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
STAMP = buildmk.stamp
-all: $(STAMP) generated_lists export_lists
+all: $(STAMP) generated_lists
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
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)
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"
@echo rebuilding $@
@cat acinclude.m4 $(libtool_m4) > $@
+export_lists:
+ @build/buildexports.sh main/exports.c lib/apr/apr.exports
+
$(LT_TARGETS):
libtoolize $(AMFLAGS) --force
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 ""