Paul D. Smith <[EMAIL PROTECTED]> writes:

>   bk> all: /tmp/foo.x
>
>   bk> foo_OBJS = foo.o bar.o
>
>   bk> %.x: $$(%_OBJS)
>
>   bk> The result of $$(%_OBJS) will be '/tmp/foo.o /tmp/bar.o'.
>
> Eh?  Really?!?!  The path munging is applied to the CONTENTS of the
> variable?  That seems pretty... strange...

That seemed like the most natural way to go when I implemented it.
Here is the comment from implicit.c:

/* In an ideal world we would take the dependency line,
   substitute the stem, re-expand the whole line and
   chop it into individual prerequisites. Unfortunately
   this won't work because of the "check_lastslash" twist.
   Instead, we will have to go word by word, taking $()'s
   into account, for each word we will substitute the stem,
   re-expand, chop it up, and, if check_lastslash != 0,
   add the directory part to each resulting prerequisite.  */

In other words, anything that had % in it will have directory
added to each word after the expansion. Ironically, in the example
above, this logic works quite well, don't you find? Also note
that one can always opt-out of this by using $$* instead of %.

hth,
-boris

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to