]> www.ginac.de Git - ginac.git/commitdiff
[build] fix ginsh build for automake <=1.11.
authorRichard Kreckel <kreckel@ginac.de>
Sun, 11 Aug 2013 11:16:15 +0000 (13:16 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 11 Aug 2013 11:25:51 +0000 (13:25 +0200)
automake <=1.11 and automake >=1.12 have different conventions for naming
C++ header files made by yacc.  To work with both, we write our own rule
rather than using automake's.

configure.ac
ginsh/Makefile.am
ginsh/ginsh_parser.ypp

index 63f6594a41d760fc9e79271192b9bbd22186b10e..9992133f5c603b2679de92ca47a02a1a8d019dd8 100644 (file)
@@ -32,9 +32,9 @@ AM_PROG_LIBTOOL
 AC_PROG_LEX
 AC_PROG_YACC
 AC_PATH_PROG(YACCEXE, $YACC, "")
-AS_IF([test "x$LEX" = "x:" -a ! -f $srcdir/ginsh/ginsh_lexer.cc],
+AS_IF([test "x$LEX" = "x:" -a ! -f $srcdir/ginsh/ginsh_lexer.cpp],
       [GINAC_WARNING([ginsh will not compile, because lex/flex is missing])])
-AS_IF([test -z "$YACCEXE" -a ! -f $srcdir/ginsh/ginsh_parser.h],
+AS_IF([test -z "$YACCEXE" -a ! -f $srcdir/ginsh/ginsh_parser.hpp],
       [GINAC_WARNING([ginsh will not compile, because yacc/bison is missing])])
 
 dnl Switch to C++ language mode for the following libraries and headers.
index 2de56d45acf1dfdf758c8a5d1ff41ceec20a9d11..72a48e86e7f02c35f1d7192fba99a2b2d6013f4a 100644 (file)
@@ -6,7 +6,6 @@ ginsh_SOURCES = ginsh_parser.ypp ginsh_lexer.lpp ginsh.h ginsh_extensions.h
 ginsh_LDADD = ../ginac/libginac.la $(GINSH_LIBS)
 
 AM_CPPFLAGS = -I$(srcdir)/../ginac -I../ginac -DIN_GINAC
-AM_YFLAGS = -d
 
 man_MANS = ginsh.1
 
@@ -20,4 +19,9 @@ ginsh_fcn_help.h: ginsh.1.in $(srcdir)/ginsh_fcn_help.py
 ginsh_op_help.h: ginsh.1 $(srcdir)/ginsh_op_help.py
        $(PYTHON) $(srcdir)/ginsh_op_help.py -o $@ $<
 
-ginsh_parser.o: ginsh_fcn_help.h ginsh_op_help.h ginsh_parser.cpp
+# automake <=1.11 and automake >=1.12 have different conventions for naming C++ header files
+# made by yacc.  To work with both, we write our own rule rather than using automake's.
+ginsh_parser.cpp ginsh_parser.hpp: ginsh_parser.ypp
+       $(YACC) $(YFLAGS) -o ginsh_parser.cpp --defines=ginsh_parser.hpp $<
+
+ginsh_parser.o: ginsh_fcn_help.h ginsh_op_help.h ginsh_parser.hpp
index 88aa9843ab09dd9b72b7343c2d582fc4dc6a54f4..c16c35cf42f64a240f32a58213b01f903198fcc0 100644 (file)
@@ -1,4 +1,4 @@
-/** @file ginsh_parser.yy
+/** @file ginsh_parser.ypp
  *
  *  Input grammar definition for ginsh.
  *  This file must be processed with yacc/bison. */