bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / server / Makefile
1 top_srcdir   = /bottlenecks/rubbos/app/httpd-2.0.64
2 top_builddir = /bottlenecks/rubbos/app/httpd-2.0.64
3 srcdir       = /bottlenecks/rubbos/app/httpd-2.0.64/server
4 builddir     = /bottlenecks/rubbos/app/httpd-2.0.64/server
5 VPATH        = /bottlenecks/rubbos/app/httpd-2.0.64/server
6
7 CLEAN_TARGETS = gen_test_char test_char.h \
8         ApacheCoreOS2.def
9 DISTCLEAN_TARGETS = httpd.exp
10 EXTRACLEAN_TARGETS = export_files exports.c export_vars.h
11
12 SUBDIRS = mpm
13
14 LTLIBRARY_NAME    = libmain.la
15 LTLIBRARY_SOURCES = \
16     test_char.h \
17         config.c log.c main.c vhost.c util.c \
18         util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
19         rfc1413.c connection.c listen.c \
20         mpm_common.c util_charset.c util_debug.c util_xml.c \
21         util_filter.c exports.c buildmark.c \
22         scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
23         eoc_bucket.c
24
25 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
26
27 include $(top_builddir)/build/rules.mk
28 include $(top_srcdir)/build/library.mk
29
30 gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
31 gen_test_char: $(gen_test_char_OBJECTS)
32         $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
33
34 test_char.h: gen_test_char
35         ./gen_test_char > test_char.h
36
37 util.lo: test_char.h
38
39 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(top_srcdir)/modules/http
40 EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
41
42 # If export_files is a dependency here, but we remove it during this stage,
43 # when exports.c is generated, make will not detect that export_files is no
44 # longer here and deadlock.  So, export_files can't be a dependency of
45 # delete-exports.
46 delete-exports:
47         @if test -f exports.c; then \
48             if test -f export_files; then \
49                 files=`cat export_files`; \
50                 headers="`find $$files -newer exports.c`"; \
51                 if test -n "$$headers"; then \
52                    echo Found newer headers. Will rebuild exports.c.; \
53                    echo rm -f exports.c export_files; \
54                    rm -f exports.c export_files; \
55                 fi; \
56             else \
57                 rm -f exports.c; \
58             fi; \
59         fi
60
61 export_files:
62         tmp=export_files_unsorted.txt; \
63         rm -f $$tmp && touch $$tmp; \
64         for dir in $(EXPORT_DIRS); do \
65             ls $$dir/*.h >> $$tmp; \
66         done; \
67         for dir in $(EXPORT_DIRS_APR); do \
68             (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
69         done; \
70         sort -u $$tmp > $@; \
71         rm -f $$tmp
72
73 exports.c: export_files
74         $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
75
76 export_vars.h: export_files
77         $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
78
79 # Rule to make def file for OS/2 core dll
80 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
81         cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
82         $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
83         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/  "\1"/' >> $@
84
85 # Rule to make exp file for AIX DSOs
86 httpd.exp: exports.c export_vars.h
87         @echo "#! ." > $@
88         @echo "* This file was AUTOGENERATED at build time." >> $@
89         @echo "* Please do not edit by hand." >> $@
90         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
91         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@