3 ms·
I'm a big fan of the "backwards" build system Make. It's very concise, portable enough, and not language-specific. I use it on literally 100% of my projects to
by john-tells-all 4y ago
I'm a big fan of the "backwards" build system Make. It's very concise, portable enough, and not language-specific. I use it on literally 100% of my projects to hold small scripts. Example: "setup Python virtualenv" or "do a fast feedback loop with Lint" or "do a slower high quality feedback loop with Pylint and the full test suite".
I'm thrilled people are developing other options, building a project "forwards".
FYI "strace" on Linux makes it doable to trace build dependencies. Alas it doesn't work on macOS, and I haven't found an easy equivalent.
- cout 4y agoI agree. While I like the idea of tup (https://gittup.org/tup/ https://gittup.org/tup/ -- the first "forward" build system I remember hearing of), writing a makefile is easy enough that thinking about the problem upside-down doesn't offer a compelling reason to switch. Ptrace is one option for tracing dependencies, but it comes with a performance hit. A low-level alternative would be ftrace (https://lwn.net/Articles/608497/ https://lwn.net/Articles/608497/) or dtrace (https://en.wikipedia.org/wiki/DTrace https://en.wikipedia.org/wiki/DTrace). Tup uses LD_PRELOAD to intercept calls to C file i/o functions. On OSX it looks DYLD_INSERT_LIBRARIES would be the equivalent.
- nrclark 4y agoI use Make the exact same way. Basically, it's a very concise way to express "here are some tasks with dependencies on each other. Abort if any of them fail" and sometimes "some of these tasks can be skipped if the inputs haven't changed". You also get free tab-completion on 99% of desktop Linux systems. If I'm working on a complex software project, I'll probably use an appropriate build system. Maybe Bazel, CMake, sometimes even Autotools. But I'll probably also keep a Makefile somewhere, and use it to automate the process of running that shiny build system.
- samth 4y agoNote that the rattle system Neil talks about works cross-platform. It uses LDPRELOAD to make it work.