]> granicus.if.org Git - apache/commitdiff
If apr and apr-util are not in-tree, we need to be able to find the
authorWilfredo Sanchez <wsanchez@apache.org>
Fri, 29 Nov 2002 07:21:07 +0000 (07:21 +0000)
committerWilfredo Sanchez <wsanchez@apache.org>
Fri, 29 Nov 2002 07:21:07 +0000 (07:21 +0000)
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

acinclude.m4
server/.cvsignore
server/Makefile.in

index de8f5891dafe54b1be274b99d1e05d4c405aa1c5..0b8086e6cbae8f3e2e011d23affd24a2273b7f4d 100644 (file)
@@ -88,7 +88,9 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(INSTALL_PROG_FLAGS)
   APACHE_SUBST(DSO_MODULES)
   APACHE_SUBST(APR_BINDIR)
+  APACHE_SUBST(APR_INCLUDEDIR)
   APACHE_SUBST(APU_BINDIR)
+  APACHE_SUBST(APU_INCLUDEDIR)
 
   abs_srcdir="`(cd $srcdir && pwd)`"
 
index a0a82683f37088457bf0c2fcef286b69dd0bdd78..e406311138b0d29c3c19cdc61757beaf3eed26c0 100644 (file)
@@ -5,6 +5,7 @@ Makefile
 *.la
 test_char.h
 gen_test_char
+export_files
 exports.c
 export_vars.h
 Debug
index ab8ddd779099c8cda7c319ec9b0a58010d27847e..4c824060d2ac85a3b5c62259396b0073f7a6589a 100644 (file)
@@ -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