[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/11] build: compare `revision' rather than `correctver' in M
From: |
Gary V. Vaughan |
Subject: |
[PATCH v2 03/11] build: compare `revision' rather than `correctver' in Makefile.am. |
Date: |
Thu, 23 Sep 2010 22:21:20 +0700 |
Split out of the original 3/4 patch. Not tested separately, but
3/4 passed make distcheck originally, and so does this series as
a whole.
Okay to push?
* 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 <address@hidden>
---
ChangeLog | 9 +++++++++
Makefile.am | 20 +++++++++-----------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d9f5cbd..a04ef73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-08-31 Gary V. Vaughan <address@hidden>
+ 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'.
+
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.
diff --git a/Makefile.am b/Makefile.am
index 89189f1..abfd208 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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; \
@@ -245,8 +243,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; \
--
1.7.3
- Re: [PATCH 1/r47] maint: help2man targets should rely on the binaries they call., (continued)
Re: [PATCH 1/r47] maint: help2man targets should rely on the binaries they call., Gary V. Vaughan, 2010/09/22
[PATCH v2 01/11] maint: rearrange Makefile.am in preparation for a follow-up patch., Gary V. Vaughan, 2010/09/23
[PATCH v2 02/11] maint: don't leak developer GREP, SED etc into distribution file., Gary V. Vaughan, 2010/09/23
[PATCH v2 03/11] build: compare `revision' rather than `correctver' in Makefile.am.,
Gary V. Vaughan <=
[PATCH v2 04/11] build: avoid unnecessary directory changes in Makefile rules., Gary V. Vaughan, 2010/09/23
[PATCH v2 05/11] build: factor Makefile.am `m4sh' invocations to LT_M4SH., Gary V. Vaughan, 2010/09/23
[PATCH v2 06/11] build: name temporary files in `Makefile.am' consistently., Gary V. Vaughan, 2010/09/23
[PATCH v2 09/11] build: eliminate `ltmain.in' intermediate file., Gary V. Vaughan, 2010/09/23
[PATCH v2 08/11] build: don't hardcode repeated long paths in Makefile rules., Gary V. Vaughan, 2010/09/23
[PATCH v2 10/11] build: eliminate superfluous temporary files from `Makefile.am'., Gary V. Vaughan, 2010/09/23
[PATCH v2 11/11] maint: simplify and improve safety of bootstrap process., Gary V. Vaughan, 2010/09/23
[PATCH v2 07/11] build: make better use of automatic variables in `Makefile.am'., Gary V. Vaughan, 2010/09/23