I'm not sure where to look, but I'm seeing some weird behavior with gnulib's bootstrap script as used by libvirt. I don't think the automake version is relevant; Serge Hallyn originally reported it to me, but I've reproduced it with both automake 1.9.6 and automake 1.11.1. Since the problem occurs when re-running ./bootstrap, I'm reporting it here.
Libvirt uses a gnulib submodule named .gnulib, and among other things, it uses gnulib/tests/ as the directory for storing all tests built by gnulib-tool --with-tests. This means that bootstrap output includes the following lines: > ./bootstrap: ./gnulib/gnulib-tool --import ... --tests-base > ._bootmp/gnulib/tests ... > ... > Creating ._bootmp/gnulib/tests/Makefile.am > ... > - invoke gl_INIT in ./configure.ac. > ./bootstrap: cp ._bootmp/gnulib/tests/Makefile.am gnulib/tests/Makefile.am # > with edits > ... > ./bootstrap: automake --add-missing --copy --force-missing ... after bootstrap completes: $ grep -A3 '^AM_C' gnulib/tests/Makefile.{am,in} gnulib/tests/Makefile.am:AM_CPPFLAGS = \ gnulib/tests/Makefile.am- -D@gltests_WITNESS@=1 \ gnulib/tests/Makefile.am- -I. -I$(srcdir) \ gnulib/tests/Makefile.am- -I../../.. -I$(srcdir)/../../.. \ -- gnulib/tests/Makefile.in:AM_CPPFLAGS = \ gnulib/tests/Makefile.in- -D@gltests_WITNESS@=1 \ gnulib/tests/Makefile.in- -I. -I$(srcdir) \ gnulib/tests/Makefile.in- -I../../.. -I$(srcdir)/../../.. \ Oops - the Makefile.in still thinks everything is relative to 3 levels up (true for the temporary ._bootmp/, but false for the final level). But even stranger, gnulib/tests/Makefile.am was correct, as evidenced by further doing: $ automake gnulib/tests/Makefile $ grep -A3 '^AM_C' gnulib/tests/Makefile.in AM_CPPFLAGS = \ -D@gltests_WITNESS@=1 \ -I. -I$(srcdir) \ -I../.. -I$(srcdir)/../.. \ I have no idea why only gnulib/tests/Makefile.in appears to be corrupted by running ./bootstrap, however, I can confirm that gnulib/tests/Makefile.am is the only file that refers to ../../ in the first place. <time elapses> Hmm, maybe I just found something - libvirt has this function in bootstrap.conf: # Change paths in gnulib/tests/Makefile.am from "../../.." to "../..". m=gnulib/tests/Makefile.am sed 's,\.\./\.\./\.\.,../..,g' $m > $m-t mv -f $m-t $m which takes place after the initial automake run. Is the bug that gnulib-tool outputs relative paths, and then bootstrap changes the relative directory structure which breaks those paths? That is, should gnulib-tool be outputting $(top_builddir)/._bootmp/lib, rather than ../../.., which then gets post-processed by ./bootstrap to get rid of ._bootmp? Or is the bug that libvirt's epilogue script is not rerunning automake after touching Makefile.am, and depending on how fast things ran, this puts timestamps out of whack? It seems like the fact that libvirt even has to provide this rewrite rule is awkward - is there any reason that the slurp() function in ./bootstrap must continue to import files into the wrong hierarchy and then try to move them into place? -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature