1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows でも UTF-8 な Makefile を使いたい

Last updated at Posted at 2024-09-04

2024-09-04 時点の GNU Make の最新リリースの 4.4.1 では Windows 上での UTF-8 に対応したパッチ が未適用だった。

じゃあ自分でビルドしよう!

前提条件

  • PowerShell の文字コードを UTF-8 に設定
    • $profilechcp 65001 を追記
  • Scoop
    • scoop install main/msys2
  • msys2-ucrt64 に gcc
    • pacman -S mingw-w64-ucrt-x86_64-toolchain

手順

PowerShell
git clone --filter=blob:none https://git.savannah.gnu.org/git/make.git
cd make
ucrt64
bash
./bootstrap.bat
./build_w32.bat --without-guile gcc

これで GccRel/gnumake.exe ができる。
make.exe に名前を変更した上でPATHを通してもいいが、scoop の shim が便利だった。

Powershell
scoop shim add make GccRel/gnumake.exe
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?