News for hackers. Stuff that matters.
Re:Writing Makefiles for Python Projects by wahern on Thursday April 01, 2021 @06:40PM (#26667146)
I wish more people would read https://www.gnu.org/software/make/manual/html_node/Standard-....

Once upon a time anybody using a Unix-like OS was familiar with most of those standard targets as a consequence of the ubiquity of autotools, especially when package repositories weren't so comprehensive and it was more common to download and build tarballs locally.

But at my current job, there's no rhyme or reason to make targets. Something like `make build` (where build may or may not be the default target, likely accidentally if it is) is more likely to install Go toolchain dependencies than to build any of the project source code. And of course little if any attempt is made to actually declare dependencies, correct or broken, as for so many programmers these days a Makefile is just a container for ad hoc shell code.

I don't often make use of autotools in my own projects as I can usually get good mileage from plain POSIX make, switching to GNU make in a bind, but I religiously try to adhere to the standard targets and other build and distribution conventions outlined at https://www.gnu.org/software/make/manual/html_node/Makefile-... and https://www.gnu.org/prep/standards/standards.html#Managing-R...

Re:Writing Makefiles for Python Projects by ForHackernews on Friday April 02, 2021 @05:12AM (#26670060)
> for so many programmers these days a Makefile is just a container for ad hoc shell code.

Not gonna lie, that's completely what it is for me. I don't work in any compiled languages, and I don't have any kind of a "build target" (unless you count a Docker image?) in my workflow.

Some old timers insist that "make test" (what are you 'making'?) is more intuitive than "run_tests.sh" so I indulge them. But it's just a list of 'phony' and some weirdly-formatted bash with tabs.

Re:Writing Makefiles for Python Projects by sneak on Thursday April 01, 2021 @06:49PM (#26667248)
Autotools are hot garbage stuck in the 1980s, and I can't fault anyone for avoiding the writing or advice of the organization that has not only failed to modernize them but has also stolen decades or centuries of person-hours of life from people due to the terrible inefficiency of this piece of critical infrastructure.