[llvm-commits] CVS: llvm/Makefile.rules

Reid Spencer reid at x10sys.com
Thu May 17 15:51:53 PDT 2007



Changes in directory llvm:

Makefile.rules updated: 1.434 -> 1.435
---
Log message:

Fix a problem with building .y files when BISON is not present. 
Merged from the release_20 branch.


---
Diffs of the changes:  (+11 -4)

 Makefile.rules |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.434 llvm/Makefile.rules:1.435
--- llvm/Makefile.rules:1.434	Wed May  2 16:31:09 2007
+++ llvm/Makefile.rules	Thu May 17 17:51:35 2007
@@ -1359,15 +1359,12 @@
 %.h: %.y
 
 # Rule for building the bison based parsers...
-$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
 ifneq ($(BISON),)
+$(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 $<
 	$(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
 	$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
-else
-	$(Echo) "Bison of $*.y SKIPPED -- bison not found"
-endif
 
 # IFF the .y file has changed since it was last checked into CVS, copy the .y
 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs.  We use this
@@ -1380,6 +1377,16 @@
        $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
        $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
 
+else
+$(PROJ_SRC_DIR)/%.cpp : $(PROJ_SRC_DIR)/%.cpp.cvs
+	$(Echo) "Bison of $*.y SKIPPED, bison not found -- copying .cpp.cvs"
+	$(Verb)$(CP) $(PROJ_SRC_DIR)/$*.cpp.cvs $(PROJ_SRC_DIR)/$*.cpp
+
+$(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.h.cvs
+	$(Echo) "Bison of $*.y SKIPPED, bison not found -- copying .h.cvs"
+	$(Verb)$(CP) $(PROJ_SRC_DIR)/$*.h.cvs $(PROJ_SRC_DIR)/$*.h
+endif
+
 
 $(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
 






More information about the llvm-commits mailing list