If you have a makefile with a clean target that has a rm -f with a globbing pattern that does not match any files, make bails out with an error.
rm -f *.obj
rm -f *.obj
C:\DOCUME~1\myusername\LOCALS~1\Temp\make10282.sh: no matches found: *.obj 
After reading around is sounds like zsh is giving the error before rm ever does anything with it. The '-f' flag to rm should ignore non existent files. I have tried exporting NULL_GLOB in the makefile to tell zsh to remove patterns if they do not match, but that does not seem to change anything.
Has anyone figured out how to let rm -f work with UnixUtils's make/zsh ?
zsh morphs its behavior depending on its name. For the behavior you seek, you need to rename zsh or copy it to "sh.exe". You may still see this problem if sh forks a sub-shell. There is a bug in the Windows port of zsh wherein it incorretly identifies its name when appended with .EXE, which is what happens when it is invoked as a sub-shell. I am working on a set of fixes for zsh and this is one of them.
Surrounding the epression in quotes seems to make it work.
rm -f "*.obj"
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.