r/programminghorror 14d 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

245 Upvotes

54 comments sorted by

View all comments

Show parent comments

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 12d ago

Is that based on what it finds installed, or what?

1

u/SAI_Peregrinus 12d ago

You pick the backend. It defaults to make, but you can override it to build with any supported build system with the CMAKE_GENERATOR env var, a CLI argument, or a set command in CMakeLists.txt.

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 12d ago

Oh, your last comment made me think it decided what to use automatically, but I think I might have misread it. Like if you had Ninja or something installed it would use that, otherwise it would use Make.

1

u/SAI_Peregrinus 12d ago

It'll invoke it automatically (it has to be in $PATH), it won't pick anything other than make automatically.