1 # libgstparse.la is an optionally built helper library linked into core
2 noinst_LTLIBRARIES = libgstparse.la
4 CLEANFILES = grammar.tab.h grammar.output
5 EXTRA_DIST = grammar.y parse.l types.h
7 # uncomment these lines to dist the generated sources
8 #BUILT_SOURCES = grammar.tab.h grammar.tab.c lex._gst_parse_yy.c
9 #libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c
11 # uncomment these lines to _NOT_ dist the generated sources
12 nodist_libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c
13 CLEANFILES += grammar.tab.c lex._gst_parse_yy.c
15 libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS)
16 libgstparse_la_LIBADD = $(GST_ALL_LIBS)
18 noinst_HEADERS = grammar.tab.h
20 grammar.tab.c grammar.tab.h: grammar.y
21 $(BISON_PATH) -d -v -p_gst_parse__yy $(srcdir)/grammar.y -o grammar.tab.c && \
22 mv grammar.tab.c grammar.tab_tmp.c && \
23 echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
24 echo '#include <config.h>' >> grammar.tab_tmp2.c && \
25 echo '#endif' >> grammar.tab_tmp2.c && \
26 cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
27 rm grammar.tab_tmp.c && \
28 mv grammar.tab_tmp2.c grammar.tab.c
30 lex._gst_parse_yy.c: parse.l grammar.tab.h
31 $(FLEX_PATH) -P_gst_parse_yy $^ && \
32 mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
33 echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c && \
34 echo '#include <config.h>' >> lex._gst_parse_yy_tmp2.c && \
35 echo '#endif' >> lex._gst_parse_yy_tmp2.c && \
36 cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c && \
37 rm lex._gst_parse_yy_tmp.c && \
38 mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c