Mercurial > hg > octave-lyh
changeset 17386:813523c2b581
build: Use convenience library to build tex-parser so "old-style cast" warning can be disabled.
* libinterp/Makefile.am: Place EXTRA_DIST targets for subdirs in
subdir/module.mk for more logical grouping. Add libtex_parser.la to
octinterp LIBADD variable.
* libinterp/corefcn/module.mk: Add new TEX_PARSER_INC, TEX_PARSER_SRC
definitions. Add new convenience library libtex_parser.la where CXXFLAGS
do not include "-Wold-style-cast".
* libinterp/parse-tree/module.mk: Add parse-tree/oct-parse.in.yy to
local EXTRA_DIST variable.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 05 Sep 2013 16:11:19 -0700 |
parents | 15e2ad6372f7 |
children | b91f29f021a3 |
files | libinterp/Makefile.am libinterp/corefcn/module.mk libinterp/parse-tree/module.mk |
diffstat | 3 files changed, 32 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/Makefile.am +++ b/libinterp/Makefile.am @@ -91,8 +91,6 @@ Makefile.in \ DOCSTRINGS \ config-features.sh \ - corefcn/oct-tex-lexer.in.ll \ - corefcn/oct-tex-symbols.in \ find-defun-files.sh \ gendoc.pl \ genprops.awk \ @@ -102,7 +100,6 @@ mkdefs \ mkops \ oct-conf.in.h \ - parse-tree/oct-parse.in.yy \ version.in.h \ $(BUILT_DISTFILES) @@ -130,7 +127,8 @@ $(OCTAVE_VALUE_SRC) \ $(PARSE_TREE_SRC) \ $(PARSER_SRC) \ - $(COREFCN_SRC) + $(COREFCN_SRC) \ + $(TEX_PARSER_SRC) noinst_LTLIBRARIES = @@ -181,6 +179,7 @@ parse-tree/libparse-tree.la \ parse-tree/libparser.la \ corefcn/libcorefcn.la \ + corefcn/libtex_parser.la \ $(top_builddir)/liboctave/liboctave.la \ $(LIBOCTINTERP_LINK_DEPS)
--- a/libinterp/corefcn/module.mk +++ b/libinterp/corefcn/module.mk @@ -4,7 +4,9 @@ corefcn/gl2ps.c \ corefcn/graphics.in.h \ corefcn/mxarray.in.h \ - corefcn/oct-errno.in.cc + corefcn/oct-errno.in.cc \ + corefcn/oct-tex-lexer.in.ll \ + corefcn/oct-tex-symbols.in ## Options functions for Fortran packages like LSODE, DASPK. ## These are generated automagically by configure and Perl. @@ -35,6 +37,9 @@ corefcn/jit-ir.h \ corefcn/pt-jit.h +TEX_PARSER_INC = \ + corefcn/oct-tex-parser.h + COREFCN_INC = \ corefcn/Cell.h \ corefcn/action-container.h \ @@ -108,7 +113,8 @@ corefcn/xnorm.h \ corefcn/xpow.h \ corefcn/zfstream.h \ - $(JIT_INC) + $(JIT_INC) \ + $(TEX_PARSER_INC) JIT_SRC = \ corefcn/jit-util.cc \ @@ -116,6 +122,10 @@ corefcn/jit-ir.cc \ corefcn/pt-jit.cc +TEX_PARSER_SRC = \ + corefcn/oct-tex-lexer.ll \ + corefcn/oct-tex-parser.yy + C_COREFCN_SRC = \ corefcn/cutils.c \ corefcn/matherr.c \ @@ -209,8 +219,6 @@ corefcn/oct-procbuf.cc \ corefcn/oct-stream.cc \ corefcn/oct-strstrm.cc \ - corefcn/oct-tex-lexer.ll \ - corefcn/oct-tex-parser.yy \ corefcn/octave-link.cc \ corefcn/pager.cc \ corefcn/pinv.cc \ @@ -293,14 +301,6 @@ -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t mv $@-t $@ -noinst_LTLIBRARIES += corefcn/libcorefcn.la - -corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC) -corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS) - -corefcn/oct-tex-lexer.cc: LEX_OUTPUT_ROOT := lex.octave_tex_ -corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy - corefcn/oct-tex-lexer.ll: corefcn/oct-tex-lexer.in.ll corefcn/oct-tex-symbols.in Makefile.am $(AWK) 'BEGIN { print "/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */"; } /^@SYMBOL_RULES@$$/ { count = 0; while (getline < "$(srcdir)/corefcn/oct-tex-symbols.in") { if ($$0 !~ /^#.*/ && NF == 3) { printf("\"\\\\%s\" { yylval->sym = %d; return SYM; }\n", $$1, count); count++; } } getline } ! /^@SYMBOL_RULES@$$/ { print }' $< > $@-t mv $@-t $@ @@ -310,3 +310,19 @@ mv $@-t $@ corefcn/txt-eng.cc: corefcn/oct-tex-symbols.cc +corefcn/oct-tex-lexer.cc: LEX_OUTPUT_ROOT := lex.octave_tex_ +corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy + + +noinst_LTLIBRARIES += \ + corefcn/libcorefcn.la \ + corefcn/libtex_parser.la + +corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC) +corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS) + +corefcn_libtex_parser_la_SOURCES = $(TEX_PARSER_SRC) +corefcn_libtex_parser_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) +corefcn_libtex_parser_la_CXXFLAGS = \ + $(filter-out -Wold-style-cast, $(AM_CXXFLAGS)) +