|
|
|
The Emacs Problem
(sites.google.com)
|
|
73 points
by mofey
5862 days ago
|
|
<<What would you rather do? Learn 16 different languages and frameworks in order to do "simple" log-file and configuration-file processing? Or just buckle down, learn Lisp, and have all of these problems go away forever? It's a rhetorical question. The answer is patently obvious at this point: Lisp is evil, and you'd damned well better write all your code in C++ and XML and JavaScript and PL*SQL and CSS and XSLT and regular expressions and all those other God-fearing red-blooded manly patriotic all-American languages from now on. No more of this crazy Lisp talk, ya hear?>> |
|
Here is what a make file should look like:
1) vpath statements for various file extensions
2) Phony targets for logical build units, including "all"
3) Generic rules for mapping .abc to .xyz; these rules should have exactly one line of code which executes an external script/tool
4) A list of edges in the dependency graph
5) A few variables as necessary to eliminate redundant edges
If you put any logic in your Makefiles, you are doing it wrong.
If your builds are slow, add empty dummy files for larger culling by timestamps. If timestamps are insufficient, codify early out logic into tools.
Not having logic in my Makefiles enables parallel execution and strong support for incremental builds. If I were to use Lisp as a build system, I'd create a DSL that had these same properties; forbidding arbitrary logic in my dependency graph. It's about finding the right balance to inject expressiveness without losing desirable properties of the DSL. This is why every developer needs to understand more about programming language design. Anytime you create any type of file format, you are doing it. And anytime you are writing any type of file format, you are reverse engineering it. Understanding the intended separation of logic for Makefiles helps me write better Makefiles.