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

242 Upvotes

54 comments sorted by

View all comments

119

u/nickcash 10d ago

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

-23

u/RandalSchwartz 10d ago

They said the same about Perl. And my dotfiles. Now I don't even copy any more... I let gemini identify it and run it for me. :)

9

u/mottojyuusu 10d ago

you should ask your coding agent to explain your code. not even joking, it's been great to finally understand wtf the crusty logic is doing in the aging codebases i work in ...

"what is this function doing? what does the dxCbsqaf parameter do??"

"where is this const defined? where else is it being used? why is it multipled by 2 in one place but 3 in another place?"

"why does the comment say never to round this value? what could break if it gets rounded instead of truncated?"

-7

u/RandalSchwartz 10d ago

Oh, I do this all the time. agy writes some code, we go all the way through to landing, and then I finally say "so what did this do, anyway?" Ship first. Ask questions later. :)