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 <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67266
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
diff --git a/util/spd_tools/Makefile b/util/spd_tools/Makefile
index d880672..3aad91c 100644
--- a/util/spd_tools/Makefile
+++ b/util/spd_tools/Makefile
@@ -3,11 +3,11 @@
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/