←back to thread

Be Aware of the Makefile Effect

(blog.yossarian.net)
431 points thunderbong | 1 comments | | HN request time: 0.346s | source
Show context
donatj ◴[] No.42663834[source]
If I had a nickel for every time I have seen a Makefile straight up copied from other projects and modified to "work" while leaving completely unrelated unnecessary build steps and targets in place.

It's a major pet peeve of mine.

replies(1): >>42663962 #
bboygravity ◴[] No.42663962[source]
How do you know what is and isn't related if nothing is documented?

Trial and error?

Well have fun with that :p

replies(3): >>42664164 #>>42665315 #>>42667060 #
1. rmgk ◴[] No.42665315[source]
You find the first part in your stack that is documented (e.g., make is documented, even if your makefile is not) and use that documentation to understand the undocumented part. You then write down your findings for the next person.

If you don’t have enough time, write down whatever pieces you understood, and write down what parts “seem to work, but you don’t understand“ to help make progress towards better documentation.

If you put the documentation as comments into the file, this can make copy&pasting working examples into a reasonably solid process.