[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eval

From: Paul D. Smith
Subject: Re: Eval
Date: Wed, 16 Apr 2003 12:22:41 -0400

%% Mike Gibson <address@hidden> writes:

  mg> I'm trying to use eval to create rules automatically and I use
  mg> foreach to generate a bunch of rules:

  mg> define make_rule
  mg> $(1) : $(1).a
  mg>   command $(1).a
  mg> endef

  mg> LIST := foo bar joe jane

  mg> $(foreach value,$(LIST),$(eval $(call make_rule,$(value))))

  mg> Which works.  If I then try to split the foreach line like this:

  mg> $(foreach value,$(LIST),\
  mg> $(eval $(call make_rule,$(value))))

  mg> I get:

  mg> Makefile:30: *** missing separator.  Stop.

  mg> Could someone please explain this?

This is a bug in GNU make 3.80.  It's already been fixed in the source
and the fix will be available in the next release of GNU make.

I think it's an instance of bug #1517.  There's a patch attached to the
resolution of the bug (you can find it under the GNU make Savannah web

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]