]> granicus.if.org Git - apache/blob - server/Makefile.in
698dda6af1b4f743ab57675a422a3a1043acfc17
[apache] / server / Makefile.in
1
2 CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
3         ApacheCoreOS2.def
4 DISTCLEAN_TARGETS = httpd.exp
5 EXTRACLEAN_TARGETS = export_files exports.c export_vars.h
6
7 SUBDIRS = mpm
8
9 LTLIBRARY_NAME    = libmain.la
10 LTLIBRARY_SOURCES = \
11     test_char.h \
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         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 \
17         scoreboard.c error_bucket.c protocol.c core.c request.c provider.c
18
19 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
20
21 include $(top_builddir)/build/rules.mk
22 include $(top_srcdir)/build/library.mk
23
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)
27
28 test_char.h: gen_test_char
29         ./gen_test_char > test_char.h
30
31 util.lo: test_char.h
32
33 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(APR_INCLUDEDIR) $(APU_INCLUDEDIR) $(top_srcdir)/modules/http
34
35 # If export_files is a dependency here, but we remove it during this stage,
36 # when exports.c is generated, make will not detect that export_files is no
37 # longer here and deadlock.  So, export_files can't be a dependency of
38 # delete-exports.
39 delete-exports:
40         @if test -f exports.c; then \
41             if test -f export_files; then \
42                 files=`cat export_files`; \
43                 headers="`find $$files -newer exports.c`"; \
44                 if test -n "$$headers"; then \
45                    echo Found newer headers. Will rebuild exports.c.; \
46                    echo rm -f exports.c export_files; \
47                    rm -f exports.c export_files; \
48                 fi; \
49             else \
50                 rm -f exports.c; \
51             fi; \
52         fi
53
54 export_files:
55         tmp=export_files_unsorted.txt; \
56         rm -f $$tmp && touch $$tmp; \
57         for dir in $(EXPORT_DIRS); do \
58             ls $$dir/*.h >> $$tmp; \
59         done; \
60         sort -u $$tmp > $@; \
61         rm -f $$tmp
62
63 exports.c: export_files
64         $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
65
66 export_vars.h: export_files
67         $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
68
69 # Rule to make def file for OS/2 core dll
70 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
71         cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
72         $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
73         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/  "\1"/' >> $@
74
75 # Rule to make exp file for AIX DSOs
76 httpd.exp: exports.c export_vars.h
77         @echo "#! ." > $@
78         @echo "* This file was AUTOGENERATED at build time." >> $@
79         @echo "* Please do not edit by hand." >> $@
80         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
81         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@