1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

For PR738:

Demote check for bison from error to warning and make sure that the
makefile can handle an empty definition for BISON variable.

llvm-svn: 29861
This commit is contained in:
Reid Spencer 2006-08-24 22:41:20 +00:00
parent d5644a74d8
commit 45b86c1ebe
3 changed files with 10 additions and 5 deletions

View File

@ -1315,10 +1315,14 @@ all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
# Rule for building the bison based parsers... # Rule for building the bison based parsers...
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
ifneq ($(BISON),)
$(Echo) "Bisoning $*.y" $(Echo) "Bisoning $*.y"
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $< $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
$(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h $(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 # 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 # file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this

View File

@ -8,7 +8,8 @@
AC_DEFUN([AC_PROG_BISON], AC_DEFUN([AC_PROG_BISON],
[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()]) [AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()])
if test "$YACC" != "bison -y"; then 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 else
AC_SUBST(BISON,[bison],[location of bison]) AC_SUBST(BISON,[bison])
fi]) fi])

6
configure vendored
View File

@ -6365,9 +6365,9 @@ fi
{ echo "$as_me:$LINENO: result: $llvm_cv_has_bison" >&5 { echo "$as_me:$LINENO: result: $llvm_cv_has_bison" >&5
echo "${ECHO_T}$llvm_cv_has_bison" >&6; } echo "${ECHO_T}$llvm_cv_has_bison" >&6; }
if test "$YACC" != "bison -y"; then 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;} { echo "$as_me:$LINENO: WARNING: bison not found, can't rebuild grammars" >&5
{ (exit 1); exit 1; }; } echo "$as_me: WARNING: bison not found, can't rebuild grammars" >&2;}
else else
BISON=bison BISON=bison