[Pixman] [PATCH 3/4] build: Do not use `mkdir -p` on Windows

Andrea Canciani ranma42 at gmail.com
Wed Dec 23 03:24:27 PST 2015


When the build is performed using `cmd.exe` as shell, the `mkdir`
command does not support the `-p` flag. The ability to create multiple
netsted folder is not used, hence it can be easily replaced by only
creating the directory if it does not exist.

This makes the build work on the `cmd.exe` shell, except for the
`clean` targets.

Signed-off-by: Andrea Canciani <ranma42 at gmail.com>
---
 Makefile.win32.common | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.win32.common b/Makefile.win32.common
index b498c2f..a759ddc 100644
--- a/Makefile.win32.common
+++ b/Makefile.win32.common
@@ -45,9 +45,10 @@ endif
 endif
 endif
 
+$(CFG_VAR):
+	@mkdir $@
 
-$(CFG_VAR)/%.obj: %.c $(libpixman_headers)
-	@mkdir -p $(CFG_VAR)
+$(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR)
 	@$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
 
 clean: inform
-- 
2.5.4 (Apple Git-61)



More information about the Pixman mailing list