On Tue, 2011-02-15 at 10:58 +0330, ali hagigat wrote:
> define var1
> echo tttt
> echo pppp
> endef
> e12:
> @echo "$(var1)"
This is the same as if you'd written this makefile:
e12:
@echo "echo tttt
@echo ppp"
As the manual describes make treats multi-line variable values in
recipes as if they were individual logical lines, so each line is
invoked in a separate shell. The first line has a missing end-quote
just as the shell said.
As a special case leading operators like "@" and "-" are applied to each
line, not just the first line.
> define var1
> echo tttt
> echo pppp
> endef
> e12:
> @echo ""$(var1)""
This is the same as if you'd written this makefile:
e12:
@echo ""echo tttt
@echo pppp""
HTH.
--
-------------------------------------------------------------------------------
Paul D. Smith <[email protected]> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make