Makefile: Reduce use of $^ in build rules

It's rare to use all of a target's prerequisites in a recipe - replace
most cases with $< (the target's first prerequisite).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-03-02 12:01:44 -05:00
parent 9430fea2c5
commit 399d539969
5 changed files with 9 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ lib/bossac/bin/bossac:
$(Q)make -C lib/bossac bin/bossac
flash: $(OUT)klipper.bin lib/bossac/bin/bossac
@echo " Flashing $^ to $(FLASH_DEVICE) via bossac"
@echo " Flashing $< to $(FLASH_DEVICE) via bossac"
$(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi
$(Q)lib/bossac/bin/bossac -U -p "$(FLASH_DEVICE)" -a -e -w $(OUT)klipper.bin -v -b
$(Q)lib/bossac/bin/bossac -U -p "$(FLASH_DEVICE)" -a -e -w $< -v -b
$(Q)lib/bossac/bin/bossac -p "$(FLASH_DEVICE)" -b -R > /dev/null 2>&1 || true