From 4b2cffa47a66add6e10f4408bb8a9cea33f781e9 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Tue, 27 Mar 2012 20:57:48 -0500 Subject: Don't use Unix style for MSVC with sh.exe in path If you have Msysgit with full shell installed, you will have sh.exe in path, even though you are using MSVC + nmake. This combo will not understand Unix mkdir still, so reorganize expressions to avoid this situation. Change-Id: Ie353f6ed494c5983fecf6e83af063edb88df234b --- pkg.pri | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg.pri b/pkg.pri index 642acdcea..3d87bd930 100644 --- a/pkg.pri +++ b/pkg.pri @@ -55,15 +55,15 @@ package { # create extra qmake compiler to copy files across during build step copyqmlinfra.input = QML_INFRA_FILES copyqmlinfra.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} - win32: isEmpty(QMAKE_SH) { + !win32|if(win32-g++:!isEmpty(QMAKE_SH)) { + # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work + copyqmlinfra.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + } else { # If we are in windows, and not a mingw shell, then the mkdir binary does not handle # the -p switch, and will fail if the directory already exists, so make it subject to # an "exists" test. The parens are necessary otherwise the copy won't occur when the # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS" copyqmlinfra.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_MKDIR $$target_dir) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - } else { - # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work - copyqmlinfra.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} } copyqmlinfra.CONFIG += no_link_no_clean copyqmlinfra.variable_out = POST_TARGETDEPS @@ -82,15 +82,15 @@ package { target_dir ~= s,/,$$QMAKE_DIR_SEP, copyqmlmeshes.input = QML_MESHES_FILES copyqmlmeshes.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} - win32: isEmpty(QMAKE_SH) { + !win32|if(win32-g++:!isEmpty(QMAKE_SH)) { + # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work + copyqmlmeshes.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + } else { # If we are in windows, and not a mingw shell, then the mkdir binary does not handle # the -p switch, and will fail if the directory already exists, so make it subject to # an "exists" test. The parens are necessary otherwise the copy won't occur when the # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS" copyqmlmeshes.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_MKDIR $$target_dir) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - } else { - # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work - copyqmlmeshes.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} } copyqmlmeshes.CONFIG += no_link_no_clean copyqmlmeshes.variable_out = POST_TARGETDEPS -- cgit v1.2.3