[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c
From: |
Ralf Wildenhues |
Subject: |
Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c |
Date: |
Tue, 13 Sep 2005 15:12:57 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi Stepan, Harald,
* Stepan Kasal wrote on Tue, Sep 13, 2005 at 02:21:43PM CEST:
> On Tue, Sep 13, 2005 at 12:58:45PM +0200, Harald Dunkel wrote:
>
> > > linked_sources = common_interface.c more.c even-more.c
> > > BUILT_SOURCES = $(linked_sources)
> > > $(linked_sources):
> > > list='$(linked_sources)'; for file in $$list; do \
> > > rm -f $$file; $(LN_S) '$(INTERFACE_DIR)'/"$$file" "$$file"; \
> > > done
>
> Ralf, you seem to forgot that
> foo bar:
> cmd..
> is equivalent to two rules:
> foo:
> cmd..
> bar:
> cmd..
D'oh. Yes, thank you.
> Moreover, the BUILT_SOURCES hack is necessary only for files which cannot
> be handled by the normal dependencies, typically for headers.
You don't need to copy headers. Just adjust the include path, as Harald
had already done in one of his earlier examples.
> So I'd suggest:
>
> linked_sources = common_interface.h common_interface.c more.c even-more.c
> BUILT_SOURCES = common_interface.h
> $(linked_sources):
> $(LN_S) '$(INTERFACE_DIR)/$@' '$@'
> CLEANFILES = $(linked_sources)
So you can leave out the BUILT_SOURCES line completely.
But you need to "rm -f '$@'" before invoking $(LN_S).
Thanks for the other corrections, by the way.
And yes: I for one have neither the time, nor the ability, nor access
to make changes to GNU Automake. There is a reason for an AUTHORS file,
and the bug-* lists and the Automake GNATS bug database.
Cheers,
Ralf
- make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Harald Dunkel, 2005/09/12
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Bob Proulx, 2005/09/12
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Harald Dunkel, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Ralf Wildenhues, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Harald Dunkel, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Stepan Kasal, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c,
Ralf Wildenhues <=
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Stepan Kasal, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Ralf Wildenhues, 2005/09/13
- Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Stepan Kasal, 2005/09/13
Re: make depend problem with hello_SOURCES = ${SRCDIR}/hello.c, Alexandre Duret-Lutz, 2005/09/13