I agree that it shall be added to all Makefile, because
“otherwise, the behavior of make is unspecified.”
(Quote from the POSIX specifications)

Probably missing because people don't usually learn
make(1) by reading the entire manual.

.POSIX can be used as long a the makefile does not
use any feature that conflicts with POSIX. But I think
it would mislead people into thinking the non-POSIX
features are POSIX feature, so it would be best skip
it in that case.

I do however think some Makefile here that use the @
macro in the prerequisite. This is not a POSIX feature,
is seldom needed, and should be removed assuming it
is redundant given the inferred prerequisite of
inference rules.


Regards,
Mattias Andrée


On Thu, 30 Dec 2021 15:58:33 +0100
crae...@gmail.com wrote:

> Hi,
> 
> I'm wondering why the Makefiles of some suckless programs (and libs) have the
> special target `.POSIX` in them and some don't.
> For example, dwm doesn't have it in it's Makefile but there isn't a single
> non-POSIX feature used. I think it would be better to include the `.POSIX` 
> target
> simply to follow the standard and guarantee portability.
> If there is a good reason why it isn't included, please let me know.
> 
> --
> craekz
> 


Reply via email to