Re: When recipe starts with spaces and contains colon
Paul Smith <[email protected]> Mon, 02 Feb 2026 07:45:14 -0500
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
On Sat, 2026-01-31 at 11:18 +0800, lijh.8 via Users list for the GNU implementation of make wrote: > Recipe in both Makefiles starts with spaces. > Is not the argument to echo command a quoted text string? > Why example 1 does not report `missing separator` too? >=20 > $ cat Makefile > test: > @echo "recipe starts with space and has : colon, isn't > this a quoted text string " It's because by adding a colon, you've added a separator. So there's now not a missing separator. Make doesn't "do" quoting, at all. To make, single- and double-quote characters are treated like an "a" or "b" or any other simple character. So, the line: @echo "colon : here" is interpreted by make as a rule with two targets '@echo' and '"colon', each with a prerequisite 'here"'. If the colon is missing then there's no seprator and so make interpret this line.