Aleksandr Miroslav
2021-05-22 01:32:25 UTC
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.
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.