From: Richard Kreckel Date: Wed, 31 Jul 2013 21:33:44 +0000 (+0000) Subject: Fix build from git repository. X-Git-Tag: release_1-6-3~48 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=8bd8cedd086aeaf08630d5357af37151e1d06d06;ds=sidebyside Fix build from git repository. To make automake aware of lex and yacc files, they must be renamed. --- diff --git a/ginsh/CMakeLists.txt b/ginsh/CMakeLists.txt index dda2e00c..5281add0 100644 --- a/ginsh/CMakeLists.txt +++ b/ginsh/CMakeLists.txt @@ -6,10 +6,10 @@ include_directories( add_definitions(-DIN_GINAC) bison_target(ginsh_parser - ginsh_parser.yy + ginsh_parser.ypp ${CMAKE_CURRENT_BINARY_DIR}/ginsh_parser.cpp) flex_target(ginsh_lexer - ginsh_lexer.ll + ginsh_lexer.lpp ${CMAKE_CURRENT_BINARY_DIR}/ginsh_lexer.cpp) add_flex_bison_dependency(ginsh_lexer ginsh_parser) @@ -19,7 +19,7 @@ set(ginsh_SOURCES ) set(ginsh_HEADERS - ginsh_parser.h + ginsh_parser.hpp ginsh.h ginsh_fcn_help.h ginsh_op_help.h @@ -28,8 +28,8 @@ set(ginsh_HEADERS set(ginsh_DISTRIB ${ginsh_SOURCES} ${ginsh_HEADERS} - ginsh_parser.yy - ginsh_lexer.ll + ginsh_parser.ypp + ginsh_lexer.lpp ginsh.1.in ginsh_fcn_help.py ginsh_op_help.py @@ -51,8 +51,7 @@ add_custom_command( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ginsh_parser.h - COMMAND ${CMAKE_COMMAND} -E copy ginsh_parser.hpp ginsh_parser.h + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ginsh_parser.hpp DEPENDS ${BISON_ginsh_parser_OUTPUTS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ginsh/Makefile.am b/ginsh/Makefile.am index 5580cea9..2de56d45 100644 --- a/ginsh/Makefile.am +++ b/ginsh/Makefile.am @@ -1,7 +1,8 @@ ## Process this file with automake to produce Makefile.in bin_PROGRAMS = ginsh -ginsh_SOURCES = ginsh_parser.yy ginsh_lexer.ll ginsh.h ginsh_extensions.h +BUILT_SOURCES = ginsh_parser.cpp ginsh_lexer.cpp +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 @@ -10,7 +11,7 @@ AM_YFLAGS = -d man_MANS = ginsh.1 CLEANFILES = ginsh_fcn_help.h ginsh_op_help.h -EXTRA_DIST = ginsh_parser.h ginsh_fcn_help.py ginsh_op_help.py +EXTRA_DIST = ginsh_fcn_help.py ginsh_op_help.py # files created by sed scripts ginsh_fcn_help.h: ginsh.1.in $(srcdir)/ginsh_fcn_help.py @@ -19,4 +20,4 @@ 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.h +ginsh_parser.o: ginsh_fcn_help.h ginsh_op_help.h ginsh_parser.cpp diff --git a/ginsh/ginsh_lexer.ll b/ginsh/ginsh_lexer.lpp similarity index 98% rename from ginsh/ginsh_lexer.ll rename to ginsh/ginsh_lexer.lpp index 7ba013ef..ec5bc0e9 100644 --- a/ginsh/ginsh_lexer.ll +++ b/ginsh/ginsh_lexer.lpp @@ -1,4 +1,4 @@ -/** @file ginsh_lexer.ll +/** @file ginsh_lexer.lpp * * Lexical analyzer definition for ginsh. * This file must be processed with flex. */ @@ -34,7 +34,7 @@ #endif #include "ginsh.h" -#include "ginsh_parser.h" +#include "ginsh_parser.hpp" #define YY_INPUT(buf, result, max_size) (result = ginsh_input(buf, max_size)) diff --git a/ginsh/ginsh_parser.yy b/ginsh/ginsh_parser.ypp similarity index 100% rename from ginsh/ginsh_parser.yy rename to ginsh/ginsh_parser.ypp