tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: :: embeded in targets
>> all:foo
>> foo:
>> @echo hi
> AFAIK that isn't a valid makefile.
I don't see anything wrong with it. It certainly works with historical
makes (I tried 1.4T and 4.0.1), and, looking at the manpages, I see no
justification for any claim that there must be whitespace between the
colon and the dependencies.
> All make docs I recall require space if not TAB after the :
Where are these make docs?
http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html
(probably the closest thing to an authoritative document at easy hand)
says that
Target entries are specified by a <blank>-separated, non-null list
of targets, then a colon, then a <blank>-separated, possibly empty
list of prerequisites.
This actually sounds as though whitespace *present* between the colon
and the first prerequisite is an unspecified extension, though the
example just above that quote does show whitespace there.
It also, relevantly to this discussion, says that
Applications shall select target names from the set of characters
consisting solely of periods, underscores, digits, and alphabetics
from the portable character set [...]
Implementations may allow other characters in target names as
extensions. The interpretation of targets containing the characters
'%' and '"' is implementation-defined.
Assuming that page is as authoritative as it looks, the FreeBSD tests
in question are testing something not specified by POSIX - which is not
wrong, if that's what they want to test, but it does mean that some
other make failing on that test doesn't indicate anything but an
incompatability with FreeBSD's make. I see no a priori reason we have
to care about it (though of course we may decide we want to anyway).
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index