r/programminghorror • u/Capable-Cap9745 • Jul 26 '26
Other Same Makefile, different results
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
251
Upvotes
View all comments
Show parent comment
2
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jul 30 '26
Well, the normal behavior would be If the file exists and it has no dependencies, or all the dependencies are up to date, the target is considered up to date and nothing happens. That is of course what .PHONY solves.
Not passing args to Make is extremely common. I did look that one up, it runs the first non-special target.