2 CLEAN_TARGETS = gen_test_char test_char.h httpd.exp export_files \
3 exports.c export_vars.h
7 LTLIBRARY_NAME = libmain.la
10 config.c log.c main.c vhost.c util.c \
11 util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
12 connection.c listen.c util_mutex.c mpm_common.c mpm_unix.c \
13 util_charset.c util_cookies.c util_debug.c util_xml.c \
14 util_expr.c util_filter.c util_pcre.c exports.c \
15 scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
16 eoc_bucket.c eor_bucket.c core_filters.c slotmem.c
18 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
20 include $(top_builddir)/build/rules.mk
21 include $(top_srcdir)/build/library.mk
23 gen_test_char_OBJECTS = gen_test_char.lo
24 gen_test_char: $(gen_test_char_OBJECTS)
25 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
27 test_char.h: gen_test_char
28 ./gen_test_char > test_char.h
32 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR)
33 EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
35 # If export_files is a dependency here, but we remove it during this stage,
36 # when exports.c is generated, make will not detect that export_files is no
37 # longer here and deadlock. So, export_files can't be a dependency of
40 @if test -f exports.c; then \
41 if test -f export_files; then \
42 files=`cat export_files`; \
43 headers="`find $$files -newer exports.c`"; \
44 if test -n "$$headers"; then \
45 echo Found newer headers. Will rebuild exports.c.; \
46 echo rm -f exports.c export_files; \
47 rm -f exports.c export_files; \
55 tmp=export_files_unsorted.txt; \
56 rm -f $$tmp && touch $$tmp; \
57 for dir in $(EXPORT_DIRS); do \
58 ls $$dir/*.h >> $$tmp; \
60 for dir in $(EXPORT_DIRS_APR); do \
61 (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
66 exports.c: export_files
67 $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
69 export_vars.h: export_files
70 $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
72 # Rule to make exp file for AIX DSOs
73 httpd.exp: exports.c export_vars.h
75 @echo "* This file was AUTOGENERATED at build time." >> $@
76 @echo "* Please do not edit by hand." >> $@
77 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
78 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@