3 ms·
While perhaps not eloquently stated, the point is valid. Makefiles work as well as anything for most of these sorts of tasks.
by jmtulloss 15y ago
While perhaps not eloquently stated, the point is valid. Makefiles work as well as anything for most of these sorts of tasks.
- snprbob86 15y ago> Makefiles work as well as anything I'd argue that they always work better than any of these language-specific alternatives ever do. I'm not saying that GNUMake or BSD's Make or any particular Make is perfect. Surely there is still a lot of evolution to happen in build systems. What I am saying is that if you have a bunch of scripts to run & a bunch of files they produce, you can't beat a general purpose dependency graph with files for nodes and command lines for edges. Lately, I `touch Makefile` as one of the absolute first things I do on a project, regardless of language or framework, even when just hacking around. I'll even write a Makefile if I'm just doing some data analysis, like multi-stage log grepping. I find `rm intermediate.file; make` to be a nice alternative to putzing with command history and avoiding waisting time redoing expensive steps. Hell, we completely manage the configuration on our servers using Make instead of something like Puppet or Chef. So far, it's working pretty well, bit I'm still a newbie at sysadmin stuff. We've even replaced all of the db migration & other common Rails rake tasks with a few short bash scripts and ~10 lines of Make. We use .sql files for migrations and store db/schema.sql instead of db/schema.rb. It's two orders of magnitude faster to run our tiny script/dump-schemas.sh against psql instead of loading the Rails environment to query the db.