1*4882a593SmuzhiyunFrom 00281390e82db18fe0de4033be4045f9391a8ee5 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
3*4882a593SmuzhiyunDate: Thu, 15 Nov 2018 14:04:29 +0100
4*4882a593SmuzhiyunSubject: [PATCH] server/Makefile.in: handle separate
5*4882a593Smuzhiyun APR_INCLUDE_DIR/APU_INCLUDE_DIR
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunIf APR_INCLUDEDIR and APU_INCLUDEDIR point to different directories,
8*4882a593Smuzhiyunbut for example APU_INCLUDEDIR contains both the apr headers and apu
9*4882a593Smuzhiyunheaders, the "export_files" file will contain duplicate header files,
10*4882a593Smuzhiyuncausing the exports.c file to contain duplicate definitions, making
11*4882a593Smuzhiyunthe build fail.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunThis commit fixes that by making sure we only use the apr headers from
14*4882a593SmuzhiyunAPR_INCLUDEDIR and the apu headers from the APU_INCLUDEDIR.
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
17*4882a593SmuzhiyunUpstream: https://bz.apache.org/bugzilla/show_bug.cgi?id=62930
18*4882a593Smuzhiyun---
19*4882a593Smuzhiyun server/Makefile.in | 6 ++----
20*4882a593Smuzhiyun 1 file changed, 2 insertions(+), 4 deletions(-)
21*4882a593Smuzhiyun
22*4882a593Smuzhiyundiff --git a/server/Makefile.in b/server/Makefile.in
23*4882a593Smuzhiyunindex 1fa334467d..2258f0bdf2 100644
24*4882a593Smuzhiyun--- a/server/Makefile.in
25*4882a593Smuzhiyun+++ b/server/Makefile.in
26*4882a593Smuzhiyun@@ -34,7 +34,6 @@ test_char.h: gen_test_char
27*4882a593Smuzhiyun util.lo: test_char.h
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR)
30*4882a593Smuzhiyun-EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun # If export_files is a dependency here, but we remove it during this stage,
33*4882a593Smuzhiyun # when exports.c is generated, make will not detect that export_files is no
34*4882a593Smuzhiyun@@ -60,9 +59,8 @@ export_files:
35*4882a593Smuzhiyun 	      ls $$dir/*.h ; \
36*4882a593Smuzhiyun 	  done; \
37*4882a593Smuzhiyun 	  echo "$(top_srcdir)/server/mpm_fdqueue.h"; \
38*4882a593Smuzhiyun-	  for dir in $(EXPORT_DIRS_APR); do \
39*4882a593Smuzhiyun-	      ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
40*4882a593Smuzhiyun-	  done; \
41*4882a593Smuzhiyun+	  ls $(APR_INCLUDE_DIR)/{apr.h,apr_*.h} 2>/dev/null; \
42*4882a593Smuzhiyun+	  ls $(APU_INCLUDE_DIR)/{apu.h,apu_*.h} 2>/dev/null; \
43*4882a593Smuzhiyun 	) | sed -e s,//,/,g | sort -u > $@
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun exports.c: export_files
46*4882a593Smuzhiyun--
47*4882a593Smuzhiyun2.19.1
48*4882a593Smuzhiyun
49