Fixed grep issue in bootloader build target (#3848)
* Changed use of '\s' in grep to '[ \t]' for portability * Pushed DFU Keyboard.h into a shell script * Fixed execution permissions on make_dfu_header,shmaster
parent
0cee0764fd
commit
149015e799
|
@ -292,14 +292,7 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf
|
||||||
|
|
||||||
bootloader:
|
bootloader:
|
||||||
make -C lib/lufa/Bootloaders/DFU/ clean
|
make -C lib/lufa/Bootloaders/DFU/ clean
|
||||||
printf "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n\n" > lib/lufa/Bootloaders/DFU/Keyboard.h
|
$(TMK_DIR)/make_dfu_header.sh $(ALL_CONFIGS)
|
||||||
printf "%s\n" "`$(GREP) "MANUFACTURER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "%s Bootloader\n" "`$(GREP) "PRODUCT\s" $(ALL_CONFIGS) -h | tail -1 | tr -d '\r'`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "%s\n" "`$(GREP) "QMK_ESC_OUTPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "%s\n" "`$(GREP) "QMK_ESC_INPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "%s\n" "`$(GREP) "QMK_LED\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "%s\n" "`$(GREP) "QMK_SPEAKER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
printf "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h
|
|
||||||
make -C lib/lufa/Bootloaders/DFU/
|
make -C lib/lufa/Bootloaders/DFU/
|
||||||
printf "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex\n"
|
printf "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex\n"
|
||||||
cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex
|
cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
ALL_CONFIGS=$*
|
||||||
|
GREP="grep"
|
||||||
|
|
||||||
|
cat <<- EOF > lib/lufa/Bootloaders/DFU/Keyboard.h
|
||||||
|
#ifndef QMK_KEYBOARD
|
||||||
|
#define QMK_KEYBOARD
|
||||||
|
|
||||||
|
$($GREP "MANUFACTURER[ \t]" $ALL_CONFIGS -h | tail -1)
|
||||||
|
$($GREP "PRODUCT[ \t]" $ALL_CONFIGS -h | tail -1 | tr -d '\r') Bootloader
|
||||||
|
$($GREP "QMK_ESC_OUTPUT[ \t]" $ALL_CONFIGS -h | tail -1)
|
||||||
|
$($GREP "QMK_ESC_INPUT[ \t]" $ALL_CONFIGS -h | tail -1)
|
||||||
|
$($GREP "QMK_LED[ \t]" $ALL_CONFIGS -h | tail -1)
|
||||||
|
$($GREP "QMK_SPEAKER[ \t]" $ALL_CONFIGS -h | tail -1)
|
||||||
|
#endif
|
||||||
|
EOF
|
Loading…
Reference in New Issue