-TARGET_EXPORTS = apache.exports
CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
- $(TARGET_EXPORTS) ApacheCoreOS2.def
+ ApacheCoreOS2.def
DISTCLEAN_TARGETS = httpd.exp
EXTRACLEAN_TARGETS = exports.c export_vars.h
LTLIBRARY_SOURCES = \
test_char.h \
config.c log.c main.c vhost.c util.c \
- util_script.c util_md5.c util_cfgtree.c util_ebcdic.c \
+ 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
+ mpm_common.c util_charset.c util_debug.c util_xml.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
+TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
-include $(top_srcdir)/build/rules.mk
+include $(top_builddir)/build/rules.mk
include $(top_srcdir)/build/library.mk
gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
util.lo: test_char.h
-EXPORT_FILES = $(top_srcdir)/srclib/apr/apr.exports \
- $(top_srcdir)/srclib/apr-util/aprutil.exports \
- $(TARGET_EXPORTS)
-
-delete-exports:
- @if test -f $(TARGET_EXPORTS); then \
- headers="`find $(top_srcdir)/include/*.h -newer $(TARGET_EXPORTS)`" ; \
- if test -n "$$headers"; then \
- echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
- echo rm -f $(TARGET_EXPORTS) ; \
- rm -f $(TARGET_EXPORTS) ; \
- fi \
+EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$OS_DIR $APR_INCLUDEDIR $APU_INCLUDEDIR $(top_srcdir)/modules/http
+
+delete-exports: export_files
+ @if test -f exports.c; then \
+ 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
-$(TARGET_EXPORTS):
- $(AWK) -f $(top_srcdir)/srclib/apr/build/make_export.awk \
- $(top_srcdir)/include/*.h \
- $(top_srcdir)/os/$(OS_DIR)/*.h > $@
+# full path required to keep BSD make happy
+$(top_builddir)/server/exports.c: export_files
+ $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $<` > $@
-exports.c: $(EXPORT_FILES)
- (cat $(EXPORT_FILES) | $(top_srcdir)/build/buildexports.sh $(top_srcdir)) > $@
-
-export_vars.h:
- $(AWK) -f $(top_srcdir)/build/make_var_export.awk \
- $(top_srcdir)/include/*.h \
- $(top_srcdir)/os/$(OS_DIR)/*.h \
- $(top_srcdir)/srclib/apr/include/*.h \
- $(top_srcdir)/srclib/apr-util/include/*.h > $@
+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
@echo "#! ." > $@
@echo "* This file was AUTOGENERATED at build time." >> $@
@echo "* Please do not edit by hand." >> $@
- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
+ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
+ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@