9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mk: the `D' flag
@ 2013-06-18 13:50 dexen deVries
  2013-06-18 14:05 ` Friedrich Psiorz
  2013-06-19 17:51 ` Anthony Sorace
  0 siblings, 2 replies; 3+ messages in thread
From: dexen deVries @ 2013-06-18 13:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

in mk(1), why is the `D' flag (if the recipe exits with a non-null status, the 
target is deleted) optional, rather than default?

i can see why it makes little sense with together `V' flag, but for non-V 
rules, targeting plain files, i'd like it by default.

-- 
dexen deVries

[[[↓][→]]]




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] mk: the `D' flag
  2013-06-18 13:50 [9fans] mk: the `D' flag dexen deVries
@ 2013-06-18 14:05 ` Friedrich Psiorz
  2013-06-19 17:51 ` Anthony Sorace
  1 sibling, 0 replies; 3+ messages in thread
From: Friedrich Psiorz @ 2013-06-18 14:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I wouldn't. It doesn't make sense to me to delete the old, working
executable of my program just because I messed up when I made a change.

Am 18.06.2013 15:50, schrieb dexen deVries:
> in mk(1), why is the `D' flag (if the recipe exits with a non-null status, the
> target is deleted) optional, rather than default?
>
> i can see why it makes little sense with together `V' flag, but for non-V
> rules, targeting plain files, i'd like it by default.
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] mk: the `D' flag
  2013-06-18 13:50 [9fans] mk: the `D' flag dexen deVries
  2013-06-18 14:05 ` Friedrich Psiorz
@ 2013-06-19 17:51 ` Anthony Sorace
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Sorace @ 2013-06-19 17:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I can't find a record of it quickly ("mk" and "D" don't lend themselves to
helpful searches), but I feel like we had this conversation about a year
ago, no?

Summary, from my memory:

Some people would prefer it, others not. Keeping intermediaries and
failed targets around is often helpful for debugging. Keep in mind mk
can be used for things other than binaries. The cost of leaving things
around you don't want is often/usually higher than the cost of
removing things you do; the inverse is uncommon. These are all
reasons to prefer the current behavior. Add to that the high cost of
changing a default with decades of precedence, and it seems pretty
darned unlikely that mk's behavior will change here.

Anthony




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-19 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 13:50 [9fans] mk: the `D' flag dexen deVries
2013-06-18 14:05 ` Friedrich Psiorz
2013-06-19 17:51 ` Anthony Sorace

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).