| [2] | 1 | ##################################################################### | 
|---|
|  | 2 | # Main projectfile | 
|---|
|  | 3 | ##################################################################### | 
|---|
|  | 4 |  | 
|---|
|  | 5 | CONFIG += ordered | 
|---|
|  | 6 | TEMPLATE = subdirs | 
|---|
|  | 7 |  | 
|---|
|  | 8 | cross_compile: CONFIG += nostrip | 
|---|
|  | 9 |  | 
|---|
|  | 10 | isEmpty(QT_BUILD_PARTS) { #defaults | 
|---|
| [561] | 11 | symbian { | 
|---|
|  | 12 | QT_BUILD_PARTS = libs tools examples demos | 
|---|
|  | 13 | } else { | 
|---|
|  | 14 | QT_BUILD_PARTS = libs tools examples demos docs translations | 
|---|
|  | 15 | } | 
|---|
| [2] | 16 | } else { #make sure the order makes sense | 
|---|
| [561] | 17 | contains(QT_BUILD_PARTS, translations) { | 
|---|
|  | 18 | QT_BUILD_PARTS -= translations | 
|---|
|  | 19 | QT_BUILD_PARTS = translations $$QT_BUILD_PARTS | 
|---|
|  | 20 | } | 
|---|
| [413] | 21 | contains(QT_BUILD_PARTS, tools) { | 
|---|
|  | 22 | QT_BUILD_PARTS -= tools | 
|---|
|  | 23 | QT_BUILD_PARTS = tools $$QT_BUILD_PARTS | 
|---|
|  | 24 | } | 
|---|
| [2] | 25 | contains(QT_BUILD_PARTS, libs) { | 
|---|
|  | 26 | QT_BUILD_PARTS -= libs | 
|---|
|  | 27 | QT_BUILD_PARTS = libs $$QT_BUILD_PARTS | 
|---|
|  | 28 | } | 
|---|
| [513] | 29 | contains(QT_BUILD_PARTS, qmake) { | 
|---|
| [2] | 30 | QT_BUILD_PARTS -= qmake | 
|---|
|  | 31 | QT_BUILD_PARTS = qmake $$QT_BUILD_PARTS | 
|---|
|  | 32 | } | 
|---|
|  | 33 | } | 
|---|
|  | 34 |  | 
|---|
|  | 35 | #process the projects | 
|---|
|  | 36 | for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) { | 
|---|
|  | 37 | isEqual(PROJECT, tools) { | 
|---|
|  | 38 | SUBDIRS += tools | 
|---|
|  | 39 | } else:isEqual(PROJECT, examples) { | 
|---|
|  | 40 | SUBDIRS += examples | 
|---|
|  | 41 | } else:isEqual(PROJECT, demos) { | 
|---|
|  | 42 | SUBDIRS += demos | 
|---|
|  | 43 | } else:isEqual(PROJECT, libs) { | 
|---|
|  | 44 | include(src/src.pro) | 
|---|
|  | 45 | } else:isEqual(PROJECT, docs) { | 
|---|
|  | 46 | contains(QT_BUILD_PARTS, tools):include(doc/doc.pri) | 
|---|
|  | 47 | } else:isEqual(PROJECT, translations) { | 
|---|
| [561] | 48 | contains(QT_BUILD_PARTS, tools) { | 
|---|
|  | 49 | include(translations/translations.pri)  # ts targets | 
|---|
|  | 50 | } else { | 
|---|
| [846] | 51 | !wince*:SUBDIRS += tools/linguist/lrelease | 
|---|
| [561] | 52 | } | 
|---|
|  | 53 | SUBDIRS += translations                    # qm build step | 
|---|
| [2] | 54 | } else:isEqual(PROJECT, qmake) { | 
|---|
| [513] | 55 | SUBDIRS += qmake | 
|---|
| [2] | 56 | } else { | 
|---|
|  | 57 | message(Unknown PROJECT: $$PROJECT) | 
|---|
|  | 58 | } | 
|---|
|  | 59 | } | 
|---|
|  | 60 |  | 
|---|
| [561] | 61 | !symbian: confclean.depends += clean | 
|---|
| [2] | 62 | confclean.commands = | 
|---|
| [561] | 63 | unix:!symbian { | 
|---|
| [2] | 64 | confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \ | 
|---|
|  | 65 | (cd config.tests/unix/endian && $(MAKE) distclean); \ | 
|---|
|  | 66 | (cd config.tests/unix/ipv6 && $(MAKE) distclean); \ | 
|---|
|  | 67 | (cd config.tests/unix/largefile && $(MAKE) distclean); \ | 
|---|
|  | 68 | (cd config.tests/unix/ptrsize && $(MAKE) distclean); \ | 
|---|
|  | 69 | (cd config.tests/x11/notype && $(MAKE) distclean); \ | 
|---|
|  | 70 | (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \ | 
|---|
|  | 71 | (cd config.tests/unix/cups && $(MAKE) distclean); \ | 
|---|
|  | 72 | (cd config.tests/unix/psql && $(MAKE) distclean); \ | 
|---|
|  | 73 | (cd config.tests/unix/mysql && $(MAKE) distclean); \ | 
|---|
|  | 74 | (cd config.tests/unix/mysql_r && $(MAKE) distclean); \ | 
|---|
|  | 75 | (cd config.tests/unix/nis && $(MAKE) distclean); \ | 
|---|
|  | 76 | (cd config.tests/unix/nix && $(MAKE) distclean); \ | 
|---|
| [561] | 77 | (cd config.tests/unix/iodbc && $(MAKE) distclean); \ | 
|---|
| [2] | 78 | (cd config.tests/unix/odbc && $(MAKE) distclean); \ | 
|---|
|  | 79 | (cd config.tests/unix/oci && $(MAKE) distclean); \ | 
|---|
|  | 80 | (cd config.tests/unix/tds && $(MAKE) distclean); \ | 
|---|
|  | 81 | (cd config.tests/unix/db2 && $(MAKE) distclean); \ | 
|---|
|  | 82 | (cd config.tests/unix/ibase && $(MAKE) distclean); \ | 
|---|
|  | 83 | (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \ | 
|---|
|  | 84 | (cd config.tests/unix/zlib && $(MAKE) distclean); \ | 
|---|
|  | 85 | (cd config.tests/unix/libmng && $(MAKE) distclean); \ | 
|---|
|  | 86 | (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \ | 
|---|
|  | 87 | (cd config.tests/unix/libjpeg && $(MAKE) distclean); \ | 
|---|
|  | 88 | (cd config.tests/unix/libpng && $(MAKE) distclean); \ | 
|---|
|  | 89 | (cd config.tests/x11/xcursor && $(MAKE) distclean); \ | 
|---|
|  | 90 | (cd config.tests/x11/xrender && $(MAKE) distclean); \ | 
|---|
|  | 91 | (cd config.tests/x11/xrandr && $(MAKE) distclean); \ | 
|---|
|  | 92 | (cd config.tests/x11/xkb && $(MAKE) distclean); \ | 
|---|
|  | 93 | (cd config.tests/x11/xinput && $(MAKE) distclean); \ | 
|---|
|  | 94 | (cd config.tests/x11/fontconfig && $(MAKE) distclean); \ | 
|---|
|  | 95 | (cd config.tests/x11/xinerama && $(MAKE) distclean); \ | 
|---|
|  | 96 | (cd config.tests/x11/sm && $(MAKE) distclean); \ | 
|---|
|  | 97 | (cd config.tests/x11/xshape && $(MAKE) distclean); \ | 
|---|
|  | 98 | (cd config.tests/x11/opengl && $(MAKE) distclean); \ | 
|---|
|  | 99 | $(DEL_FILE) config.tests/.qmake.cache; \ | 
|---|
|  | 100 | $(DEL_FILE) src/core/global/qconfig.h; \ | 
|---|
|  | 101 | $(DEL_FILE) src/core/global/qconfig.cpp; \ | 
|---|
|  | 102 | $(DEL_FILE) mkspecs/qconfig.pri; \ | 
|---|
|  | 103 | $(DEL_FILE) .qmake.cache; \ | 
|---|
|  | 104 | (cd qmake && $(MAKE) distclean); | 
|---|
|  | 105 | } | 
|---|
| [236] | 106 | win32|os2 { | 
|---|
| [846] | 107 | confclean.commands += -$(DEL_FILE) src\\core\\global\\qconfig.h $$escape_expand(\\n\\t) \ | 
|---|
|  | 108 | -$(DEL_FILE) src\\core\\global\\qconfig.cpp $$escape_expand(\\n\\t) \ | 
|---|
|  | 109 | -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \ | 
|---|
|  | 110 | -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \ | 
|---|
| [2] | 111 | (cd qmake && $(MAKE) distclean) | 
|---|
|  | 112 | } | 
|---|
| [561] | 113 | symbian { | 
|---|
|  | 114 | confclean.depends += distclean | 
|---|
| [846] | 115 | contains(QMAKE_HOST.os, "Windows") { | 
|---|
|  | 116 | confclean.commands += \ | 
|---|
|  | 117 | (cd src\\tools\\moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 118 | (cd src\\tools\\rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 119 | (cd src\\tools\\uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 120 | -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \ | 
|---|
|  | 121 | -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \ | 
|---|
|  | 122 | -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \ | 
|---|
|  | 123 | -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \ | 
|---|
| [561] | 124 | (cd qmake && $(MAKE) distclean) | 
|---|
| [846] | 125 | } else { | 
|---|
|  | 126 | confclean.commands += \ | 
|---|
|  | 127 | (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 128 | (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 129 | (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \ | 
|---|
|  | 130 | -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\\n\\t) \ | 
|---|
|  | 131 | -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\\n\\t) \ | 
|---|
|  | 132 | -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\\n\\t) \ | 
|---|
|  | 133 | -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \ | 
|---|
|  | 134 | (cd qmake && $(MAKE) distclean) | 
|---|
|  | 135 | } | 
|---|
| [561] | 136 | } | 
|---|
| [2] | 137 | QMAKE_EXTRA_TARGETS += confclean | 
|---|
|  | 138 | qmakeclean.commands += (cd qmake && $(MAKE) clean) | 
|---|
|  | 139 | QMAKE_EXTRA_TARGETS += qmakeclean | 
|---|
|  | 140 | CLEAN_DEPS += qmakeclean | 
|---|
|  | 141 |  | 
|---|
|  | 142 | CONFIG -= qt | 
|---|
|  | 143 |  | 
|---|
|  | 144 | ### installations #### | 
|---|
|  | 145 |  | 
|---|
|  | 146 | #translations | 
|---|
|  | 147 | translations.path=$$[QT_INSTALL_TRANSLATIONS] | 
|---|
|  | 148 | translations.files = $$QT_SOURCE_TREE/translations/*.qm | 
|---|
|  | 149 | INSTALLS += translations | 
|---|
|  | 150 |  | 
|---|
|  | 151 | #qmake | 
|---|
|  | 152 | qmake.path=$$[QT_INSTALL_BINS] | 
|---|
| [236] | 153 | win32|os2 { | 
|---|
| [2] | 154 | qmake.files=$$QT_BUILD_TREE/bin/qmake.exe | 
|---|
|  | 155 | } else { | 
|---|
|  | 156 | qmake.files=$$QT_BUILD_TREE/bin/qmake | 
|---|
|  | 157 | } | 
|---|
|  | 158 | INSTALLS += qmake | 
|---|
|  | 159 |  | 
|---|
|  | 160 | #mkspecs | 
|---|
|  | 161 | mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs | 
|---|
| [846] | 162 | mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$files($$QT_SOURCE_TREE/mkspecs/*) | 
|---|
|  | 163 | mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules | 
|---|
| [2] | 164 | unix { | 
|---|
|  | 165 | DEFAULT_QMAKESPEC = $$QMAKESPEC | 
|---|
|  | 166 | DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g | 
|---|
|  | 167 | mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default | 
|---|
| [846] | 168 | mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default | 
|---|
| [2] | 169 | } | 
|---|
| [769] | 170 | win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) { | 
|---|
|  | 171 | # When shadow building on Windows, the default mkspec only exists in the build tree. | 
|---|
|  | 172 | mkspecs.files += $$QT_BUILD_TREE/mkspecs/default | 
|---|
|  | 173 | } | 
|---|
| [2] | 174 | INSTALLS += mkspecs | 
|---|
|  | 175 |  | 
|---|
|  | 176 | false:macx { #mac install location | 
|---|
|  | 177 | macdocs.files = $$htmldocs.files | 
|---|
|  | 178 | macdocs.path = /Developer/Documentation/Qt | 
|---|
|  | 179 | INSTALLS += macdocs | 
|---|
|  | 180 | } | 
|---|
|  | 181 |  | 
|---|