How to run "make" command in gitbash in windows?
Asked Answered
K

3

26

Can anyone help me to run Makefile in windows using "make" command. When I try to run from git bash, am getting following error,

$ make build bash: make: command not found

$ make deploy bash: make: command not found

Is there anyway to install this in gitbash or something or is there any other windows tool I need to use?

Krafftebing answered 8/3, 2021 at 6:4 Comment(1)
Did you try to specify the path to make explicitly?Parr
P
17

Sounds like Make isn't in your git-bash's path.

A quick search shows this guide, which suggests the following steps:

  • Go to ezwinports.
  • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).
  • Extract zip.
  • Copy the contents to your Git\mingw64\ merging the folders, but do NOT overwrite/replace any existing files.

The guide is several years old. It may behoove you to read some of the comments before taking action.

Phytoplankton answered 8/3, 2021 at 6:11 Comment(3)
it perfectly works, as of november 2022 its with make-4.4 thanks so muchLibidinous
The make-4.1-2-without-guile-w32-bin.zip is not being downloded. May be it expired. What to do?Hammerless
You can try getting the most recent version from ezwinports' SourceForge. I don't know if this solution still works in 4.4.1.Phytoplankton
E
30

You can also use chocolatey to install it:

choco install make

Here's the package.

Endora answered 1/9, 2021 at 22:51 Comment(0)
P
17

Sounds like Make isn't in your git-bash's path.

A quick search shows this guide, which suggests the following steps:

  • Go to ezwinports.
  • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).
  • Extract zip.
  • Copy the contents to your Git\mingw64\ merging the folders, but do NOT overwrite/replace any existing files.

The guide is several years old. It may behoove you to read some of the comments before taking action.

Phytoplankton answered 8/3, 2021 at 6:11 Comment(3)
it perfectly works, as of november 2022 its with make-4.4 thanks so muchLibidinous
The make-4.1-2-without-guile-w32-bin.zip is not being downloded. May be it expired. What to do?Hammerless
You can try getting the most recent version from ezwinports' SourceForge. I don't know if this solution still works in 4.4.1.Phytoplankton
E
0

Do the following steps

  1. Install MinGW(https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)

  2. Copy the following command in git bash

mingw-get install mingw32-make

And Thank me later...

Elegit answered 12/4 at 4:23 Comment(1)
you thank yourself?Slug

© 2022 - 2024 — McMap. All rights reserved.