aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-05-17 22:51:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-05-17 22:51:35 +0000
commit413f2f961af246ff6422726fb8071555c6cacb44 (patch)
tree0ced9c22e942c1e37e429dfb26baec160948eca0 /Makefile.rules
parent9f26f73179edecbbac322c54aee7eda2fc3907ec (diff)
downloadexternal_llvm-413f2f961af246ff6422726fb8071555c6cacb44.zip
external_llvm-413f2f961af246ff6422726fb8071555c6cacb44.tar.gz
external_llvm-413f2f961af246ff6422726fb8071555c6cacb44.tar.bz2
Fix a problem with building .y files when BISON is not present.
Merged from the release_20 branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 888c5bd..d83f2fa 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1359,15 +1359,12 @@ all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
%.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 @@ $(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
$(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