1 | # This file is part of MKF. |
---|
2 | # |
---|
3 | # MKF is free software; you can redistribute it and/or modify |
---|
4 | # it under the terms of the GNU General Public License as published by |
---|
5 | # the Free Software Foundation; either version 2 of the License, or |
---|
6 | # (at your option) any later version. |
---|
7 | # |
---|
8 | # MKF is distributed in the hope that it will be useful, |
---|
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | # GNU General Public License for more details. |
---|
12 | # |
---|
13 | # You should have received a copy of the GNU General Public License |
---|
14 | # along with MKF; if not, write to the Free Software |
---|
15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
16 | # |
---|
17 | # Copyright (c) 2004 Alexandre Becoulet <alexandre.becoulet@epita.fr> |
---|
18 | |
---|
19 | _if_var_eq cmd_bison |
---|
20 | var_define cmd_bison bison |
---|
21 | _end_if |
---|
22 | |
---|
23 | _if_in_path {PVAR,cmd_bison} |
---|
24 | |
---|
25 | msg_info GNU bison ({PVAR,cmd_bison}) found |
---|
26 | var_define use_bison bison |
---|
27 | |
---|
28 | _if_var_eq mkf_pretty_print yes |
---|
29 | command_add y c echo " BISON {SRC,.*\.y} -> {OUT}" |
---|
30 | _end_if |
---|
31 | command_add y c {JVAR,cmd_bison} -o {OUT} -d {JVAR,opt_bison} {SRC,.*\.y} |
---|
32 | |
---|
33 | _if_var_eq mkf_pretty_print yes |
---|
34 | command_add yy cc echo " BISON {SRC,.*\.yy} -> {OUT}" |
---|
35 | _end_if |
---|
36 | command_add yy cc {JVAR,cmd_bison} -o {OUT} -d {JVAR,opt_bison} {SRC,.*\.yy} |
---|
37 | |
---|
38 | _else |
---|
39 | |
---|
40 | msg_error can't find bison tool |
---|
41 | _end_if |
---|
42 | |
---|