1 # libgstparse.la is an optionally built helper library linked into core
2 noinst_LTLIBRARIES = libgstparse.la
4 CLEANFILES = grammar.tab.h grammar.output
11 lex._gst_parse_yy.pre.c
13 # uncomment these lines to dist the generated sources
14 #BUILT_SOURCES = grammar.tab.h grammar.tab.c lex._gst_parse_yy.c
15 #libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c
17 # uncomment these lines to _NOT_ dist the generated sources
18 nodist_libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c
19 CLEANFILES += grammar.tab.c lex._gst_parse_yy.c
21 libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS)
22 libgstparse_la_LIBADD = $(GST_ALL_LIBS)
24 noinst_HEADERS = grammar.tab.h
26 all: grammar.tab.pre.c grammar.tab.pre.h lex._gst_parse_yy.pre.c
28 grammar.tab.pre.c grammar.tab.pre.h: grammar.y
30 $(BISON_PATH) -d -v -p_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
31 mv grammar.tab.c grammar.tab_tmp.c && \
32 echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
33 echo '#include <config.h>' >> grammar.tab_tmp2.c && \
34 echo '#endif' >> grammar.tab_tmp2.c && \
35 cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
36 rm grammar.tab_tmp.c && \
37 mv grammar.tab_tmp2.c grammar.tab.c
38 mv grammar.tab.c grammar.tab.pre.c
39 mv grammar.tab.h grammar.tab.pre.h
41 echo "Timestamp issue on pregenerated bison output."
42 echo "Using probably outdated pregenerated sources..."
43 touch grammar.tab.pre.c grammar.tab.pre.h
46 lex._gst_parse_yy.pre.c: parse.l grammar.tab.pre.h
48 $(FLEX_PATH) -P_gst_parse_yy lex._gst_parse_yy.c && \
49 mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
50 echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c && \
51 echo '#include <config.h>' >> lex._gst_parse_yy_tmp2.c && \
52 echo '#endif' >> lex._gst_parse_yy_tmp2.c && \
53 cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c && \
54 rm lex._gst_parse_yy_tmp.c && \
55 mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c && \
56 mv lex._gst_parse_yy.c lex._gst_parse_yy.pre.c
58 echo "Timestamp issue on pregenerated flex output."
59 echo "Using probably outdated pregenerated sources..."
60 touch lex._gst_parse_yy.pre.c
64 grammar.tab.c grammar.tab.h: grammar.y
65 $(BISON_PATH) -d -v -p_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
66 mv grammar.tab.c grammar.tab_tmp.c && \
67 echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
68 echo '#include <config.h>' >> grammar.tab_tmp2.c && \
69 echo '#endif' >> grammar.tab_tmp2.c && \
70 cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
71 rm grammar.tab_tmp.c && \
72 mv grammar.tab_tmp2.c grammar.tab.c
74 grammar.tab.c grammar.tab.h: grammar.tab.pre.c grammar.tab.pre.h
75 cp $(srcdir)/grammar.tab.pre.h grammar.tab.h
76 cp $(srcdir)/grammar.tab.pre.c grammar.tab.c
80 lex._gst_parse_yy.c: parse.l grammar.tab.h
81 $(FLEX_PATH) -P_gst_parse_yy lex._gst_parse_yy.c && \
82 mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
83 echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c && \
84 echo '#include <config.h>' >> lex._gst_parse_yy_tmp2.c && \
85 echo '#endif' >> lex._gst_parse_yy_tmp2.c && \
86 cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c && \
87 rm lex._gst_parse_yy_tmp.c && \
88 mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c
90 lex._gst_parse_yy.c: lex._gst_parse_yy.pre.c grammar.tab.h grammar.tab.c
91 cp $(srcdir)/lex._gst_parse_yy.pre.c lex._gst_parse_yy.c