]> www.ginac.de Git - ginac.git/blobdiff - ginsh/Makefile.am
Within mLi_numeric, set signs of the imaginary parts correctly for G_numeric.
[ginac.git] / ginsh / Makefile.am
index 0cdab1d5c1f0b81d3e8021245a4a10a8f2ab0fa8..72a48e86e7f02c35f1d7192fba99a2b2d6013f4a 100644 (file)
@@ -1,17 +1,27 @@
 ## Process this file with automake to produce Makefile.in
 
 bin_PROGRAMS = ginsh
-ginsh_SOURCES = ginsh_parser.yy ginsh_lexer.ll ginsh.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
+
 man_MANS = ginsh.1
-YFLAGS = -d
-EXTRA_DIST = ginsh_parser.h
+
+CLEANFILES = ginsh_fcn_help.h ginsh_op_help.h
+EXTRA_DIST = ginsh_fcn_help.py ginsh_op_help.py
 
 # files created by sed scripts
-ginsh_fcn_help.c: ginsh.1 ginsh_fcn_help.sed
-       sed -n -f ginsh_fcn_help.sed <$< >$@
+ginsh_fcn_help.h: ginsh.1.in $(srcdir)/ginsh_fcn_help.py
+       $(PYTHON) $(srcdir)/ginsh_fcn_help.py -o $@ $<
+
+ginsh_op_help.h: ginsh.1 $(srcdir)/ginsh_op_help.py
+       $(PYTHON) $(srcdir)/ginsh_op_help.py -o $@ $<
 
-ginsh_op_help.c: ginsh.1 ginsh_op_help.sed
-       sed -n -f ginsh_op_help.sed <$< >$@
+# 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.cc: ginsh_fcn_help.c ginsh_op_help.c
+ginsh_parser.o: ginsh_fcn_help.h ginsh_op_help.h ginsh_parser.hpp