]> www.ginac.de Git - ginac.git/commitdiff
Fix build from git repository.
authorRichard Kreckel <kreckel@ginac.de>
Wed, 31 Jul 2013 21:33:44 +0000 (21:33 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 31 Jul 2013 21:33:44 +0000 (21:33 +0000)
To make automake aware of lex and yacc files, they must be renamed.

ginsh/CMakeLists.txt
ginsh/Makefile.am
ginsh/ginsh_lexer.lpp [moved from ginsh/ginsh_lexer.ll with 98% similarity]
ginsh/ginsh_parser.ypp [moved from ginsh/ginsh_parser.yy with 100% similarity]

index dda2e00ca265aad718fcd60b35b9c076cecb8eb2..5281add0c637b08ab82a00f776f6cabcebbd9304 100644 (file)
@@ -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})
 
index 5580cea9366993a3fe0e52bc4ac04eee626092c1..2de56d45acf1dfdf758c8a5d1ff41ceec20a9d11 100644 (file)
@@ -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
similarity index 98%
rename from ginsh/ginsh_lexer.ll
rename to ginsh/ginsh_lexer.lpp
index 7ba013efa0e017897338070658b3649895987844..ec5bc0e9f3fb33b6a16810cd4dba92db0a85cbc6 100644 (file)
@@ -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))
 
similarity index 100%
rename from ginsh/ginsh_parser.yy
rename to ginsh/ginsh_parser.ypp