Re:Show HN: Minimal build system using just /bin/sh
by svckr on Friday August 18, 2017 @07:29AM
(#15045227)
Regarding DAG: tsort (1) sorts input lines by interpreting them as a list of edges. I guess that's what you where referring to when you said "cumbersome" :)
$ cat > f
a c
a d
b c
^D
$ tsort f
a
b
d
c
Re:Show HN: Minimal build system using just /bin/sh
by vog on Friday August 18, 2017 @08:12AM
(#15045413)
The problem is not tsort, it is adding, removing, updating items in such a text file. (not to mention nasty corner cases like filenames containing whitespaces, or the security implications of filenames containing newlines)
Re:Show HN: Minimal build system using just /bin/sh
by chenglou on Friday August 18, 2017 @06:34AM
(#15045002)
Tup is pretty darn amazing. I've never had such a high success rate while writing build rules under it. "Once it builds, it has no bug". Not to mention the great speed to begin with.
Is there any similar build system? I know of https://github.com/droundy/fac, but it's not cross-platform
Re:Show HN: Minimal build system using just /bin/sh
by dom0 on Friday August 18, 2017 @07:37AM
(#15045264)
tup sounds similar to qbs. I found qbs to be a most amazing C++ build system, it's the only one I used that is
1) reasonably easy to use 2) very fast 3) very correct
Most build systems fail 3), usually 2) and often also 1).
Re:Show HN: Minimal build system using just /bin/sh
by CJefferson on Friday August 18, 2017 @12:00PM
(#15047325)
What makes tup amazing is it traces which files a program touches, so assuming your programs obey the rule "I need to rerun if I have different command line arguments or something I read has changed", you get perfect dependencies for any program. I use it for running experiments with custom programs and scripts all the time, and it just refund the parts I need.
You can find a nice explanation in the "tup" build tool, although there are of course many others: http://gittup.org/tup/
And yes, you can express DAGs with text and/or filesystem operations (plus symlinks), but not efficiently and writing code that operates on that level is cumbersome.