0
I'm trying to figure out why a simple Windows command in makefile fails only when the CygWin binary folder is included in the PATH variable.
To take most variables out of the equation I'm using the barebone makefile below:
clean:
del /F /Q file.txt
I'm running GNU make 3.81 from a directory that contains only make.exe and makefile.
C:\temp\test>dir /b
make.exe
makefile
C:\temp\test>make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for Windows32
When PATH includes the Cygwin binary folder, I get a ProcessCreate() error.
C:\temp\test>path=c:\tools\cygwin\bin
C:\temp\test>make clean
del /F /Q file.txt
process_begin: CreateProcess(NULL, del /F /Q file.txt, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [clean] Error 2
It works as expected, otherwise.
C:\temp\test>set path=
C:\temp\test>make clean
del /F /Q file.txt
Could Not Find C:\temp\test\file.txt
This makes no sense to me.
Any idea what could be happening here?
2I think I know what the problem is here. I'm not giving you an answer (because this is not the right site for this question, and I don't want to encourage more questions on the wrong site) but I will suggest that you look up what
PATH
does, then have a look through thecygwin/bin
directory. – wizzwizz4 – 2017-01-09T20:48:43.633