For PR738:
authorReid Spencer <rspencer@reidspencer.com>
Thu, 24 Aug 2006 22:41:20 +0000 (22:41 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 24 Aug 2006 22:41:20 +0000 (22:41 +0000)
Demote check for bison from error to warning and make sure that the
makefile can handle an empty definition for BISON variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29861 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules
autoconf/m4/bison.m4
configure

index 42c367a9499361bb0413c491d6389f697772f500..808e2b5a7615ed4dcbe3a8867e4a2b84a90f933c 100644 (file)
@@ -1315,10 +1315,14 @@ all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
 
 # Rule for building the bison based parsers...
 $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
+ifneq ($(BISON),)
        $(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
index e186af01012e436e689983d8dbd7ff70ac9c986b..48b83cc4a61f5bad45568fad59a008f49856e6f2 100644 (file)
@@ -8,7 +8,8 @@
 AC_DEFUN([AC_PROG_BISON],
 [AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()])
 if test "$YACC" != "bison -y"; then
-  AC_MSG_ERROR([bison not found but required])
+  AC_SUBST(BISON,[])
+  AC_MSG_WARN([bison not found, can't rebuild grammars])
 else
-  AC_SUBST(BISON,[bison],[location of bison])
+  AC_SUBST(BISON,[bison])
 fi])
index 25bbe720278a603b66b654f81ec8d3050f223a84..7f35be5d566eb4f508d17c66ae6389c3b086797e 100755 (executable)
--- a/configure
+++ b/configure
@@ -6365,9 +6365,9 @@ fi
 { echo "$as_me:$LINENO: result: $llvm_cv_has_bison" >&5
 echo "${ECHO_T}$llvm_cv_has_bison" >&6; }
 if test "$YACC" != "bison -y"; then
-  { { echo "$as_me:$LINENO: error: bison not found but required" >&5
-echo "$as_me: error: bison not found but required" >&2;}
-   { (exit 1); exit 1; }; }
+
+  { echo "$as_me:$LINENO: WARNING: bison not found, can't rebuild grammars" >&5
+echo "$as_me: WARNING: bison not found, can't rebuild grammars" >&2;}
 else
   BISON=bison