On 08/31/2012 09:59 PM, Jim Meyering wrote: > Jim Meyering wrote: >> Jim Meyering wrote: >> ... >>> No problem. >>> Next step, "make distcheck". First failure is because inclusion of >>> version.h fails in the non-srcdir build: >> ... >>> This fixes it: >>> >>> diff --git a/src/local.mk b/src/local.mk >> >> FYI, here's another make distcheck problem, >> in case someone else can get to it before I do >> (it'll soon be dinner time here): >> >> make[2]: Entering directory >> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build' >> CC src/uname-arch.o >> CC src/hostname.o >> CCLD src/arch >> CCLD src/hostname >> GEN man/arch.1 >> GEN man/hostname.1 >> mkdir: cannot create directory 'man/arch.td': No such file or directory >> make[2]: *** [man/arch.1] Error 1 >> make[2]: *** Waiting for unfinished jobs.... >> mkdir: cannot create directory 'man/hostname.td': No such file or directory >> make[2]: *** [man/hostname.1] Error 1 >> make[2]: Leaving directory >> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build' >> make[1]: *** [dist] Error 2 >> make[1]: Leaving directory >> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build' >> make: *** [distcheck] Error 1 > > The fix for this is to create man and src directories: > > diff --git a/configure.ac b/configure.ac > index 8c41d62..5dc4b0a 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -464,6 +464,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1]) > # For a test of uniq: it uses the $LOCALE_FR envvar. > gt_LOCALE_FR > > +# Now that configure no longer creates src/ or man/, create them here. > +# Doing it this way is more maintainable that adding to each individual > +# Makefile rule that creates a file in one of those sub-directories. > +$MKDIR_P man src > + To be extra-purist, shouldn't this be handled with dirstamp rules in the Makefile? Or maybe, such a purist move could be done at least in the Automake-NG based fork of coreutils, where we can use GNU make order-only prerequisites, which will DTRT in this context.
Thanks, Stefano
