From 91882a4c56f16500e63f589390a170ed469edf06 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 28 Jan 2014 14:14:51 -0800 Subject: [PATCH] Remove VPATH usage in Makefiles This is just messing up all the doc dependencies because of such similar directory names and file names. Closes #11422 --- Makefile.in | 3 --- mk/rt.mk | 8 +++++--- mk/rustllvm.mk | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index af21ab4fac2..05b62157de9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -206,9 +206,6 @@ endef $(foreach target,$(CFG_TARGET),\ $(eval $(call DEF_X,$(target)))) -# Look in doc and src dirs. -VPATH := $(S)doc $(S)src - # "Source" files we generate in builddir along the way. GENERATED := diff --git a/mk/rt.mk b/mk/rt.mk index 269491649bb..f2226b1ae3e 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -67,13 +67,14 @@ NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S RT_OUTPUT_DIR_$(1) := $(1)/rt -$$(RT_OUTPUT_DIR_$(1))/%.o: rt/%.ll $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD)) +$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \ + $$(LLVM_CONFIG_$$(CFG_BUILD)) @mkdir -p $$(@D) @$$(call E, compile: $$@) $$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \ -filetype=obj -mtriple=$(1) -relocation-model=pic -o $$@ $$< -$$(RT_OUTPUT_DIR_$(1))/%.o: rt/%.c $$(MKFILE_DEPS) +$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS) @mkdir -p $$(@D) @$$(call E, compile: $$@) $$(Q)$$(call CFG_COMPILE_C_$(1), $$@, \ @@ -81,7 +82,8 @@ $$(RT_OUTPUT_DIR_$(1))/%.o: rt/%.c $$(MKFILE_DEPS) -I $$(S)src/libuv/include -I $$(S)src/rt \ $$(RUNTIME_CFLAGS_$(1))) $$< -$$(RT_OUTPUT_DIR_$(1))/%.o: rt/%.S $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD)) +$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.S $$(MKFILE_DEPS) \ + $$(LLVM_CONFIG_$$(CFG_BUILD)) @mkdir -p $$(@D) @$$(call E, compile: $$@) $$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<) diff --git a/mk/rustllvm.mk b/mk/rustllvm.mk index 8d7abc020cc..a62386818c1 100644 --- a/mk/rustllvm.mk +++ b/mk/rustllvm.mk @@ -37,7 +37,7 @@ $$(RT_OUTPUT_DIR_$(1))/$$(call CFG_STATIC_LIB_NAME_$(1),rustllvm): \ @$$(call E, link: $$@) $$(Q)$$(AR_$(1)) rcs $$@ $$(RUSTLLVM_OBJS_OBJS_$(1)) -$(1)/rustllvm/%.o: rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1)) +$(1)/rustllvm/%.o: $(S)src/rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1)) @$$(call E, compile: $$@) $$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(LLVM_CXXFLAGS_$(1)) $$(RUSTLLVM_INCS_$(1))) $$< endef