[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: Ralf Wildenhues
Subject: Re: BUILT_SOURCES: dependencies not copied to build_dir
Date: Tue, 28 Mar 2006 12:34:14 +0200
User-agent: Mutt/1.5.11

Hi Michael,

* Michael Biebl wrote on Tue, Mar 28, 2006 at 12:16:18PM CEST:
> This is the solution I came up with:
> EXTRA_DIST = ngcs_marshal.ngci
> CLEANFILES = ngcs_marshal.h ngcs_marshal.c
> ngcs_marshal.c: ngcs_marshal.ngci
>         $(srcdir)/ $(srcdir)/ngcs_marshal @

Do you mean `$@' instead of `@' here?  If not: what is the `@' supposed
to do?

> ngcs_marshal.h: ngcs_marshal.ngci
>         $(srcdir)/ $(srcdir)/ngcs_marshal @
> This way and ngcs_marshal.ngci are not copied to the builddir
> and whenever they change one of them in the srcdir the header and c file
> are regenerated.
> I don't need srcdir in the dependency line, but if I omit them in the
> build rule I either get:

Well, yes, you do need it in the rule.  Were they inference rules, could
you use `$<', but in an explicit rule like above that is not portable.

> I also had to change to take an additional parameter (@) where I
> can tell the location of the output file. Otherwise the file is created
> in the srcdir. I wanted to avoid changing first (that's why the
> copying) but it seemed not to be possible.

That's definitely the better way.


reply via email to

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