comparison libinterp/corefcn/module.mk @ 17378: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 de4cf28c7e11
children fedcd3717ebc
comparison
equal deleted inserted replaced
17377:15e2ad6372f7 17378:813523c2b581
2 corefcn/module.mk \ 2 corefcn/module.mk \
3 corefcn/defaults.in.h \ 3 corefcn/defaults.in.h \
4 corefcn/gl2ps.c \ 4 corefcn/gl2ps.c \
5 corefcn/graphics.in.h \ 5 corefcn/graphics.in.h \
6 corefcn/mxarray.in.h \ 6 corefcn/mxarray.in.h \
7 corefcn/oct-errno.in.cc 7 corefcn/oct-errno.in.cc \
8 corefcn/oct-tex-lexer.in.ll \
9 corefcn/oct-tex-symbols.in
8 10
9 ## Options functions for Fortran packages like LSODE, DASPK. 11 ## Options functions for Fortran packages like LSODE, DASPK.
10 ## These are generated automagically by configure and Perl. 12 ## These are generated automagically by configure and Perl.
11 OPT_HANDLERS = \ 13 OPT_HANDLERS = \
12 corefcn/DASPK-opts.cc \ 14 corefcn/DASPK-opts.cc \
32 JIT_INC = \ 34 JIT_INC = \
33 corefcn/jit-util.h \ 35 corefcn/jit-util.h \
34 corefcn/jit-typeinfo.h \ 36 corefcn/jit-typeinfo.h \
35 corefcn/jit-ir.h \ 37 corefcn/jit-ir.h \
36 corefcn/pt-jit.h 38 corefcn/pt-jit.h
39
40 TEX_PARSER_INC = \
41 corefcn/oct-tex-parser.h
37 42
38 COREFCN_INC = \ 43 COREFCN_INC = \
39 corefcn/Cell.h \ 44 corefcn/Cell.h \
40 corefcn/action-container.h \ 45 corefcn/action-container.h \
41 corefcn/c-file-ptr-stream.h \ 46 corefcn/c-file-ptr-stream.h \
106 corefcn/workspace-element.h \ 111 corefcn/workspace-element.h \
107 corefcn/xdiv.h \ 112 corefcn/xdiv.h \
108 corefcn/xnorm.h \ 113 corefcn/xnorm.h \
109 corefcn/xpow.h \ 114 corefcn/xpow.h \
110 corefcn/zfstream.h \ 115 corefcn/zfstream.h \
111 $(JIT_INC) 116 $(JIT_INC) \
117 $(TEX_PARSER_INC)
112 118
113 JIT_SRC = \ 119 JIT_SRC = \
114 corefcn/jit-util.cc \ 120 corefcn/jit-util.cc \
115 corefcn/jit-typeinfo.cc \ 121 corefcn/jit-typeinfo.cc \
116 corefcn/jit-ir.cc \ 122 corefcn/jit-ir.cc \
117 corefcn/pt-jit.cc 123 corefcn/pt-jit.cc
124
125 TEX_PARSER_SRC = \
126 corefcn/oct-tex-lexer.ll \
127 corefcn/oct-tex-parser.yy
118 128
119 C_COREFCN_SRC = \ 129 C_COREFCN_SRC = \
120 corefcn/cutils.c \ 130 corefcn/cutils.c \
121 corefcn/matherr.c \ 131 corefcn/matherr.c \
122 corefcn/siglist.c \ 132 corefcn/siglist.c \
207 corefcn/oct-obj.cc \ 217 corefcn/oct-obj.cc \
208 corefcn/oct-prcstrm.cc \ 218 corefcn/oct-prcstrm.cc \
209 corefcn/oct-procbuf.cc \ 219 corefcn/oct-procbuf.cc \
210 corefcn/oct-stream.cc \ 220 corefcn/oct-stream.cc \
211 corefcn/oct-strstrm.cc \ 221 corefcn/oct-strstrm.cc \
212 corefcn/oct-tex-lexer.ll \
213 corefcn/oct-tex-parser.yy \
214 corefcn/octave-link.cc \ 222 corefcn/octave-link.cc \
215 corefcn/pager.cc \ 223 corefcn/pager.cc \
216 corefcn/pinv.cc \ 224 corefcn/pinv.cc \
217 corefcn/pr-output.cc \ 225 corefcn/pr-output.cc \
218 corefcn/procstream.cc \ 226 corefcn/procstream.cc \
291 $(SED) < $< \ 299 $(SED) < $< \
292 -e "s|%NO_EDIT_WARNING%|DO NOT EDIT! Generated automatically from $(<F) by Make.|" \ 300 -e "s|%NO_EDIT_WARNING%|DO NOT EDIT! Generated automatically from $(<F) by Make.|" \
293 -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t 301 -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t
294 mv $@-t $@ 302 mv $@-t $@
295 303
296 noinst_LTLIBRARIES += corefcn/libcorefcn.la 304 corefcn/oct-tex-lexer.ll: corefcn/oct-tex-lexer.in.ll corefcn/oct-tex-symbols.in Makefile.am
305 $(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
306 mv $@-t $@
307
308 corefcn/oct-tex-symbols.cc: corefcn/oct-tex-symbols.in Makefile.am
309 $(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } /^#/ { } { if (NF == 3) { printf(" { %s, %s },\n", $$2, $$3); count++; } }' $< > $@-t
310 mv $@-t $@
311
312 corefcn/txt-eng.cc: corefcn/oct-tex-symbols.cc
313 corefcn/oct-tex-lexer.cc: LEX_OUTPUT_ROOT := lex.octave_tex_
314 corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy
315
316
317 noinst_LTLIBRARIES += \
318 corefcn/libcorefcn.la \
319 corefcn/libtex_parser.la
297 320
298 corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC) 321 corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC)
299 corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS) 322 corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS)
300 323
301 corefcn/oct-tex-lexer.cc: LEX_OUTPUT_ROOT := lex.octave_tex_ 324 corefcn_libtex_parser_la_SOURCES = $(TEX_PARSER_SRC)
302 corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy 325 corefcn_libtex_parser_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS)
303 326 corefcn_libtex_parser_la_CXXFLAGS = \
304 corefcn/oct-tex-lexer.ll: corefcn/oct-tex-lexer.in.ll corefcn/oct-tex-symbols.in Makefile.am 327 $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
305 $(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 328
306 mv $@-t $@
307
308 corefcn/oct-tex-symbols.cc: corefcn/oct-tex-symbols.in Makefile.am
309 $(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } /^#/ { } { if (NF == 3) { printf(" { %s, %s },\n", $$2, $$3); count++; } }' $< > $@-t
310 mv $@-t $@
311
312 corefcn/txt-eng.cc: corefcn/oct-tex-symbols.cc