Re:Tired of Makefiles
by xmprt on Monday May 13, 2024 @06:33PM
(#40349355)
make still has a better UI than shell scripts. With shell scripts you have to maintain multiple files whereas a Makefile has all the scripts in a single file.
[ Parent
| on HN ]
No you don't. I like makefiles because of the dependencies between targets but for simple multi-target things I still do shell scripts like
mything() {
# ...
}
otherthing() {
# ...
}
if [ $# -eq 0 ]; then
echo "Usage: ./run.sh [mything, otherthing]"
exit 1
fi
"$@"
Re:Tired of Makefiles
by collinvandyck76 on Monday May 13, 2024 @07:09PM
(#40349651)
I've been writing scripts like this but with a case/esac at the bottom to map $1 to the right command. Have never thought about doing this instead. thank you for opening my eyes!
Been There, Done That, Bought The T-Shirt and leads to unmaintainable shit. One script per action. The end.
Re:Tired of Makefiles
by collinvandyck76 on Tuesday May 14, 2024 @10:12AM
(#40355427)
Maybe for your usecase, sure, but my usecase is my own dotfiles which has some of these helper scripts and it's a good fit there.
You express no nuance and only say that something is wrong without explaining why. Your communication skills lack "skill" and "communication". Your absolutism makes me convinced that you are are either wrong or incapable to explain why you would be right.
Re:Tired of Makefiles
by edflsafoiewq on Monday May 13, 2024 @06:45PM
(#40349448)
Why is that a better UI?
wth. makefile can include other makefiles.