summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-08-06 21:50:26 +0000
committertruelight <truelight@openttd.org>2005-08-06 21:50:26 +0000
commit01f9cec6dffc402a8179020c1aec56dd35fff600 (patch)
treeb1badf3d960143de7c85c13e954777f1f0a740b3
parent36d717d77a71293e98294d2bbe0074cc7849c897 (diff)
downloadopenttd-01f9cec6dffc402a8179020c1aec56dd35fff600.tar.xz
(svn r2825) -Fix: GCC that put deps in the wrong dirs can now compile OTTD again
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7e42ca8be..4195f665a 100644
--- a/Makefile
+++ b/Makefile
@@ -1036,15 +1036,15 @@ DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video .deps/o
%.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: