From: Simon Richter Date: Tue, 22 Dec 2015 21:45:33 +0000 (+0100) Subject: build: Use `del` instead of `rm` on `cmd.exe` shells X-Git-Tag: pixman-0.36.0~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af0689716a011de3645aaefc57138c9d1d0e3ae6;p=platform%2Fupstream%2Fpixman.git 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 Signed-off-by: Andrea Canciani Acked-by: Oded Gabbay --- diff --git a/Makefile.win32.common b/Makefile.win32.common index a759ddc..756fc94 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