Hacker News new | past | comments | ask | show | jobs | submit login

Saying that Make is a horribly implemented Shell dialect clearly seems like a misrepresentation of Make to me.

Make is a non-procedural way to describe the dependencies of your build process. You describe what you want as a result rather than the steps that the interpreter should follow.

It's possible to like or dislike this approach but it's clearly qualitatively different from Shell scripting.




I understand that distinction, but my point is that for automation like running jslint or minify, the dependencies aren't that necessary. Those commands don't take very long, and often don't have long dependency chains.

Make basically adds a very small "declarative" dependency layer, and then reimplements the shell poorly:

   - variables (from the environment)
   - command tokenization
   - escaping rules
   - functions
   - if statements
   - include
   - globbing (in the target line)
   - various magic $ variables
   - process substitution
   - eval
   ... etc.
That is, it's a full fledged programming language with different syntax than shell, but mostly the same features. I guess what might do in some cases is have a very simple "actions.sh" shell script, and then a Makefile which ONLY has simple command lines calling into actions.sh. Any functions would be in bash rather than make.

This is actually nice because there is an "upgrade path". For most simple things, you can just stick with shell. But when you need the power of make, you can upgrade without rewriting anything -- just adding a short/readable makefile.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: