0

I installed make and gcc on win10. I tried to write a simple makefile. When I execute make clean, I find it doesn't work properly. I found the problem. on win10, make uses cmd instead of powershell, so the shell command I wrote in makefile does not work. Is there any way to change make to use powershell

  • I would rather make it use `sh`, like on every other modern OS. That's what [MSYS2](https://stackoverflow.com/q/30069830/2752075)'s port of `make` uses. – HolyBlackCat Oct 10 '22 at 14:28
  • @HolyBlackCat [tag:sh] will not work for [tag:powershell] commands. – Gerhard Oct 10 '22 at 14:42
  • @Gerhard My point is that makefiles should be written for the `sh` shell, since it's used by default on most platforms, and you can get it on Windows too. – HolyBlackCat Oct 10 '22 at 14:43

1 Answers1

1

You can set the SHELL variable inside of the makefile to the path of powershell wherever that might be.

HSchmale
  • 1,838
  • 2
  • 21
  • 48