このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
|
tools:flex:インストール:2.6.4 [2021/01/13 10:39] michiya |
tools:flex:インストール:2.6.4 [2021/01/14 07:50] (現在) michiya |
||
|---|---|---|---|
| 行 19: | 行 19: | ||
| $ tar xvf flex-2.6.4.tar.gz | $ tar xvf flex-2.6.4.tar.gz | ||
| $ cd flex-2.6.4/ | $ cd flex-2.6.4/ | ||
| - | $ export | + | $ LIBTOOLIZE=/ |
| - | $ ./ | + | |
| + | | ||
| $ ./configure \ | $ ./configure \ | ||
| - | PATH=\ | + | PATH=/ |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| --prefix=/ | --prefix=/ | ||
| CFLAGS=' | CFLAGS=' | ||
| 行 44: | 行 39: | ||
| </ | </ | ||
| + | ===== スクリプト ===== | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | ############################################################# | ||
| + | inst_ver=2.6.4 | ||
| + | inst_target=/ | ||
| + | arch_file=" | ||
| + | target_web=" | ||
| + | working_dir=$(cd $(dirname $0); pwd)/ | ||
| + | m4_path=/ | ||
| + | libtool_path=/ | ||
| + | autoconf_path=/ | ||
| + | gettext_path=/ | ||
| + | automake_path=/ | ||
| + | bison_path=/ | ||
| + | help2man_path=/ | ||
| + | texinfo_path=/ | ||
| + | indent_path=/ | ||
| + | ############################################################# | ||
| + | |||
| + | if [ -d ${inst_target} ]; | ||
| + | then | ||
| + | echo " | ||
| + | exit 0 | ||
| + | fi | ||
| + | |||
| + | if [ ! -d ${m4_path} ]; | ||
| + | then | ||
| + | echo "m4 is not exist" | ||
| + | exit 1 | ||
| + | fi | ||
| + | if [ ! -f ${libtool_path} ]; | ||
| + | then | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | if [ ! -d ${autoconf_path} ]; | ||
| + | then | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | if [ ! -d ${gettext_path} ]; | ||
| + | then | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | if [ ! -d ${automake_path} ]; | ||
| + | then | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | mkdir -p ${inst_target} | ||
| + | if [ $? -ne 0 ]; | ||
| + | then | ||
| + | echo "You do not have write permission on " | ||
| + | echo "Scipt is aborted." | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | rm -rf ${arch_file} ${working_dir} | ||
| + | |||
| + | wget ${target_web} | ||
| + | if [ $? -ne 0 ]; | ||
| + | then | ||
| + | echo " | ||
| + | echo "wget ${target_web}" | ||
| + | exit 1 | ||
| + | fi | ||
| + | mkdir ${working_dir} | ||
| + | tar xvf ${arch_file} -C ${working_dir} --strip-components 1 | ||
| + | cd ${working_dir} | ||
| + | LIBTOOLIZE=${libtool_path} PATH=${automake_path}: | ||
| + | ./configure PATH=${indent_path}: | ||
| + | make | ||
| + | make install | ||
| + | </ | ||