[Top][All Lists]

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

Implicit Rules

From: Mike Gibson
Subject: Implicit Rules
Date: Fri, 11 Apr 2003 11:37:05 -0700
User-agent: KMail/1.4.3


I'm trying to create an implicit rule to build a single target from two 
different prerequisites.  The filename of the target can tell me what the 
prerequisites are as is normally done.

So say I've got the target aaa-bbb.out which can be built from aaa.src and 

Of course, something like this doesn't work:

%-%.out : %.src %.src
        create_out $^

since only one % in the target is allowed (for obvious reasons).

So I tried to do this:

%.out : $(call extract-first-name,%).src $(call extract-secondname,%,2).src
        create_out $^

which doesn't work since extract-first-name and extract-second-name get called 
with "%" and not the actual filename and we end up with a useless implicit 

%.out : %.src .src
        create_out $^

Is there any way to create an implicit rule that deals with two patterns 
instead of just one?

Mike Gibson

reply via email to

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