diff options
author | Simon Richter <Simon.Richter@hogyros.de> | 2015-12-22 22:45:33 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2015-12-23 21:24:17 +0100 |
commit | af0689716a011de3645aaefc57138c9d1d0e3ae6 (patch) | |
tree | 845adaf81de7fc8ffef725cf52af2e401182c13d | |
parent | 93b876c11063f58c87fd93ed41e4d3f483bf59ab (diff) |
build: Use `del` instead of `rm` on `cmd.exe` shells
The `rm` command is not usually available when running on Win32 in a
`cmd.exe` shell. Instead the shell provides the `del` builtin, which
has somewhat more limited wildcars expansion and error handling.
This makes all of the Makefile targets work on Win32 both using
`cmd.exe` and using the MSYS environment.
Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
-rw-r--r-- | Makefile.win32.common | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.win32.common b/Makefile.win32.common index a759ddc8..756fc94a 100644 --- a/Makefile.win32.common +++ b/Makefile.win32.common @@ -5,6 +5,10 @@ LD = link AR = lib PERL = perl +ifneq ($(shell echo ""),) +RM = del +endif + ifeq ($(top_builddir),) top_builddir = $(top_srcdir) endif @@ -51,7 +55,7 @@ $(CFG_VAR): $(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR) @$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $< -clean: inform - @$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} || exit 0 +clean: inform $(CFG_VAR) + @cd $(CFG_VAR) && echo > silence_error.exe && $(RM) *.exe *.ilk *.lib *.obj *.pdb .PHONY: inform clean |