]> granicus.if.org Git - apache/commitdiff
Get Apache to use the new generated exports list. This works on my
authorRyan Bloom <rbb@apache.org>
Fri, 1 Dec 2000 07:32:11 +0000 (07:32 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 1 Dec 2000 07:32:11 +0000 (07:32 +0000)
Linux machine, but I am pretty sure there are going to be problems for
others.  The idea here, is to be able to generate a list of the exported
functions from APR.  This list needs to be correct, we can not list
functions that are not exported on the platform being built on.  To
accomplish this, we generate a list of the exported symbols when we
configure APR.  As a part of this list, we also include all of the
#if macros that surround those symbols.  Apache then uses this list
of functions and macros to generate a file that refers to each of those
symbols.  Because we have the macros, when we compile this file, the
compiler ignores any symbols that aren't valid on this platform.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87142 13f79535-47bb-0310-9956-ffa450edef68

build/build.mk
build/build2.mk
build/buildexports.sh

index d4a58ec5c73485040f2377282a9c2902a565b8c0..b5dbb907f21da34c63acc95fb4819747aea37178 100644 (file)
@@ -60,7 +60,7 @@
 
 STAMP = buildmk.stamp
 
-all: $(STAMP) generated_lists export_lists
+all: $(STAMP) generated_lists
        @$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
 
 generated_lists:
@@ -72,9 +72,6 @@ generated_lists:
        @echo config_m4_files = `find . -name config.m4` > $@
        @n=`helpers/PrintPath libtoolize`; echo libtool_prefix = `dirname $$n`/.. >> $@
 
-export_lists:
-       @build/buildexports.sh main/exports.c support/httpd.exp
-
 $(STAMP): build/buildcheck.sh
        @build/buildcheck.sh && touch $(STAMP)
 
index e974df35540a55a72532b0d0b5a6575d43154011..b13dd67fcac14e7dea825b1a61b85f148fb27d01 100644 (file)
@@ -72,7 +72,7 @@ APR_TARGETS = $(apr_configure) $(apr_private.h_in) $(mm_configure)
 
 PCRE_TARGETS = $(pcre_configure)
 
-targets = .deps aclocal.m4 $(APACHE_TARGETS) $(APR_TARGETS) $(PCRE_TARGETS)
+targets = .deps aclocal.m4 $(APACHE_TARGETS) $(APR_TARGETS) $(PCRE_TARGETS) export_lists
 
 cross_compile_warning = "warning: AC_TRY_RUN called without default to allow cross compiling"
 
@@ -87,6 +87,9 @@ aclocal.m4: acinclude.m4 lib/apr/apr_common.m4 lib/apr/hints.m4 $(libtool_m4)
        @echo rebuilding $@
        @cat acinclude.m4 $(libtool_m4) > $@
 
+export_lists:
+       @build/buildexports.sh main/exports.c lib/apr/apr.exports
+
 $(LT_TARGETS):
        libtoolize $(AMFLAGS) --force
 
index 72a14e4f557910d4e248128c11bdd83ca673c162..1a04a5f948a28b1f3df6100d79c3a158e91d8058 100755 (executable)
@@ -7,19 +7,36 @@ echo "/* This is an ugly hack that needs to be here, so that libtool will"
 echo " * link all of the APR functions into server regardless of whether"
 echo " * the base server uses them."
 echo " */"
-
+echo ""
+cd lib/apr/include 
+for file in *.h
+do
+    echo "#include \"$file\""
+done
+cd ../../../
 echo ""
 
 while read LINE
 do
+    if [ "x`echo $LINE | egrep  '^[:space:]*APR_'`" != "x" ]; then
+        ifline=`echo "$LINE" |\
+            sed -e 's%^\(.*\)%\#if \1%'`
+        echo $ifline
+    fi
     if [ "x`echo $LINE | egrep  '^[:space:]*apr_'`" != "x" ]; then
-        newline=`echo "$LINE" |\
-            sed -e 's%^\(.*\)%extern const void *\1\\(void\);%'`
-        echo $newline
+#        newline=`echo "$LINE" |\
+#            sed -e 's%^\(.*\)%extern const void *\1\\(void\);%'`
+#        echo $newline
         newline=`echo "$LINE" |\
             sed -e 's%^\(.*\)%const void *ap_hack_\1 = \(const void *\)\1\;%'`
         echo $newline
     fi
+    if [ "x`echo $LINE | egrep  '^[:space:]*\/APR_'`" != "x" ]; then
+        endline=`echo "$LINE" |\
+            sed -e 's%^\/\(.*\)%\#endif \/\*\1\*\/%'`
+        echo "$endline"
+    fi
 done
 
 echo ""