[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evaluating Target Name
From: |
Luke Shumaker |
Subject: |
Re: Evaluating Target Name |
Date: |
Fri, 29 Oct 2010 00:56:30 -0400 |
I'm not entirely clear if this is the situation you're in, but:
default::
-include md5sums.mk
md5sums.mk: md5sums
sed 'address@hidden \([^ ]*\)@default :: \1\n\1: $<@' < '$<' > '$@'
# END #
Which would make the `default' target depend on all files listed in the
file `md5sums' and make each of those depend on `md5sums'. (The sed
script breaks on filenames with spaces... but so does make, so it's OK)
I hope this helps.
~ Luke Shumaker
On Thu, 2010-10-28 at 17:37 +0200, address@hidden wrote:
> Hi all,
>
> I've some problems determining a dynamic target name.
>
> The target name must be evaluated using its prerequisites (simple checksum)
> so I can only evaulate my target name if I have already started evaluating
> the prerequisites. And if this happens make built up the whole rule
> already, so this will result in a deadlock...
>
> Is there a way to build up the correct target name after having evaluated
> the prerequisites?
>
> Maybe some intermediate rules are necessary, but currently I have no idea
> how this could look like. I tried to split it up but I need the
> prerequisites afterwards for the linking process so I cannot just move them
> to another rule...
>
> Any help appreciated, thanks!
>
> Best regards,
>
> Erik