all: startup_armclang startup_armasm main_armclang
startup_armclang:
armclang --target=arm-arm-none-eabi -march=armv7-r -DBL1 _DRAM_JUMP -E -x assembler-with-cpp ./startup.s > temp.s
startup_armasm:
armasm --diag_style=gnu --brief_diagnostics -g --debug --keep --cpu=Cortex-R5 -I. -I./System -o startup.o temp.s
rm -f temp.s
main_armclang:
armclang -c --target=arm-arm-none-eabi -marm -march=armv7-r -mcpu=cortex-r5 -g1 --debug -O0 -fno-function-sections -fno-data-sections -mfloat-abi=soft -mfpu=none -I. -I./System Main.c -o Main.o -MMD -MF Main.d
我尝试了:$>使全部>logmake:警告:File
Makefile
,但仅记录为以下日志:
armclang --target=arm-arm-none-eabi -march=armv7-r -DBL1 _DRAM_JUMP -E -x assembler-with-cpp ./startup.s > ./temp.s
armasm --diag_style=gnu --brief_diagnostics -g --debug -keep --cpu=Cortex-R5 -I . -I./System -o ./startup.o temp.s
rm -f temp.s
armclang -c --target=arm-arm-none-eabi -marm -march=armv7-r -mcpu=cortex-r5 -g1 --debug -O0 --fno-function-sections --fno-data-sections -mfloat-abi=soft -mfpu=none -I . -I./System Main.c -o Main.o -MMD -MF Main.d
对于类似的问题,您应该指定外壳 正在使用并用该外壳的名称标记问题。认为您正在使用
csh
tcsh
#error Whoops
$ echo $SHELL
/bin/bash
我破坏的项目(未能构建)如下:
$ make
cc -c -o bar_init.o bar_init.c
cc -c -o default_opt_init.o default_opt_init.c
cc -c -o foo_init.o foo_init.c
cc -c -o init.o init.c
cc -c -o main.o main.c
main.c:3:2: error: #error Whoops
3 | #error Whoops
| ^~~~~
make: *** [<builtin>: main.o] Error 1
我可以在仍将其发送到控制台的同时记录标准输出和标准 以您尝试的方式:
$ make 2>&1 | tee log
cc -c -o bar_init.o bar_init.c
cc -c -o default_opt_init.o default_opt_init.c
cc -c -o foo_init.o foo_init.c
cc -c -o init.o init.c
cc -c -o main.o main.c
main.c:3:2: error: #error Whoops
3 | #error Whoops
| ^~~~~
make: *** [<builtin>: main.o] Error 1
$ cat log
cc -c -o bar_init.o bar_init.c
cc -c -o default_opt_init.o default_opt_init.c
cc -c -o foo_init.o foo_init.c
cc -c -o init.o init.c
cc -c -o main.o main.c
main.c:3:2: error: #error Whoops
3 | #error Whoops
| ^~~~~
make: *** [<builtin>: main.o] Error 1
因此在
bash
中起作用。我也有
tcsh
壳:
$ tcsh
> make clean
rm -f prog *.o
> make 2>&1 | tee log
Ambiguous output redirect.
> make 2 > & 1 |
当您看到的时,shell重定向语法在
tcsh
和
bash
中并不相同。
(并且错误Ambiguous output redirect
从未通过bash
发出)。
[t]csh
重定向设施不如
bash
方便。到 实现您需要做的事情:
[t]csh