# HG changeset patch # User truelight # Date 2005-08-06 21:50:26 # Node ID 19bff0929c47d90834549485bd76d0bc058314c4 # Parent bf4d7cb16c9c233080586fa66fcb113156fbf934 (svn r2825) -Fix: GCC that put deps in the wrong dirs can now compile OTTD again diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1036,15 +1036,15 @@ DEPS_MAGIC := $(shell mkdir -p .deps .de %.o: %.c $(MAKE_CONFIG) endian_target.h table/strings.h $(call cmd,c_compile) - @mv $(<:%.c=%.d) $(<:%.c=.deps/%.d) + @[ -f $(<:%.c=%.d) ] && mv $(<:%.c=%.d) $(<:%.c=.deps/%.d) || mv $(*F).d $(<:%.c=.deps/%.d) %.o: %.cpp $(MAKE_CONFIG) endian_target.h table/strings.h $(call cmd,cxx_compile) - @mv $(<:%.cpp=%.d) $(<:%.cpp=.deps/%.d) + @[ -f $(<:%.cpp=%.d) ] && mv $(<:%.cpp=%.d) $(<:%.cpp=.deps/%.d) || mv $(*F).d $(<:%.cpp=.deps/%.d) %.o: %.m $(MAKE_CONFIG) endian_target.h table/strings.h $(call cmd,objc_compile) - @mv $(<:%.m=%.d) $(<:%.m=.deps/%.d) + @[ -f $(<:%.m=%.d) ] && mv $(<:%.m=%.d) $(<:%.m=.deps/%.d) || mv $(*F).d $(<:%.m=.deps/%.d) # Silence stale header dependencies %.h: