|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH] bootstrap: support Automake-NG in $buildreq* bootstrap (check_versions): Handle automake and aclocal from
Automake-NG specially. They can be specified as respectively the "automake-ng" and "aclocal-ng" requirements. Signed-off-by: Stefano Lattarini <stefano.lattarini@...> --- build-aux/bootstrap | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 5aa73cc..c0960f5 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2012-04-19.22; # UTC +scriptversion=2012-04-23.22; # UTC # Bootstrap this package from checked-out sources. @@ -433,6 +433,21 @@ check_versions() { GZIP) ;; # Do not use $GZIP: it contains gzip options. *) eval "app=\${$appvar-$app}" ;; esac + # Special handling for (still experimental) Automake-NG programs. + # They remain named as the mainstream Automake programs ("automake", + # and "aclocal") to avoid gratuitous incompatibilities with + # pre-existing usages (by, say, autoreconf, or custom autogen.sh + # scripts), but correctly identify themselves (as being part of + # "GNU automake-ng") when asked their version. + case $app in + automake-ng|aclocal-ng) + app=`echo "$app" | sed 's/-ng$//'` + ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { + echo "$me: Error: '$app' not found or not from Automake-NG" >&2 + ret=1 + continue + } ;; + esac if [ "$req_ver" = "-" ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. -- 1.7.9.5 |
|
|
Re: [PATCH] bootstrap: support Automake-NG in $buildreqOn 04/23/2012 09:17 AM, Stefano Lattarini wrote:
> * bootstrap (check_versions): Handle automake and aclocal from > Automake-NG specially. They can be specified as respectively > the "automake-ng" and "aclocal-ng" requirements. > > Signed-off-by: Stefano Lattarini <stefano.lattarini@...> > --- > build-aux/bootstrap | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/build-aux/bootstrap b/build-aux/bootstrap > index 5aa73cc..c0960f5 100755 > --- a/build-aux/bootstrap > +++ b/build-aux/bootstrap > @@ -1,6 +1,6 @@ > #! /bin/sh > # Print a version string. > -scriptversion=2012-04-19.22; # UTC > +scriptversion=2012-04-23.22; # UTC > > # Bootstrap this package from checked-out sources. > > @@ -433,6 +433,21 @@ check_versions() { > GZIP) ;; # Do not use $GZIP: it contains gzip options. > *) eval "app=\${$appvar-$app}" ;; > esac > + # Special handling for (still experimental) Automake-NG programs. > + # They remain named as the mainstream Automake programs ("automake", > + # and "aclocal") to avoid gratuitous incompatibilities with > + # pre-existing usages (by, say, autoreconf, or custom autogen.sh > + # scripts), but correctly identify themselves (as being part of > + # "GNU automake-ng") when asked their version. > + case $app in > + automake-ng|aclocal-ng) > + app=`echo "$app" | sed 's/-ng$//'` > + ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { > + echo "$me: Error: '$app' not found or not from Automake-NG" >&2 > + ret=1 > + continue > + } ;; > + esac Whe are we doing app=`echo "$app" | sed 's/-ng$//'` instead of app=${app%-ng}? We already use $() elsewhere in bootstrap, and therefore we already require a decent POSIX shell (that is, Solaris /bin/sh can't run bootstrap, and all other shells that support $() tend to also support ${var%suffix}). There's probably a lot of cleanup we could do to bootstrap once we assume a decent shell; but we should probably also ensure that bootstrap can rerun itself under a decent shell rather than the current state of dying a horrible death on Solaris. -- Eric Blake eblake@... +1-919-301-3266 Libvirt virtualization library http://libvirt.org |
|
|
Re: [PATCH] bootstrap: support Automake-NG in $buildreqHi Eric, thanks for the quick feedback.
On 04/23/2012 05:51 PM, Eric Blake wrote: > > What you have is worth committing now, but I wonder... > > Why are we doing app=`echo "$app" | sed 's/-ng$//'` instead of > app=${app%-ng}? > Because I thought ./bootstrap was expected to work also with "classical" Bourne shells, not only with POSIX shell, but ... > We already use $() elsewhere in bootstrap, and > therefore we already require a decent POSIX shell (that is, Solaris > /bin/sh can't run bootstrap, and all other shells that support $() tend > to also support ${var%suffix}). > ... I surmise form your words this is not the case (yay!), so I will amend my patch along your suggestion if nobody objects. > There's probably a lot of cleanup we could do to bootstrap once we > assume a decent shell; but we should probably also ensure that bootstrap > can rerun itself under a decent shell rather than the current state of > dying a horrible death on Solaris. > This is not high priority though IMHO, since 'bootstrap' is a developer-only script, and developers are likely to have either bash or zsh installed, or a better vendor shell (e.g., /usr/xpg4/bin/sh on Solaris) early in $PATH, so it's a no-brainer for them to run bootstrap properly, i.e., using $ {bash|zsh|sh} bootstrap What might be worthwhile is adding a check in bootstrap that will cause it to abort early and with a clear error message if run under a non-POSIX shell... Regards, Stefano |
|
|
Re: [PATCH] bootstrap: support Automake-NG in $buildreqOn 04/23/2012 05:17 PM, Stefano Lattarini wrote:
> * bootstrap (check_versions): Handle automake and aclocal from > Automake-NG specially. They can be specified as respectively > the "automake-ng" and "aclocal-ng" requirements. > Ping? Regards, Stefano |
|
|
Re: [PATCH] bootstrap: support Automake-NG in $buildreqStefano Lattarini wrote:
> * bootstrap (check_versions): Handle automake and aclocal from > Automake-NG specially. They can be specified as respectively > the "automake-ng" and "aclocal-ng" requirements. > > Signed-off-by: Stefano Lattarini <stefano.lattarini@...> > --- > build-aux/bootstrap | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/build-aux/bootstrap b/build-aux/bootstrap > index 5aa73cc..c0960f5 100755 > --- a/build-aux/bootstrap > +++ b/build-aux/bootstrap > @@ -1,6 +1,6 @@ > #! /bin/sh > # Print a version string. > -scriptversion=2012-04-19.22; # UTC > +scriptversion=2012-04-23.22; # UTC > > # Bootstrap this package from checked-out sources. > > @@ -433,6 +433,21 @@ check_versions() { > GZIP) ;; # Do not use $GZIP: it contains gzip options. > *) eval "app=\${$appvar-$app}" ;; > esac > + # Special handling for (still experimental) Automake-NG programs. > + # They remain named as the mainstream Automake programs ("automake", > + # and "aclocal") to avoid gratuitous incompatibilities with > + # pre-existing usages (by, say, autoreconf, or custom autogen.sh > + # scripts), but correctly identify themselves (as being part of > + # "GNU automake-ng") when asked their version. > + case $app in Thanks. Applied with this comment change, an added ChangeLog entry, and with the removal of the Signed-off-by line in the log: diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 4058669..c496d29 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -433,7 +433,8 @@ check_versions() { GZIP) ;; # Do not use $GZIP: it contains gzip options. *) eval "app=\${$appvar-$app}" ;; esac - # Special handling for (still experimental) Automake-NG programs. + + # Handle the still-experimental Automake-NG programs specially. # They remain named as the mainstream Automake programs ("automake", # and "aclocal") to avoid gratuitous incompatibilities with # pre-existing usages (by, say, autoreconf, or custom autogen.sh |
|
|
Re: [PATCH] bootstrap: support Automake-NG in $buildreqOn 04/26/2012 03:38 PM, Jim Meyering wrote:
> Stefano Lattarini wrote: >> * bootstrap (check_versions): Handle automake and aclocal from >> Automake-NG specially. They can be specified as respectively >> the "automake-ng" and "aclocal-ng" requirements. >> >> Signed-off-by: Stefano Lattarini <stefano.lattarini@...> >> --- >> build-aux/bootstrap | 17 ++++++++++++++++- >> 1 file changed, 16 insertions(+), 1 deletion(-) >> >> diff --git a/build-aux/bootstrap b/build-aux/bootstrap >> index 5aa73cc..c0960f5 100755 >> --- a/build-aux/bootstrap >> +++ b/build-aux/bootstrap >> @@ -1,6 +1,6 @@ >> #! /bin/sh >> # Print a version string. >> -scriptversion=2012-04-19.22; # UTC >> +scriptversion=2012-04-23.22; # UTC >> >> # Bootstrap this package from checked-out sources. >> >> @@ -433,6 +433,21 @@ check_versions() { >> GZIP) ;; # Do not use $GZIP: it contains gzip options. >> *) eval "app=\${$appvar-$app}" ;; >> esac >> + # Special handling for (still experimental) Automake-NG programs. >> + # They remain named as the mainstream Automake programs ("automake", >> + # and "aclocal") to avoid gratuitous incompatibilities with >> + # pre-existing usages (by, say, autoreconf, or custom autogen.sh >> + # scripts), but correctly identify themselves (as being part of >> + # "GNU automake-ng") when asked their version. >> + case $app in > ... > > Thanks. Applied with this comment change, an added ChangeLog entry, > and with the removal of the Signed-off-by line in the log: > BTW, I've now tweaked the .git/config in my gnulib clone to ensure no more Signed-off-by line will be added in my commit messages. As per the ChangeLog entry, you were right -- it's easy to lose the habit of editing them by hand ;-) Regards, Stefano |
| Free embeddable forum powered by Nabble | Forum Help |