]> granicus.if.org Git - apache/blob - server/Makefile.in
Ah, we don't even need the 'ls -1' - 'ls' suffices.
[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         rfc1413.c connection.c listen.c \
15         mpm_common.c util_charset.c util_debug.c util_xml.c \
16         util_filter.c $(top_builddir)/server/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 delete-exports: export_files
36         @if test -f exports.c; then \
37             files=`cat $?`; \
38             headers="`find $$files -newer exports.c`"; \
39             if test -n "$$headers"; then \
40                 echo Found newer headers. Will rebuild exports.c.; \
41                 echo rm -f exports.c; \
42                 rm -f exports.c; \
43             fi; \
44         fi
45
46 export_files:
47         tmp=export_files_unsorted.txt; \
48         rm -f $$tmp && touch $$tmp; \
49         for dir in $(EXPORT_DIRS); do \
50             ls $$dir/*.h >> $$tmp; \
51         done; \
52         sort -u $$tmp > $@; \
53         rm -f $$tmp
54
55 # full path required to keep BSD make happy
56 $(top_builddir)/server/exports.c: export_files
57         $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
58
59 export_vars.h: export_files
60         $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
61
62 # wtf does this have to be explicit????
63 exports.lo: exports.c
64
65 # Rule to make def file for OS/2 core dll
66 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
67         cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
68         $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
69         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/  "\1"/' >> $@
70
71 # Rule to make exp file for AIX DSOs
72 httpd.exp: exports.c export_vars.h
73         @echo "#! ." > $@
74         @echo "* This file was AUTOGENERATED at build time." >> $@
75         @echo "* Please do not edit by hand." >> $@
76         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
77         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@