Windows – Using make from Windows PowerShell

makepowershellpowershell-3.0windows 8

Under Linux, sources of projects commonly come with Makefile's. Makefiles contain directives to build these projects using the command make. I am currently forced to use Windows, and so as to be able to use this OS I configured and enhanced the "PowerShell" (by installing some additional programs, such as vim or svn, a module called PSReadLine, writing a PowerShell profile, etc.).

However I could not find whether it is possible to install make in PowerShell. I am aware that I will also have to install programs that make will call, such as, say, g++ or pdflatex, but that'll be for later. For now I would like to get make itself working in the first place.

A bit of research revealed two possibilities:

  1. The accepted answer to this very similar question: How to use makefiles on Windows, suggests to use Cygwin. That's a possibility, Cygwin is great, but since I decided to give PowerShell a chance I would like to know whether this is also possible with PowerShell, not Cygwin. Hence this question is not a duplicate, since that other question was about some possibility to use make in Windows, whereas I am asking for PowerShell in particular.

  2. There exists a make clone for PowerShell clone called poshmake, but the syntax of the Poshmake files is different from usual Makefiles, which is a no-go. I want a true make, as maintaining two versions of Makefiles for all the projects I have lying around is not an option.

So: is it possible to install GNU make, which will understand the syntax of typical Makefiles, such that I can call make from within PowerShell?

Best Answer

Take a look at "Make for Windows". After installing you simply call "make" from CMD or PowerShell.