[904] | 1 | isEmpty(DEPTH):error("DEPTH is not set before including common.pri!")
|
---|
[205] | 2 |
|
---|
[910] | 3 | DESTDIR = .
|
---|
[209] | 4 |
|
---|
[610] | 5 | !build_pass: {
|
---|
| 6 | debug_and_release {
|
---|
| 7 | debug-run.target = debug-run
|
---|
| 8 | debug-run.commands = $(MAKE) -f $(MAKEFILE).Debug run
|
---|
| 9 | release-run.target = release-run
|
---|
| 10 | release-run.commands = $(MAKE) -f $(MAKEFILE).Release run
|
---|
| 11 | QMAKE_EXTRA_TARGETS += debug-run release-run
|
---|
| 12 |
|
---|
| 13 | debug-dbg.target = debug-dbg
|
---|
| 14 | debug-dbg.commands = $(MAKE) -f $(MAKEFILE).Debug dbg
|
---|
| 15 | release-dbg.target = release-dbg
|
---|
| 16 | release-dbg.commands = $(MAKE) -f $(MAKEFILE).Release dbg
|
---|
| 17 | QMAKE_EXTRA_TARGETS += debug-dbg release-dbg
|
---|
| 18 | }
|
---|
[303] | 19 | } else {
|
---|
[328] | 20 | isEmpty(RUN_SHELL):RUN_SHELL = $(RUN_SHELL)
|
---|
| 21 | isEmpty(RUN_ARGS):RUN_ARGS = $(RUN_ARGS)
|
---|
[610] | 22 |
|
---|
[303] | 23 | run.target = run
|
---|
[328] | 24 | run.commands = $$RUN_SHELL $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
[303] | 25 | run.depends = $(DESTDIR_TARGET)
|
---|
| 26 | QMAKE_EXTRA_TARGETS += run
|
---|
[610] | 27 |
|
---|
| 28 | os2:isEmpty(RUN_DEBUG):RUN_DEBUG = idbug
|
---|
| 29 | win:isEmpty(RUN_DEBUG):RUN_DEBUG = windbg
|
---|
| 30 | unix:isEmpty(RUN_DEBUG):RUN_DEBUG = gdb
|
---|
| 31 |
|
---|
| 32 | dbg.target = dbg
|
---|
| 33 | dbg.commands = $$RUN_SHELL $$RUN_DEBUG $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
| 34 | dbg.depends = $(DESTDIR_TARGET)
|
---|
| 35 | QMAKE_EXTRA_TARGETS += dbg
|
---|
[303] | 36 | }
|
---|
| 37 |
|
---|
[904] | 38 | # All kinds of builds should have the console if possible
|
---|
[303] | 39 | win32 {
|
---|
| 40 | CONFIG(release, debug|release):CONFIG(qt):contains(QT, gui) {
|
---|
| 41 | CONFIG -= console
|
---|
| 42 | CONFIG *= windows
|
---|
| 43 | } else {
|
---|
| 44 | CONFIG -= windows
|
---|
| 45 | CONFIG *= console
|
---|
| 46 | }
|
---|
[904] | 47 | }
|
---|
| 48 | os2 {
|
---|
| 49 | CONFIG -= windows
|
---|
| 50 | CONFIG *= console
|
---|
| 51 | }
|
---|
[907] | 52 |
|
---|
| 53 | defineReplace(fixSep) {
|
---|
| 54 | win32|os2 {
|
---|
| 55 | 1 = $$replace(1,/,\\)
|
---|
| 56 | }
|
---|
| 57 | return($$1)
|
---|
| 58 | }
|
---|
[910] | 59 |
|
---|
| 60 | defineReplace(file_copier_output_path) {
|
---|
| 61 | isEmpty(FILES.path):FILES.path = $$DESTDIR
|
---|
| 62 | 1 = $${FILES.path}/$$basename(1)
|
---|
| 63 | return($$1)
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | file_copier.input = FILES
|
---|
| 67 | file_copier.output = ${QMAKE_FUNC_file_copier_output_path}
|
---|
| 68 | file_copier.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
---|
| 69 | file_copier.CONFIG += no_link
|
---|
| 70 | file_copier.variable_out = POST_TARGETDEPS
|
---|
| 71 | QMAKE_EXTRA_COMPILERS += file_copier
|
---|