]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
maint: don't leak developer GREP, SED etc into distribution file.
authorGary V. Vaughan <gary@gnu.org>
Thu, 23 Sep 2010 10:00:08 +0000 (17:00 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 24 Sep 2010 18:55:29 +0000 (01:55 +0700)
* Makefile.am: Having rearranged the file, now apply the actual
changes to follow-up.
(edit): Split into two parts...
(bootstrap_edit): ...substitutions that should happen at bootstrap
time...
(configure_edit): ...and substitutions that should not happen until
configure time.
* Makefile.am (libltdl/m4/ltversion.m4, libltdl/config/ltmain.sh)
(libtoolize.in, tests/package.m4): Use bootstrap_edit.
(libtoolize, tests/defs): Use configure_edit.
* HACKING (Release Procedure): Remove the note to workaround the
bug fixed by this changeset.
* NEWS (Bug fixes): Mention that this bug is now fixed.
Reported by Joerg Sonnenberger.

ChangeLog
HACKING
Makefile.am
NEWS

index ad6aed218b7e44d9670d37f370a747ee2ba3e58e..473de9feebe95a487ad56ac0c948736c78fa7db6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2010-08-31  Gary V. Vaughan  <gary@gnu.org>
 
+       maint: don't leak developer GREP, SED etc into distribution file.
+       * Makefile.am: Having rearranged the file, now apply the actual
+       changes to follow-up.
+       (edit): Split into two parts...
+       (bootstrap_edit): ...substitutions that should happen at bootstrap
+       time...
+       (configure_edit): ...and substitutions that should not happen until
+       configure time.
+       * Makefile.am (libltdl/m4/ltversion.m4, libltdl/config/ltmain.sh)
+       (libtoolize.in, tests/package.m4): Use bootstrap_edit.
+       (libtoolize, tests/defs): Use configure_edit.
+       * HACKING (Release Procedure): Remove the note to workaround the
+       bug fixed by this changeset.
+       * NEWS (Bug fixes): Mention that this bug is now fixed.
+       Reported by Joerg Sonnenberger.
+
        maint: rearrange Makefile.am in preparation for a follow-up patch.
        * Makefile.am (Libtool scripts.): Move this section below the
        `Bootstrap.' section...
diff --git a/HACKING b/HACKING
index 977be10663dea999e6d2638f23e11de1036a3b9e..b17de29af3b2c9ebd1e35d8d758a96482dfeede9 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -619,15 +619,6 @@ or obtained by writing to the Free Software Foundation, Inc.,
 
 * Update NEWS, ChangeLog.
 
-* Until the bug that leaks developer tool paths into the release tarballs
-  from ./bootstrap is fixed, make sure the right tools are first in your
-  PATH and then:
-       export EGREP=egrep
-       export FGREP=fgrep
-       export GREP=grep
-       export MAKE=make
-       export SED=sed
-
 * Run ./bootstrap.
 
 * Run ./configure (or create a build directory first and run configure
index dcb6d0d364e8eabedfa613790645ea418fff3957..12f7c92394fa2b456c3dd9ba8ed79f41301a7cdd 100644 (file)
@@ -75,26 +75,23 @@ EXTRA_DIST     += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \
 CLEANFILES     += libtool libtoolize libtoolize.tmp \
                  $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
 
-edit = sed \
-       -e 's,@EGREP\@,$(EGREP),g' \
-       -e 's,@FGREP\@,$(FGREP),g' \
-       -e 's,@GREP\@,$(GREP),g' \
-       -e 's,@LN_S\@,$(LN_S),g' \
-       -e 's,@MACRO_VERSION\@,$(VERSION),g' \
-       -e 's,@PACKAGE\@,$(PACKAGE),g' \
-       -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-       -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-       -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-       -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
-       -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
-       -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
-       -e 's,@SED\@,$(SED),g' \
-       -e 's,@VERSION\@,$(VERSION),g' \
-       -e 's,@aclocaldir\@,$(aclocaldir),g' \
-       -e 's,@datadir\@,$(datadir),g' \
-       -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
-       -e 's,@host_triplet\@,$(host_triplet),g' \
-       -e 's,@prefix\@,$(prefix),g'
+## These are the replacements that need to be made at bootstrap time,
+## because they must be static in distributed files, and not accidentally
+## changed by configure running on the build machine.
+bootstrap_edit  = sed \
+                 -e 's,@MACRO_VERSION\@,$(VERSION),g' \
+                 -e "s,@MACRO_REVISION\@,$$correctver,g" \
+                 -e "s,@MACRO_SERIAL\@,$$serial,g" \
+                 -e 's,@PACKAGE\@,$(PACKAGE),g' \
+                 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
+                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
+                 -e "s,@package_revision\@,$$correctver,g" \
+                 -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
+                 -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
+                 -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
+                 -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
+                 -e 's,@VERSION\@,$(VERSION),g'
 
 ## We build ltversion.m4 here, instead of from config.status,
 ## because config.status is rerun each time one of configure's
@@ -121,11 +118,9 @@ $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac ChangeLog
          cd $(srcdir); \
          rm -f $(m4dir)/ltversion.tmp; \
          serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \
-         echo $(edit) -e "s,@MACRO_REVISION\@,$$correctver,g" \
-           -e "s,@MACRO_SERIAL\@,$$serial,g" \
+         echo $(bootstrap_edit) \
            $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \
-         $(edit) -e "s,@MACRO_REVISION\@,$$correctver,g" \
-                 -e "s,@MACRO_SERIAL\@,$$serial,g" \
+         $(bootstrap_edit) \
                  $(m4dir)/ltversion.in > $(m4dir)/ltversion.tmp; \
          chmod a-w $(m4dir)/ltversion.tmp; \
          mv -f $(m4dir)/ltversion.tmp $(m4dir)/ltversion.m4; \
@@ -160,11 +155,9 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch
            \> $(auxdir)/ltmain.in; \
          $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
            > $(auxdir)/ltmain.in; \
-         echo $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-           -e "s,@package_revision\@,$$correctver," \
+         echo $(bootstrap_edit) \
            $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \
-         $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-               -e "s,@package_revision\@,$$1,g" \
+         $(bootstrap_edit) \
                $(auxdir)/ltmain.in > $(auxdir)/ltmain.tmp; \
          rm -f $(auxdir)/ltmain.in; \
          chmod a-w $(auxdir)/ltmain.tmp; \
@@ -176,8 +169,10 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch
 EXTRA_DIST += libtoolize.m4sh
 $(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am
        cd $(srcdir); \
-       rm -f libtoolize.in; \
-       $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.in
+       rm -f libtoolize.in libtoolize.tmp; \
+       $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.tmp; \
+       $(bootstrap_edit) libtoolize.tmp > libtoolize.in; \
+       rm -f libtoolize.tmp
 
 $(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc
        cd $(srcdir); \
@@ -220,16 +215,27 @@ all-local: $(LTDL_BOOTSTRAP_DEPS)
 ## Libtool scripts. ##
 ## ---------------- ##
 
+configure_edit = sed \
+       -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
+       -e 's,@aclocaldir\@,$(aclocaldir),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,@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'
+
 # The libtool distributor and the standalone libtool script.
 bin_SCRIPTS = libtoolize libtool
 
 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
        rm -f libtoolize.tmp libtoolize
-       $(timestamp); \
-       $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-               -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
-               -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \
-               -e "s,@pkgconfig_files\@,$(auxfiles),g" \
+       $(configure_edit) \
                $(srcdir)/libtoolize.in > libtoolize.tmp
        chmod a+x libtoolize.tmp
        chmod a-w libtoolize.tmp
@@ -552,7 +558,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
          echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
          echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
          echo 'm4_define([AT_PACKAGE_URL],       [@PACKAGE_URL@])'; \
-       } | $(edit) > $(srcdir)/tests/package.m4
+       } | $(bootstrap_edit) > $(srcdir)/tests/package.m4
 
 tests/atconfig: $(top_builddir)/config.status
        $(SHELL) ./config.status tests/atconfig
@@ -897,7 +903,7 @@ DIST_SUBDIRS   += $(CONF_SUBDIRS)
 check-recursive: tests/defs
 tests/defs: $(srcdir)/tests/defs.in
        rm -f tests/defs.tmp tests/defs; \
-       $(edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \
+       $(configure_edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \
        mv -f tests/defs.tmp tests/defs
 
 # Use `$(srcdir)/tests' for the benefit of non-GNU makes: this is
diff --git a/NEWS b/NEWS
index 90e33f7dcdfc07fac1d50b46505d8c9fe371bb8c..d8d692e68ce453bc9bfea771340fa13780707342 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ New in 2.4.2 2010-12-??: git version 2.4.1a, Libtool team:
 
   - The generic approximation of the command line length limit (when getconf is
     not available) works again.  Regression introduced in v2.2.6-39-g9c3d4d8.
+  - The bug that leaked developer tool paths into the release tarballs
+    from ./bootstrap is fixed.
 
 New in 2.4 2010-09-22: git version 2.2.11a, Libtool team: