gst/parse/: Reverted previous patch as it required to bump the flex dependency to...
[platform/upstream/gstreamer.git] / gst / parse / Makefile.am
1 # libgstparse.la is an optionally built helper library linked into core
2 noinst_LTLIBRARIES = libgstparse.la
3
4 CLEANFILES = grammar.tab.h grammar.output
5 EXTRA_DIST = grammar.y parse.l types.h
6
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
10
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 
14
15 libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS)
16 libgstparse_la_LIBADD = $(GST_ALL_LIBS)
17
18 noinst_HEADERS = grammar.tab.h
19
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
29  
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
39
40
41 .NOTPARALLEL:
42