[llvm-commits] CVS: llvm/Makefile.rules
Reid Spencer
reid at x10sys.com
Wed Dec 21 15:17:18 PST 2005
Changes in directory llvm:
Makefile.rules updated: 1.336 -> 1.337
---
Log message:
Some simple cleanups:
1. When srcdir == objdir have "spotless" say that it isn't supported in
that mode rather than just let make say "no such target"
2. Minor doc cleanups
3. Fix the double rebuild problem with yacc files. A missing dependency
caused parallel builds to skip building the .cpp file after the .cpp
file was regenerated by bison.
---
Diffs of the changes: (+12 -6)
Makefile.rules | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.336 llvm/Makefile.rules:1.337
--- llvm/Makefile.rules:1.336 Tue Dec 20 21:31:52 2005
+++ llvm/Makefile.rules Wed Dec 21 17:17:06 2005
@@ -108,6 +108,9 @@
else \
$(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
fi
+else
+spotless:
+ $(EchoCmd) "spotless target not supported for objdir == srcdir"
endif
$(BUILT_SOURCES) : $(ObjMakefiles)
@@ -475,9 +478,9 @@
done
endif
-#---------------------------------------------------------
+#-----------------------------------------------------------
# Handle the PARALLEL_DIRS options for parallel construction
-#---------------------------------------------------------
+#-----------------------------------------------------------
ifdef PARALLEL_DIRS
SubDirs += $(PARALLEL_DIRS)
@@ -1219,7 +1222,6 @@
clean-local::
-$(Verb) $(RM) -f $(LexOutput)
- $(Verb) $(RM) -f $(LexOutput)
endif
@@ -1230,7 +1232,6 @@
YaccFiles := $(filter %.y,$(Sources))
ifneq ($(YaccFiles),)
-YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
.PRECIOUS: $(YaccOutput)
@@ -1239,7 +1240,7 @@
%.cpp: %.y
%.h: %.y
-# Rule for building the bison parsers...
+# Rule for building the bison based parsers...
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
$(Echo) "Bisoning $*.y"
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
@@ -1247,8 +1248,13 @@
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
$(Echo) "*** DON'T FORGET TO CHECK IN $*.cpp and $*.h (generated files)"
+YaccObjs := $(patsubst %.y,$(ObjDir)/%.o,$(YaccFiles))
+$(YaccObjs): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
+
+YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
+
clean-local::
- $(Verb) $(RM) -f $(YaccOutput)
+ -$(Verb) $(RM) -f $(YaccOutput)
endif
###############################################################################
More information about the llvm-commits
mailing list