From 7dd42da9a064750699058b2a9d66d84bc314b221 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Wed, 31 Aug 2022 17:16:55 -0700 Subject: [PATCH] util/spd_tools: Rebuild utils when source changes This adds source file dependencies to utilities so that they are rebuilt when the source is changed. Previously, binaries were only built if they did not already exist and never rebuilt to reflect source file changes. BUG=none TEST=verified binaries are rebuilt when source files are touched. Change-Id: I4775fe0e00e0f5d4f8b4b47331d836aba53c0e69 Signed-off-by: Caveh Jalali Reviewed-on: https://review.coreboot.org/c/coreboot/+/67266 Tested-by: build bot (Jenkins) Reviewed-by: Robert Zieba Reviewed-by: Reka Norman Reviewed-by: Martin L Roth --- util/spd_tools/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/spd_tools/Makefile b/util/spd_tools/Makefile index d8806724fa..3aad91c976 100644 --- a/util/spd_tools/Makefile +++ b/util/spd_tools/Makefile @@ -3,11 +3,11 @@ PART_ID_GEN = bin/part_id_gen all: $(SPD_GEN) $(PART_ID_GEN) -$(SPD_GEN): - go build -o $(SPD_GEN) src/spd_gen/*.go +$(SPD_GEN): src/spd_gen/*.go + go build -o $@ $^ -$(PART_ID_GEN): - go build -o $(PART_ID_GEN) src/part_id_gen/*.go +$(PART_ID_GEN): src/part_id_gen/*.go + go build -o $@ $^ clean: rm -rf bin/