Makefile.in revision 1ca054782cb35b5f67686a41b1df75c269fa617b
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo SorceCLEAN_TARGETS = gen_test_char test_char.h httpd.exp export_files \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce exports.c export_vars.h
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo SorceSUBDIRS = mpm
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo SorceLTLIBRARY_NAME = libmain.la
225d845476b6136be9b77f528ed986bba7a7f732Simo SorceLTLIBRARY_SOURCES = \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce test_char.h \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce config.c log.c main.c vhost.c util.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce connection.c listen.c util_mutex.c mpm_common.c mpm_unix.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce util_charset.c util_cookies.c util_debug.c util_xml.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce util_expr.c util_filter.c util_pcre.c exports.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce eoc_bucket.c eor_bucket.c core_filters.c slotmem.c
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo SorceTARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorceinclude $(top_builddir)/build/rules.mk
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorceinclude $(top_srcdir)/build/library.mk
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorcegen_test_char_OBJECTS = gen_test_char.lo
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorcegen_test_char: $(gen_test_char_OBJECTS)
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozektest_char.h: gen_test_char
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek ./gen_test_char > test_char.h
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekutil.lo: test_char.h
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub HrozekEXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR)
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub HrozekEXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek# If export_files is a dependency here, but we remove it during this stage,
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek# when exports.c is generated, make will not detect that export_files is no
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek# longer here and deadlock. So, export_files can't be a dependency of
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek# delete-exports.
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekdelete-exports:
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce @if test -f exports.c; then \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek if test -f export_files; then \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek files=`cat export_files`; \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek headers="`find $$files -newer exports.c`"; \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek if test -n "$$headers"; then \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek echo Found newer headers. Will rebuild exports.c.; \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek echo rm -f exports.c export_files; \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek rm -f exports.c export_files; \
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek fi; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce else \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce rm -f exports.c; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce fi; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce fi
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekexport_files:
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek tmp=export_files_unsorted.txt; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce rm -f $$tmp && touch $$tmp; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce for dir in $(EXPORT_DIRS); do \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce ls $$dir/*.h >> $$tmp; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce done; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce for dir in $(EXPORT_DIRS_APR); do \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce done; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce sort -u $$tmp > $@; \
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce rm -f $$tmp
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorceexports.c: export_files
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekexport_vars.h: export_files
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce# Rule to make exp file for AIX DSOs
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorcehttpd.exp: exports.c export_vars.h
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce @echo "#! ." > $@
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce @echo "* This file was AUTOGENERATED at build time." >> $@
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce @echo "* Please do not edit by hand." >> $@
225d845476b6136be9b77f528ed986bba7a7f732Simo Sorce $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek