Akim Demaille wrote: > Le 7 juin 2012 à 15:15, Jim Meyering a écrit : > >> That is fine, too. Thanks. >> >> You can tell that I rarely run these rules from a non-srcdir >> build directory. > > Yeah, shame on you :) > > Don't you have several builds in parallel? Different generations > of the compilers, and different compiler options. > > Here are a few more such changes. The first one is about > do-release-commit-and-tag. The impetus came from VPATH, > but I couldn't resist addressing other issues while at it :( > > From 2a0a9b6a821752f5cdef9e3a5ee78120d16b91f4 Mon Sep 17 00:00:00 2001 > From: Akim Demaille <a...@lrde.epita.fr> > Date: Thu, 7 Jun 2012 16:17:30 +0200 > Subject: [PATCH 1/2] do-release-commit-and-tag: support VPATH builds. > > * build-aux/do-release-commit-and-tag: Prefer $(...) to `...`. > (noteworthy): Defined earlier to factor its value. > (noteworthy_stub): New. > Use it to factor. > (help_version): Split into... > (help, version): these. > Adjust the option processing part. > Support "--option=value" in addition to "--option value". > (builddir): New. > (--builddir): New option. > * top/README-release: Document this. > Reword slightly so that the reader cannot understand that he > has to do these steps before calling do-release-commit-and-tag.
Thanks for the improvements! A couple of nits: ... > diff --git a/build-aux/do-release-commit-and-tag > b/build-aux/do-release-commit-and-tag ... > @@ -106,12 +125,12 @@ case $type in > esac > > # Extract package name from Makefile. > -pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) \ > - || die 'failed to determine package name from Makefile' > +Makefile=$builddir/Makefile > +pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $Makefile) \ $builddir is not guaranteed to be sanitized, so we should double-quote $Makefile: -pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $Makefile) \ +pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' "$Makefile") \ > + || die 'failed to determine package name from $Makefile' Here, you'll want to use double quotes, so that $Makefile expands.