Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, it is awesome; I remember reading about redo years ago and thinking "this IS going to be awesome when released". I was trying to think of things that make, with all its legacy, does better.

The only thing I could come up with so far is when one input has multiple outputs (e.g. yacc; not quite dead, unfortunately). In gmake at least, you can do:

%.h %.c: %.y yacc ....

In redo, you'd have to have to have specific blah.h.do and blah.c.do for each blah.y file you have

The other thing is multiple ways to generate the same file; as far as I know, make can do that but then the result is ambiguous - it's actually better than redo doesn't try.



There are relatively painless workarounds for both situations.

For multiple outputs, you can just make sure that anybody who depends on %.c also depends on %.h. This is pretty easy in the case of yacc. Then the rule can just be one for creating the %.h and you'll still never be missing a build rule.

For the problem of multiple ways to generate the same file (eg. generating a .o from either a .c or a .cpp), you can solve that by simply putting the decision logic into the .do file. This is actually better than making it implicit, because you explicitly get to say exactly which priority order to use in case both .c and .cpp exist. Make would silently pick one or the other (after also wasting time evaluating a bunch of other irrelevant rules, like ones for .pas files), which is no fun when you're debugging.


Thanks (both for the reply and for redo! oh, and for bup and sshuttle!)

The multiple-output solution is not very painful, but is kind of error prone, which stands out as redo is otherwise extremely clean, simple and robust. Perhaps something like "yytab.h_and_yytab.c.do" in the filename could work?

Quoting myself: > it's actually better than redo doesn't try.

This was a type. I mean tot say "actually better that redo doesn't try", which is what you were saying too.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: