4 ms·
Makefile quickly gets complicated when you have to pass in flags (--an-example-flag). e.g. dev: ./scripts/run-dev.sh $(if $(filter build,$(MAKECMDGOALS)),--b
by arbol 4y ago
Makefile quickly gets complicated when you have to pass in flags (--an-example-flag).
e.g.
dev:
./scripts/run-dev.sh $(if $(filter build,$(MAKECMDGOALS)),--build,) $(if $(filter restart,$(MAKECMDGOALS)),--restart,) ...etc
Since the project is in python it would be better to write a python script and start the tasks as subprocesses. This means you can use the python argparser you're already familiar with.
https://docs.python.org/3/library/subprocess.html https://docs.python.org/3/library/subprocess.html