On Wed, Mar 19, 2014 at 8:18 AM, Assaf Gordon <[email protected]> wrote: > Hello, > > A small build error, possibly in 'gnulib' but easier to reproduce with > GNU-Hello: > running "make dist" does not generate a required file "configmake.h". > > To reproduce: > === > $ git clone git://git.savannah.gnu.org/hello.git > $ cd hello > $ ./bootstrap && ./configure && make dist > === > > Fails with: > === > <...> > lib/localcharset.c:81:25: fatal error: configmake.h: No such file or > directory > # include "configmake.h" > ^ > compilation terminated. > make[1]: *** [lib/localcharset.o] Error 1 > make[1]: Leaving directory `/data/gordon/temp/hello' > make: *** [dist] Error 2 > ==== > > When adding a "make" step before "make dist", it works as expected.
Hi Gordon, Thanks for the report. That looks like a bug in automake. I've attached a patch, though note that this fix is not ready to push to automake.git, since it lacks a test suite addition and a NEWS entry.
From 2af2dce968e3d7a7a004e7229bf49a53bf525665 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Thu, 20 Mar 2014 12:31:32 -0700 Subject: [PATCH] "make dist" did not depend on $(BUILT_SOURCES) * lib/am/distdir.am (distdir-am): New intermediate target. Interpose this target between $(distdir) and its dependent, $(DISTFILES), so that we can ensure $(BUILT_SOURCES) are all created before we begin creating $(DISTFILES). Assaf Gordon reported that "make dist" (after ./configure from a pristine clone of GNU hello) would fail due to the absence of configmake.h while compiling lib/localcharset.c. --- lib/am/distdir.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 3a8b0d8..40912b3 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -71,10 +71,13 @@ endif %?SUBDIRS% .PHONY: distdir if %?SUBDIRS% -AM_RECURSIVE_TARGETS += distdir +AM_RECURSIVE_TARGETS += distdir distdir-am endif %?SUBDIRS% -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) ## ## For Gnits users, this is pretty handy. Look at 15 lines ## in case some explanatory text is desirable. -- 1.9.0.258.g00eda23
