Subject: bug#12899: Build failure from latest master

From: Stefano Lattarini <[email-masked]>
Date: Thu, 15 Nov 2012 19:36:47 +0100

On 11/15/2012 07:24 PM, Stefano Lattarini wrote:
> In a freshly-cloned repository on Debian with GNU make 3.82 and
> gcc 4.7.2.:
> 
>   $ ./bootstrap && ./configure
>   ... [all is ok]
>   $ make all
>     ...
>     CC       src/echo.o
>     CCLD     src/echo
>     CC       src/env.o
>     CCLD     src/env
>     CC       src/expand.o
>     CCLD     src/expand
>     CC       src/expr.o
>     CCLD     src/expr
>     CC       src/factor.o
>   src/factor.c:650:20: fatal error: primes.h: No such file or directory
>   compilation terminated.
>   make[2]: *** [src/factor.o] Error 1
>
The patch below seems to solve the issue.  Just let me run a complete
bootstrap to ensure this is the case ...

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

>From 0d1064cf32327fc0f2c422306d35eceb6334336d Mon Sep 17 00:00:00 2001
Message-Id: <0d1064cf3[email-masked]>
From: Stefano Lattarini <[email-masked]>
Date: Thu, 15 Nov 2012 19:36:21 +0100
Subject: [PATCH] build: fix build failures from pristine checkout

Fixed coreutils bug#12899.

* src/local.mk (BUILT_SOURCES): Add '$(top_srcdir)/src/primes.h'.
---
 src/local.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/local.mk b/src/local.mk
index 02a9bf5..337d005 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -386,6 +386,7 @@ src/dircolors.h: src/dcgen src/dircolors.hin
 # insist that maintainers must build on hosts that support the widest
 # known ints (currently 128-bit).
 MAINTAINERCLEANFILES += $(top_srcdir)/src/primes.h
+BUILT_SOURCES += $(top_srcdir)/src/primes.h
 $(top_srcdir)/src/primes.h:
 	$(MAKE) src/make-prime-list
 	$(AM_V_GEN)rm -f $@ $@-t
-- 
1.8.0.150.gb0b00a3