target: dependencies
command1
command2
On my system (Mac OS X), make
seems to require that that Makefiles have a tab character preceding the the content of each command
line, or it throws a syntax error.
This is an annoyance when creating or editing Makefiles because I have my editor set up to be all-spaces-all-the-time.
Can you make valid Makefiles without tab characters?
Best Answer
This is a syntax oddity/requirement of
make
, it has nothing to do with Mac OS X. Unfortunately, there's nothing you can do about it if you are going to usemake
.Edit: GNU Make now supports a custom recipe prefix. See this answer.
You are not the first one to dislike this aspect of
make
. To quote Unix Haters' Handbook: