The latest version of make has the --output-sync option, which can do STDOUT of each target atom so that when using make --jobs=N
operations were not performed for several purposes,
Unfortunately, I have to use make v 3.81 , because the one that comes with our SDK.
To determine if I need --output-sync , I added some “warnings” around my goals
all: $(patsubst %.cpp, %.o, $(wildcard *.cpp)) %.o: %.cpp @echo BEFORE @echo MAKEFLAGS=$(MAKEFLAGS) qcc.exe $(CC_FLAGS) $@ $< @echo AFTER
The exit was very alternating.
AFTER BEFOREAFTER AFTER AFTER
Is there a way to emulate the functionality of --output-sync ?
I understand that the build speed can be affected if, for example, there is a way to "block the preliminary recipe for the STDOUT mutex" and release it after the recipe.
I am fine with changing each of our goals, if necessary.
source share