help-make
[Top][All Lists]
Advanced

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

Re: conditional prerequisite


From: Tristan Van Berkom
Subject: Re: conditional prerequisite
Date: Fri, 29 Aug 2003 11:31:58 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Martin d'Anjou wrote:

Hi,

I have a static pattern rule like this:

%.o: %.c
        gcc ...

Occasionaly, I have an additional dependency, but not always, so I added:

%.other: %.weird
        compile weird

%.o: %.c %.other
        gcc ...

But the entire thing fails now as no rule can be found when there is no corresponding ".other" file.

You might want to start by :

%.o:: %.c
        gcc...

%.o:: %.c %.other
        gcc...

to make sure that `make' knows you have more than one way to
update a `.o' file.

Just a hint,

HTH,
                               -Tristan







reply via email to

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