]> granicus.if.org Git - apache/blobdiff - server/Makefile.in
Merge r1741310, r1741461 from trunk:
[apache] / server / Makefile.in
index d0f7c0eeb5c08ce9a807b99080a61e43836e4d37..9663eec7dcad89728a61dde99618398d484ab179 100644 (file)
@@ -1,29 +1,29 @@
 
-TARGET_EXPORTS    = apache.exports
-CLEAN_TARGETS = gen_test_char test_char.h gen_uri_delims uri_delims.h \
-       $(TARGET_EXPORTS) ApacheCoreOS2.def
-DISTCLEAN_TARGETS = httpd.exp
-EXTRACLEAN_TARGETS = exports.c export_vars.h
+CLEAN_TARGETS = gen_test_char test_char.h \
+       ApacheCoreOS2.def httpd.exp export_files \
+       exports.c export_vars.h
 
 SUBDIRS = mpm
 
 LTLIBRARY_NAME    = libmain.la
 LTLIBRARY_SOURCES = \
-    test_char.h \
-       config.c log.c main.c vhost.c util.c \
-       util_script.c util_md5.c util_cfgtree.c util_ebcdic.c \
-       rfc1413.c connection.c listen.c \
-        mpm_common.c util_charset.c util_debug.c util_xml.c \
-       util_filter.c exports.c buildmark.c scoreboard.c \
-       error_bucket.c protocol.c core.c request.c
-
-TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h \
-       httpd.exp
-
-include $(top_srcdir)/build/rules.mk
+       config.c log.c main.c vhost.c util.c util_fcgi.c \
+       util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
+       connection.c listen.c util_mutex.c mpm_common.c mpm_unix.c \
+       util_charset.c util_cookies.c util_debug.c util_xml.c \
+       util_filter.c util_pcre.c util_regex.c exports.c \
+       scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
+       eoc_bucket.c eor_bucket.c core_filters.c \
+       util_expr_parse.c util_expr_scan.c util_expr_eval.c
+
+LTLIBRARY_DEPENDENCIES = test_char.h
+
+TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
+
+include $(top_builddir)/build/rules.mk
 include $(top_srcdir)/build/library.mk
 
-gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
+gen_test_char_OBJECTS = gen_test_char.lo
 gen_test_char: $(gen_test_char_OBJECTS)
        $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
 
@@ -32,44 +32,72 @@ test_char.h: gen_test_char
 
 util.lo: test_char.h
 
-EXPORT_FILES = $(top_srcdir)/srclib/apr/apr.exports \
-       $(top_srcdir)/srclib/apr-util/aprutil.exports \
-       $(TARGET_EXPORTS)
+EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR)
+EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
 
+# If export_files is a dependency here, but we remove it during this stage,
+# when exports.c is generated, make will not detect that export_files is no
+# longer here and deadlock.  So, export_files can't be a dependency of
+# delete-exports.
 delete-exports:
-       @if test -f $(TARGET_EXPORTS); then \
-                   headers="`find $(top_srcdir)/include/*.h -newer $(TARGET_EXPORTS)`" ; \
-                   if test -n "$$headers"; then \
-                       echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
-                       echo rm -f $(TARGET_EXPORTS) ; \
-                       rm -f $(TARGET_EXPORTS) ; \
-                   fi \
+       @if test -f exports.c; then \
+           if test -f export_files; then \
+               files=`cat export_files`; \
+               headers="`find $$files -newer exports.c`"; \
+               if test -n "$$headers"; then \
+                  echo Found newer headers. Will rebuild exports.c.; \
+                  echo rm -f exports.c export_files; \
+                  rm -f exports.c export_files; \
+               fi; \
+           else \
+               rm -f exports.c; \
+           fi; \
        fi
 
+export_files:
+       ( for dir in $(EXPORT_DIRS); do \
+             ls $$dir/*.h ; \
+         done; \
+         for dir in $(EXPORT_DIRS_APR); do \
+             ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
+         done; \
+       ) | sed -e s,//,/,g | sort -u > $@
 
-$(TARGET_EXPORTS):
-       $(AWK) -f $(top_srcdir)/srclib/apr/build/make_export.awk \
-               $(top_srcdir)/include/*.h \
-               $(top_srcdir)/os/$(OS_DIR)/*.h > $@
-
-exports.c: $(EXPORT_FILES)
-       (cat $(EXPORT_FILES) | $(top_srcdir)/build/buildexports.sh $(top_srcdir)) > $@
-
-export_vars.h:
-       $(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 > $@
+exports.c: export_files
+       $(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
 
-# wtf does this have to be explicit????
-exports.lo: exports.c
+export_vars.h: export_files
+       $(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
 
 # Rule to make def file for OS/2 core dll
-ApacheCoreOS2.def: exports.c $(top_srcdir)/os/$(OS_DIR)/core_header.def
+ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
        cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
        $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
+       $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/  "\1"/' >> $@
 
 # Rule to make exp file for AIX DSOs
 httpd.exp: exports.c export_vars.h
-       echo "#! ." > $@
-       echo "* This file was AUTOGENERATED at build time." >> $@
-       echo "* Please do not edit by hand." >> $@
-       $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
-       $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
+       @echo "#! ." > $@
+       @echo "* This file was AUTOGENERATED at build time." >> $@
+       @echo "* Please do not edit by hand." >> $@
+       $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
+       $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
+
+
+#   developer stuff
+#   (we really don't expect end users to use these targets!)
+#
+util_expr_scan.c util_expr_parse.c util_expr_parse.h: util_expr_scan.l util_expr_parse.y
+       bison -pap_expr_yy --defines=$(builddir)/util_expr_parse.h \
+           -o $(builddir)/util_expr_parse.c $(srcdir)/util_expr_parse.y
+       flex -Pap_expr_yy -o $(builddir)/util_expr_scan.c $(srcdir)/util_expr_scan.l
+       set -e ; \
+       for f in util_expr_scan.c util_expr_parse.c util_expr_parse.h ; do \
+               sed -e "s|\"$(builddir)/|\"|g" < $(builddir)/$$f > \
+                       $(builddir)/$$f.$$$$ && \
+               mv $(builddir)/$$f.$$$$ $(builddir)/$$f ; \
+       done
+       # work around flex bug
+       # http://sourceforge.net/tracker/?func=detail&aid=3029024&group_id=97492&atid=618177
+       perl -0777 -p -i -e 's,\n(void|int) ap_expr_yy[gs]et_column[^\n]+\)\n.*?\n\},,gs' \
+               $(builddir)/util_expr_scan.c