summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-08-29 13:04:57 +0200
committerMathieu Lirzin <mthl@gnu.org>2017-08-29 17:18:18 +0200
commit361f25da9cdfa390bcfde88f31c71e7403bb2f3b (patch)
tree3207f33f1dca0c495ecf88ef01c89d7897bf8226
parent64031f2aaf721043eff0aecec840bce71cec97ae (diff)
downloadautomake-361f25da9cdfa390bcfde88f31c71e7403bb2f3b.tar.gz
build: Extend PATH from 'pre-inst-env' script
* configure.ac (ACLOCAL, AUTOMAKE): Use 'pre-inst-env'. * Makefile.am (extend_PATH): Delete. * doc/Makefile.inc (update_mans, $(srcdir)/%D%/amhello-1.0.tar.gz) (setup_autotools_paths): Use 'pre-inst-env' instead of $(extend_PATH).
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac4
-rw-r--r--doc/Makefile.inc8
3 files changed, 5 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index bdcafd933..ab6533ea9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,11 +73,6 @@ generated_file_finalize = $(AM_V_at) \
nodist_noinst_SCRIPTS += pre-inst-env
CLEANFILES += $(noinst_SCRIPTS)
-# For some tests or targets, we need to have the just-build automake and
-# aclocal scripts avaiable on PATH.
-extend_PATH = \
- { PATH='$(abs_builddir)/bin$(PATH_SEPARATOR)'$$PATH && export PATH; }
-
# The master location for INSTALL is lib/INSTALL.
# This is where "make fetch" will install new versions.
# Make sure we also update this copy.
diff --git a/configure.ac b/configure.ac
index e936e9e00..7c8ecb4af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,8 +67,8 @@ AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
# aclocal and automake, hence the remake rules must use those versions
# as well. The extra quoting is to cater to cases when the build
# directory contains whitespace or shell metacharacters.
-ACLOCAL="\"`pwd`/bin/aclocal-$APIVERSION\""
-AUTOMAKE="\"`pwd`/bin/automake-$APIVERSION\""
+ACLOCAL="\"`pwd`/pre-inst-env\" aclocal-$APIVERSION"
+AUTOMAKE="\"`pwd`/pre-inst-env\" automake-$APIVERSION"
AC_PROG_LN_S
diff --git a/doc/Makefile.inc b/doc/Makefile.inc
index 18c137c5b..807c29308 100644
--- a/doc/Makefile.inc
+++ b/doc/Makefile.inc
@@ -38,8 +38,7 @@ EXTRA_DIST += %D%/help2man
update_mans = \
$(AM_V_GEN): \
&& $(MKDIR_P) %D% \
- && $(extend_PATH) \
- && $(PERL) $(srcdir)/%D%/help2man --output=$@
+ && ./pre-inst-env $(PERL) $(srcdir)/%D%/help2man --output=$@
%D%/aclocal.1 %D%/automake.1:
$(AM_V_GEN): \
@@ -78,8 +77,7 @@ dist_noinst_DATA += $(amhello_sources)
dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
setup_autotools_paths = { \
- $(extend_PATH) \
- && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+ ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
&& AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
&& AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
&& AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
@@ -98,7 +96,7 @@ $(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
&& $(setup_autotools_paths) \
&& ( \
{ $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
- && $(am_AUTORECONF) -vfi \
+ && $(abs_builddir)/pre-inst-env $(am_AUTORECONF) -vfi \
&& ./configure \
&& $(MAKE) $(AM_MAKEFLAGS) distcheck \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \