I would like to start Flask in debug/development mode using a single command.
Given
A fresh terminal, changing into the project directory, activating a virtual environment and running a custom Makefile:
> cd project
> activate myenv
(myenv) > make
Output
Debug mode is OFF. However, running the commands separately turns it ON (as expected):
(myenv) > set FLASK_APP=app.py
(myenv) > set FLASK_ENV=development
(myenv) > flask run
Output
Code
I've created the following Makefile, but when run, the debug mode does not turn on:
Makefile
all:
make env && \
make debug && \
flask run
env:
set FLASK_APP=app.py
debug:
set FLASK_ENV=development
How do I improve the Makefile to run Flask in debug mode?
Note: instructions vary slightly for each operating system; at the moment, I am testing this in a Windows command prompt.


allto :make env; make debug; flask run? - JacobIRRsetx FLASK_APP app.pyetc. If this is the entirety of your makefile however you are using the wrong tool for the job, this should just be a batch file. As the first line in the make manual says: "The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them." - user657267No rule to make target 'env;. Stop.'- pylangsetxdid not work. I eventually want to extend the file to work in bash terminals. I'll try a batch file. - pylang