Makefiles are far too difficult to read and write compared to alternatives in my opinion when you're automating anything beyond a few simple tasks. You'll inevitably have tasks that require several lines of code, complex logic, different settings for production, staging and development environments, common code that has to be shared between build steps etc. I find it difficult to make shell scripts robust and maintainable.
I'd much rather use JavaScript's Gulp (especially if my project was using Node like in the post) or Python's Fabric if possible.
You know that you could keep the make tasks simple and have them invoke external scripts that are written in the language of your choosing, right? Building a mound of spaghetti shell code in a single file isn't the only way to construct a Makefile.
Sure, but once you want to start sharing code between your external scripts and the Makefile, it makes a lot more sense to me to write it all in a single more maintainable language.
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.
Makefiles are far too difficult to read and write compared to alternatives in my opinion when you're automating anything beyond a few simple tasks. You'll inevitably have tasks that require several lines of code, complex logic, different settings for production, staging and development environments, common code that has to be shared between build steps etc. I find it difficult to make shell scripts robust and maintainable.
I'd much rather use JavaScript's Gulp (especially if my project was using Node like in the post) or Python's Fabric if possible.