Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> [My] Makefiles are far too difficult to read and write compared to alternatives in my opinion

Corrected for accuracy.

> when you're automating anything beyond a few simple tasks.

This is why, historically, so few projects of any scale or complexity have used Make.



Well I did say "in my opinion". I didn't find this code from the post readable for example (and this comment is directed at Make and not the script writer):

BIN := ./node_modules/.bin

UGLIFY ?= $(BIN)/uglify-js

UGLIFY_FLAGS ?= --screw-ie8

build/%.min.js: build/%.js

  @$(UGLIFY) $(UGLIFY_FLAGS) $< > $@
I find all Makefiles end up containing code like this where it makes sense when you write it but when returning to it a few weeks later you don't understand what it does anymore.


No code is readable if you don't bother to understand the language. That code right there is pretty bog-standard and frankly much easier to read than the Grunt equivalent.


Honest question: what was hard to understand in this code?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: