File: utils.pri

package info (click to toggle)
sqlitestudio 3.4.21-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 61,476 kB
  • sloc: ansic: 406,208; cpp: 123,881; yacc: 2,692; java: 992; tcl: 497; sh: 462; xml: 426; makefile: 19
file content (36 lines) | stat: -rw-r--r-- 1,151 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
defineTest(copy_dir) {
    #message("copying $$absolute_path($$1) to $$absolute_path($$2)");
    unix: {
            system(cp -R $$quote($$1) $$quote($$2))
    }
    win32: {
            system(xcopy \"$$quote($$1)\" \"$$quote($$2)\" /s /e /y /q /i)
    }
}

defineTest(copy_file) {
    #message("copying $$absolute_path($$1) to $$absolute_path($$2)");
    unix: {
            system(cp $$quote($$1) $$quote($$2))
    }
    win32: {
            system(copy \"$$quote($$1)\" \"$$quote($$2)\" /y)
    }
}

# This would be better way, but targets defined inside of test function are not visible outside
# and they cannot be exported. I need to find another way to do this.
#
#defineTest(copy_file) {
#    message("copying $$absolute_path($$1) to $$absolute_path($$2)");
#    unix: {
#            copy_target.commands = cp $$quote($$absolute_path($$1)) $$quote($$absolute_path($$2))
#    }
#    win32: {
#            copy_target.commands = copy $$quote($$absolute_path($$1)) $$quote($$absolute_path($$2)) /y
#    }
#    QMAKE_EXTRA_TARGETS += copy_target
#    PRE_TARGETDEPS += copy_target
#    export(PRE_TARGETDEPS)
#    export(QMAKE_EXTRA_TARGETS)
#}