[Top][All Lists]

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

Re: BUILT_SOURCES: dependencies not copied to build_dir

From: Stepan Kasal
Subject: Re: BUILT_SOURCES: dependencies not copied to build_dir
Date: Tue, 28 Mar 2006 14:39:05 +0200
User-agent: Mutt/1.4.1i


On Tue, Mar 28, 2006 at 12:16:18PM +0200, Michael Biebl meant to write:
> EXTRA_DIST = ngcs_marshal.ngci
> CLEANFILES = ngcs_marshal.h ngcs_marshal.c
> ngcs_marshal.c: ngcs_marshal.ngci
>         $(srcdir)/ $(srcdir)/ngcs_marshal $@
> ngcs_marshal.h: ngcs_marshal.ngci
>         $(srcdir)/ $(srcdir)/ngcs_marshal $@

yes, this is a good solution.

One question, though?  Does ` ... *.c' produce both files, or only
the .c one?

If it produces only one of the files, the makefile is correct.

If it produces both of them, it may not work with parallel make.
(See .)

Alternatively, you might make use of the Automake's ability to use new
extensions, something like:

foobar_SOURCES = ngcs_marshal.ngci \
        this.c \
        that.c ...

        $(srcdir)/ $< $@

        $(srcdir)/ $< $@

If the Python script produces both output files, the latter rule should be
something like:

ngcs_marshal.h: ngcs_marshal.c
        @if test -f $@; then :; else \
          rm -f data.c; \
          $(MAKE) $(AM_MAKEFLAGS) data.c; \

Have a nice day,

reply via email to

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