As with everything, including computers, there are trade-offs. Don't judge ONLY by the first contact or StackOverflow responses. We need to dig that kind of long term solution by its possibilities.
You can use a folder/file name as a task name and this actually highlights one of the benefits of make that a lot of other systems either don't do, or make difficult.
Now when you run make deploy, npm install will run if the package.json file is newer than the node_modules directory and the .env file will be created if it doesn't exist.
Makefile seems namespace-limited and unpredictable to me.
I cannot use folder name as a task name...
As with everything, including computers, there are trade-offs. Don't judge ONLY by the first contact or StackOverflow responses. We need to dig that kind of long term solution by its possibilities.
About using the folder name, try:
.PHONY: task-with-same-folder-same
task-with-same-folder-same:
You can use a folder/file name as a task name and this actually highlights one of the benefits of make that a lot of other systems either don't do, or make difficult.
Suppose you have the following rules:
Now when you run
make deploy
,npm install
will run if thepackage.json
file is newer than thenode_modules
directory and the.env
file will be created if it doesn't exist.makefile has a lot of things to complain about, unpredictable I simply don't see. It's rock solid, and hasn't changed massively in over a decade.