Discussion:
[9fans] mk: the `D' attribute
(too old to reply)
dexen deVries
2012-10-09 08:02:54 UTC
Permalink
why is the `D' attribute (`If the recipe exits with a non-null status, the
target is deleted.') optional and not default behavior? in what cases does
leaving half-made files make sense?

GNU make's manual states, ``This [[removal of target on error]] is almost
always what you want `make' to do, but it is not historical practice; so for
compatibility, you must explicitly request it''. is `mk' about backward
compatibility just as well?
--
dexen deVries

[[[↓][→]]]
Andy Spencer
2012-10-09 09:04:15 UTC
Permalink
Post by dexen deVries
GNU make's manual states, ``This [[removal of target on error]] is
almost always what you want `make' to do
I'm don't think GNU Make has ever correctly predicted what I want
`make' to do.

Besides that, I think there could be problems if you have an existing
file and run mk to update it and instead it just deletes the one you
have.
Anthony Sorace
2012-10-09 15:22:37 UTC
Permalink
I suspect it just that we disagree. In the most common case, I don't really
care whether such things get deleted. I sometimes very much want them
not to be deleted, because they contain interesting information on the
failure mode. I don't believe I've ever explicitly wanted them to be
deleted. That describes a good case for the current default behavior.

Anthony

Loading...