%% "Yanghui Bian" <[EMAIL PROTECTED]> writes:

  yb> blocks := a b

  yb> a_property := 0 1 2 3

  yb> b_property := 2 3 8 9

  yb> How can I get a list of property in the first column for the all
  yb> the blocks?

  yb> I try to use the foreach as below:

  yb> block_properties := $(foreach block, $(blocks), $(block)_property)

Not quite.  $(block)_property expands to the _names_ of the variables;
so the result will be:

    a_property b_property

You want to expand to the _values_ of those variables, so you need an
extra variable reference:

    block_properties := $(foreach block, $(blocks), $($(block)_property))
                                                    ^^                  ^

-- 
-------------------------------------------------------------------------------
 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