Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QMAKE_MKDIR_CMD How To ?

QMAKE_MKDIR_CMD How To ?

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ningen
    wrote on last edited by
    #1

    There are qt specs.
    mkspecs\common\shell-unix.conf:
    @QMAKE_TAR = tar -cf
    QMAKE_GZIP = gzip -9f

    QMAKE_COPY = cp -f
    QMAKE_COPY_FILE = $$QMAKE_COPY
    QMAKE_COPY_DIR = $$QMAKE_COPY -R
    QMAKE_MOVE = mv -f
    QMAKE_DEL_FILE = rm -f
    QMAKE_DEL_DIR = rmdir
    QMAKE_CHK_EXISTS = test -e %1 ||
    QMAKE_CHK_DIR_EXISTS = test -d # legacy
    QMAKE_MKDIR = mkdir -p # legacy
    QMAKE_MKDIR_CMD = test -d %1 || mkdir -p %1
    QMAKE_STREAM_EDITOR = sed@

    mkspecs\common\shell-win32.conf:
    @
    QMAKE_ZIP = zip -r -9

    QMAKE_COPY = copy /y
    QMAKE_COPY_DIR = xcopy /s /q /y /i
    QMAKE_MOVE = move
    QMAKE_DEL_FILE = del
    QMAKE_DEL_DIR = rmdir
    QMAKE_CHK_EXISTS = if not exist %1
    QMAKE_CHK_DIR_EXISTS = if not exist # legacy
    QMAKE_MKDIR = mkdir # legacy
    QMAKE_MKDIR_CMD = if not exist %1 mkdir %1 & if not exist %1 exit 1@

    I try use it:
    @my.commands=$$quote($$QMAKE_MKDIR_CMD mydir && $$QMAKE_COPY file1 mydir/file2 $$escape_expand(\n\t))@

    And so I'm getting the result:
    @test -d %1 || mkdir -p %1 mydir && cp -f file1 mydir/file2 @

    But I want:
    @test -d mydir || mkdir -p mydir && cp -f file1 mydir/file2 @

    How do i make it was this?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zorn
      wrote on last edited by
      #2

      $$sprintf($$QMAKE_MKDIR_CMD, "mydir")

      1 Reply Last reply
      1
      • Z Offline
        Z Offline
        zorn
        wrote on last edited by
        #3

        $$sprintf($$QMAKE_MKDIR_CMD, "mydir")

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved