M HYPE SPLASH
// updates

GnuMake SHELL under windows

By Emma Payne

I am trying to make a simple makefile (GNU Make 3.81) work under windows, using cygwin installed with the git-for-windows "distro".

Everything seems to work, but the SHELL. It always shows "sh" being used. The manual has some notes about SHELL on windows, but it mentions COMSPEC, which points to the actual windows shell (cmd.exe) which does not play any role here. Also $(COMSPEC) on the Makefile results in a blank string, while $(SHELL) is always the path to sh.exe, which is the one being used that I am trying to replace with bash.exe

This is the minimum Makefile to reproduce:

$ cat Makefile
SHELL="C:/Program Files/Git/usr/bin/bash.exe"
info: $(info SHELL is "$(SHELL)")
$ make info
SHELL is "C:/Program Files/Git/usr/bin/sh.exe"
make: `info' is up to date.

Anyone already figured out how to use bash in this setup?

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy