(Make version etc. below)

  Dear reader,

  I think I have an interesting problem, demonstrated below in a minimal
setup:

blaat:
blaat.blaat:

TEST = $(1).$(1)

test/%: $(call TEST,%)
        @echo "Args = $^"

print/%: %
        @echo $(call TEST,$<)


  Ultimately my question is why I get the output below if enter the
following on the command line:

yt...@moniac:~/scratch> make print/blaat
blaat.blaat
yt...@moniac:~/scratch> make test/blaat
make: *** No rule to make target `test/blaat'.  Stop.

  I do not understand why the call to the TEST function (in the test/% rule)
with parameter "%" does not do the same as the call (in the print/% rule) to
the same function with parameter "$<", which is derived from "%" ??

  My follow-up question would be how to achieve the same output for both
rules?

  Many thanks for your reaction!!


Ytsen.


yt...@moniac:~/scratch> make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-linux-gnu
yt...@moniac:~/scratch> uname -a
Linux moniac 2.6.31.8-0.1-desktop #1 SMP PREEMPT 2009-12-15 23:55:40 +0100
x86_64 x86_64 x86_64 GNU/Linux
yt...@moniac:~/scratch> 
-- 
View this message in context: 
http://old.nabble.com/Question-function-%22call%22-and-%22-%22-tp28003847p28003847.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



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

Reply via email to