I'm not sure, but maybe you don't need include and temp files. Try something like this.
$(eval $(shell build-ddef.sh)) [email protected] wrote: > Pls consider: > > TMPF=$(shell tmpf=$$(mktemp /tmp/ddefs.XXXXXXXXX);build-ddefs.sh > > $$tmpf;echo $$tmpf) > include $(TMPF) > # defines several make macros > > Above works so that make includes a freshly built include file, with up to > date macros. > > How do I ensure that that $(TMPF) is deleted after make exits, or after > the include line runs? > > I seem to recall that putting the "rm $(TMPF)" > in every recipe does work, but I would prefer to do the delete as soon after > the include runs as possible, or when make exits. I'm aware of > an approach that involves a while loop in a shell that polls for the make > process, sleeping, then looping until make dies, then deleting $(TMPF), but > I'm hoping > for a nicer solution. > > -- > thanks/regards, > Tom > > > > _______________________________________________ > Help-make mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-make _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
