Can anyone explain to me why running GNU Make 3.80 on the following
makefile:


  THINGS := one two three

  define THING_template
    ALL += `date +%s; sleep 1`
    THIS = $(shell date +%s; sleep 1)
    ALL2 += $(THIS)
  endef

  $(foreach thing,$(THINGS),$(eval $(call THING_template,$(thing))))

  debug:
          @echo ALL = $(ALL)
          @echo ALL2 = $(ALL2)


...results in the following output:

  $ make
  ALL = 1091577190 1091577191 1091577192
  ALL2 = 1091577187 1091577188

I would have expected something more like this:

  $ make
  ALL = 1091577190 1091577191 1091577192
  ALL2 = 1091577186 1091577187 1091577188

Where did the other append to ALL2 go?

Thanks,
Dave



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

Reply via email to