2 CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
3 ApacheCoreOS2.def buildmarked.c
4 DISTCLEAN_TARGETS = httpd.exp
5 EXTRACLEAN_TARGETS = export_files exports.c export_vars.h
9 LTLIBRARY_NAME = libmain.la
12 config.c log.c main.c vhost.c util.c \
13 util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
14 connection.c listen.c \
15 mpm_common.c util_charset.c util_debug.c util_xml.c \
16 util_filter.c exports.c buildmarked.c \
17 scoreboard.c error_bucket.c protocol.c core.c request.c provider.c
19 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
21 PHONY_TARGETS = $(srcdir)/buildmark.c
23 include $(top_builddir)/build/rules.mk
24 include $(top_srcdir)/build/library.mk
26 buildmarked.c: $(srcdir)/buildmark.c
27 cp $(srcdir)/buildmark.c $@
29 gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
30 gen_test_char: $(gen_test_char_OBJECTS)
31 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
33 test_char.h: gen_test_char
34 ./gen_test_char > test_char.h
38 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(APR_INCLUDEDIR) $(APU_INCLUDEDIR) $(top_srcdir)/modules/http
40 # If export_files is a dependency here, but we remove it during this stage,
41 # when exports.c is generated, make will not detect that export_files is no
42 # longer here and deadlock. So, export_files can't be a dependency of
45 @if test -f exports.c; then \
46 if test -f export_files; then \
47 files=`cat export_files`; \
48 headers="`find $$files -newer exports.c`"; \
49 if test -n "$$headers"; then \
50 echo Found newer headers. Will rebuild exports.c.; \
51 echo rm -f exports.c export_files; \
52 rm -f exports.c export_files; \
60 tmp=export_files_unsorted.txt; \
61 rm -f $$tmp && touch $$tmp; \
62 for dir in $(EXPORT_DIRS); do \
63 ls $$dir/*.h >> $$tmp; \
68 exports.c: export_files
69 $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
71 export_vars.h: export_files
72 $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
74 # Rule to make def file for OS/2 core dll
75 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
76 cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
77 $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/ "\1"/' >> $@
78 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/ "\1"/' >> $@
80 # Rule to make exp file for AIX DSOs
81 httpd.exp: exports.c export_vars.h
83 @echo "* This file was AUTOGENERATED at build time." >> $@
84 @echo "* Please do not edit by hand." >> $@
85 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
86 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@