More DRY inspired cleanup. 72 hours... etc etc. * 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 <g...@gnu.org> --- Makefile.am | 5 ++++- tests/defs.m4sh | 11 +++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 821b58e..ac86f5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -270,17 +270,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 6a48079..25bab38 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 -- 1.7.7.1 Cheers, -- Gary V. Vaughan (gary AT gnu DOT org)