60 |
60 |
61 export(LIBS) |
61 export(LIBS) |
62 export(INCLUDEPATH) |
62 export(INCLUDEPATH) |
63 export(DEPENDPATH) |
63 export(DEPENDPATH) |
64 export(HB_COVERAGE_EXCLUDE) |
64 export(HB_COVERAGE_EXCLUDE) |
|
65 return(true) |
|
66 } |
|
67 |
|
68 # params: <path> |
|
69 # eg. foo_path = $$hbStripDriveLetter($$PWD)/foo.txt |
|
70 defineReplace(hbStripDriveLetter) { |
|
71 stripped_path = $$1 |
|
72 symbian { |
|
73 contains(QMAKE_HOST.os, Windows) { |
|
74 colons_found = $$find( stripped_path, "\\:" ) |
|
75 !isEmpty(colons_found) { |
|
76 stripped_path = $$section(stripped_path, ":", 1) |
|
77 } |
|
78 } |
|
79 } |
|
80 return($$stripped_path) |
|
81 } |
|
82 |
|
83 # params: <sourcepath> <targetpath> |
|
84 # e.g. hbPrjExport("$${PWD}/foo.txt", "$${EPOCROOT}epoc32/release/foo.txt") |
|
85 defineTest(hbPrjExport) { |
|
86 BLD_INF_RULES.prj_exports += "$$hbStripDriveLetter($$1) $$hbStripDriveLetter($$2)" |
|
87 export(BLD_INF_RULES.prj_exports) |
65 return(true) |
88 return(true) |
66 } |
89 } |
67 |
90 |
68 # params: <collection> |
91 # params: <collection> |
69 # NOTE: exports PUBLIC_HEADERS, RESTRICTED_HEADERS and CONVENIENCE_HEADERS |
92 # NOTE: exports PUBLIC_HEADERS, RESTRICTED_HEADERS and CONVENIENCE_HEADERS |
129 DEVNULL = nul |
152 DEVNULL = nul |
130 } |
153 } |
131 system($$1 > $$DEVNULL 2>&1):return($$1) |
154 system($$1 > $$DEVNULL 2>&1):return($$1) |
132 |
155 |
133 # host build is runnable? |
156 # host build is runnable? |
134 hbtoolcmd = $$hbNativePath($$HB_BUILD_DIR/bin/$$1) |
157 !isEmpty(HB_BUILD_DIR) { |
135 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
158 hbtoolcmd = $$hbNativePath($$HB_BUILD_DIR/bin/$$1) |
|
159 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
|
160 } |
136 |
161 |
137 # tool in HB_BIN_DIR? |
162 # tool in HB_BIN_DIR? |
138 hbtoolcmd = $$hbNativePath($$HB_BIN_DIR/$$1) |
163 hbtoolcmd = $$hbNativePath($$HB_BIN_DIR/$$1) |
139 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
164 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
140 |
165 |
141 # pre-built tool is runnable? |
166 # pre-built tool is runnable? |
142 hbtoolcmd = $$hbNativePath($$sprintf("%1%2", $$HB_SOURCE_DIR/bin/$$1, "_symbian.exe")) |
167 hbtoolcmd = $$hbNativePath($$sprintf("%1%2", $$HB_SOURCE_DIR/bin/$$1, "_symbian.exe")) |
143 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
168 system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) |
144 } |
169 } |
145 # fall back to <builddir>/bin |
170 |
146 return($$hbNativePath($$HB_BUILD_DIR/bin/$$1)) |
171 !isEmpty(HB_BUILD_DIR) { |
|
172 # prefer <builddir>/bin |
|
173 return($$hbNativePath($$HB_BUILD_DIR/bin/$$1)) |
|
174 } else { |
|
175 # fall back to <bindir> |
|
176 return($$hbNativePath($$HB_BIN_DIR/$$1)) |
|
177 } |
147 } |
178 } |
148 |
179 |
149 # params: <file> <dir> |
180 # params: <file> <dir> |
150 defineReplace(hbCopyCommand) { |
181 defineReplace(hbCopyCommand) { |
151 file = $$hbNativePath($$1) |
182 file = $$hbNativePath($$1) |