~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/pars/make_flex.sh

  • Committer: Hartmut Holzgraefe
  • Date: 2010-08-30 19:06:55 UTC
  • mto: (1730.6.3 drizzle-make-lcov)
  • mto: This revision was merged to the branch mainline in revision 1810.
  • Revision ID: hartmut@hartmut-laptop-20100830190655-huox6mk5a2pvbscr
various lcov related changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
set -eu
20
20
 
21
 
TMPFILE=_flex_tmp.c
22
 
OUTFILE=lexyy.c
23
 
 
24
 
flex -o $TMPFILE pars0lex.l
 
21
cd ../../..
 
22
 
 
23
TMPFILE=plugin/innobase/pars/_flex_tmp.c
 
24
OUTFILE=plugin/innobase/pars/lexyy.c
 
25
 
 
26
flex -o $TMPFILE plugin/innobase/pars/pars0lex.l
25
27
 
26
28
# AIX needs its includes done in a certain order, so include "univ.i" first
27
29
# to be sure we get it right.
30
32
# flex assigns a pointer to an int in one place without a cast, resulting in
31
33
# a warning on Win64.  Add the cast.  Also define some symbols as static.
32
34
sed -e '
33
 
s/'"$TMPFILE"'/'"$OUTFILE"'/;
 
35
s/'`basename $TMPFILE`'/'`basename $OUTFILE`'/;
34
36
s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
35
37
s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
36
38
s/\(void yy_switch_to_buffer\)/__attribute__((unused)) static \1/;