2 CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
4 DISTCLEAN_TARGETS = httpd.exp
5 EXTRACLEAN_TARGETS = 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 rfc1413.c connection.c listen.c \
15 mpm_common.c util_charset.c util_debug.c util_xml.c \
16 util_filter.c exports.c buildmark.c scoreboard.c \
17 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 include $(top_builddir)/build/rules.mk
22 include $(top_srcdir)/build/library.mk
24 gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
25 gen_test_char: $(gen_test_char_OBJECTS)
26 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
28 test_char.h: gen_test_char
29 ./gen_test_char > test_char.h
33 EXPORT_FILES = $(top_srcdir)/include/*.h \
34 $(top_srcdir)/os/$(OS_DIR)/*.h \
35 $(top_srcdir)/srclib/apr/include/*.h \
36 $(top_srcdir)/srclib/apr-util/include/*.h \
37 $(top_srcdir)/modules/http/*.h
40 @if test -f exports.c; then \
41 headers="`find $(EXPORT_FILES) -newer exports.c`" ; \
42 if test -n "$$headers"; then \
43 echo Found newer headers. Will rebuild exports.c. ; \
44 echo rm -f exports.c ; \
50 $(AWK) -f $(top_srcdir)/build/make_exports.awk $(EXPORT_FILES) > $@
53 $(AWK) -f $(top_srcdir)/build/make_var_export.awk $(EXPORT_FILES) > $@
55 # wtf does this have to be explicit????
58 # Rule to make def file for OS/2 core dll
59 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
60 cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
61 $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/ "\1"/' >> $@
62 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/ "\1"/' >> $@
64 # Rule to make exp file for AIX DSOs
65 httpd.exp: exports.c export_vars.h
67 @echo "* This file was AUTOGENERATED at build time." >> $@
68 @echo "* Please do not edit by hand." >> $@
69 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
70 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@