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