]> granicus.if.org Git - apache/blobdiff - server/Makefile.in
If apr and apr-util are not in-tree, we need to be able to find the
[apache] / server / Makefile.in
index 47f028f6901e3f26d0e1f877055745d0b503205b..4c824060d2ac85a3b5c62259396b0073f7a6589a 100644 (file)
@@ -13,8 +13,8 @@ LTLIBRARY_SOURCES = \
        util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
        rfc1413.c connection.c listen.c \
        mpm_common.c util_charset.c util_debug.c util_xml.c \
-       util_filter.c exports.c buildmark.c scoreboard.c \
-       error_bucket.c protocol.c core.c request.c
+       util_filter.c $(top_builddir)/server/exports.c buildmark.c \
+       scoreboard.c error_bucket.c protocol.c core.c request.c provider.c
 
 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
 
@@ -30,27 +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
 
-exports.c:
-       $(AWK) -f $(top_srcdir)/build/make_exports.awk $(EXPORT_FILES) > $@
+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
 
-export_vars.h:
-       $(AWK) -f $(top_srcdir)/build/make_var_export.awk $(EXPORT_FILES) > $@
+# full path required to keep BSD make happy
+$(top_builddir)/server/exports.c: export_files
+       $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $<` > $@
+
+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