[2] | 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 prefix |
---|
| 20 | var_define prefix /usr |
---|
| 21 | _else |
---|
| 22 | var_append opt_c_compiler -DPREFIX=\"{PVAR,prefix}\" |
---|
| 23 | var_append opt_c++_compiler -DPREFIX=\"{PVAR,prefix}\" |
---|
| 24 | _end_if |
---|
| 25 | |
---|
| 26 | _if_file_exists {PVAR,prefix} |
---|
| 27 | msg_info using {PVAR,prefix} as target directory prefix |
---|
| 28 | _else |
---|
| 29 | msg_error can't find {PVAR,prefix} prefix directory |
---|
| 30 | _end_if |
---|
| 31 | |
---|
| 32 | _if_var_eq install_dir |
---|
| 33 | var_define install_dir {PVAR,prefix} |
---|
| 34 | _end_if |
---|
| 35 | |
---|
| 36 | _if_exec_ok mkdir -p {PVAR,install_dir} |
---|
| 37 | msg_info using {PVAR,install_dir} as install directory |
---|
| 38 | _else |
---|
| 39 | msg_error can't create {PVAR,install_dir} install directory |
---|
| 40 | _end_if |
---|
| 41 | |
---|