3 ms·
That's funny, I see what you are talking about, but I had a moment like that with make, but instead likened it to prolog instead in my head one evening!
by mzs 13y ago
That's funny, I see what you are talking about, but I had a moment like that with make, but instead likened it to prolog instead in my head one evening!
- mturmon 13y agoI think Prolog is a much better analogy than Lisp. Like Prolog, the Makefile declares relationships, which go into a rule database, and then when you need to make something, the runtime scans the rules looking for what matches. This will imply other dependencies, which are satisfied recursively.
- opk 13y agoThere are two separate stages with GNU make. The first is very lisp like with the functions like $(filter) and you use it to create all the rules for the second, more prolog like, stage. A simple Makefile would do nothing for the first stage because it'd all be static text instead of function calls.
- vog 13y agoNot only that. In the above mentioned MXE project, the $(...) functions also play a vital role on the "second stage": They create a huge, automatic set of rules and actions, based on a higher-level description that is given for each package via a bunch Make variables (some of which are multiline and contain actual commands for that package).