]> granicus.if.org Git - apache/blob - server/Makefile.in
skiplist: Add skiplist capability to httpd
[apache] / server / Makefile.in
1
2 CLEAN_TARGETS = gen_test_char test_char.h \
3         ApacheCoreOS2.def httpd.exp export_files \
4         exports.c export_vars.h
5
6 SUBDIRS = mpm
7
8 LTLIBRARY_NAME    = libmain.la
9 LTLIBRARY_SOURCES = \
10         config.c log.c main.c vhost.c util.c \
11         util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
12         connection.c listen.c util_mutex.c mpm_common.c mpm_unix.c \
13         util_charset.c util_cookies.c util_debug.c util_xml.c \
14         util_filter.c util_pcre.c util_regex.c exports.c \
15         scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
16         eoc_bucket.c eor_bucket.c core_filters.c \
17         util_expr_parse.c util_expr_scan.c util_expr_eval.c \
18         skiplist.c
19 LTLIBRARY_DEPENDENCIES = test_char.h
20
21 TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
22
23 include $(top_builddir)/build/rules.mk
24 include $(top_srcdir)/build/library.mk
25
26 gen_test_char_OBJECTS = gen_test_char.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_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR)
36 EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
37
38 # If export_files is a dependency here, but we remove it during this stage,
39 # when exports.c is generated, make will not detect that export_files is no
40 # longer here and deadlock.  So, export_files can't be a dependency of
41 # delete-exports.
42 delete-exports:
43         @if test -f exports.c; then \
44             if test -f export_files; then \
45                 files=`cat export_files`; \
46                 headers="`find $$files -newer exports.c`"; \
47                 if test -n "$$headers"; then \
48                    echo Found newer headers. Will rebuild exports.c.; \
49                    echo rm -f exports.c export_files; \
50                    rm -f exports.c export_files; \
51                 fi; \
52             else \
53                 rm -f exports.c; \
54             fi; \
55         fi
56
57 export_files:
58         ( for dir in $(EXPORT_DIRS); do \
59               ls $$dir/*.h ; \
60           done; \
61           for dir in $(EXPORT_DIRS_APR); do \
62               ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
63           done; \
64         ) | sed -e s,//,/,g | sort -u > $@
65
66 exports.c: export_files
67         $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
68
69 export_vars.h: export_files
70         $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
71
72 # Rule to make def file for OS/2 core dll
73 ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
74         cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
75         $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
76         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/  "\1"/' >> $@
77
78 # Rule to make exp file for AIX DSOs
79 httpd.exp: exports.c export_vars.h
80         @echo "#! ." > $@
81         @echo "* This file was AUTOGENERATED at build time." >> $@
82         @echo "* Please do not edit by hand." >> $@
83         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
84         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
85
86
87 #   developer stuff
88 #   (we really don't expect end users to use these targets!)
89 #
90 util_expr_scan.c util_expr_parse.c util_expr_parse.h: util_expr_scan.l util_expr_parse.y
91         bison -pap_expr_yy --defines=$(builddir)/util_expr_parse.h \
92             -o $(builddir)/util_expr_parse.c $(srcdir)/util_expr_parse.y
93         flex -Pap_expr_yy -o $(builddir)/util_expr_scan.c $(srcdir)/util_expr_scan.l
94         set -e ; \
95         for f in util_expr_scan.c util_expr_parse.c util_expr_parse.h ; do \
96                 sed -e "s|\"$(builddir)/|\"|g" < $(builddir)/$$f > \
97                         $(builddir)/$$f.$$$$ && \
98                 mv $(builddir)/$$f.$$$$ $(builddir)/$$f ; \
99         done
100         # work around flex bug
101         # http://sourceforge.net/tracker/?func=detail&aid=3029024&group_id=97492&atid=618177
102         perl -0777 -p -i -e 's,\n(void|int) ap_expr_yy[gs]et_column[^\n]+\)\n.*?\n\},,gs' \
103                 $(builddir)/util_expr_scan.c