]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
build: compare `revision' rather than `correctver' in Makefile.am.
authorGary V. Vaughan <gary@gnu.org>
Thu, 23 Sep 2010 10:37:00 +0000 (17:37 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 24 Sep 2010 18:55:29 +0000 (01:55 +0700)
* Makefile.am (rebuild): Set the shell variable `revision' rather
than `correctver' for clarity of purpose.
(bootstrap_edit, libltdl/config/ltmain.sh): Adjust.
(libltdl/m4/ltversion.m4): Likewise, and alse, instead of munging
the serial number comment line with set, extract `macro_version'
from this file, and compare it directly with `revision'.
(libtool): Likewise for `package_revision'.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
ChangeLog
Makefile.am

index f939b295fbb2c88ddf3a74563470e24c3939de5d..a56ffc1adb307a7b0a541d00632902ff8562ec91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-31  Gary V. Vaughan  <gary@gnu.org>
+
+       build: compare `revision' rather than `correctver' in Makefile.am.
+       * Makefile.am (rebuild): Set the shell variable `revision' rather
+       than `correctver' for clarity of purpose.
+       (bootstrap_edit, libltdl/config/ltmain.sh): Adjust.
+       (libltdl/m4/ltversion.m4): Likewise, and alse, instead of munging
+       the serial number comment line with set, extract `macro_version'
+       from this file, and compare it directly with `revision'.
+       (libtool): Likewise for `package_revision'.
+
 2010-09-24  Gary V. Vaughan  <gary@gnu.org>
 
        libtool: remove redundant unsubstituted shell var defaults.
index c932118124ec47ce812f31ce93d6a7e9179a2e5c..0d4fde94d63393ef926d2dd63844e1f829ca5dd4 100644 (file)
@@ -57,7 +57,7 @@ timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \
          *) TIMESTAMP="" ;; \
        esac
 
-rebuild = rebuild=:; $(timestamp); correctver=$$1
+rebuild = rebuild=:; $(timestamp); revision=$$1
 
 
 # ---------- #
@@ -80,13 +80,13 @@ CLEANFILES     += libtool libtoolize libtoolize.tmp \
 ## 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_REVISION\@,$$revision,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_revision\@,$$revision,g" \
                  -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
                  -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
                  -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
@@ -107,9 +107,8 @@ EXTRA_DIST += $(m4dir)/ltversion.in $(srcdir)/$(m4dir)/ltversion.m4
 $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac ChangeLog
        @target='$(srcdir)/$(m4dir)/ltversion.m4'; $(rebuild); \
        if test -f "$$target"; then \
-         set dummy `sed -n '/^# serial /p' "$$target"`; shift; \
-         actualver=1.$$3; \
-         test "$$actualver" = "$$correctver" && rebuild=false; \
+         eval `sed -n '/^macro_revision=/p' $(srcdir)/$(m4dir)/ltversion.m4`; \
+         test "$$macro_revision" = "$$revision" && rebuild=false; \
        fi; \
        for prereq in $?; do \
          case $$prereq in *ChangeLog | *configure.ac);; *) rebuild=:;; esac; \
@@ -117,7 +116,7 @@ $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac ChangeLog
        if $$rebuild; then \
          cd $(srcdir); \
          rm -f $(m4dir)/ltversion.tmp; \
-         serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \
+         serial=`echo "$$revision" | sed 's,^1[.],,g'`; \
          echo $(bootstrap_edit) \
            $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \
          $(bootstrap_edit) \
@@ -141,8 +140,7 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch
        @target='$(srcdir)/$(auxdir)/ltmain.sh'; $(rebuild); \
        if test -f "$$target"; then \
          eval `sed -n '/^package_revision=/p' "$$target"`; \
-         actualver=$$package_revision; \
-         test "$$actualver" = "$$correctver" && rebuild=false; \
+         test "$$package_revision" = "$$revision" && rebuild=false; \
        fi; \
        for prereq in $?; do \
          case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
@@ -247,8 +245,8 @@ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
 libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
        @target=libtool; $(rebuild); \
        if test -f "$$target"; then \
-         set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
-         test "$$actualver" = "$$correctver" && rebuild=false; \
+         eval `sed -n '/^package_revision=/p' "$$target"`; \
+         test "$$package_revision" = "$$revision" && rebuild=false; \
        fi; \
        for prereq in $?; do \
          case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \