summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorWilfredo Sanchez <wsanchez@apache.org>2002-11-29 08:21:07 +0100
committerWilfredo Sanchez <wsanchez@apache.org>2002-11-29 08:21:07 +0100
commit9018dc55c1105a8df2d5b848cbd7eeacb91517d1 (patch)
tree335a2c2777f5434be0e03f8fd71f06d1b5d05233 /server
parentChanges to reduce dependency on in-tree apr and apr-util. (diff)
downloadapache2-9018dc55c1105a8df2d5b848cbd7eeacb91517d1.tar.xz
apache2-9018dc55c1105a8df2d5b848cbd7eeacb91517d1.zip
If apr and apr-util are not in-tree, we need to be able to find the
include directory for each in order to generate the server/exports.c and server/export_vars.h files. configure.in: - Provide APR_INCLUDEDIR, APU_INCLUDEDIR. server/Makefile.in: - Use $APR_INCLUDEDIR $APU_INCLUDEDIR vars. - Add export_files target to generate a list of headers with symbols to export, use that list to generate exports.c and export_vars.h. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/.cvsignore1
-rw-r--r--server/Makefile.in38
2 files changed, 23 insertions, 16 deletions
diff --git a/server/.cvsignore b/server/.cvsignore
index a0a82683f3..e406311138 100644
--- a/server/.cvsignore
+++ b/server/.cvsignore
@@ -5,6 +5,7 @@ Makefile
*.la
test_char.h
gen_test_char
+export_files
exports.c
export_vars.h
Debug
diff --git a/server/Makefile.in b/server/Makefile.in
index ab8ddd7790..4c824060d2 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -30,28 +30,34 @@ test_char.h: gen_test_char
util.lo: test_char.h
-EXPORT_FILES = $(top_srcdir)/include/*.h \
- $(top_srcdir)/os/$(OS_DIR)/*.h \
- $(top_srcdir)/srclib/apr/include/*.h \
- $(top_srcdir)/srclib/apr-util/include/*.h \
- $(top_srcdir)/modules/http/*.h
+EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$OS_DIR $APR_INCLUDEDIR $APU_INCLUDEDIR $(top_srcdir)/modules/http
-delete-exports:
+delete-exports: export_files
@if test -f exports.c; then \
- headers="`find $(EXPORT_FILES) -newer exports.c`" ; \
- if test -n "$$headers"; then \
- echo Found newer headers. Will rebuild exports.c. ; \
- echo rm -f exports.c ; \
- rm -f exports.c ; \
- fi \
+ files=`cat $<`; \
+ headers="`find $$files -newer exports.c`"; \
+ if test -n "$$headers"; then \
+ echo Found newer headers. Will rebuild exports.c.; \
+ echo rm -f exports.c; \
+ rm -f exports.c; \
+ fi; \
fi
+export_files:
+ tmp=export_files_unsorted.txt; \
+ rm -f $$tmp && touch $$tmp; \
+ for dir in $(EXPORT_DIRS); do \
+ find $$dir -maxdepth 1 -type f -name '*.h' >> $$tmp; \
+ done; \
+ cat $$tmp | sort | uniq > $@; \
+ rm -f $$tmp
+
# full path required to keep BSD make happy
-$(top_builddir)/server/exports.c:
- $(AWK) -f $(top_srcdir)/build/make_exports.awk $(EXPORT_FILES) > $@
+$(top_builddir)/server/exports.c: export_files
+ $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $<` > $@
-export_vars.h:
- $(AWK) -f $(top_srcdir)/build/make_var_export.awk $(EXPORT_FILES) > $@
+export_vars.h: export_files
+ $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $<` > $@
# wtf does this have to be explicit????
exports.lo: exports.c