[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamically building (temp) include file - how to delete on exit?
From: |
ogronom |
Subject: |
Re: dynamically building (temp) include file - how to delete on exit? |
Date: |
Sat, 16 Jun 2012 14:25:26 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120401 Firefox/11.0 SeaMonkey/2.8 |
I just thought about deletion of temp file. You can add the following
after include statement
$(eval $(shell rm $(TMPF) > /dev/null))
This will remove tmp file.
address@hidden wrote:
> 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
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
Re: dynamically building (temp) include file - how to delete on exit?, Basile Starynkevitch, 2012/06/16