Discussion:
bsd make: intermediate target? (BSD equivalent of GNU's .INTERMEDIATE)
Aleksandr Miroslav
2021-05-22 01:32:25 UTC
Permalink
I'm looking for the FreeBSD make equivalent of the following GNU Makefile:


all: foo

foo: bar
cp bar foo
rm -f bar

bar:
echo foo > bar

.INTERMEDIATE: bar

Without that ".INTERMEDIATE: bar" line, GNU make would
recreate bar every single time. With it, once foo is created, it is left
alone, even if bar is deleted.

Is there a way to do such a thing with FreeBSD make? The only way I can
think of is to put it all under one target foo.

Loading...