News for hackers. Stuff that matters.
Re:How I stopped worrying and loved Makefiles by wizhi on Sunday April 28, 2024 @05:30AM (#40187264)
But this can literally just be done in a simple shell script as well. The makefile ends up just being a redundant way to run a shell script.
Re:How I stopped worrying and loved Makefiles by lelanthran on Sunday April 28, 2024 @07:36AM (#40187824)
> But this can literally just be done in a simple shell script as well.

Only if there's no dependencies. It's unusual that GP's type of usage has no dependencies.

Re:How I stopped worrying and loved Makefiles by blipvert on Sunday April 28, 2024 @11:41AM (#40189413)
I build .tf files from parameters for each host in the Makefile (and script which knows the vSphere topology) for one-shot execution (it only creates the VM, it doesn’t manage the lifecycle) and also template config that needs to be done before deployment - there are plenty of dependencies
Re:How I stopped worrying and loved Makefiles by chuckadams on Sunday April 28, 2024 @12:08PM (#40189588)
When my shell scripts depend on another script ... they run the other script. Make definitely has its place, especially when dependencies get complex and parallel, but it's hardly necessary for simple cases. Once Make is needed, it's trivial to drop in and have it wrap the standalone scripts.
Re:How I stopped worrying and loved Makefiles by lelanthran on Sunday April 28, 2024 @01:34PM (#40190249)
> When my shell scripts depend on another script ... they run the other script.

I hear you, but you're running the other script unconditionally. If it downloads something, it will download it every time you run the first script.

In this simple case, make runs the other script conditionally, so it need not run every time.