5 ms·
Make lets you specify all 3 kinds of dependencies. Requirement is the default, want can be had by prefixing the commands with - (ignore errors), and ordering ca
by tlb 8y ago
Make lets you specify all 3 kinds of dependencies. Requirement is the default, want can be had by prefixing the commands with - (ignore errors), and ordering can be had by putting the prerequisites after a |.
foo : requirement want | ordering
requirement:
generate $@
want:
- generate $@
ordering:
generate $@
Make could have been the engine behind a lot of unix infrastructure. I suspect the language-specific stuff like VPATH made it an undesirable choice.
- cperciva 8y agoOrdering is a nonportable extension, unfortunately.
- deleted 8y ago[deleted]
- Avamander 8y agoI think make is too much of a write-only language, it's also hard to debug and autogenerators (automake) create makefiles that are just abhorrent.
- zaphar 8y agoIt's not Make's fault that autogenerated Makefiles are hard to read. The same is true of pretty any much language produced by autogenerated code. It is possible to write perfectly reasonable and debuggable Makefiles if you do it by hand.
- orf 8y agoSame for assembly. Does that mean it's easy, intuitive and doesn't suffer from horrible pitfalls?
- teddyh 8y ago> Make could have been the engine behind a lot of unix infrastructure. Possibly, if the problem with file names containing spaces was fixed.
- nn3 8y agoOn SUSE Linux a few versions used Makefiles for parallelizing init scripts under sysvinit before they switched to systemd. I've been using make to drive test scripts myself recently, although i often regret it because other people editing them often make quite a mess later.
- paulddraper 8y agoNot exactly. GNU Make's order only dependency is different than what is described. If `foo` is requested, `ordering` will be requested. However the last modified time of `ordering` will not affect whether `foo` is rebuilt. There's no analogy of the last modified caching of make products to in it systems here