ユーザ用ツール

サイト用ツール


tools:m4:インストール:1.4.18

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
tools:m4:インストール:1.4.18 [2020/12/09 03:02]
michiya ↷ tools:m4 から tools:m4:1.4.18 へページの移動と名称変更しました。
tools:m4:インストール:1.4.18 [2021/01/19 08:38] (現在)
michiya
行 1: 行 1:
-====== m4 ======+====== m4をソースからインストール ======
  
-===== Source =====+===== インストール =====
  
 <code> <code>
行 9: 行 9:
 $ mkdir build $ mkdir build
 $ cd build $ cd build
-$ ../configure --prefix=/opt/m4/m4-1.4.18+$ ../configure --prefix=/opt/m4/1.4.18
 $ make $ make
 $ make install $ make install
 </code> </code>
  
-パスを通す.+===== 環境変数 ===== 
 <code> <code>
-$ export PATH=/opt/m4/m4-1.4.18/bin:${PATH}+$ export PATH=/opt/m4/1.4.18/bin:${PATH}
 </code> </code>
 +
 +===== スクリプト =====
 +
 +<code>
 +#!/bin/bash
 +
 +#############################################################
 +inst_ver=1.4.18
 +inst_target=/opt/m4/${inst_ver}
 +arch_file="m4-"${inst_ver}".tar.gz"
 +target_web="https://ftp.gnu.org/pub/gnu/m4/"${arch_file}
 +working_dir=$(cd $(dirname $0); pwd)/m4-${inst_ver}
 +#############################################################
 +
 +if [ -d ${inst_target} ];
 +then
 +    echo "${inst_target} is already exist"
 +    exit 0
 +fi
 +
 +mkdir -p ${inst_target}
 +if [ $? -ne 0 ];
 +then
 +    echo "You do not have write permission on "${inst_target}"."
 +    echo "Scipt is aborted."
 +    exit 1
 +fi
 +
 +rm -rf ${arch_file} ${working_dir}
 +
 +wget ${target_web}
 +if [ $? -ne 0 ];
 +then
 +    echo "command is failed"
 +    echo "wget ${target_web}"
 +    exit 1
 +fi
 +mkdir ${working_dir}
 +tar xvf ${arch_file} -C ${working_dir} --strip-components 1
 +cd ${working_dir}
 +mkdir -p build
 +cd build
 +../configure --prefix=${inst_target}
 +make
 +make install
 +</code>
 +
 +==== libc 2.27以上の場合うまく動かない ====
 +
 +https://github.com/michiya-lab/m4-1.4.18-libc2.27_or_above
 +\\
 +に修正したものをアップしているため,ダウンロードし,同様の手順でインストールする.
tools/m4/インストール/1.4.18.1607482946.txt.gz · 最終更新: 2021/01/09 14:37 (外部編集)