GNU Make --output-sync不起作用?

J-D*_*zle 6 c makefile gnu-make

这让我疯狂.

对于并行make build(-j),您应该能够同步控制台输出.这是ref:

我正在使用GNU Make 3.82 for x86_64-redhat-linux-gnu

不同步的:

make -j8 all         //not synchronized
Run Code Online (Sandbox Code Playgroud)

产量(我在这里使用eclipse-cdt managedbuild):

Building file: ../dome.c
Building file: ../main.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"dome.d" -MT"dome.d" -o "dome.o" "../dome.c"
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.c"
Finished building: ../dome.c
Finished building: ../main.c


Building target: empty_linux
Invoking: GCC C Linker
gcc  -o "empty_linux"  ./dome.o ./main.o   
Finished building target: empty_linux
Run Code Online (Sandbox Code Playgroud)

同步尝试

make -j8 all --output-sync    
Run Code Online (Sandbox Code Playgroud)

产量(-O/-Oline/etc的结果相同):

make: unrecognized option '--output-sync 
Run Code Online (Sandbox Code Playgroud)

我到底做错了什么?

nwe*_*hof 11

--output-sync选项仅适用于GNU make 4.0.此外,在您的情况下,您应该使用:

--output-sync=target
Run Code Online (Sandbox Code Playgroud)

要么

-Otarget
Run Code Online (Sandbox Code Playgroud)

但这不适用于版本3.82.

  • `wget http://ftp.gnu.org/gnu/make/make-4.0.tar.bz2&& tar xjf make-4.0.tar.bz2 && cd make-4.0 && ./configure&& make && sudo make install` then `/ usr/local/bin/make --version`.全部完成!:-) (3认同)