"SB" == SIGOURE Benoit tsuna@lrde.epita.fr writes:
Fix the build process: don't use symlinks.
Never use symlinks, they always introduce problems in builds.
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.
On 2007-01-09, Akim Demaille akim@lrde.epita.fr wrote:
"SB" == SIGOURE Benoit tsuna@lrde.epita.fr writes:
Fix the build process: don't use symlinks.
Never use symlinks, they always introduce problems in builds.
Although you already told me this, I learned it the hard way :|
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:
http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
$< 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. $< 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)
$ uname -a NetBSD netbsd-3 3.0_BETA NetBSD 3.0_BETA (FLOP-SM-WITHOUT-CRYPT) #0: Tue Oct 25 01:38:54 CEST 2005 root@dump-test:/usr/src/sys/arch/i386/compile/FLOP-SM-WITHOU T-CRYPT i386 $ cat -n Makefile 1 all: dep 2 echo $@ 3 echo $< 4 echo $^ 5 6 dep: $ make echo all all echo
echo
$ which make /usr/bin/make $ gmake echo all all echo dep dep echo dep dep
Dammit... Even $^ doesn't work with BSD make! :(
"T" == Tsuna tsuna@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:
http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
$< 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?
:)