[Pixman] [PATCH] Allow building on Windows with cmd.exe

Siarhei Siamashka siarhei.siamashka at gmail.com
Sun May 31 23:09:52 PDT 2015


On Wed, 22 Apr 2015 04:01:31 +0200
Simon Richter <Simon.Richter at hogyros.de> wrote:

> This finds out whether the standard shell for make is cmd.exe, and adjusts
> the build process accordingly.
> ---
>  Makefile.win32.common | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)

Thanks for the patch.

But it is a bit difficult for non-Windows folks to see if
it makes any sense or not. So it would be best if some other
Windows user could review and confirm that it works.

I have added Andrea Canciani (the author of the win32 makefiles)
to CC.

> diff --git a/Makefile.win32.common b/Makefile.win32.common
> index 777f94c..335886f 100644
> --- a/Makefile.win32.common
> +++ b/Makefile.win32.common
> @@ -1,5 +1,15 @@
>  LIBRARY = pixman-1
>  
> +ifeq ($(shell echo ""),)
> +# POSIX style shell
> +mkdir_p = mkdir -p $1
> +rm = $(RM) $1
> +else
> +# DOS/Windows style shell
> +mkdir_p = if not exist $(subst /,\,$1) md $(subst /,\,$1)
> +rm = del $(subst /,\,$1)
> +endif
> +
>  CC = cl
>  LD = link
>  AR = lib
> @@ -47,10 +57,10 @@ endif
>  
>  
>  $(CFG_VAR)/%.obj: %.c $(libpixman_headers)
> -	@mkdir -p $(CFG_VAR)
> +	@$(call mkdir_p,$(@D))
>  	@$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
>  
>  clean: inform
> -	@$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} $(BUILT_SOURCES) || exit 0
> +	@-$(call rm,$(CFG_VAR)/*.exe $(CFG_VAR)/*.ilk $(CFG_VAR)/*.lib $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb} $(BUILT_SOURCES))
>  
>  .PHONY: inform clean



-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list