]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
build: substitute paths into defs.m4sh instead of recalculating.
authorGary V. Vaughan <gary@gnu.org>
Thu, 27 Oct 2011 04:50:53 +0000 (11:50 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sat, 5 Nov 2011 09:58:31 +0000 (16:58 +0700)
* Makefile.am (configure_edit): Add substitutions for aux_dir,
macro_dir and srcdir.
* tests/defs.m4sh: Don't recalculate srcdir.
(aux_dir, macro_dir, srcdir): Convert to absolute paths.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Makefile.am
tests/defs.m4sh

index e6aee852262dda6cdc194aa1489abfb202ae534e..02a659772e497bdf27a4a93410397ea2bf090eaa 100644 (file)
@@ -268,17 +268,20 @@ all-local: $(LTDL_BOOTSTRAP_DEPS)
 configure_edit = $(SED) \
        -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
        -e 's,@aclocaldir\@,$(aclocaldir),g' \
+       -e 's,@aux_dir\@,$(aux_dir),g' \
        -e 's,@datadir\@,$(datadir),g' \
        -e 's,@EGREP\@,$(EGREP),g' \
        -e 's,@FGREP\@,$(FGREP),g' \
        -e 's,@GREP\@,$(GREP),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@LN_S\@,$(LN_S),g' \
+       -e 's,@macro_dir\@,$(macro_dir),g' \
        -e "s,@pkgconfig_files\@,$(auxfiles),g" \
        -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
        -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \
        -e 's,@prefix\@,$(prefix),g' \
-       -e 's,@SED\@,$(SED),g'
+       -e 's,@SED\@,$(SED),g' \
+       -e 's,@srcdir\@,$(srcdir),g'
 
 # The libtool distributor and the standalone libtool script.
 bin_SCRIPTS = libtoolize libtool
index 6a4807914bd6d57590a5ea3bdcb926305e9c10df..25bab384484eb816a4db6aa1227bb1de165ef6b8 100644 (file)
@@ -52,11 +52,6 @@ DEBUG | debug )
   ;;
 esac
 
-if test -z "$srcdir"; then
-  srcdir=`$ECHO "$0" | $SED "$dirname; s,/tests\$,,"`
-  test "$srcdir" = "$0" && srcdir=.
-fi
-
 # func_msg arg...
 # Echo message with prefix.
 func_msg ()
@@ -341,9 +336,9 @@ func_exec ()
 
 # Shared global variables for test scripts
 prefix=./_inst-`echo "$0" | sed 's,.*/,,; s,-.*,,'`
-srcdir=`cd $srcdir && pwd`
-macro_dir=$srcdir/libltdl/m4
-aux_dir=$srcdir/libltdl/config
+srcdir=`cd '@srcdir@' && pwd`
+macro_dir=`cd '@macro_dir@' && pwd`
+aux_dir=`cd '@aux_dir@' && pwd`
 scripts="$aux_dir/ltmain.m4sh $srcdir/libtoolize.m4sh"
 
 # Unset some MAKE... variables that may cause $MAKE to act like a