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

I use Make fairly similarly. One fairly major footgun the author is not avoiding is their targets will break if files or folders of the same name exist.

You should always .PHONY any non-file targets though lest you want your build to break suddenly and confusingly when you add a folder named say "build" in the authors case.

Make checks file modification dates by default to see if it can eliminate steps. Setting a target as a .PHONY indicates it's a "fake target" as in a command set to be run and not a file to be written. Makes default assumption is it's being ran to "make a file" so "make foo.html" or such.

Here's a very simple example

https://github.com/donatj/force-color.org/blob/dev/Makefile



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

Search: