New to GNU make 4.4, we have the .WAIT
prerequisite!
Set it as a dependency, and it will pause all dependencies to the right of it until all the ones to the left are completed.
all: please_run_me and_me .WAIT before_me
Note that please_run_me
& and_me
are not ordered in relation to eachother, but both will finish before before_me
starts.
You can throw multiple .WAIT
s on a line.
There was another way added to do this too - .NOTPARALLEL
, you can read about it in the changelog or in the manual
Though it released on the 31st October 2022, some distributions (e.g.: Ubuntu) may not come with it preinstalled yet.
If you want to install make
for such devices, you'll have to build from source.