help-make
[Top][All Lists]
Advanced

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

Re: dynamically building (temp) include file - how to delete on exit?


From: gnu_make0
Subject: Re: dynamically building (temp) include file - how to delete on exit?
Date: Sat, 16 Jun 2012 12:37:13 -0500

On Sat 6/16/12 12:39 EDT ogronom wrote:
> I'm not sure, but maybe you don't need include and temp files. Try
> something like this.
> 
> $(eval $(shell build-ddef.sh))

Nice idea, but I need help to get it to work, take a look:

  /tmp $ cat makefile

  $(eval $(shell echo -e 'bam=hi\nfoo=123'))

  .PHONEY: bar
  bar:
          @echo foo: $(foo)
          @echo 
          @echo bam: $(bam)
  /tmp $ make bar
  foo:

  bam: hi foo=123

What should the eval code be changed to so that foo has the proper value
of '123'?  I need to support shell output defining about 7 macros,
each of which needs to be parsed by make as a separate line (right?).

I've looked the texinfo help on 'eval'; my hunch is this is possible,
with proper metaquoting, and possibly the use of define, call, or another
approach I'm unaware of.  Any help or examples appreciated.

--
thanks



reply via email to

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