[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiline variables inside single/double quote
From: |
Paul Smith |
Subject: |
Re: Multiline variables inside single/double quote |
Date: |
Tue, 15 Feb 2011 09:43:37 -0500 |
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 <address@hidden> 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