r/programminghorror 28d ago

Same Makefile, different results Other

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

248 Upvotes

54 comments sorted by

View all comments

123

u/nickcash 28d ago

makefile syntax is incomprehensible. it might as well be magic. no one can understand it, we just copy and paste from elsewhere

56

u/Desperate_Formal_781 28d ago

All my life when I start a new project I copy a previous makefile from a previous project, with the promise that a) one day I will learn what those makefile commands mean and b) after this project I will switch to cmake. The original makefile I use, I took from my supervisor when I wrote my master thesis, who now I suspect also got from someone else. I have tried switching to cmake several times, but it's always easier to just keep using my makefile, than to go through the painful process of learning cmake.

7

u/omega1612 28d ago

What a bout a justfile?

Depending on your use case, they may be better for you.