[coreboot] New patch to review for coreboot: 4434f18 cbfstool: respect dependencies when building locally
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Tue Nov 6 23:51:55 CET 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1707
-gerrit
commit 4434f1831a6c79190fea864530fc668747e55494
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Wed Aug 15 16:02:52 2012 -0700
cbfstool: respect dependencies when building locally
cbfstool was not looking at any dependencies when building
by running make in util/cbfstool. By fixing this it's not
required to make clean every time you edit a file in there.
Change-Id: I544fd54d4b9dd3b277996c21ade56dc086b84800
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
util/cbfstool/Makefile | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index 7d667f8..813ba1b 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -16,6 +16,8 @@ COMMON+=cbfs-mkstage.o cbfs-mkpayload.o cbfstool.o
COMMON:=$(addprefix $(obj)/,$(COMMON))
+all: dep $(BINARY)
+
$(obj)/%.o: %.c
$(HOSTCC) $(CFLAGS) -c -o $@ $<
@@ -37,8 +39,6 @@ $(obj)/%.o: lzma/C/7zip/Common/%.cpp
$(obj)/%.o: lzma/C/Common/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
-all: $(BINARY)
-
clean:
rm -f $(COMMON) $(BINARY)
@@ -47,3 +47,13 @@ tags:
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(LDFLAGS) -o $@ $^
+
+dep:
+ @$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies
+ @$(HOSTCC) $(CFLAGS) -MM lzma/C/7zip/Decompress/*.c >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Compress/*/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Common/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/Common/*.cpp >> .dependencies
+ @$(HOSTCXX) $(CXXFLAGS) -MM lzma/*.cc >> .dependencies
+
+-include .dependencies
More information about the coreboot
mailing list