[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: OT help with Make



On Mon, Jul 12, 2010 at 4:24 PM, myjunk stuff <carzrgr8@xxxxxxxxxxxxx> wrote:
>>> Is there a way to do the following:
>>>
>>> target1 :
>>>    rule1
>>>
>>> target2 :
>>>    execute target1
>>>
>>
>> target2: target1
>>
>>
> I'm sorry - what I meant to say was:
>
> var1=whatever
>
> target1:
>  rule1 var1
>
> target2:
>  var1=something_new
>  target1
>

But then this makes target1 ambiguous: is it built with "rule1
whatever" or "rule1 something_new"?

If you just want functions, you might consider a shell script instead of Make.

I have done something similar with make, where my var1 was CC and I
wanted to cross-compile for several targets.  I had a base Makefile
with the definitions and then a little Makefile for each target that
included the base Makefile and redefined the CC variable.  In this
case, the little Makefiles were in a different build directory for
each target, so the ambiguity was solved that way.

Regards,
Mark
markrages@gmail
-- 
Mark Rages, Engineer
Midwest Telecine LLC
markrages@xxxxxxxxxxxxxxxxxxx


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user