| | 379 | == Whitespace == |
| | 380 | |
| | 381 | make has a rather ad-hoc approach to whitespace. Most of the time it ignores it, e.g. |
| | 382 | {{{ |
| | 383 | FOO = bar |
| | 384 | }}} |
| | 385 | sets `FOO` to `"bar"`, not `" bar"`. However, sometimes whitespace is significant, |
| | 386 | and calling macros is one example. For example, we used to have a call |
| | 387 | {{{ |
| | 388 | $(call all-target, $$($1_$2_INPLACE)) |
| | 389 | }}} |
| | 390 | and this passed `" $$($1_$2_INPLACE)"` as the argument to `all-target`. This in turn generated |
| | 391 | {{{ |
| | 392 | .PHONY: all_ inplace/bin/ghc-asm |
| | 393 | }}} |
| | 394 | which caused an infinite loop, as make continually thought that `ghc-asm` was out-of-date, rebuilt it, |
| | 395 | reinvoked make, and then thought it was out of date again. |
| | 396 | |
| | 397 | The moral of the story is, avoid white space unless you're sure it'll be OK! |