Is make no longer included with MinGW and/or MSYS?
Asked Answered
M

4

20

I installed MinGW and MSYS on my Windows 7 computer. I added C:\Program Files (x86)\MinGW\bin to my path. Commands such as gcc and g++ work, but make does not. I looked in the directory, and there is no executable called make, even though I installed all components. There is a file called mingw32-make. There are also other files prefixed with mingw32-, such as c++, g++, gcc, gcc-4.6.1, and gfortran. However, there is a make in C:\Program Files (x86)\MinGW\msys\1.0\bin.

If I open the MinGW Shell and type in make, make executes. However, it does not execute from the Windows terminal.

Is this intentional, or could I be missing other executables as well? Should I just add C:\Program Files (x86)\MinGW\msys\1.0\bin to my path?

Mcfarlin answered 30/11, 2011 at 23:16 Comment(8)
Yup, add the msys bin directory to your path (after MinGW's bin dir). That's exactly what the MinGW shell did and why it works there.Ecbolic
@Ecbolic If you post as an answer, I can accept it. I couldn't find anywhere in the MinGW docs that say to do this - everything just says to add mingw/bin to your path.Mcfarlin
@ThomasOwens: I'm pretty sure mingw32-make is the same as make, it's just prefixed.Unsatisfactory
Don't know about the docs, but think of it this way: how else is the OS going to find the program? It only looks for executables in directories that are in the PATH.Ecbolic
@Mehrdad: I'm pretty sure it's not. mingw32-make is built to run as a stand-alone program. (MSYS-)make needs the MSYS runtime to work.Ecbolic
@eriktous: I'm talking about the functionality, not the particular method of running... do they actually accomplish different goals, or is their environment simply different?Unsatisfactory
@Mehrdad: IIRC mingw32-make is crippled in certain ways. It ususally works for simple things, but if you're doing something more advanced it borks. (I don't recall the specifics, but it may have to do with windows <-> posix path translation, which is handled by the msys.dll.)Ecbolic
@eriktous: Oh I see, thanks for the correction then, I didn't know that. :)Unsatisfactory
E
10

Yup, add the msys bin directory to your path (after MinGW's bin dir). That's exactly what the MinGW shell does and why it works there.

Ecbolic answered 1/12, 2011 at 0:34 Comment(0)
M
2

MSYS Answer


  1. Open up your MSYS command terminal (is installed with latest MSYS).
  2. Type in "make". It will say it doesn't exist.
  3. Accordingly with: https://packages.msys2.org/package/make, type in pacman -S make. Type Y for yes.
  4. Make is now installed!
  5. Type "make", and it ask you to specify input files.
  6. Probably only call it from the MSYS command terminal.
  7. Pin MSYS command terminal to taskbar by right-clicking its taskbar icon while it's running.
Marj answered 2/9, 2022 at 2:54 Comment(2)
You're describing MSYS2, not the old MSYS (1.0) OP was using.Slum
@Slum time to upgrade I guess... :)Marj
P
1

Try gmake. Sometimes the GNU version of Make installs itself as gmake in order to distinguish from non-GNU Make.

Playpen answered 30/11, 2011 at 23:22 Comment(4)
I forgot to mention, I read the blog post linked to in a question about setting up MinGW. gmake also has no effect. I did read, as I was continuning to wade through Google, that installing to Program Files isn't recommended (although it was the default install directory for me), so I'm reinstalling to C:\mingw as well.Mcfarlin
Yes, mingw will eventually get upset that you've installed it in a path that contains spaces in the name.Playpen
Interesting. I didn't read that until several pages into Google. I just installed to the default location, and figured everything would be good. Apparently, that's not the case.Mcfarlin
The reinstall just finished. There's no make or gmake in C:\mingw\bin, but there is a mingw32-make still. The make executable is still located in C:\mingw\msys\1.0\bin. I'm thinking about just adding the second directory to my path and being done with it. Hopefully, Eclipse can cope.Mcfarlin
I
0

C:\Program files\xxx has spaces in it! Since shell scripts are involved, spaces are significant and have to be escaped. Hence this path will not work with mingw. The documentation recommends to install MingW in C:\MingW.

Illicit answered 16/11, 2015 at 8:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.