[build] fix ginsh build for automake <=1.11.
[ginac.git] / ginsh / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 bin_PROGRAMS = ginsh
4 BUILT_SOURCES = ginsh_parser.cpp ginsh_lexer.cpp
5 ginsh_SOURCES = ginsh_parser.ypp ginsh_lexer.lpp ginsh.h ginsh_extensions.h
6 ginsh_LDADD = ../ginac/libginac.la $(GINSH_LIBS)
7
8 AM_CPPFLAGS = -I$(srcdir)/../ginac -I../ginac -DIN_GINAC
9
10 man_MANS = ginsh.1
11
12 CLEANFILES = ginsh_fcn_help.h ginsh_op_help.h
13 EXTRA_DIST = ginsh_fcn_help.py ginsh_op_help.py
14
15 # files created by sed scripts
16 ginsh_fcn_help.h: ginsh.1.in $(srcdir)/ginsh_fcn_help.py
17         $(PYTHON) $(srcdir)/ginsh_fcn_help.py -o $@ $<
18
19 ginsh_op_help.h: ginsh.1 $(srcdir)/ginsh_op_help.py
20         $(PYTHON) $(srcdir)/ginsh_op_help.py -o $@ $<
21
22 # automake <=1.11 and automake >=1.12 have different conventions for naming C++ header files
23 # made by yacc.  To work with both, we write our own rule rather than using automake's.
24 ginsh_parser.cpp ginsh_parser.hpp: ginsh_parser.ypp
25         $(YACC) $(YFLAGS) -o ginsh_parser.cpp --defines=ginsh_parser.hpp $<
26
27 ginsh_parser.o: ginsh_fcn_help.h ginsh_op_help.h ginsh_parser.hpp