Patchwork Remove race condition opportunity in cbfstool build

login
register
about
Submitter Patrick Georgi
Date 2010-02-10 12:25:04
Message ID <4B72A5A0.7000905@georgi-clan.de>
Download mbox | patch
Permalink /patch/898/
State Superseded
Headers show

Comments

Patrick Georgi - 2010-02-10 12:25:04
Hi,

r5104 seemed to fail because the target directory didn't exist for the
cbfstool object files. Make them depend on it.


Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>

Patch

Index: util/cbfstool/Makefile.inc
===================================================================
--- util/cbfstool/Makefile.inc	(revision 5104)
+++ util/cbfstool/Makefile.inc	(working copy)
@@ -21,31 +21,31 @@ 
 $(obj)/util/cbfstool:
 	mkdir -p $@
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/%.c
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/%.c $(obj)/util/cbfstool
 	printf "    HOSTCC     $(subst $(obj)/,,$(@))\n"
 	$(HOSTCC) $(CBFSTOOLFLAGS) $(HOSTCFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/%.cc
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/%.cc $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/LZMA/%.cpp
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/LZMA/%.cpp $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/LZ/%.cpp
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/LZ/%.cpp $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/RangeCoder/%.cpp
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Compress/RangeCoder/%.cpp $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Common/%.cpp
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/7zip/Common/%.cpp $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<
 
-$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/Common/%.cpp
+$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/Common/%.cpp $(obj)/util/cbfstool
 	printf "    HOSTCXX    $(subst $(obj)/,,$(@))\n"
 	$(HOSTCXX) $(CBFSTOOLFLAGS) $(HOSTCXXFLAGS) -c -o $@ $<