From: Gary V. Vaughan Date: Sat, 22 Nov 2003 10:03:13 +0000 (+0000) Subject: * configure.ac (LASTRELEASE): Calculate it as best as we can from X-Git-Tag: release-1-9b~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f3c6f4c5e3124520b799ef69c63646502e3f082;p=thirdparty%2Flibtool.git * configure.ac (LASTRELEASE): Calculate it as best as we can from AC_PACKAGE_VERSION. * Makefile.am (distdir): Remove dependency on timestamps so that it is possible to roll a dist without contacting the cvs server. Use `make cvs-release' for that. (cvs-news): Extracted from cvs-dist. (cvs-dist): Depend on cvs-news. (CHECK_LASTRELEASE): Check LASTRELEASE has been set. (prev-tarball): New rule. Use LASTRELEASE to make sure the previous release tarball is present. (cvs-diff): Use CHECK_LASTRELEASE. (xdelta): Ditto. (cvs-release): Depend on prev-tarball, timestamps, cvs-news and fetch. Provided you set LASTRELEASE appropriately, making a full cvs release is just a matter of `make cvs-release', and submitting the files to ftp-upload. --- diff --git a/ChangeLog b/ChangeLog index 4c627b8eb..dcd23d26f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2003-11-22 Gary V. Vaughan + + * configure.ac (LASTRELEASE): Calculate it as best as we can from + AC_PACKAGE_VERSION. + * Makefile.am (distdir): Remove dependency on timestamps so that + it is possible to roll a dist without contacting the cvs server. + Use `make cvs-release' for that. + (cvs-news): Extracted from cvs-dist. + (cvs-dist): Depend on cvs-news. + (CHECK_LASTRELEASE): Check LASTRELEASE has been set. + (prev-tarball): New rule. Use LASTRELEASE to make sure the + previous release tarball is present. + (cvs-diff): Use CHECK_LASTRELEASE. + (xdelta): Ditto. + (cvs-release): Depend on prev-tarball, timestamps, cvs-news and + fetch. Provided you set LASTRELEASE appropriately, making a full + cvs release is just a matter of `make cvs-release', and submitting + the files to ftp-upload. + 2003-11-19 Gary V. Vaughan * m4/libtool.m4 (_LT_PROG_LTMAIN): Ensure config.status has a diff --git a/Makefile.am b/Makefile.am index c248a5eb1..47a1130e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,18 +51,6 @@ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_COMMANDS= $(SHELL) $(config_status) chmod +x $@ -# TSDEPS will be defined to TSDEPS_DIST at `make dist' time -TSDEPS = -TSDEPS_DIST = ChangeLog m4/libtool.m4 -CVS = cvs # set it to `:' to avoid CVS operations - -.PHONY: timestamps update-timestamps -timestamps distdir: update-timestamps -update-timestamps: - @if (cd $(srcdir) && test -d CVS && \ - $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \ - echo "Cannot make dist before commit"; exit 1; else :; fi - .PHONY: configure-subdirs configure-subdirs distdir: $(DIST_MAKEFILE_LIST) @DIST_MAKEFILE_LIST@: @@ -83,19 +71,59 @@ install-data-hook: uninstall-local: -rm -rf $(DESTDIR)$(pkgdatadir)/libltdl -################################################################ -## -## Everything past here is useful to the maintainer, but probably not -## to anybody else (snarfed from automake/Makefile.am). -## -XDELTA = xdelta -XDELTA_OPTIONS = --pristine -9 +## ---------------------------------------------------------------- ## +## Everything past here is useful to the maintainer, but probably ## +## not to anybody else (inspiration from automake/Makefile.am). ## +## ---------------------------------------------------------------- ## + +CHECK_LASTRELEASE = if test -z "$(LASTRELEASE)"; \ + then echo "LASTRELEASE is not set"; exit 1; fi + +.PHONY: cvs-release +cvs-release: version-check prev-tarball cvs-news fetch cvs-dist cvs-diff xdelta + @$(CHECK_LASTRELEASE); tarname="$(PACKAGE)-$(VERSION).tar.gz"; \ + diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \ + xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \ + echo " *** Upload $$tarname, $$tarname.sig,";\ + echo " *** $$tarname.directive.asc, $$diffname,"; \ + echo " *** $$diffname.sig, $$diffname.directive.asc,"; \ + echo " *** $$xdeltaname, $$xdeltaname.sig and";\ + echo " *** $$xdeltaname.directive.asc to either";\ + echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org."; + +.PHONY: version-check +version-check: + @case $(VERSION) in \ + *[acegikmoqsuwy]) \ + echo "Version \`$(VERSION)' is not a releasable version, please read:"; \ + echo " http://www.gnu.org/software/libtool/contribute.html"; \ + exit 1; \ + ;; \ + esac -GPG = gpg # set it to `:' to avoid gpg operations +.PHONY: prev-tarball +prev-tarball: +## Make sure we have the previous release tarball in the tree. + @$(CHECK_LASTRELEASE); ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \ + if test -f $$ofile; then :; \ + else echo "Cannot make xdelta without $$ofile"; exit 1; fi + +# TSDEPS will be defined to TSDEPS_DIST at `make dist' time +TSDEPS = +TSDEPS_DIST = ChangeLog m4/libtool.m4 +CVS = cvs # set it to `:' to avoid CVS operations + +.PHONY: timestamps update-timestamps +timestamps: update-timestamps +update-timestamps: + @if (cd $(srcdir) && test -d CVS && \ + $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \ + echo "Cannot make cvs-dist before commit"; exit 1; else :; fi -.PHONY: cvs-dist cvs-diff xdelta cvs-release -cvs-dist: + +.PHONY: cvs-news +cvs-news: timestamps ## Make sure the NEWS file is up-to-date: @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \ then :; \ @@ -103,6 +131,53 @@ cvs-dist: echo "NEWS not updated; not releasing" 1>&2; \ exit 1; \ fi + +## Program to use to fetch files. +WGET = wget +WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~ + +## Files that we fetch and which we compare against. +## FIXME should be a lot more here +FETCHFILES = \ +./INSTALL \ +config/config.guess \ +libltdl/config.guess \ +config/config.sub \ +libltdl/config.sub \ +config/texinfo.tex + +## Fetch the latest versions of files we care about. +.PHONY: fetch +fetch: + rm -rf Fetchdir > /dev/null 2>&1 + mkdir Fetchdir +## If a get fails then that is a problem. + (cd Fetchdir && \ + $(WGETSGO)/autoconf/autoconf/INSTALL; \ + $(WGETSGO)/config/config/config.guess; \ + $(WGETSGO)/config/config/config.sub; \ + $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex ) +## Don't exit after test because we want to give as many errors as +## possible. + @stat=0; for file in $(FETCHFILES); do \ + fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \ + if diff -u $(srcdir)/$$file $$fetchedfile \ + >>Fetchdir/update.patch 2>/dev/null; then :; \ + else \ + stat=1; \ + echo "Updating $(srcdir)/$$file..."; \ + cp $$fetchedfile $(srcdir)/$$file; \ + fi; \ + done; \ + test $$stat = 1 && \ + echo "See Fetchdir/update.patch for a log of the changes."; \ + exit $$stat + + +GPG = gpg # set it to `:' to avoid gpg operations + +.PHONY: cvs-dist +cvs-dist: cvs-news ## Build the distribution: $(MAKE) distcheck ## Finally, if everything was successful, commit the last changes and tag @@ -121,23 +196,26 @@ cvs-dist: && $(GPG) --clearsign $$ofile.directive \ && rm -f $$ofile.directive +.PHONY: cvs-diff cvs-diff: ## Figure out which cvs tags we are diffing, and if the diff works we ## compress it and then generate the signatures needed for FSF ftp-upload: thisver=`echo "release-$(VERSION)" | sed 's/\./-/g'`; \ - if test -z "$$OLDVERSION"; then \ - prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ - else prevno="$$OLDVERSION"; fi; \ - prevver=release-`echo $$prevno | sed 's/\./-/g'`; \ - ofile="$(PACKAGE)-$$prevno-$(VERSION).diff.gz"; \ + $(CHECK_LASTRELEASE); \ + prevver=release-`echo $(LASTRELEASE) | sed 's/\./-/g'`; \ + ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \ $(CVS) -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \ - | GZIP=$(GZIP_ENV) gzip -c > $$ofile; \ + | GZIP=$(GZIP_ENV) gzip -c > $$ofile \ && $(GPG) --detach-sign $$ofile \ && echo "directory: libtool" > $$ofile.directive \ && $(GPG) --clearsign $$ofile.directive \ && rm -f $$ofile.directive -xdelta: +XDELTA = xdelta +XDELTA_OPTIONS = --pristine -9 + +.PHONY: xdelta +xdelta: prev-tarball ## Make sure xdelta exists; @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \ then :;\ @@ -148,57 +226,13 @@ xdelta: ## Generate the delta file (xdelta has wierd exit statuses, so we need to ## add some shell code to keep make happy), and then generate the signatures ## for FSF ftp-upload: - if test -z "$$OLDVERSION"; then \ - prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ - else prevno="$$OLDVERSION"; fi; \ - ofile="$(PACKAGE)-$$prevno-$(VERSION).xdelta"; \ + $(CHECK_LASTRELEASE); \ + ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \ ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \ - $(PACKAGE)-$$prevno.tar.gz $(PACKAGE)-$(VERSION).tar.gz \ + $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \ $$ofile 2>&1` \ && : ) \ && $(GPG) --detach-sign $$ofile \ && echo "directory: libtool" > $$ofile.directive \ && $(GPG) --clearsign $$ofile.directive \ && rm -f $$ofile.directive - -cvs-release: cvs-dist cvs-diff xdelta - -## Program to use to fetch files. -WGET = wget -WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~ - -## Files that we fetch and which we compare against. -## FIXME should be a lot more here -FETCHFILES = \ -./INSTALL \ -config/config.guess \ -libltdl/config.guess \ -config/config.sub \ -libltdl/config.sub \ -config/texinfo.tex - -## Fetch the latest versions of files we care about. -fetch: - rm -rf Fetchdir > /dev/null 2>&1 - mkdir Fetchdir -## If a get fails then that is a problem. - (cd Fetchdir && \ - $(WGETSGO)/autoconf/autoconf/INSTALL; \ - $(WGETSGO)/config/config/config.guess; \ - $(WGETSGO)/config/config/config.sub; \ - $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex ) -## Don't exit after test because we want to give as many errors as -## possible. - @stat=0; for file in $(FETCHFILES); do \ - fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \ - if diff -u $(srcdir)/$$file $$fetchedfile \ - >>Fetchdir/update.patch 2>/dev/null; then :; \ - else \ - stat=1; \ - echo "Updating $(srcdir)/$$file..."; \ - cp $$fetchedfile $(srcdir)/$$file; \ - fi; \ - done; \ - test $$stat = 1 && \ - echo "See Fetchdir/update.patch for a log of the changes."; \ - exit $$stat diff --git a/configure.ac b/configure.ac index 6f3a703a2..1107500bc 100644 --- a/configure.ac +++ b/configure.ac @@ -41,12 +41,60 @@ dnl AC_CONFIG_FILES([tests/atlocal]) ## Display a configure time version banner. ## ## ---------------------------------------- ## +# Calculating the previous version is somewhat involved, so do it once +# here, and SUBST the result for the maintainer release rules. The +# versioning scheme we use is described here: +# http://www.gnu.org/software/libtool/contribute.html + +# First we break the version number up into its constituent parts. +LT_MAJOR=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']` +LT_MINOR=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']` +LT_MICRO=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']` +LT_ALPHA=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']` + +test "$LT_MINOR" = "AC_PACKAGE_VERSION" && LT_MINOR=0 +test "$LT_MICRO" = "AC_PACKAGE_VERSION" && LT_MICRO="" + +# Then we try to work out what the release before this one would have been +# numbered. The only time we come unstuck is when this is the first release +# from a stable branch (LT_MICRO=LT_ALPHA=""), so OLDVERSION is the last +# release from the old stable branch, and we don't know what version that +# was, so leave it unset so that the Makefile can complain. +case $LT_ALPHA in + [[ab]]) + case $LT_MICRO in + [.[01]]) + LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;; + *) + LASTRELEASE="$LT_MAJOR.$LT_MINOR$LT_MICRO" ;; + esac + ;; + [[cegikmoqsuwy]]) + LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;; + [[dfhjlnprtvxz]]) + LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;; + *) # No LT_ALPHA component + case $LT_MICRO in + .0) + LASTRELEASE="" ;; + .1) + LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;; + .*) + lt_micro_value=`echo $LT_MICRO | sed 's,^\.,,'` + LASTRELEASE="$LT_MAJOR.$LT_MINOR.`expr $lt_micro_value - 1`" ;; + *) + LASTRELEASE="" ;; + esac + ;; +esac +AC_SUBST([LASTRELEASE]) + # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. TIMESTAMP= -case AC_PACKAGE_VERSION in - [*[acegikmoqsuwy])] +case $LT_ALPHA in + [[acegikmoqsuwy]]) TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog` AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION$TIMESTAMP]) echo @@ -55,7 +103,6 @@ esac AC_SUBST([TIMESTAMP]) - ## ------------------------ ## ## Automake Initialisation. ## ## ------------------------ ##