[Pixman] [PATCH 4/4] build: Use `del` instead of `rm` on `cmd.exe` shells

Oded Gabbay oded.gabbay at gmail.com
Wed Dec 23 07:09:52 PST 2015


On Wed, Dec 23, 2015 at 1:24 PM, Andrea Canciani <ranma42 at gmail.com> wrote:
> From: Simon Richter <Simon.Richter at hogyros.de>
>
> 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 at hogyros.de>
> Signed-off-by: Andrea Canciani <ranma42 at gmail.com>
> ---
>  Makefile.win32.common | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> 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
> --
> 2.5.4 (Apple Git-61)
>
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pixman

Acked-by: Oded Gabbay <oded.gabbay at gmail.com>


More information about the Pixman mailing list