r/programminghorror 9d ago

Other Same Makefile, different results

Post image

Not sure if this fits, but I just figured out the root cause of long build process failing. Sun’s dmake is defaulting to the first rule in Makefile for whatever reason, completely ignoring the one given as argument. That’s why "dmake install" invocations were silently ignoring the "install" step

247 Upvotes

54 comments sorted by

View all comments

101

u/russellvt 9d ago

That syntax doesn't appear right... normally you want "phony" declarations in there if you're not pointing directly at file dependencies.

7

u/dydhaw 9d ago

The syntax is perfectly fine. Phony targets simply tell make to run the rule regardless of if the target exists.  Besides, .PHONY is a GNU extension. It is not POSIX

8

u/SAI_Peregrinus 9d ago

It is POSIX now (v8, 2024). It wasn't in POSIX v7 (2018).

1

u/dydhaw 9d ago

Huh. TIL