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 <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2011-10-27 11:50:53 +07:00
parent 99df003684
commit 363a9a0732
2 changed files with 7 additions and 9 deletions

View 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

View 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