build: Do not use `mkdir -p` on Windows
authorAndrea Canciani <ranma42@gmail.com>
Tue, 22 Dec 2015 21:46:05 +0000 (22:46 +0100)
committerAndrea Canciani <ranma42@gmail.com>
Wed, 23 Dec 2015 20:24:06 +0000 (21:24 +0100)
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@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
Makefile.win32.common

index b498c2f6e8b1edbc875ebad9b8e1e608ab33fccd..a759ddc8ad37a1b0d1e497952702a9a0d084355a 100644 (file)
@@ -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