%% [EMAIL PROTECTED] writes:

  hpvl> When experimenting with some input variables I found the following
  hpvl> strange behaviour: 

  hpvl> I have an external module.hier file listing modules to be processed. 
  hpvl> I use the following lines in the generic makefile: 

  hpvl>  MODULES   = $(shell cat module.hier | $(GREP) )
                                               ^^^^^^^
Just $(GREP)?  Aren't you missing something here?

  hpvl> #determine list of modules 
  hpvl>  TOP_MOD   = $(word $(words $(MODULES)),$(MODULES) )   #determine last module 
from list 

You're adding all kinds of whitespace here.  By putting whitespace at
the end of the line (separating the function from the comment at the end
of the line) you're adding whitespace.  See the GNU make manual sections
"The Two Flavors of Variables" and "Setting Values".

  hpvl> When I do an echo of $(TOP_MOD) I do not see these spaces! 

How can you see spaces? :)

Anyway, make invokes a shell and the shell will strip extra whitespace
before it invokes the echo.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to