[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: target-specific 'define'd variables (3.80)?
From: |
Paul D. Smith |
Subject: |
Re: target-specific 'define'd variables (3.80)? |
Date: |
Mon, 5 Jul 2004 12:55:31 -0400 |
%% Will Partain <address@hidden> writes:
wp> Hi; I don't know if the little Makefile below *ought* to
wp> work or not; it seems it should.
No. define/endef is not supported directly in kernel-specific
variables. The entire definition must fit onto one logical line.
You can always do this:
define _foo
@echo This is a multi-line definition
@echo of myvar with foo in it.
endef
define _bar
@echo This is a multi-line definition
@echo of myvar with bar in it.
endef
foo : myvar = $(_foo)
bar : myvar = $(_bar)
foo :
$(myvar)
bar :
$(myvar)
Of course in this simple example there are much less complex ways to
manage this; just using $@ would be enough:
define myvar
@echo This is a multi-line definition
@echo of myvar with $@ in it.
endef
foo :
$(myvar)
bar :
$(myvar)
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- target-specific 'define'd variables (3.80)?, Will Partain, 2004/07/05
- Re: target-specific 'define'd variables (3.80)?,
Paul D. Smith <=
- Re: target-specific 'define'd variables (3.80)?, Boris Kolpackov, 2004/07/06
- Re: target-specific 'define'd variables (3.80)?, Paul D. Smith, 2004/07/06
- Re: target-specific 'define'd variables (3.80)?, Paul D. Smith, 2004/07/06
- Re: target-specific 'define'd variables (3.80)?, Boris Kolpackov, 2004/07/06
- Re: target-specific 'define'd variables (3.80)?, Paul D. Smith, 2004/07/06
- Re: target-specific 'define'd variables (3.80)?, Boris Kolpackov, 2004/07/07