summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-11-25 17:49:22 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-11-25 17:49:22 +0000
commit6057760793503f1c1e9387402f287a9f849fc57d (patch)
treeb1577ae01350c5ba91f3183bcf917a3c0adce5b9 /Makefile.rules
parent38eeb15ad402a90831d42820e619c4298f6505a9 (diff)
downloadllvm-6057760793503f1c1e9387402f287a9f849fc57d.tar.gz
llvm-6057760793503f1c1e9387402f287a9f849fc57d.tar.bz2
llvm-6057760793503f1c1e9387402f287a9f849fc57d.tar.xz
Added a pseudo-hack: The Makefile now copies Makefiles from source tree to
object tree if it is missing. This means that new Makefiles should get picked up automagically, requiring less bothersome re-configuring after updates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index a3b57e1110..380910818a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -395,6 +395,11 @@ RObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(RObjs))
ifdef DIRS
all install clean test bytecode ::
$(VERB) for dir in ${DIRS}; do \
+ $(MKDIR) $$dir; \
+ if [ ! -f $$dir/Makefile ]; \
+ then \
+ cp $(SourceDir)/$$dir/Makefile $$dir/Makefile; \
+ fi; \
($(MAKE) -C $$dir $@) || exit 1; \
done
endif
@@ -408,15 +413,20 @@ test :: $(addsuffix /.maketest , $(PARALLEL_DIRS))
bytecode :: $(addsuffix /.makebytecode, $(PARALLEL_DIRS))
%/.makeall %/.makeinstall %/.makeclean %/.maketest %/.makebytecode:
- $(VERB) $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
+ $(VERB) $(MKDIR) $(@D); cp $(SourceDir)/$(@D)/Makefile $(@D); $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
endif
# Handle directories that may or may not exist
ifdef OPTIONAL_DIRS
all install clean test bytecode ::
$(VERB) for dir in ${OPTIONAL_DIRS}; do \
- if [ -d $$dir ]; \
+ if [ -d $(SourceDir)/$$dir ]; \
then\
+ $(MKDIR) $$dir; \
+ if [ ! -f $$dir/Makefile ]; \
+ then \
+ cp $(SourceDir)/$$dir/Makefile $$dir/Makefile; \
+ fi; \
($(MAKE) -C$$dir $@) || exit 1; \
fi \
done