]> granicus.if.org Git - apache/blob - server/Makefile.in
750790205305ce8faf5655444a27efff868ec5ba
[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.c
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.c \
21         httpd.exp
22
23 include $(top_srcdir)/build/rules.mk
24 include $(top_srcdir)/build/library.mk
25
26 gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
27 gen_test_char: $(gen_test_char_OBJECTS)
28         $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
29
30 test_char.h: gen_test_char
31         ./gen_test_char > test_char.h
32
33 util.lo: test_char.h
34
35 EXPORT_FILES = $(top_srcdir)/srclib/apr/apr.exports \
36         $(top_srcdir)/srclib/apr-util/aprutil.exports \
37         $(TARGET_EXPORTS)
38
39 delete-exports:
40         @if test -f $(TARGET_EXPORTS); then \
41                     headers="`find $(top_srcdir)/include/*.h -newer $(TARGET_EXPORTS)`" ; \
42                     if test -n "$$headers"; then \
43                         echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
44                         echo rm -f $(TARGET_EXPORTS) ; \
45                         rm -f $(TARGET_EXPORTS) ; \
46                     fi \
47         fi
48
49
50 $(TARGET_EXPORTS):
51         $(AWK) -f $(top_srcdir)/srclib/apr/build/make_export.awk \
52                 $(top_srcdir)/include/*.h \
53                 $(top_srcdir)/os/$(OS_DIR)/*.h > $@
54
55 exports.c: $(EXPORT_FILES)
56         (cat $(EXPORT_FILES) | $(top_srcdir)/build/buildexports.sh $(top_srcdir)) > $@
57
58 export_vars.c:
59         $(AWK) -f $(top_srcdir)/build/make_var_export.awk $(top_srcdir)/include/*.h $(top_srcdir)/os/$(OS_DIR)/*.h $(top_srcdir)/srclib/apr/include/*.h $(top_srcdir)/srclib/apr-util/include/*.h > $@
60
61 # wtf does this have to be explicit????
62 exports.lo: exports.c
63
64 # Rule to make def file for OS/2 core dll
65 ApacheCoreOS2.def: exports.c $(top_srcdir)/os/$(OS_DIR)/core_header.def
66         cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
67         $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
68
69 # Rule to make exp file for AIX DSOs
70 httpd.exp: exports.c export_vars.c
71         echo "#! ." > $@
72         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
73         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@