- Timestamp:
- Jan 28, 2016 11:08:44 AM (9 years ago)
- Location:
- trunk/kBuild/units
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/units/qt3.kmk
r2726 r2805 5 5 6 6 # 7 # Copyright (c) 2008-201 4knut st. osmundsen <[email protected]>7 # Copyright (c) 2008-2016 knut st. osmundsen <[email protected]> 8 8 # 9 9 # This file is part of kBuild. … … 39 39 40 40 41 if ndef UNIT_qt442 # Add our target properties (same as qt4 ).41 if !defined(UNIT_qt4) && !defined(UNIT_qt5) 42 # Add our target properties (same as qt4 & qt5). 43 43 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX 44 44 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS -
trunk/kBuild/units/qt4.kmk
r2787 r2805 5 5 6 6 # 7 # Copyright (c) 2008-201 4knut st. osmundsen <[email protected]>7 # Copyright (c) 2008-2016 knut st. osmundsen <[email protected]> 8 8 # 9 9 # This file is part of kBuild. … … 39 39 40 40 41 if ndef UNIT_qt342 # Add our target properties (same as qt3 ).41 if !defined(UNIT_qt3) && !defined(UNIT_qt5) 42 # Add our target properties (same as qt3 & qt5). 43 43 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX 44 44 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS -
trunk/kBuild/units/qt5.kmk
r2804 r2805 1 1 # $Id$ 2 2 ## @file 3 # Qt 4unit.4 # 5 6 # 7 # Copyright (c) 2008-201 4knut st. osmundsen <[email protected]>3 # Qt 5 unit. 4 # 5 6 # 7 # Copyright (c) 2008-2016 knut st. osmundsen <[email protected]> 8 8 # 9 9 # This file is part of kBuild. … … 33 33 34 34 35 ifdef UNIT_qt 436 $(error kBuild: The qt 4unit was included twice!)37 endif 38 UNIT_qt 4 = qt439 40 41 if ndef UNIT_qt342 # Add our target properties (same as qt3 ).35 ifdef UNIT_qt5 36 $(error kBuild: The qt5 unit was included twice!) 37 endif 38 UNIT_qt5 = qt5 39 40 41 if !defined(UNIT_qt3) && !defined(UNIT_qt4) 42 # Add our target properties (same as qt3 & qt4). 43 43 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX 44 44 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS … … 51 51 52 52 # 53 # The QT 4SDK.54 # 55 # This is implemented here rather than in sdks/QT 4.kmk to enforce the global USES.53 # The QT5 SDK. 54 # 55 # This is implemented here rather than in sdks/QT5.kmk to enforce the global USES. 56 56 # It also makes things easier to develop, with fewer files I mean. 57 57 # 58 58 ## @todo the SDK might actually not be necessary as it turns out... For now it servers 59 59 # a purpose if the host differs from the target, in theory at least. 60 SDK_QT 4 = Qt460 SDK_QT5 = Qt5 61 61 62 62 # SDK Specific Properties 63 # PATH_SDK_QT 4 - The general Qt4root directory.64 # PATH_SDK_QT 4_INC - The include directory.65 # PATH_SDK_QT 4_LIB.amd64 - The lib directory for AMD64.66 # PATH_SDK_QT 4_LIB.x86 - The lib directory for X86.67 # PATH_SDK_QT 4_LIB - The lib directory for KBUILD_TARGET.68 ifndef PATH_SDK_QT 469 PATH_SDK_QT 4:= $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v4*)))70 ifeq ($(PATH_SDK_QT 4),)63 # PATH_SDK_QT5 - The general Qt5 root directory. 64 # PATH_SDK_QT5_INC - The include directory. 65 # PATH_SDK_QT5_LIB.amd64 - The lib directory for AMD64. 66 # PATH_SDK_QT5_LIB.x86 - The lib directory for X86. 67 # PATH_SDK_QT5_LIB - The lib directory for KBUILD_TARGET. 68 ifndef PATH_SDK_QT5 69 PATH_SDK_QT5 := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v4*))) 70 ifeq ($(PATH_SDK_QT5),) 71 71 # If target == host, try look for Qt in the various platform specific places. 72 72 ifeq ($(KBUILD_TARGET),$(KBUILD_HOST)) 73 73 ifeq ($(KBUILD_TARGET),darwin) 74 PATH_SDK_QT 4:= $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))74 PATH_SDK_QT5 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4))) 75 75 else ifeq ($(KBUILD_TARGET),win) 76 76 # No idea here yet... … … 78 78 # No port... 79 79 else 80 # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT 4_LIB* stuff if it doesn't work.81 # Try find the general root of thing by looking for the qt 3to4program, if not found, then look for rcc.82 PATH_SDK_QT 4 := $(patsubst %/bin/qt3to4-qt4,%,$(firstword $(wildcard \83 /usr/bin/qt 3to4-qt4\84 /usr/local/bin/qt 3to4-qt4\85 /usr/qt/4/bin/qt 3to4-qt4\86 /usr/share/qt 4/bin/qt3to4-qt4\80 # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT5_LIB* stuff if it doesn't work. 81 # Try find the general root of thing by looking for the qt4to5 program, if not found, then look for rcc. 82 PATH_SDK_QT5 := $(patsubst %/bin/qt4to5-qt5,%,$(firstword $(wildcard \ 83 /usr/bin/qt4to5-qt5 \ 84 /usr/local/bin/qt4to5-qt5 \ 85 /usr/qt/4/bin/qt4to5-qt5 \ 86 /usr/share/qt5/bin/qt4to5-qt5 \ 87 87 ))) 88 ifeq ($(PATH_SDK_QT 4),)89 PATH_SDK_QT 4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \90 /usr/bin/qt 3to4\91 /usr/local/bin/qt 3to4\92 /usr/qt/4/bin/qt 3to4\93 /usr/share/qt 4/bin/qt3to4\88 ifeq ($(PATH_SDK_QT5),) 89 PATH_SDK_QT5 := $(patsubst %/bin/qt4to5,%,$(firstword $(wildcard \ 90 /usr/bin/qt4to5 \ 91 /usr/local/bin/qt4to5 \ 92 /usr/qt/4/bin/qt4to5 \ 93 /usr/share/qt5/bin/qt4to5 \ 94 94 ))) 95 95 endif 96 ifeq ($(PATH_SDK_QT 4),)97 PATH_SDK_QT 4 := $(patsubst %/bin/rcc-qt4,%,$(firstword $(wildcard \98 /usr/bin/rcc-qt 4\99 /usr/local/bin/rcc-qt 4\100 /usr/qt/4/bin/rcc-qt 4\101 /usr/share/qt 4/bin/rcc-qt4\96 ifeq ($(PATH_SDK_QT5),) 97 PATH_SDK_QT5 := $(patsubst %/bin/rcc-qt5,%,$(firstword $(wildcard \ 98 /usr/bin/rcc-qt5 \ 99 /usr/local/bin/rcc-qt5 \ 100 /usr/qt/4/bin/rcc-qt5 \ 101 /usr/share/qt5/bin/rcc-qt5 \ 102 102 ))) 103 103 endif 104 ifeq ($(PATH_SDK_QT 4),)105 PATH_SDK_QT 4:= $(patsubst %/bin/rcc,%,$(firstword $(wildcard \104 ifeq ($(PATH_SDK_QT5),) 105 PATH_SDK_QT5 := $(patsubst %/bin/rcc,%,$(firstword $(wildcard \ 106 106 /usr/bin/rcc \ 107 107 /usr/local/bin/rcc \ 108 108 /usr/qt/4/bin/rcc \ 109 /usr/share/qt 4/bin/rcc \109 /usr/share/qt5/bin/rcc \ 110 110 ))) 111 111 endif 112 ifneq ($(PATH_SDK_QT 4),)113 export PATH_SDK_QT 4112 ifneq ($(PATH_SDK_QT5),) 113 export PATH_SDK_QT5 114 114 115 115 # Locate the include files. 116 ifeq ($(PATH_SDK_QT 4_INC),)117 PATH_SDK_QT 4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \118 $(PATH_SDK_QT 4)/include/QtCore/qglobal.h \119 $(PATH_SDK_QT 4)/include/qt4/QtCore/qglobal.h \120 /usr/include/qt 4/QtCore/qtglobal.h \121 /usr/local/include/qt 4/QtCore/qtglobal.h \116 ifeq ($(PATH_SDK_QT5_INC),) 117 PATH_SDK_QT5_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \ 118 $(PATH_SDK_QT5)/include/QtCore/qglobal.h \ 119 $(PATH_SDK_QT5)/include/qt5/QtCore/qglobal.h \ 120 /usr/include/qt5/QtCore/qtglobal.h \ 121 /usr/local/include/qt5/QtCore/qtglobal.h \ 122 122 ))) 123 ifneq ($(PATH_SDK_QT 4_INC),)124 export PATH_SDK_QT 4_INC123 ifneq ($(PATH_SDK_QT5_INC),) 124 export PATH_SDK_QT5_INC 125 125 endif 126 126 endif 127 127 128 128 # Now for the libraries (mostly for helping out finding the KBUILD_TARGET libs). 129 ifeq ($(PATH_SDK_QT 4_LIB.x86),)130 PATH_SDK_QT 4_LIB.x86 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \131 $(PATH_SDK_QT 4)/lib32/libQtCore$(SUFF_DLL) \132 $(PATH_SDK_QT 4)/lib32/qt4/libQtCore$(SUFF_DLL) \129 ifeq ($(PATH_SDK_QT5_LIB.x86),) 130 PATH_SDK_QT5_LIB.x86 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ 131 $(PATH_SDK_QT5)/lib32/libQtCore$(SUFF_DLL) \ 132 $(PATH_SDK_QT5)/lib32/qt5/libQtCore$(SUFF_DLL) \ 133 133 /usr/lib32/libQtCore$(SUFF_DLL) \ 134 /usr/lib32/qt 4/libQtCore$(SUFF_DLL) \134 /usr/lib32/qt5/libQtCore$(SUFF_DLL) \ 135 135 /usr/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \ 136 136 /usr/local/lib32/libQtCore$(SUFF_DLL) \ 137 /usr/local/lib32/qt 4/libQtCore$(SUFF_DLL) \137 /usr/local/lib32/qt5/libQtCore$(SUFF_DLL) \ 138 138 /usr/local/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \ 139 $(PATH_SDK_QT 4)/lib/libQtCore$(SUFF_DLL) \140 $(PATH_SDK_QT 4)/lib/qt4/libQtCore$(SUFF_DLL) \141 $(PATH_SDK_QT 4)/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \139 $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \ 140 $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \ 141 $(PATH_SDK_QT5)/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \ 142 142 ))) 143 ifneq ($(PATH_SDK_QT 4_LIB.x86),)144 export PATH_SDK_QT 4_LIB.x86143 ifneq ($(PATH_SDK_QT5_LIB.x86),) 144 export PATH_SDK_QT5_LIB.x86 145 145 endif 146 146 endif 147 ifeq ($(PATH_SDK_QT 4_LIB.amd64),)148 PATH_SDK_QT 4_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \149 $(PATH_SDK_QT 4)/lib64/libQtCore$(SUFF_DLL) \150 $(PATH_SDK_QT 4)/lib64/qt4/libQtCore$(SUFF_DLL) \151 $(PATH_SDK_QT 4)/lib/amd64/libQtCore$(SUFF_DLL) \147 ifeq ($(PATH_SDK_QT5_LIB.amd64),) 148 PATH_SDK_QT5_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ 149 $(PATH_SDK_QT5)/lib64/libQtCore$(SUFF_DLL) \ 150 $(PATH_SDK_QT5)/lib64/qt5/libQtCore$(SUFF_DLL) \ 151 $(PATH_SDK_QT5)/lib/amd64/libQtCore$(SUFF_DLL) \ 152 152 /usr/lib64/libQtCore$(SUFF_DLL) \ 153 /usr/lib64/qt 4/libQtCore$(SUFF_DLL) \153 /usr/lib64/qt5/libQtCore$(SUFF_DLL) \ 154 154 /usr/lib/amd64/libQtCore$(SUFF_DLL) \ 155 155 /usr/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \ 156 156 /usr/local/lib64/libQtCore$(SUFF_DLL) \ 157 /usr/local/lib64/qt 4/libQtCore$(SUFF_DLL) \157 /usr/local/lib64/qt5/libQtCore$(SUFF_DLL) \ 158 158 /usr/local/lib/amd64/libQtCore$(SUFF_DLL) \ 159 159 /usr/local/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \ 160 $(PATH_SDK_QT 4)/lib/libQtCore$(SUFF_DLL) \161 $(PATH_SDK_QT 4)/lib/qt4/libQtCore$(SUFF_DLL) \162 $(PATH_SDK_QT 4)/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \160 $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \ 161 $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \ 162 $(PATH_SDK_QT5)/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \ 163 163 ))) 164 ifneq ($(PATH_SDK_QT 4_LIB.amd64),)165 export PATH_SDK_QT 4_LIB.amd64164 ifneq ($(PATH_SDK_QT5_LIB.amd64),) 165 export PATH_SDK_QT5_LIB.amd64 166 166 endif 167 167 endif 168 168 169 169 # And finally, the library path for KBUILD_TARGET. 170 ifeq ($(PATH_SDK_QT 4_LIB),)171 PATH_SDK_QT 4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET_ARCH))172 ifeq ($(PATH_SDK_QT 4_LIB),)173 PATH_SDK_QT 4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \174 $(PATH_SDK_QT 4)/lib/libQtCore$(SUFF_DLL) \175 $(PATH_SDK_QT 4)/lib/qt4/libQtCore$(SUFF_DLL) \170 ifeq ($(PATH_SDK_QT5_LIB),) 171 PATH_SDK_QT5_LIB := $(PATH_SDK_QT5_LIB.$(KBUILD_TARGET_ARCH)) 172 ifeq ($(PATH_SDK_QT5_LIB),) 173 PATH_SDK_QT5_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ 174 $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \ 175 $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \ 176 176 /usr/lib/libQtCore$(SUFF_DLL) \ 177 /usr/lib/qt 4/libQtCore$(SUFF_DLL) \177 /usr/lib/qt5/libQtCore$(SUFF_DLL) \ 178 178 /usr/local/lib/libQtCore$(SUFF_DLL) \ 179 /usr/local/lib/qt 4/libQtCore$(SUFF_DLL) \179 /usr/local/lib/qt5/libQtCore$(SUFF_DLL) \ 180 180 ))) 181 181 endif 182 ifneq ($(PATH_SDK_QT 4_LIB),)183 export PATH_SDK_QT 4_LIB182 ifneq ($(PATH_SDK_QT5_LIB),) 183 export PATH_SDK_QT5_LIB 184 184 endif 185 185 endif … … 189 189 endif 190 190 # Found it? 191 ifeq ($(PATH_SDK_QT 4),)192 $(warning kBuild: Couldn't find the Qt 4headers and libaries...)193 PATH_SDK_QT 4:= $(KBUILD_DEVTOOLS_TRG)/qt/not-found191 ifeq ($(PATH_SDK_QT5),) 192 $(warning kBuild: Couldn't find the Qt5 headers and libaries...) 193 PATH_SDK_QT5 := $(KBUILD_DEVTOOLS_TRG)/qt/not-found 194 194 endif 195 195 endif 196 196 else 197 197 # Resolve any fancy stuff once and for all. 198 PATH_SDK_QT 4 := $(PATH_SDK_QT4)198 PATH_SDK_QT5 := $(PATH_SDK_QT5) 199 199 endif 200 200 … … 202 202 # build it on the mac. The .dmg installs into Frameworks but builds into lib. 203 203 ifeq ($(KBUILD_TARGET),darwin) 204 ifndef PATH_SDK_QT 4_LIB205 ifneq ($(wildcard $(PATH_SDK_QT 4)/Frameworks),)206 PATH_SDK_QT 4_LIB ?= $(PATH_SDK_QT4)/Frameworks204 ifndef PATH_SDK_QT5_LIB 205 ifneq ($(wildcard $(PATH_SDK_QT5)/Frameworks),) 206 PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/Frameworks 207 207 else 208 PATH_SDK_QT 4_LIB ?= $(PATH_SDK_QT4)/lib208 PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/lib 209 209 endif 210 210 endif 211 211 else 212 PATH_SDK_QT 4_LIB ?= $(PATH_SDK_QT4)/lib213 PATH_SDK_QT 4_INC ?= $(PATH_SDK_QT4)/include212 PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/lib 213 PATH_SDK_QT5_INC ?= $(PATH_SDK_QT5)/include 214 214 endif 215 215 … … 219 219 220 220 # 221 # The QT 4tool.222 # 223 # This is implemented here rather than in tools/QT 4.kmk to enforce the global USES.221 # The QT5 tool. 222 # 223 # This is implemented here rather than in tools/QT5.kmk to enforce the global USES. 224 224 # It also makes things easier to develop, with fewer files I mean. 225 225 # 226 TOOL_QT 4 = Qt4226 TOOL_QT5 = Qt5 227 227 228 228 # Tool Specific Properties 229 # PATH_TOOL_QT 4- Obsolete.230 # PATH_TOOL_QT 4_BIN - The231 # TOOL_QT 4_BIN_SUFF -232 if !defined(PATH_TOOL_QT 4_BIN) && defined(PATH_TOOL_QT4)233 PATH_TOOL_QT 4_BIN := $(PATH_TOOL_QT4)/bin234 endif 235 ifndef PATH_TOOL_QT 4_BIN236 PATH_TOOL_QT 4_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/qt/v4*/bin)))237 if "$(PATH_TOOL_QT 4_BIN)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != ""238 PATH_TOOL_QT 4_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/qt/v4*/bin)))239 endif 240 ifeq ($(PATH_TOOL_QT 4_BIN),)241 ifdef TOOL_QT 4_BIN_SUFF242 TOOL_QT 4_BIN_SUFF := $(TOOL_QT4_BIN_SUFF)229 # PATH_TOOL_QT5 - Obsolete. 230 # PATH_TOOL_QT5_BIN - The 231 # TOOL_QT5_BIN_SUFF - 232 if !defined(PATH_TOOL_QT5_BIN) && defined(PATH_TOOL_QT5) 233 PATH_TOOL_QT5_BIN := $(PATH_TOOL_QT5)/bin 234 endif 235 ifndef PATH_TOOL_QT5_BIN 236 PATH_TOOL_QT5_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/qt/v4*/bin))) 237 if "$(PATH_TOOL_QT5_BIN)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != "" 238 PATH_TOOL_QT5_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/qt/v4*/bin))) 239 endif 240 ifeq ($(PATH_TOOL_QT5_BIN),) 241 ifdef TOOL_QT5_BIN_SUFF 242 TOOL_QT5_BIN_SUFF := $(TOOL_QT5_BIN_SUFF) 243 243 endif 244 # Try looking for moc-qt 4/ moc-$(suffix) first.245 ifneq ($(TOOL_QT 4_BIN_SUFF),)246 PATH_TOOL_QT 4_BIN := $(patsubst %/moc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \247 /usr/lib/qt 4/bin/moc$(TOOL_QT4_BIN_SUFF) \248 /usr/qt/4/bin/moc$(TOOL_QT 4_BIN_SUFF) \249 /usr/share/qt 4/bin/moc$(TOOL_QT4_BIN_SUFF) \250 /usr/local/bin/moc$(TOOL_QT 4_BIN_SUFF) \251 /usr/bin/moc$(TOOL_QT 4_BIN_SUFF) \244 # Try looking for moc-qt5 / moc-$(suffix) first. 245 ifneq ($(TOOL_QT5_BIN_SUFF),) 246 PATH_TOOL_QT5_BIN := $(patsubst %/moc$(TOOL_QT5_BIN_SUFF),%,$(firstword $(wildcard \ 247 /usr/lib/qt5/bin/moc$(TOOL_QT5_BIN_SUFF) \ 248 /usr/qt/4/bin/moc$(TOOL_QT5_BIN_SUFF) \ 249 /usr/share/qt5/bin/moc$(TOOL_QT5_BIN_SUFF) \ 250 /usr/local/bin/moc$(TOOL_QT5_BIN_SUFF) \ 251 /usr/bin/moc$(TOOL_QT5_BIN_SUFF) \ 252 252 ))) 253 253 else 254 PATH_TOOL_QT 4_BIN := $(patsubst %/moc-qt4,%,$(firstword $(wildcard \255 /usr/lib/qt 4/bin/moc-qt4\256 /usr/qt/4/bin/moc-qt 4\257 /usr/share/qt 4/bin/moc-qt4\258 /usr/local/bin/moc-qt 4\259 /usr/bin/moc-qt 4\254 PATH_TOOL_QT5_BIN := $(patsubst %/moc-qt5,%,$(firstword $(wildcard \ 255 /usr/lib/qt5/bin/moc-qt5 \ 256 /usr/qt/4/bin/moc-qt5 \ 257 /usr/share/qt5/bin/moc-qt5 \ 258 /usr/local/bin/moc-qt5 \ 259 /usr/bin/moc-qt5 \ 260 260 ))) 261 ifneq ($(PATH_TOOL_QT 4_BIN),)262 TOOL_QT 4_BIN_SUFF := -qt4261 ifneq ($(PATH_TOOL_QT5_BIN),) 262 TOOL_QT5_BIN_SUFF := -qt5 263 263 else 264 # If no luck, try looking for moc in the qt 4specific locations.265 PATH_TOOL_QT 4_BIN := $(patsubst %/moc,%,$(firstword $(wildcard \266 /usr/lib/qt 4/bin/moc \264 # If no luck, try looking for moc in the qt5 specific locations. 265 PATH_TOOL_QT5_BIN := $(patsubst %/moc,%,$(firstword $(wildcard \ 266 /usr/lib/qt5/bin/moc \ 267 267 /usr/qt/4/bin/moc \ 268 /usr/share/qt 4/bin/moc \268 /usr/share/qt5/bin/moc \ 269 269 ))) 270 270 endif 271 271 endif 272 # If still no go, try looking for qt 3to4and rcc.273 ifeq ($(PATH_TOOL_QT 4_BIN),)274 PATH_TOOL_QT 4_BIN := $(patsubst %/qt3to4,%,$(firstword $(wildcard \275 /usr/lib/qt 4/bin/qt3to4\276 /usr/qt/4/bin/qt 3to4\277 /usr/share/qt 4/bin/qt3to4\278 /usr/local/bin/qt 3to4\279 /usr/bin/qt 3to4\272 # If still no go, try looking for qt4to5 and rcc. 273 ifeq ($(PATH_TOOL_QT5_BIN),) 274 PATH_TOOL_QT5_BIN := $(patsubst %/qt4to5,%,$(firstword $(wildcard \ 275 /usr/lib/qt5/bin/qt4to5 \ 276 /usr/qt/4/bin/qt4to5 \ 277 /usr/share/qt5/bin/qt4to5 \ 278 /usr/local/bin/qt4to5 \ 279 /usr/bin/qt4to5 \ 280 280 ))) 281 281 endif 282 ifeq ($(PATH_TOOL_QT 4_BIN),)283 PATH_TOOL_QT 4_BIN := $(patsubst %/rcc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \284 /usr/lib/qt 4/bin/rcc$(TOOL_QT4_BIN_SUFF) \285 /usr/qt/4/bin/rcc$(TOOL_QT 4_BIN_SUFF) \286 /usr/share/qt 4/bin/rcc$(TOOL_QT4_BIN_SUFF) \287 /usr/local/bin/rcc$(TOOL_QT 4_BIN_SUFF) \288 /usr/bin/rcc$(TOOL_QT 4_BIN_SUFF) \282 ifeq ($(PATH_TOOL_QT5_BIN),) 283 PATH_TOOL_QT5_BIN := $(patsubst %/rcc$(TOOL_QT5_BIN_SUFF),%,$(firstword $(wildcard \ 284 /usr/lib/qt5/bin/rcc$(TOOL_QT5_BIN_SUFF) \ 285 /usr/qt/4/bin/rcc$(TOOL_QT5_BIN_SUFF) \ 286 /usr/share/qt5/bin/rcc$(TOOL_QT5_BIN_SUFF) \ 287 /usr/local/bin/rcc$(TOOL_QT5_BIN_SUFF) \ 288 /usr/bin/rcc$(TOOL_QT5_BIN_SUFF) \ 289 289 ))) 290 290 endif 291 if "$(PATH_TOOL_QT 4_BIN)" == "" && "$(TOOL_QT4_BIN_SUFF)" != ""292 PATH_TOOL_QT 4_BIN := $(patsubst %/rcc,%,$(firstword $(wildcard \293 /usr/lib/qt 4/bin/rcc \291 if "$(PATH_TOOL_QT5_BIN)" == "" && "$(TOOL_QT5_BIN_SUFF)" != "" 292 PATH_TOOL_QT5_BIN := $(patsubst %/rcc,%,$(firstword $(wildcard \ 293 /usr/lib/qt5/bin/rcc \ 294 294 /usr/qt/4/bin/rcc \ 295 /usr/share/qt 4/bin/rcc \295 /usr/share/qt5/bin/rcc \ 296 296 /usr/local/bin/rcc \ 297 297 /usr/bin/rcc \ 298 298 ))) 299 299 endif 300 ifneq ($(PATH_TOOL_QT 4_BIN),)301 export PATH_TOOL_QT 4_BIN300 ifneq ($(PATH_TOOL_QT5_BIN),) 301 export PATH_TOOL_QT5_BIN 302 302 endif 303 303 endif … … 305 305 else 306 306 # Resolve any fancy stuff once and for all. 307 PATH_TOOL_QT 4_BIN := $(PATH_TOOL_QT4_BIN)308 endif 309 ifneq ($(PATH_TOOL_QT 4_BIN),)310 TOOL_QT 4_MOC ?= $(PATH_TOOL_QT4_BIN)/moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)311 TOOL_QT 4_UIC ?= $(PATH_TOOL_QT4_BIN)/uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)312 ifndef TOOL_QT 4_RCC313 TOOL_QT 4_RCC := $(PATH_TOOL_QT4_BIN)/rcc$(HOST_SUFF_EXE)314 ifeq ($(wildcard $(TOOL_QT 4_RCC)),)315 TOOL_QT 4_RCC := $(PATH_TOOL_QT4_BIN)/rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)307 PATH_TOOL_QT5_BIN := $(PATH_TOOL_QT5_BIN) 308 endif 309 ifneq ($(PATH_TOOL_QT5_BIN),) 310 TOOL_QT5_MOC ?= $(PATH_TOOL_QT5_BIN)/moc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 311 TOOL_QT5_UIC ?= $(PATH_TOOL_QT5_BIN)/uic$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 312 ifndef TOOL_QT5_RCC 313 TOOL_QT5_RCC := $(PATH_TOOL_QT5_BIN)/rcc$(HOST_SUFF_EXE) 314 ifeq ($(wildcard $(TOOL_QT5_RCC)),) 315 TOOL_QT5_RCC := $(PATH_TOOL_QT5_BIN)/rcc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 316 316 endif 317 317 endif 318 TOOL_QT 4_LRC ?= $(PATH_TOOL_QT4_BIN)/lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)319 TOOL_QT 4_LUPDATE ?= $(PATH_TOOL_QT4_BIN)/lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)318 TOOL_QT5_LRC ?= $(PATH_TOOL_QT5_BIN)/lrelease$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 319 TOOL_QT5_LUPDATE ?= $(PATH_TOOL_QT5_BIN)/lupdate$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 320 320 else 321 321 # Pathless, relies on the environment. 322 TOOL_QT 4_MOC ?= moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)323 TOOL_QT 4_UIC ?= uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)324 TOOL_QT 4_RCC ?= rcc$(HOST_SUFF_EXE)325 TOOL_QT 4_LRC ?= lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)326 TOOL_QT 4_LUPDATE ?= lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)322 TOOL_QT5_MOC ?= moc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 323 TOOL_QT5_UIC ?= uic$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 324 TOOL_QT5_RCC ?= rcc$(HOST_SUFF_EXE) 325 TOOL_QT5_LRC ?= lrelease$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 326 TOOL_QT5_LUPDATE ?= lupdate$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE) 327 327 endif 328 328 329 329 # General Properties used by kBuild and/or units/qt.kmk 330 TOOL_QT 4_MOCFLAGS ?=331 TOOL_QT 4_MOCINCS ?=332 TOOL_QT 4_MOCDEFS ?=333 TOOL_QT 4_MOCDEFS.darwin ?= __APPLE__ __GNUC__334 TOOL_QT 4_MOCDEFS.solaris ?= __sun335 TOOL_QT 4_MOCDEFS.win.amd64 ?= WIN64336 TOOL_QT 4_MOCDEFS.win.x86 ?= WIN32330 TOOL_QT5_MOCFLAGS ?= 331 TOOL_QT5_MOCINCS ?= 332 TOOL_QT5_MOCDEFS ?= 333 TOOL_QT5_MOCDEFS.darwin ?= __APPLE__ __GNUC__ 334 TOOL_QT5_MOCDEFS.solaris ?= __sun 335 TOOL_QT5_MOCDEFS.win.amd64 ?= WIN64 336 TOOL_QT5_MOCDEFS.win.x86 ?= WIN32 337 337 338 338 … … 347 347 # @param $(outbase) Output basename (full). Use this for list files and such. 348 348 # 349 TOOL_QT 4_MOC_CPP_DEPEND =350 TOOL_QT 4_MOC_CPP_DEPORD =351 TOOL_QT 4_MOC_CPP_OUTPUT =352 TOOL_QT 4_MOC_CPP_OUTPUT_MAYBE =353 define TOOL_QT 4_MOC_CPP_CMDS354 $(QUIET)$(TOOL_QT 4_MOC)\349 TOOL_QT5_MOC_CPP_DEPEND = 350 TOOL_QT5_MOC_CPP_DEPORD = 351 TOOL_QT5_MOC_CPP_OUTPUT = 352 TOOL_QT5_MOC_CPP_OUTPUT_MAYBE = 353 define TOOL_QT5_MOC_CPP_CMDS 354 $(QUIET)$(TOOL_QT5_MOC)\ 355 355 $(flags)\ 356 356 $(addprefix -I, $(incs))\ … … 370 370 # @param $(outbase) Output basename (full). Use this for list files and such. 371 371 # 372 TOOL_QT 4_MOC_HPP_DEPEND =373 TOOL_QT 4_MOC_HPP_DEPORD =374 TOOL_QT 4_MOC_HPP_OUTPUT =375 TOOL_QT 4_MOC_HPP_OUTPUT_MAYBE =376 define TOOL_QT 4_MOC_HPP_CMDS377 $(QUIET)$(TOOL_QT 4_MOC)\372 TOOL_QT5_MOC_HPP_DEPEND = 373 TOOL_QT5_MOC_HPP_DEPORD = 374 TOOL_QT5_MOC_HPP_OUTPUT = 375 TOOL_QT5_MOC_HPP_OUTPUT_MAYBE = 376 define TOOL_QT5_MOC_HPP_CMDS 377 $(QUIET)$(TOOL_QT5_MOC)\ 378 378 $(flags)\ 379 379 $(addprefix -I, $(incs))\ … … 393 393 # @param $(outbase) Output basename (full). Use this for list files and such. 394 394 # 395 TOOL_QT 4_UIC_UI_DEPEND =396 TOOL_QT 4_UIC_UI_DEPORD =397 TOOL_QT 4_UIC_UI_OUTPUT =398 TOOL_QT 4_UIC_UI_OUTPUT_MAYBE =399 define TOOL_QT 4_UIC_UI_CMDS400 $(QUIET)$(TOOL_QT 4_UIC)\395 TOOL_QT5_UIC_UI_DEPEND = 396 TOOL_QT5_UIC_UI_DEPORD = 397 TOOL_QT5_UIC_UI_OUTPUT = 398 TOOL_QT5_UIC_UI_OUTPUT_MAYBE = 399 define TOOL_QT5_UIC_UI_CMDS 400 $(QUIET)$(TOOL_QT5_UIC)\ 401 401 $(flags)\ 402 402 -o $(out)\ … … 415 415 # 416 416 # @remarks The sed script generating the dependency file is a bit naive. 417 TOOL_QT 4_RCC_QRC_DEPEND =418 TOOL_QT 4_RCC_QRC_DEPORD =419 TOOL_QT 4_RCC_QRC_OUTPUT =420 TOOL_QT 4_RCC_QRC_OUTPUT_MAYBE =421 define TOOL_QT 4_RCC_QRC_CMDS422 $(QUIET)$(TOOL_QT 4_RCC)\417 TOOL_QT5_RCC_QRC_DEPEND = 418 TOOL_QT5_RCC_QRC_DEPORD = 419 TOOL_QT5_RCC_QRC_OUTPUT = 420 TOOL_QT5_RCC_QRC_OUTPUT_MAYBE = 421 define TOOL_QT5_RCC_QRC_CMDS 422 $(QUIET)$(TOOL_QT5_RCC)\ 423 423 $(flags)\ 424 424 -o $(out)\ … … 455 455 # @param $(outbase) Output basename (full). Use this for list files and such. 456 456 # 457 TOOL_QT 4_LRC_TS_DEPEND =458 TOOL_QT 4_LRC_TS_DEPORD =459 TOOL_QT 4_LRC_TS_OUTPUT =460 TOOL_QT 4_LRC_TS_OUTPUT_MAYBE =461 define TOOL_QT 4_LRC_TS_CMDS462 $(QUIET)$(TOOL_QT 4_LRC)\457 TOOL_QT5_LRC_TS_DEPEND = 458 TOOL_QT5_LRC_TS_DEPORD = 459 TOOL_QT5_LRC_TS_OUTPUT = 460 TOOL_QT5_LRC_TS_OUTPUT_MAYBE = 461 define TOOL_QT5_LRC_TS_CMDS 462 $(QUIET)$(TOOL_QT5_LRC)\ 463 463 $(flags)\ 464 464 $(source)\ … … 470 470 # 471 471 # 472 # Back to the Qt 4unit.472 # Back to the Qt5 unit. 473 473 # 474 474 # … … 477 477 ## wrapper for the lrelease (LRC) command dependencies. 478 478 ifndef NO_COMPILE_CMDS_DEPS 479 _UNIT_QT 4_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)480 else 481 _UNIT_QT 4_LRC_CMDS_DEP =482 endif 483 484 ## 485 # def_unit_qt 4_target_pre_handle_translation helper that is expanded before evaluation.479 _UNIT_QT5_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_LRC_CMDS_PREV_),$$(commands $(out)),FORCE) 480 else 481 _UNIT_QT5_LRC_CMDS_DEP = 482 endif 483 484 ## 485 # def_unit_qt5_target_pre_handle_translation helper that is expanded before evaluation. 486 486 # 487 487 # This is necessary to resolve reference to local variables before doing … … 489 489 # later in a different context and the result would be completely wrong. 490 490 # 491 define def_unit_qt 4_target_pre_handle_translation_dx491 define def_unit_qt5_target_pre_handle_translation_dx 492 492 493 493 $(out) + $(more_output) +| $(maybe_output): \ 494 494 $(deps) \ 495 $(value _UNIT_QT 4_LRC_CMDS_DEP) \495 $(value _UNIT_QT5_LRC_CMDS_DEP) \ 496 496 | \ 497 497 $(orderdeps) … … 503 503 ifndef NO_COMPILE_CMDS_DEPS 504 504 %$$(QUIET2)$$(APPEND) '$(dep)' 505 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT 4_LRC_CMDS_PREV_'505 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_LRC_CMDS_PREV_' 506 506 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)' 507 507 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef' … … 511 511 $(target)-inst-nls_SOURCES += $(out) 512 512 513 endef # def_unit_qt 4_target_pre_handle_translation_dx513 endef # def_unit_qt5_target_pre_handle_translation_dx 514 514 515 515 ## … … 520 520 # 521 521 # @remarks Invoked via $(evalvalctx ). 522 define def_unit_qt 4_target_pre_handle_translation522 define def_unit_qt5_target_pre_handle_translation 523 523 local type := LRC 524 524 … … 556 556 $(eval includedep $(dep)) 557 557 endif 558 $(eval $(def_unit_qt 4_target_pre_handle_translation_dx))559 560 endef # def_unit_qt 4_target_pre_handle_translation558 $(eval $(def_unit_qt5_target_pre_handle_translation_dx)) 559 560 endef # def_unit_qt5_target_pre_handle_translation 561 561 562 562 … … 564 564 ## wrapper for the UIC command dependencies. 565 565 ifndef NO_COMPILE_CMDS_DEPS 566 _UNIT_QT 4_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_RCC_CMDS_PREV_),$$(commands $(out)),FORCE)567 else 568 _UNIT_QT 4_RCC_CMDS_DEP =569 endif 570 571 ## 572 # def_unit_qt 4_target_pre_handle_qrc helper that is expanded before evaluation.566 _UNIT_QT5_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_RCC_CMDS_PREV_),$$(commands $(out)),FORCE) 567 else 568 _UNIT_QT5_RCC_CMDS_DEP = 569 endif 570 571 ## 572 # def_unit_qt5_target_pre_handle_qrc helper that is expanded before evaluation. 573 573 # 574 574 # This is necessary to resolve reference to local variables before doing … … 576 576 # later in a different context and the result would be completely wrong. 577 577 # 578 define def_unit_qt 4_target_pre_handle_rcc_dx578 define def_unit_qt5_target_pre_handle_rcc_dx 579 579 580 580 $(out) +| $(realout) $(more_output) $(maybe_output): \ 581 581 $(deps) \ 582 $(value _UNIT_QT 4_RCC_CMDS_DEP) \582 $(value _UNIT_QT5_RCC_CMDS_DEP) \ 583 583 | \ 584 584 $(orderdeps) … … 591 591 ifndef NO_COMPILE_CMDS_DEPS 592 592 %$$(QUIET2)$$(APPEND) '$(dep)' 593 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT 4_RCC_CMDS_PREV_'593 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_RCC_CMDS_PREV_' 594 594 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)' 595 595 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef' … … 600 600 $(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep) 601 601 602 endef # def_unit_qt 4_target_pre_handle_rcc_dx602 endef # def_unit_qt5_target_pre_handle_rcc_dx 603 603 604 604 ## … … 606 606 # 607 607 # @remarks $(evalvalctx me). 608 define def_unit_qt 4_src_handler_qrc608 define def_unit_qt5_src_handler_qrc 609 609 local type := RCC 610 610 … … 643 643 $(eval includedep $(dep)) 644 644 endif 645 $(eval $(def_unit_qt 4_target_pre_handle_rcc_dx))646 647 endef # def_unit_qt 4_src_handler_qrc645 $(eval $(def_unit_qt5_target_pre_handle_rcc_dx)) 646 647 endef # def_unit_qt5_src_handler_qrc 648 648 649 649 … … 651 651 ## wrapper for the UIC command dependencies. 652 652 ifndef NO_COMPILE_CMDS_DEPS 653 _UNIT_QT 4_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_UIC_CMDS_PREV_),$$(commands $(out)),FORCE)654 else 655 _UNIT_QT 4_UIC_CMDS_DEP =656 endif 657 658 ## 659 # def_unit_qt 4_src_handler_ui helper that is expanded before evaluation.653 _UNIT_QT5_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_UIC_CMDS_PREV_),$$(commands $(out)),FORCE) 654 else 655 _UNIT_QT5_UIC_CMDS_DEP = 656 endif 657 658 ## 659 # def_unit_qt5_src_handler_ui helper that is expanded before evaluation. 660 660 # 661 661 # This is necessary to resolve reference to local variables before doing … … 663 663 # later in a different context and the result would be completely wrong. 664 664 # 665 define def_unit_qt 4_target_pre_handle_ui_dx665 define def_unit_qt5_target_pre_handle_ui_dx 666 666 667 667 $(out) +| $(realout) $(more_output) $(maybe_output): \ 668 668 $(deps) \ 669 $(value _UNIT_QT 4_UIC_CMDS_DEP) \669 $(value _UNIT_QT5_UIC_CMDS_DEP) \ 670 670 | \ 671 671 $(orderdeps) … … 678 678 ifndef NO_COMPILE_CMDS_DEPS 679 679 %$$(QUIET2)$$(APPEND) '$(dep)' 680 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT 4_UIC_CMDS_PREV_'680 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_UIC_CMDS_PREV_' 681 681 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)' 682 682 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef' … … 686 686 $(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep) 687 687 688 endef # def_unit_qt 4_target_pre_handle_ui_dx688 endef # def_unit_qt5_target_pre_handle_ui_dx 689 689 690 690 ## … … 692 692 # 693 693 # @remarks $(evalvalctx me). 694 define def_unit_qt 4_src_handler_ui694 define def_unit_qt5_src_handler_ui 695 695 local type := UIC 696 696 … … 729 729 $(eval includedep $(dep)) 730 730 endif 731 $(eval $(def_unit_qt 4_target_pre_handle_ui_dx))732 733 endef # def_unit_qt 4_src_handler_ui731 $(eval $(def_unit_qt5_target_pre_handle_ui_dx)) 732 733 endef # def_unit_qt5_src_handler_ui 734 734 735 735 … … 737 737 ## wrapper for the MOC command dependencies. 738 738 ifndef NO_COMPILE_CMDS_DEPS 739 _UNIT_QT 4_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)740 else 741 _UNIT_QT 4_MOC_HPP_CMDS_DEP =742 endif 743 744 ## 745 # def_unit_qt 4_target_pre_handle_moc_hdr helper that is expanded before evaluation.739 _UNIT_QT5_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE) 740 else 741 _UNIT_QT5_MOC_HPP_CMDS_DEP = 742 endif 743 744 ## 745 # def_unit_qt5_target_pre_handle_moc_hdr helper that is expanded before evaluation. 746 746 # 747 747 # This is necessary to resolve reference to local variables before doing … … 749 749 # later in a different context and the result would be completely wrong. 750 750 # 751 define def_unit_qt 4_target_pre_handle_moc_hdr_dx751 define def_unit_qt5_target_pre_handle_moc_hdr_dx 752 752 753 753 $(out) +| $(realout) $(more_output) $(maybe_output): \ 754 754 $(deps) \ 755 $(value _UNIT_QT 4_MOC_HPP_CMDS_DEP) \755 $(value _UNIT_QT5_MOC_HPP_CMDS_DEP) \ 756 756 | \ 757 757 $(orderdeps) … … 764 764 ifndef NO_COMPILE_CMDS_DEPS 765 765 %$$(QUIET2)$$(APPEND) '$(dep)' 766 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT 4_MOC_HPP_CMDS_PREV_'766 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_MOC_HPP_CMDS_PREV_' 767 767 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)' 768 768 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef' … … 785 785 # 786 786 # @remarks Invoked via $(evalvalctx ). 787 define def_unit_qt 4_target_pre_handle_moc_hdr787 define def_unit_qt5_target_pre_handle_moc_hdr 788 788 local type := MOC 789 789 … … 823 823 $(eval includedep $(dep)) 824 824 endif 825 $(eval $(def_unit_qt 4_target_pre_handle_moc_hdr_dx))826 827 endef # def_unit_qt 4_target_pre_handle_moc_hdr825 $(eval $(def_unit_qt5_target_pre_handle_moc_hdr_dx)) 826 827 endef # def_unit_qt5_target_pre_handle_moc_hdr 828 828 829 829 830 830 ## wrapper for the MOC command dependencies. 831 831 ifndef NO_COMPILE_CMDS_DEPS 832 _UNIT_QT 4_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)833 else 834 _UNIT_QT 4_MOC_CPP_CMDS_DEP =835 endif 836 837 ## 838 # def_unit_qt 4_target_pre_handle_moc_src helper that is expanded before evaluation.832 _UNIT_QT5_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE) 833 else 834 _UNIT_QT5_MOC_CPP_CMDS_DEP = 835 endif 836 837 ## 838 # def_unit_qt5_target_pre_handle_moc_src helper that is expanded before evaluation. 839 839 # 840 840 # This is necessary to resolve reference to local variables before doing … … 842 842 # later in a different context and the result would be completely wrong. 843 843 # 844 define def_unit_qt 4_target_pre_handle_moc_src_dx844 define def_unit_qt5_target_pre_handle_moc_src_dx 845 845 846 846 $(out) +| $(realout) $(more_output) $(maybe_output): \ 847 847 $(deps) \ 848 $(value _UNIT_QT 4_MOC_CPP_CMDS_DEP) \848 $(value _UNIT_QT5_MOC_CPP_CMDS_DEP) \ 849 849 | \ 850 850 $(orderdeps) … … 857 857 ifndef NO_COMPILE_CMDS_DEPS 858 858 %$$(QUIET2)$$(APPEND) '$(dep)' 859 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT 4_MOC_CPP_CMDS_PREV_'859 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_MOC_CPP_CMDS_PREV_' 860 860 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)' 861 861 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef' … … 874 874 # 875 875 # @remarks Invoked via $(evalvalctx ). 876 define def_unit_qt 4_target_pre_handle_moc_src876 define def_unit_qt5_target_pre_handle_moc_src 877 877 local type := MOC 878 878 … … 912 912 $(eval includedep $(dep)) 913 913 endif 914 $(eval $(def_unit_qt 4_target_pre_handle_moc_src_dx))915 916 endef # def_unit_qt 4_target_pre_handle_moc_src914 $(eval $(def_unit_qt5_target_pre_handle_moc_src_dx)) 915 916 endef # def_unit_qt5_target_pre_handle_moc_src 917 917 918 918 919 919 ## 920 920 # Adds sources containing Q_OBJECT to QT_MOCSRCS. 921 define def_unit_qt 4_target_pre_cpp_source921 define def_unit_qt5_target_pre_cpp_source 922 922 ifneq ($(file-size $(source)),-1) 923 923 ifneq ($(strip $(shell $(SED) -f $(KBUILD_PATH)/units/qt-Q_OBJECT.sed $(source))),) … … 925 925 endif 926 926 endif 927 endef # def_unit_qt 4_target_pre_cpp_source927 endef # def_unit_qt5_target_pre_cpp_source 928 928 929 929 ## … … 936 936 # a .moc files and generate rules and dependencies fofor these 937 937 # 938 define def_unit_qt 4_target_pre938 define def_unit_qt5_target_pre 939 939 940 940 # Make QTTOOL the default for the specific Qt tools instead of TOOL. … … 978 978 ifeq ($(bld_trg),darwin) 979 979 # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work... 980 $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT 4_LIB) )981 $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT 4_LIB) )982 $(eval $(target)_LDFLAGS += -F$(PATH_SDK_QT 4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )983 $(eval $(target)_INCS += $(foreach module,$(qt_modules), $(PATH_SDK_QT 4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )980 $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT5_LIB) ) 981 $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT5_LIB) ) 982 $(eval $(target)_LDFLAGS += -F$(PATH_SDK_QT5_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) ) 983 $(eval $(target)_INCS += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) ) 984 984 else 985 985 ifeq ($(bld_trg),win) 986 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT 4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )986 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) ) 987 987 ifeq ($(tool_do),LINK_PROGRAM) 988 $(eval $(target)_LIBS += $(PATH_SDK_QT 4_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )988 $(eval $(target)_LIBS += $(PATH_SDK_QT5_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) ) 989 989 endif 990 990 else 991 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT 4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )992 endif 993 $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT 4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )991 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) ) 992 endif 993 $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT5_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT5_INC) ) 994 994 endif 995 995 $(eval $(target)_DEFS += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) ) … … 1006 1006 $($(target)_SOURCES.$(bld_type)) \ 1007 1007 $($(target)_SOURCES) \ 1008 ), $(evalval def_unit_qt 4_target_pre_cpp_source))1008 ), $(evalval def_unit_qt5_target_pre_cpp_source)) 1009 1009 endif 1010 1010 1011 1011 # Install source handlers for .ui files. 1012 1012 $(target)_SRC_HANDLERS += \ 1013 .ui:def_unit_qt 4_src_handler_ui \1014 .UI:def_unit_qt 4_src_handler_ui \1015 .qrc:def_unit_qt 4_src_handler_qrc \1016 .qrc:def_unit_qt 4_src_handler_qrc1013 .ui:def_unit_qt5_src_handler_ui \ 1014 .UI:def_unit_qt5_src_handler_ui \ 1015 .qrc:def_unit_qt5_src_handler_qrc \ 1016 .qrc:def_unit_qt5_src_handler_qrc 1017 1017 1018 1018 # Calc the MOC and UI output directories and add them to BLDDIRS and INCS. … … 1032 1032 $($(target)_QT_MOCSRCS.$(bld_type)) \ 1033 1033 $($(target)_QT_MOCSRCS) \ 1034 , $(evalvalctx def_unit_qt 4_target_pre_handle_moc_src))1034 , $(evalvalctx def_unit_qt5_target_pre_handle_moc_src)) 1035 1035 1036 1036 # Deal with QT_MOCHDRS. … … 1042 1042 $($(target)_QT_MOCHDRS.$(bld_type)) \ 1043 1043 $($(target)_QT_MOCHDRS) \ 1044 , $(evalvalctx def_unit_qt 4_target_pre_handle_moc_hdr))1044 , $(evalvalctx def_unit_qt5_target_pre_handle_moc_hdr)) 1045 1045 1046 1046 # Deal with QT_TRANSLATIONS. … … 1066 1066 $(target)-inst-nls_SOURCES := 1067 1067 $(foreach source, $(translations)\ 1068 , $(evalvalctx def_unit_qt 4_target_pre_handle_translation))1069 endif 1070 1071 endef # def_unit_qt 4_target_pre1068 , $(evalvalctx def_unit_qt5_target_pre_handle_translation)) 1069 endif 1070 1071 endef # def_unit_qt5_target_pre 1072 1072 1073 1073 … … 1075 1075 # Rule for debugging. 1076 1076 # 1077 unit-qt 4-show-vars:1078 @$(ECHO) 'The Qt 4SDK variables:'1079 @$(ECHO) ' PATH_SDK_QT 4 = "$(PATH_SDK_QT4)"'1080 @$(ECHO) ' PATH_SDK_QT 4_INC = "$(PATH_SDK_QT4_INC)"'1081 @$(ECHO) ' PATH_SDK_QT 4_LIB = "$(PATH_SDK_QT4_LIB)"'1082 @$(ECHO) ' PATH_SDK_QT 4_LIB.amd64 = "$(PATH_SDK_QT4_LIB.amd64)"'1083 @$(ECHO) ' PATH_SDK_QT 4_LIB.x86 = "$(PATH_SDK_QT4_LIB.x86)"'1084 @$(ECHO) 'The Qt 4TOOL variables:'1085 @$(ECHO) ' PATH_TOOL_QT 4_BIN = "$(PATH_TOOL_QT4_BIN)"'1086 @$(ECHO) ' TOOL_QT 4_BIN_SUFF = "$(TOOL_QT4_BIN_SUFF)"'1087 @$(ECHO) ' TOOL_QT 4_MOC = "$(TOOL_QT4_MOC)"'1088 @$(ECHO) ' TOOL_QT 4_UIC = "$(TOOL_QT4_UIC)"'1089 @$(ECHO) ' TOOL_QT 4_RCC = "$(TOOL_QT4_RCC)"'1090 @$(ECHO) ' TOOL_QT 4_LRC = "$(TOOL_QT4_LRC)"'1091 @$(ECHO) ' TOOL_QT 4_LUPDATE = "$(TOOL_QT4_LUPDATE)"'1092 1077 unit-qt5-show-vars: 1078 @$(ECHO) 'The Qt5 SDK variables:' 1079 @$(ECHO) ' PATH_SDK_QT5 = "$(PATH_SDK_QT5)"' 1080 @$(ECHO) ' PATH_SDK_QT5_INC = "$(PATH_SDK_QT5_INC)"' 1081 @$(ECHO) ' PATH_SDK_QT5_LIB = "$(PATH_SDK_QT5_LIB)"' 1082 @$(ECHO) ' PATH_SDK_QT5_LIB.amd64 = "$(PATH_SDK_QT5_LIB.amd64)"' 1083 @$(ECHO) ' PATH_SDK_QT5_LIB.x86 = "$(PATH_SDK_QT5_LIB.x86)"' 1084 @$(ECHO) 'The Qt5 TOOL variables:' 1085 @$(ECHO) ' PATH_TOOL_QT5_BIN = "$(PATH_TOOL_QT5_BIN)"' 1086 @$(ECHO) ' TOOL_QT5_BIN_SUFF = "$(TOOL_QT5_BIN_SUFF)"' 1087 @$(ECHO) ' TOOL_QT5_MOC = "$(TOOL_QT5_MOC)"' 1088 @$(ECHO) ' TOOL_QT5_UIC = "$(TOOL_QT5_UIC)"' 1089 @$(ECHO) ' TOOL_QT5_RCC = "$(TOOL_QT5_RCC)"' 1090 @$(ECHO) ' TOOL_QT5_LRC = "$(TOOL_QT5_LRC)"' 1091 @$(ECHO) ' TOOL_QT5_LUPDATE = "$(TOOL_QT5_LUPDATE)"' 1092
Note:
See TracChangeset
for help on using the changeset viewer.