coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: fix 'dist' and 'syntax-check' targets in VPATH build


From: Pádraig Brady
Subject: Re: [PATCH] build: fix 'dist' and 'syntax-check' targets in VPATH build
Date: Tue, 19 May 2015 00:56:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 18/05/15 07:35, Bernhard Voelker wrote:
> On 05/17/2015 05:03 PM, Pádraig Brady wrote:
>> * cfg.mk: Various syntax-check adjustments so that it's
>> not assumed the $builddir is the base distribution directory.
> 
> I'm not sure if it was this commit or an earlier one, but we're
> missing some dependencies - IIRC this worked in the past:
> 
>   $ make -j clean && make -j syntax-check

I don't think that worked.

>   ...
>   12.91 require_config_h_first
>     AR       lib/libcoreutils.a
>   ar: lib/libcoreutils.a: Error reading lib/parse-datetime.o: File truncated
>   Makefile:6599: recipe for target 'lib/libcoreutils.a' failed
>   make: *** [lib/libcoreutils.a] Error 1
>   make: *** Waiting for unfinished jobs....
>     AR       lib/libcoreutils.a
>   ...
>     CCLD     src/ptx
>   mv: cannot stat 'src/.deps/factor.Tpo': No such file or directory
>   Makefile:8790: recipe for target 'src/factor.o' failed
>   make: *** [src/factor.o] Error 1
>     CCLD     src/dd
>   mv: cannot stat 'src/.deps/copy.Tpo': No such file or directory
>   Makefile:8790: recipe for target 'src/copy.o' failed
>   make[1]: *** [src/copy.o] Error 1
>   make[1]: *** Waiting for unfinished jobs....
>   maint.mk:1572: recipe for target 'sc_tight_scope' failed
>   make: *** [sc_tight_scope] Error 1

One specific issue at least is that gnublib modules
will generally add generated files to MOSTLYCLEANFILES
in the various modules/files.
That means that a `make clean` will remove some headers
required to build src/*.o, and those don't depend on
anything that would rebuild them as can be seen with:

src/sort.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/sort$(EXEEXT): $(src_sort_OBJECTS) $(src_sort_DEPENDENCIES) ...

That will cause issues for syntax checks which depend on explicit binaries,
which also includes gnulib's tight-scope check with depends on bin_PROGRAMS
which will not depend on BUILT_SOURCES.

I suppose we could make that explicit in gnulib's maint.mk by changing:
  syntax-check: $(local-check)
to:
  syntax-check:
        @$(MAKE) all
        @$(MAKE) $(local-check)

though I'm not sure of the portability of generality of that TBH.

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]