On 12/07/2011 10:26 AM, Pádraig Brady wrote: >> Should we enhance bootstrap so as to require implicit build dependencies >> on patch, autoconf 2.59 or newer, and automake 1.9 or newer, in addition >> to whatever the cfg.mk dependencies list? Of course, cfg.mk can require >> a newer minimum version on any of these tools. >> >> > > That makes sense.
Okay, I'm pushing it then. > The caveat with the above is that if the an older version > was already specified, then user would get an incorrect > prompt about version requirements. That's an unlikely edge case TBH, > as the specification would be in error in any case, Not to mention in conflict with gnulib documentation in gnulib.git/DEPENDENCIES (except that patch wasn't yet listed, so I'll squash that into the patch). Furthermore, patch is only mandatory if there is a *.diff file in the gnulib-local directory. Using just POSIX features of find(1) to determine if any *.diff files exist was an interesting exercise :) Are we worried about gnulib-tool func_lookup_file()'s non-portable use of 'patch -s'? diff --git i/ChangeLog w/ChangeLog index 6a5fa5a..455bb6a 100644 --- i/ChangeLog +++ w/ChangeLog @@ -3,6 +3,7 @@ bootstrap: detect tools required by gnulib-tool * build-aux/bootstrap (buildreq): Provide minimum implicit dependencies. + * DEPENDENCIES: Mention patch as a prereq. 2011-12-04 Bruno Haible <br...@clisp.org> diff --git i/DEPENDENCIES w/DEPENDENCIES index f025ab2..91cd6c5 100644 --- i/DEPENDENCIES +++ w/DEPENDENCIES @@ -81,6 +81,16 @@ at any time. http://ftp.gnu.org/gnu/diffutils/ ftp://ftp.gnu.org/gnu/diffutils/ +* The patch utility 'patch'. + + Mandatory if you use gnulib-local diffs. Using the platform's native + utilities gives good portability exposure, but you can also use GNU + patch. + + Homepage: + http://www.gnu.org/software/patch/ + + Download: + http://ftp.gnu.org/gnu/patch/ + ftp://ftp.gnu.org/gnu/patch/ + * Grep. + Mandatory. Using the platform's native grep gives good portability exposure, but you can also use GNU grep. diff --git i/build-aux/bootstrap w/build-aux/bootstrap index 6aaaa0e..8dda38b 100755 --- i/build-aux/bootstrap +++ w/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2011-12-07.16; # UTC +scriptversion=2011-12-07.20; # UTC # Bootstrap this package from checked-out sources. @@ -483,11 +483,16 @@ case $buildreq in *) buildreq="$buildreq autoconf 2.59" ;; esac -case $buildreq in - patch) ;; - *) buildreq="$buildreq -patch -" ;; -esac +if test ! -d "$local_gl_dir" \ + || find "$local_gl_dir" -name '*.diff' -exec false {} +; then + : +else + case $buildreq in + patch) ;; + *) buildreq="$buildreq + patch -" ;; + esac +fi if ! printf "$buildreq" | check_versions; then echo >&2 if test -f README-prereq; then -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature