From: Jeff Trawick Date: Wed, 5 Jun 2002 11:59:26 +0000 (+0000) Subject: Fix apxs to allow it to work when the build directory is somewhere X-Git-Tag: 2.0.37~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20235e3688481409863dccc09bd406d9b1809e0c;p=apache Fix apxs to allow it to work when the build directory is somewhere besides server-root/build. PR: 8453 Submitted by: a number of people hit this problem and offered hints or partial fixes; Thom May and Pier Fumagalli had a patch to apxs, a subset of which mostly fixed this problem; there were hints in PRs 8453 and 9316 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95522 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 959316aca5..f1861ea272 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.37 + *) Fix apxs to allow it to work when the build directory is somewhere + besides server-root/build. PR 8453 + [Jeff Trawick and a host of others] + *) Allow ap_discard_request_body to be called multiple times in the same request. Essentially, ap_http_filter keeps track of whether it has sent an EOS bucket up the stack, if so, it will only ever diff --git a/build/install-bindist.sh.in b/build/install-bindist.sh.in index 9a2a9e7554..d3693ee6c4 100755 --- a/build/install-bindist.sh.in +++ b/build/install-bindist.sh.in @@ -120,7 +120,7 @@ else lcopy bindist/error $SR/error 755 644 fi -sed -e "s;^#!\@perlbin\@.*;#!$PERL;" -e "s;\@prefix\@;$SR;" \ +sed -e "s;^#!\@perlbin\@.*;#!$PERL;" -e "s;\@exp_installbuilddir\@;$SR/build;" \ support/apxs.in > $SR/bin/apxs PRE=`grep "^prefix = " bindist/build/config_vars.mk` PRE=`echo $PRE | sed -e "s;prefix = ;;"` diff --git a/support/apxs.in b/support/apxs.in index 3a9692123c..e57d5ed6d8 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -61,13 +61,15 @@ package apxs; ## Configuration ## -my $prefix = "@prefix@"; -my $CFG_PREFIX = $prefix; +my %config_vars = (); + +my $installbuilddir = "@exp_installbuilddir@"; +get_config_vars("$installbuilddir/config_vars.mk",\%config_vars); # read the configuration variables once -my %config_vars = (); -get_config_vars("$prefix/build/config_vars.mk",\%config_vars); +my $prefix = get_vars("prefix"); +my $CFG_PREFIX = $prefix; my $exec_prefix = get_vars("exec_prefix"); my $CFG_TARGET = get_vars("progname"); my $CFG_SYSCONFDIR = get_vars("sysconfdir"); @@ -324,6 +326,7 @@ if ($opt_g) { $data =~ s|%NAME%|$name|sg; $data =~ s|%TARGET%|$CFG_TARGET|sg; $data =~ s|%PREFIX%|$prefix|sg; + $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg; my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s); @@ -418,7 +421,7 @@ if ($opt_c) { $la =~ s|\.c$|.la|; my $o = $s; $o =~ s|\.c$|.o|; - push(@cmds, "$prefix/build/libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $opt -c -o $lo $s && touch $slo"); + push(@cmds, "$installbuilddir/libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $opt -c -o $lo $s && touch $slo"); unshift(@objs, $lo); } @@ -443,7 +446,7 @@ if ($opt_c) { $opt .= " -l$opt_l"; } - push(@cmds, "$prefix/build/libtool $ltflags --mode=link $CFG_CC -o $dso_file -rpath $CFG_LIBEXECDIR -module -avoid-version $opt $lo"); + push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file -rpath $CFG_LIBEXECDIR -module -avoid-version $opt $lo"); # execute the commands &execute_cmds(@cmds); @@ -474,8 +477,8 @@ if ($opt_i or $opt_e) { $t =~ s|^.+/([^/]+)$|$1|; $t =~ s|\.la$|\.so|; if ($opt_i) { - push(@cmds, "$prefix/build/instdso.sh SH_LIBTOOL='" . - "$prefix/build/libtool' $f $CFG_LIBEXECDIR"); + push(@cmds, "$installbuilddir/instdso.sh SH_LIBTOOL='" . + "$installbuilddir/libtool' $f $CFG_LIBEXECDIR"); push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t"); } @@ -592,7 +595,7 @@ __DATA__ builddir=$(shell pwd) top_srcdir=%PREFIX% top_builddir=%PREFIX% -include %PREFIX%/build/special.mk +include %INSTALLBUILDDIR%/special.mk # the used tools APXS=apxs