makefilet
automatically enables Make's mode of parallel processing (one job per CPU).
This inevitably forces Make to
manage the outputs of parallel targets.
By default makefilet
enables the line-based output synchronization in order to improve the
arrangement of output.
Make's parallel output handling has a few effects:
CTRL-C
).
Thus the user cannot see the target output, which contains the URL of the local development
server.There are a few ways to avoid these issues:
Makefile
to be executed in series (MAKEFLAGS += --jobs=1
)Starting from an example, which is executed in parallel (default behaviour -> output is hidden):
.PHONY: runserver
runserver: build_assets
python3 -m flask
Instead you may want to force a single target to be executed in single-job mode (which is good for interactive targets):
.PHONY: _runserver_single_job
_runserver_single_job:
python3 -m flask
.PHONY: runserver
runserver: build_assets
$(MAKE) --jobs=1 _runserver_single_job