]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
build: Extend PATH from 'pre-inst-env' script
authorMathieu Lirzin <mthl@gnu.org>
Tue, 29 Aug 2017 11:04:57 +0000 (13:04 +0200)
committerMathieu Lirzin <mthl@gnu.org>
Tue, 29 Aug 2017 15:18:18 +0000 (17:18 +0200)
* 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).

Makefile.am
configure.ac
doc/Makefile.inc

index bdcafd9334d1cf70704bfcd8f89f4fe63d757e7b..ab6533ea994a9e77f82ef42a2dbbeef9bede57c3 100644 (file)
@@ -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.
index e936e9e00a77ff99680f7165aba7003a6b650161..7c8ecb4afe35eda8afff4cbaa1af25ff8227852d 100644 (file)
@@ -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
 
index 18c137c5b83876d9f2170761d58a0c3e5f6ac176..807c29308059ff94072c0c0d1292fa7e7e9ce860 100644 (file)
@@ -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 \