gst/parse/Makefile.am: Fix typo and use outdated sources if the flex/bison sources are newer than the pregenerated on...

Original commit message from CVS:
* gst/parse/Makefile.am:
Fix typo and use outdated sources if the flex/bison sources are newer
than the pregenerated ones but flex is too old. Print a warning in
that case. This should fix the build on the build bot.
This commit is contained in:
Sebastian Dröge 2007-04-18 13:34:48 +00:00
parent 7a3a27d0c1
commit 7a67f8a6bb
3 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2007-04-18 Sebastian Dröge <slomo@circular-chaos.org>
* gst/parse/Makefile.am:
Fix typo and use outdated sources if the flex/bison sources are newer
than the pregenerated ones but flex is too old. Print a warning in
that case. This should fix the build on the build bot.
2007-04-18 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Marc-Andre Lureau <marcandre dot lureau at gmail dot com>

2
common

@ -1 +1 @@
Subproject commit dae6fa1f592c9231820c2135b8b1b3c2b0875ef6
Subproject commit e05f45f13961b851501ca8938aa2049fa96c7b11

View file

@ -26,6 +26,7 @@ noinst_HEADERS = grammar.tab.h
all: grammar.tab.pre.c grammar.tab.pre.h lex._gst_parse_yy.pre.c
grammar.tab.pre.c grammar.tab.pre.h: grammar.y
if GENERATE_PARSER
$(BISON_PATH) -d -v -p_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
mv grammar.tab.c grammar.tab_tmp.c && \
echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
@ -36,9 +37,15 @@ grammar.tab.pre.c grammar.tab.pre.h: grammar.y
mv grammar.tab_tmp2.c grammar.tab.c
cp grammar.tab.c grammar.tab.pre.c
cp grammar.tab.h grammar.tab.pre.h
else
echo "Timestamp issue on pregenerated bison output."
echo "Using probably outdated pregenerated sources..."
touch grammar.tab.pre.c grammar.tab.pre.h
endif
lex._gst_parse_yy.pre.c: parse.l grammar.tab.pre.h
$(FLEX_PATH) -P_gst_parse_yy $^ && \
if GENERATE_PARSER
$(FLEX_PATH) -P_gst_parse_yy lex._gst_parse_yy.c && \
mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c && \
echo '#include <config.h>' >> lex._gst_parse_yy_tmp2.c && \
@ -47,6 +54,11 @@ lex._gst_parse_yy.pre.c: parse.l grammar.tab.pre.h
rm lex._gst_parse_yy_tmp.c && \
mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c
cp lex._gst_parse_yy.c lex._gst_parse_yy.pre.c
else
echo "Timestamp issue on pregenerated flex output."
echo "Using probably outdated pregenerated sources..."
touch lex._gst_parse_yy.pre.c
endif
if GENERATE_PARSER
grammar.tab.c grammar.tab.h: grammar.y