From: Gary V. Vaughan Date: Thu, 27 Oct 2011 04:50:53 +0000 (+0700) Subject: build: substitute paths into defs.m4sh instead of recalculating. X-Git-Tag: v2.4.2.418~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363a9a0732fe1ddfab43dd359ab7b56e31a30558;p=thirdparty%2Flibtool.git build: substitute paths into defs.m4sh instead of recalculating. * 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 --- diff --git a/Makefile.am b/Makefile.am index e6aee8522..02a659772 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/tests/defs.m4sh b/tests/defs.m4sh index 6a4807914..25bab3844 100644 --- a/tests/defs.m4sh +++ b/tests/defs.m4sh @@ -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