Why do I get a "/usr/bin/bash" error when trying to compile a project with an external makefile in Windows®?
Error example:
make -f nbproject/Makefile-MyConfiguration.mk SUBPROJECTS= .clean-conf
make[1]: Entering directory 'V:/SVB/PIC/FW/me/uCWorkspace/ide_workspaces/windows/mplab/pic_test1.X'
cd /D ../../../../uCProjects/apps/PIC_test && ../../../../tools/windows/make/make4.1/bin/make.exe clean
nbproject/Makefile-MyConfiguration.mk:5: recipe for target '.clean-conf' failed
make[1]: Leaving directory 'V:/SVB/PIC/FW/me/uCWorkspace/ide_workspaces/windows/mplab/pic_test1.X'
nbproject/Makefile-impl.mk:44: recipe for target '.clean-impl' failed
/usr/bin/bash: line 0: cd: /D: No such file or directory
Cause:
The cause is a possible bug in the GNU make tool. Also, the 'sh' tool is installed on the PC and can be launched from Windows® Command Prompt line.
Workaround:
Make the sh.exe tool un-callable from Windows Command Prompt. There are different options to do this:
- Remove the c:\cygwin\bin\ or/and C:\MinGW\bin\ from PATH - Environment Variables. Note that the installation folders can have a different name on your PC.
- Rename sh.exe file to sh_.exe from c:\cygwin\bin\ or c:\MinGW\bin\.
- Rename the Cygwin/Mingw folder.