[clug] Tricky 'make' problem

Daniel Pittman daniel at rimspace.net
Thu Jan 7 05:49:29 MST 2010


Paul Matthews <plm at netspace.net.au> writes:
> On 07/01/10 19:54, Hal Ashburner wrote:
>
>> does solaris make deal with implicit rules? eg something like
>>
>> %.skl:  %.jcl
>>         tailor  $^ -o $@
>
> It does appear so, but its not obvious how to use it to my advantage:

[...]

> Don't know where to go from here....
>
>     all : skls jcls
>     skls :
>         ./generate
>
>     step%jcl: step%skl
>         ./tailor $< $@
>
>     jcls :
>             # Ummm

With GNU make, you can use delayed evaluation to achieve this, but I don't
know if Solaris make supports the same features:

jcls: $(patsubst skl,jcl,$(wildcard echo $.skl))
    # Now depends automatically. :)

Alternately, a variable defined with '=' rather than ':=' is evaluated every
time it expands, at that stage, not at the start of the make process.

However, those all depend on doing string manipulation and globbing somewhere;
either inside the make(1) process, or through a shell callout...

        Daniel
-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the linux mailing list