mattdibi / redox-w-firmware

Firmware for nordic MCUs used in the Redox wireless keyboard
MIT License
77 stars 42 forks source link

make keyboard fw failed on `.SECONDARY:` section #33

Open hitsmaxft opened 5 months ago

hitsmaxft commented 5 months ago

Build environment : mac intel and mac m1 GNU Make 4.4.1

building will failure since build directories is not created, for example, _build

make -C redox-w-keyboard-basic/custom/armgcc
make[1]: Entering directory '/Users/qixiang/Projects/keyboards/redox-w-firmware/redox-w-keyboard-basic/custom/armgcc'
Compiling file: system_nrf51.c
Assembler messages:
Fatal error: can't create _build/system_nrf51.o: No such file or directory
make[1]: *** [Makefile:153: _build/system_nrf51.o] Error 1
make[1]: Leaving directory '/Users/qixiang/Projects/keyboards/redox-w-firmware/redox-w-keyboard-basic/custom/armgcc'
make: *** [Makefile:4: all] Error 2

to fix this issue , need to add all to the .SECONDARY section will fill the issue

- .SECONDARY:
+ .SECONDARY: all

#building all targets
all: $(OUTPUT_BINARY_DIRECTORY)/nrf51822_xxac-keyboard-left.hex  \
     $(OUTPUT_BINARY_DIRECTORY)/nrf51822_xxac-keyboard-right.hex

Since .SECONDARY will keep building targets after build. I'm wondering what purpose does it placed here