From: Wilfredo Sanchez Date: Fri, 29 Nov 2002 07:21:07 +0000 (+0000) Subject: If apr and apr-util are not in-tree, we need to be able to find the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22604025d41b4609eaf32870a24b190a71d45aae;p=apache 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 --- diff --git a/acinclude.m4 b/acinclude.m4 index de8f5891da..0b8086e6cb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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)`" 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