]> granicus.if.org Git - apache/blob - server/Makefile.in
bc872a35f42f986a68202422f4c6e537ab0140cf
[apache] / server / Makefile.in
1
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
7
8 SUBDIRS = mpm
9
10 LTLIBRARY_NAME    = libmain.la
11 LTLIBRARY_SOURCES = \
12     test_char.h \
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
19
20 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
21
22 include $(top_builddir)/build/rules.mk
23 include $(top_srcdir)/build/library.mk
24
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)
28
29 test_char.h: gen_test_char
30         ./gen_test_char > test_char.h
31
32 util.lo: test_char.h
33
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
38
39 delete-exports:
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 ; \
45                         rm -f exports.c ; \
46                     fi \
47         fi
48
49 exports.c:
50         $(AWK) -f $(top_srcdir)/build/make_exports.awk $(EXPORT_FILES) > $@
51
52 export_vars.h:
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 > $@
58
59 # wtf does this have to be explicit????
60 exports.lo: exports.c
61
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"/' >> $@
67
68 # Rule to make exp file for AIX DSOs
69 httpd.exp: exports.c export_vars.h
70         @echo "#! ." > $@
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' >> $@