On 09/03/2010 04:03 AM, Bruno Haible wrote:
It is well possible to use gnulib without using 'bootstrap'. As examples,
please see the 'autogen.sh' scripts of some packages:
   - libunistring
     
<http://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=autogen.sh>

Also GNU M4, which uses 'gnulib-tool --update' rather than --import in its bootstrap script.

The contents of gnulib-cache.m4 is an output of the invocation of gnulib-tool,
and therefore a derivative of the parameters that you pass to gnulib-tool.

But the current documentation says that 'gnulib-cache.m4' is the ONE output that you SHOULD be keeping in version control. In fact, that is precisely how m4 works - by versioning just gnulib-cache.m4, it is sufficient to have bootstrap run 'gnulib-tool --update' so that all other developers will pick up the same set of modules as the last developer that made a modification via gnulib-tool --import.

'gnulib-tool --update' is equivalent to 'gnulib-tool --import ...' where the
options and list of modules are fetched from gnulib-cache.m4. Because of the
principle to not mix inputs and outputs (see above), and because
gnulib-cache.m4 is an output (produced by the previous gnulib-tool execution),
you must ensure that gnulib-cache.m4 is not used by subsequent gnulib-tool
invocations.

That advice goes counter to how M4 is currently using gnulib-tool.

This means
   1. You must not use 'gnulib-tool --update'.

Then why does it exist? I frequently rerun bootstrap on an existing tree in order to pick up the new modules that have been added by other developers, and gnulib-tool --update is faster than gnulib-tool --import at doing so.

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to