]> granicus.if.org Git - apache/commitdiff
Fix apxs to allow it to work when the build directory is somewhere
authorJeff Trawick <trawick@apache.org>
Wed, 5 Jun 2002 11:59:26 +0000 (11:59 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 5 Jun 2002 11:59:26 +0000 (11:59 +0000)
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

CHANGES
build/install-bindist.sh.in
support/apxs.in

diff --git a/CHANGES b/CHANGES
index 959316aca5f792f72caedc8e81990f9051d243b2..f1861ea27206f821fe861a6ab0b0fa2ef0b8d362 100644 (file)
--- 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
index 9a2a9e7554abecaf71777a15e1d3380260a43ac4..d3693ee6c44d2ff40d75dedbb6832de86339d86d 100755 (executable)
@@ -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 = ;;"`
index 3a9692123ccb9f0e6fc351675b3564a40b0311e2..e57d5ed6d8983860a4986e78c752d1541ad2d6cb 100644 (file)
@@ -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