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(-)
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 -- 2.1.4 _______________________________________________ Pixman mailing list Pixman@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pixman