# HG changeset patch # User John W. Eaton # Date 1363199594 14400 # Node ID faaf60aa457ced89309c353eb4c21849f575c9a7 # Parent 00da706fba4807446d1b263017e39f5d14e33067 use separate automake convenience library for bison and flex generated files * libinterp/Makefile.am (DIST_SRC): Include $(PARSER_SRC). (liboctinterp_la_LIBADD): Include parse-tree/libparser.la. * libinterp/parse-tree/module.mk (PARSE_TREE_INC): Remove $(PARSER_INC) from the list. (PARSE_TREE_SRC): Remove $(PARSER_SRC) from the list. (noinst_LTLIBRARIES): Include parse-tree/libparser.la in the list. (parse_tree_libparser_la_SOURCES, parse_tree_libparser_la_CPPFLAGS, parse_tree_libparser_la_CXXFLAGS): New varibles. Filter out -Wold-style-cast from CXXFLAGS for parser convenience library. diff -r 00da706fba48 -r faaf60aa457c libinterp/Makefile.am --- a/libinterp/Makefile.am Wed Mar 13 11:22:31 2013 -0700 +++ b/libinterp/Makefile.am Wed Mar 13 14:33:14 2013 -0400 @@ -125,6 +125,7 @@ octave.cc \ $(OCTAVE_VALUE_SRC) \ $(PARSE_TREE_SRC) \ + $(PARSER_SRC) \ $(INTERP_CORE_SRC) \ $(INTERPFCN_SRC) \ $(COREFCN_SRC) @@ -178,6 +179,7 @@ liboctinterp_la_LIBADD = \ octave-value/liboctave-value.la \ parse-tree/libparse-tree.la \ + parse-tree/libparser.la \ interp-core/libinterp-core.la \ interpfcn/libinterpfcn.la \ corefcn/libcorefcn.la \ diff -r 00da706fba48 -r faaf60aa457c libinterp/parse-tree/module.mk --- a/libinterp/parse-tree/module.mk Wed Mar 13 11:22:31 2013 -0700 +++ b/libinterp/parse-tree/module.mk Wed Mar 13 14:33:14 2013 -0400 @@ -11,13 +11,6 @@ parse-tree/lex.ll \ parse-tree/oct-parse.yy -## FIXME: Automake does not support per-object rules. -## These rules could be emulated by creating a new convenience -## library and using per-library rules. Or we can just live -## with the extra warnings about old-sytle-casts. (09/18/2012) -#lex.lo lex.o oct-parse.lo oct-parse.o: \ -# AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS)) - PARSE_TREE_INC = \ parse-tree/pt-all.h \ parse-tree/pt-arg-list.h \ @@ -48,8 +41,7 @@ parse-tree/pt-unop.h \ parse-tree/pt-walk.h \ parse-tree/pt.h \ - parse-tree/token.h \ - $(PARSER_INC) + parse-tree/token.h PARSE_TREE_SRC = \ parse-tree/pt-arg-list.cc \ @@ -79,8 +71,7 @@ parse-tree/pt-stmt.cc \ parse-tree/pt-unop.cc \ parse-tree/pt.cc \ - parse-tree/token.cc \ - $(PARSER_SRC) + parse-tree/token.cc ## Special rules for sources which must be built before rest of compilation. @@ -106,7 +97,14 @@ $(SED) "s/%PUSH_PULL_DECL%/$$decl/" $< > $@-t mv $@-t $@ -noinst_LTLIBRARIES += parse-tree/libparse-tree.la +noinst_LTLIBRARIES += \ + parse-tree/libparse-tree.la \ + parse-tree/libparser.la parse_tree_libparse_tree_la_SOURCES = $(PARSE_TREE_SRC) parse_tree_libparse_tree_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) + +parse_tree_libparser_la_SOURCES = $(PARSER_SRC) +parse_tree_libparser_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) +parse_tree_libparser_la_CXXFLAGS = \ + $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))