>> "T" == Tsuna
<tsuna(a)warszawa.lrde.epita.fr> writes:
> > PRISM.def:
$(top_builddir)/src/syn/prism/PRISM.def
> > rm -f $@
> > - $(LN_S) $^ $@
> > + cp -f $^ $@
>
> Why don't you use $< when you mean that? That's confusing.
Why would I use $< ?
According to GNU Make's manual:
$<
The name of the first prerequisite. If the target got its commands from an
implicit rule, this will be the first prerequisite added by the implicit
rule (see Implicit Rules).
$^
The names of all the prerequisites, with spaces between them. For
prerequisites which are archive members, only the member named is used
(see Archives). A target has only one prerequisite on each other file it
depends on, no matter how many times each file is listed as a
prerequisite. So if you list a prerequisite more than once for a target,
the value of $^ contains just one copy of the name. This list does not
contain any of the order-only prerequisites; for those see the `$|'
variable, below.
So $< is only for implicit rules, which is not the
case here.
It's funny to quote the documentation and say something else.
$< happens to work in explicit rules with GNU make,
but AFAIK $<
does not get expanded in explicit rules with other make
implementations (such as BSD make)
It is true. But these Makefiles are for GNU Make.
$ which make
/usr/bin/make
$ gmake
echo all
all
echo dep
dep
echo dep
dep
Dammit... Even $^ doesn't work with BSD make! :(
How could you expect a positive sentence with "BSD" and "work" in it?
:)