[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't compute prerequisites in static pattern rule
From: |
Noel Yap |
Subject: |
Re: can't compute prerequisites in static pattern rule |
Date: |
Tue, 16 Dec 2003 09:02:03 -0500 |
Evgeny Sologubov wrote:
>
> Hello,
>
> I am having a problem with such a rule:
>
> all: prj-Main
>
> prj-%: $(shell cat -s %/Makefile.dep)
> $(MAKE) -C $*
>
> make (a win32 build of v3.80) says:
> /usr/bin/cat: %/Makefile.dep: No such file or directory
> :(
>
> I expected that it shall be expanded to the following:
> prj-Main: $(shell cat -s Main/Makefile.dep)
> $(MAKE) -C $*
$(shell) gets executed during parsing of the makefile so % isn't interpreted as
a matching character.
> Is there a way to do what I want?
Nothing obvious comes to mind. My instinct is to say that this can't be done.
You might have to rethink how you want to do what you really want to do.
For example, in the end, I think what you want is to generate a dependency file
for a project. The usual way to do this is to include that dependency file
within the makefile. This inclusion cannot be done generically, but this
really shouldn't be a
problem since, presumably, you should know what project you're trying to build,
anyway. Is this not so?
Noel
--
NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.
- can't compute prerequisites in static pattern rule, Evgeny Sologubov, 2003/12/16
- Re: can't compute prerequisites in static pattern rule,
Noel Yap <=
- Re[2]: can't compute prerequisites in static pattern rule, Evgeny Sologubov, 2003/12/16
- Re: can't compute prerequisites in static pattern rule, Noel Yap, 2003/12/16
- Re[4]: can't compute prerequisites in static pattern rule, Evgeny Sologubov, 2003/12/17
- Re: can't compute prerequisites in static pattern rule, Noel Yap, 2003/12/17
- Re[2]: can't compute prerequisites in static pattern rule, Evgeny Sologubov, 2003/12/17
- Re: Re[2]: can't compute prerequisites in static pattern rule, Paul D. Smith, 2003/12/17
- Re: can't compute prerequisites in static pattern rule, Noel Yap, 2003/12/17
- Re[2]: can't compute prerequisites in static pattern rule, Evgeny Sologubov, 2003/12/17