2 TARGET_EXPORTS = apache.exports
3 CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
4 $(TARGET_EXPORTS) ApacheCoreOS2.def
5 DISTCLEAN_TARGETS = httpd.exp
6 EXTRACLEAN_TARGETS = exports.c export_vars.h
10 LTLIBRARY_NAME = libmain.la
13 config.c log.c main.c vhost.c util.c \
14 util_script.c util_md5.c util_cfgtree.c util_ebcdic.c \
15 rfc1413.c connection.c listen.c \
16 mpm_common.c util_charset.c util_debug.c util_xml.c \
17 util_filter.c exports.c buildmark.c scoreboard.c \
18 error_bucket.c protocol.c core.c request.c
20 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
22 include $(top_srcdir)/build/rules.mk
23 include $(top_srcdir)/build/library.mk
25 gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
26 gen_test_char: $(gen_test_char_OBJECTS)
27 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
29 test_char.h: gen_test_char
30 ./gen_test_char > test_char.h
34 EXPORT_FILES = $(top_srcdir)/include/*.h \
35 $(top_srcdir)/os/$(OS_DIR)/*.h \
36 $(top_srcdir)/srclib/apr/include/*.h \
37 $(top_srcdir)/srclib/apr-util/include/*.h
40 @if test -f exports.c; then \
41 headers="`find $(top_srcdir)/include/*.h -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 \
54 $(top_srcdir)/include/*.h \
55 $(top_srcdir)/os/$(OS_DIR)/*.h \
56 $(top_srcdir)/srclib/apr/include/*.h \
57 $(top_srcdir)/srclib/apr-util/include/*.h > $@
59 # wtf does this have to be explicit????
62 # Rule to make def file for OS/2 core dll
63 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
64 cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
65 $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/ "\1"/' >> $@
66 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/ "\1"/' >> $@
68 # Rule to make exp file for AIX DSOs
69 httpd.exp: exports.c export_vars.h
71 @echo "* This file was AUTOGENERATED at build time." >> $@
72 @echo "* Please do not edit by hand." >> $@
73 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
74 $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@