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