source: trunk/kBuild/units/qt4.kmk@ 1769

Last change on this file since 1769 was 1769, checked in by bird, 17 years ago

qt4: todo.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 33.8 KB
Line 
1# $Id: qt4.kmk 1769 2008-09-08 00:13:13Z bird $
2## @file
3# Qt 4 unit.
4#
5
6#
7# Copyright (c) 2008 knut st. osmundsen <bird-src-spam@anduin.net>
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild; if not, write to the Free Software
23# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24#
25#
26
27ifdef UNIT_qt4
28 $(error kBuild: The qt4 unit was included twice!)
29endif
30UNIT_qt4 = qt4
31
32
33ifndef UNIT_qt3
34 # Add our target properties (same as qt3).
35 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
36 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS
37endif
38PROPS_SINGLE += RCCTOOL
39PROPS_ACCUMULATE_R += RCCFLAGS QT_MODULES
40
41
42## @todo use pkg-config?
43
44#
45# The QT4 SDK.
46#
47# This is implemented here rather than in sdks/QT4.kmk to enforce the global USES.
48# It also makes things easier to develop, with fewer files I mean.
49#
50## @todo the SDK might actually not be necessary as it turns out... For now it servers
51# a purpose if the host differs from the target, in theory at least.
52SDK_QT4 = Qt4
53
54# SDK Specific Properties
55# PATH_SDK_QT4 - The general Qt4 root directory.
56# PATH_SDK_QT4_INC - The include directory.
57# PATH_SDK_QT4_LIB.amd64 - The lib directory for AMD64.
58# PATH_SDK_QT4_LIB.x86 - The lib directory for X86.
59# PATH_SDK_QT4_LIB - The lib directory for KBUILD_TARGET.
60ifndef PATH_SDK_QT4
61 PATH_SDK_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
62 ifeq ($(PATH_SDK_QT4),)
63 # If target == host, try look for Qt in the various platform specific places.
64 ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
65 ifeq ($(KBUILD_TARGET),darwin)
66 PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
67 else ifeq ($(KBUILD_TARGET),win)
68 # No idea here yet...
69 else ifeq ($(KBUILD_TARGET),ose)
70 # No port...
71 else
72 # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work.
73 # Try find the general root of thing by looking for the qt3to4 program, if not found, then look for rcc.
74 PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \
75 /usr/bin/qt3to4 \
76 /usr/local/bin/qt3to4 \
77 /usr/qt/4/bin/qt3to4 \
78 /usr/share/qt4/bin/qt3to4 \
79 )))
80 ifeq ($(PATH_SDK_QT4),)
81 PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \
82 /usr/bin/rcc \
83 /usr/local/bin/rcc \
84 /usr/qt/4/bin/rcc \
85 /usr/share/qt4/bin/rcc \
86 )))
87 endif
88 ifneq ($(PATH_SDK_QT4),)
89 export PATH_SDK_QT4
90
91 # Locate the include files.
92 ifeq ($(PATH_SDK_QT4_INC),)
93 PATH_SDK_QT4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \
94 $(PATH_SDK_QT4)/include/QtCore/qglobal.h \
95 $(PATH_SDK_QT4)/include/qt4/QtCore/qglobal.h \
96 /usr/include/qt4/QtCore/qtglobal.h \
97 /usr/local/include/qt4/QtCore/qtglobal.h \
98 )))
99 endif
100
101 # Now for the libraries (mostly for helping out finding the KBUILD_TARGET libs).
102 ifeq ($(PATH_SDK_QT4_LIB.x86),)
103 PATH_SDK_QT4_LIB.x86 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
104 $(PATH_SDK_QT4)/lib32/libQtCore$(SUFF_DLL) \
105 $(PATH_SDK_QT4)/lib32/qt4/libQtCore$(SUFF_DLL) \
106 /usr/lib32/libQtCore$(SUFF_DLL) \
107 /usr/lib32/qt4/libQtCore$(SUFF_DLL) \
108 /usr/local/lib32/libQtCore$(SUFF_DLL) \
109 /usr/local/lib32/qt4/libQtCore$(SUFF_DLL) \
110 $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
111 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
112 )))
113 ifneq ($(PATH_SDK_QT4_LIB.x86),)
114 export PATH_SDK_QT4_LIB.x86
115 endif
116 endif
117 ifeq ($(PATH_SDK_QT4_LIB.amd64),)
118 PATH_SDK_QT4_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
119 $(PATH_SDK_QT4)/lib64/libQtCore$(SUFF_DLL) \
120 $(PATH_SDK_QT4)/lib64/qt4/libQtCore$(SUFF_DLL) \
121 $(PATH_SDK_QT4)/lib/amd64/libQtCore$(SUFF_DLL) \
122 /usr/lib64/libQtCore$(SUFF_DLL) \
123 /usr/lib64/qt4/libQtCore$(SUFF_DLL) \
124 /usr/lib/amd64/libQtCore$(SUFF_DLL) \
125 /usr/local/lib64/libQtCore$(SUFF_DLL) \
126 /usr/local/lib64/qt4/libQtCore$(SUFF_DLL) \
127 /usr/local/lib/amd64/libQtCore$(SUFF_DLL) \
128 $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
129 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
130 )))
131 ifneq ($(PATH_SDK_QT4_LIB.amd64),)
132 export PATH_SDK_QT4_LIB.amd64
133 endif
134 endif
135
136 # And finally, the library path for KBUILD_TARGET.
137 ifeq ($(PATH_SDK_QT4_LIB),)
138 PATH_SDK_QT4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET))
139 ifeq ($(PATH_SDK_QT4_LIB),)
140 PATH_SDK_QT4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
141 $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
142 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
143 /usr/lib/libQtCore$(SUFF_DLL) \
144 /usr/lib/qt4/libQtCore$(SUFF_DLL) \
145 /usr/local/lib/libQtCore$(SUFF_DLL) \
146 /usr/local/lib/qt4/libQtCore$(SUFF_DLL) \
147 )))
148 endif
149 ifneq ($(PATH_SDK_QT4_LIB),)
150 export PATH_SDK_QT4_LIB
151 endif
152 endif
153
154 endif
155 endif # Unices
156 endif
157 # Found it?
158 ifeq ($(PATH_SDK_QT4),)
159 $(warning kBuild: Couldn't find the Qt4 headers and libaries...)
160 PATH_SDK_QT4 := $(PATH_DEVTOOLS_TRG)/qt/not-found
161 endif
162 endif
163else
164 # Resolve any fancy stuff once and for all.
165 PATH_SDK_QT4 := $(PATH_SDK_QT4)
166endif
167
168# Libraries can be in either Frameworks or lib depending on how you
169# build it on the mac. The .dmg installs into Frameworks but builds into lib.
170ifeq ($(KBUILD_TARGET),darwin)
171 ifndef PATH_SDK_QT4_LIB
172 ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
173 PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
174 else
175 PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
176 endif
177 endif
178else
179 PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
180 PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
181endif
182
183# The bits that kBuild picks up.
184# (nothing here)
185
186
187#
188# The QT4 tool.
189#
190# This is implemented here rather than in tools/QT4.kmk to enforce the global USES.
191# It also makes things easier to develop, with fewer files I mean.
192#
193TOOL_QT4 = Qt4
194
195# Tool Specific Properties
196# PATH_TOOL_QT4 - Obsolete.
197# PATH_TOOL_QT4_BIN - The
198# TOOL_QT4_BIN_SUFF -
199if !defined(PATH_TOOL_QT4_BIN) && defined(PATH_TOOL_QT4)
200 PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4)/bin
201endif
202ifndef PATH_TOOL_QT4_BIN
203 PATH_TOOL_QT4_BIN := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v4*/bin)))
204 ifeq ($(PATH_TOOL_QT4_BIN),)
205 ifdef TOOL_QT4_BIN_SUFF
206 TOOL_QT4_BIN_SUFF := $(TOOL_QT4_BIN_SUFF)
207 endif
208 # Try looking for qt3to4 first, then try moc-qt4/moc.
209 PATH_TOOL_QT4_BIN := $(patsubst %/qt3to4,%,$(firstword $(wildcard \
210 /usr/lib/qt4/bin/qt3to4 \
211 /usr/qt/4/bin/qt3to4 \
212 /usr/share/qt4/bin/qt3to4 \
213 /usr/local/bin/qt3to4 \
214 /usr/bin/qt3to4\
215 )))
216 ifeq ($(PATH_TOOL_QT4_BIN),)
217 ifeq ($(TOOL_QT4_BIN_SUFF),)
218 PATH_TOOL_QT4_BIN := $(patsubst %/moc-qt4,%,$(firstword $(wildcard \
219 /usr/lib/qt4/bin/moc-qt4 \
220 /usr/qt/4/bin/moc-qt4 \
221 /usr/share/qt4/bin/moc-qt4 \
222 /usr/local/bin/moc-qt4 \
223 /usr/bin/moc-qt4 \
224 )))
225 endif
226 ifneq ($(PATH_TOOL_QT4_BIN),)
227 export TOOL_QT4_BIN_SUFF := -qt4
228 else
229 PATH_TOOL_QT4_BIN := $(patsubst %/moc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \
230 /usr/lib/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \
231 /usr/qt/4/bin/moc$(TOOL_QT4_BIN_SUFF) \
232 /usr/share/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \
233 /usr/local/bin/moc$(TOOL_QT4_BIN_SUFF) \
234 /usr/bin/moc$(TOOL_QT4_BIN_SUFF) \
235 )))
236 endif
237 endif
238 endif
239 # If not found, we'll enter the 'pathless' mode.
240else
241 # Resolve any fancy stuff once and for all.
242 PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4_BIN)
243endif
244ifneq ($(PATH_TOOL_QT4_BIN),)
245 TOOL_QT4_MOC ?= $(PATH_TOOL_QT4_BIN)/moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
246 TOOL_QT4_UIC ?= $(PATH_TOOL_QT4_BIN)/uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
247 TOOL_QT4_RCC ?= $(PATH_TOOL_QT4_BIN)/rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
248 TOOL_QT4_LRC ?= $(PATH_TOOL_QT4_BIN)/lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
249 TOOL_QT4_LUPDATE ?= $(PATH_TOOL_QT4_BIN)/lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
250else
251 # Pathless, relies on the environment.
252 TOOL_QT4_MOC ?= moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
253 TOOL_QT4_UIC ?= uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
254 TOOL_QT4_RCC ?= rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
255 TOOL_QT4_LRC ?= lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
256 TOOL_QT4_LUPDATE ?= lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
257endif
258
259# General Properties used by kBuild and/or units/qt.kmk
260TOOL_QT4_MOCFLAGS ?=
261TOOL_QT4_MOCINCS ?=
262TOOL_QT4_MOCDEFS ?=
263TOOL_QT4_MOCDEFS.darwin ?= __APPLE__ __GNUC__
264TOOL_QT4_MOCDEFS.solaris ?= __sun
265TOOL_QT4_MOCDEFS.win.amd64 ?= WIN64
266TOOL_QT4_MOCDEFS.win.x86 ?= WIN32
267
268
269## MOC a C++ source file.
270# @param $(target) Normalized main target name.
271# @param $(source) Source filename (relative).
272# @param $(out) Object file name. This shall be (re)created by the compilation.
273# @param $(dep) Dependcy file. This may be (re)created by the compilation.
274# @param $(flags) Flags.
275# @param $(defs) Definitions.
276# @param $(incs) Includes.
277# @param $(outbase) Output basename (full). Use this for list files and such.
278#
279TOOL_QT4_MOC_CPP_DEPEND =
280TOOL_QT4_MOC_CPP_DEPORD =
281TOOL_QT4_MOC_CPP_OUTPUT =
282TOOL_QT4_MOC_CPP_OUTPUT_MAYBE =
283define TOOL_QT4_MOC_CPP_CMDS
284 $(QUIET)$(TOOL_QT4_MOC)\
285 $(flags)\
286 $(addprefix -I, $(incs))\
287 $(addprefix -D, $(defs))\
288 -o $(out)\
289 $(source)
290endef
291
292## MOC a C++ header file.
293# @param $(target) Normalized main target name.
294# @param $(source) Source filename (relative).
295# @param $(out) Object file name. This shall be (re)created by the compilation.
296# @param $(dep) Dependcy file. This may be (re)created by the compilation.
297# @param $(flags) Flags.
298# @param $(defs) Definitions.
299# @param $(incs) Includes.
300# @param $(outbase) Output basename (full). Use this for list files and such.
301#
302TOOL_QT4_MOC_HPP_DEPEND =
303TOOL_QT4_MOC_HPP_DEPORD =
304TOOL_QT4_MOC_HPP_OUTPUT =
305TOOL_QT4_MOC_HPP_OUTPUT_MAYBE =
306define TOOL_QT4_MOC_HPP_CMDS
307 $(QUIET)$(TOOL_QT4_MOC)\
308 $(flags)\
309 $(addprefix -I, $(incs))\
310 $(addprefix -D, $(defs))\
311 -o $(out)\
312 $(source)
313endef
314
315## Compile a Qt user interface file (.ui).
316# @param $(target) Normalized main target name.
317# @param $(source) Source filename (relative).
318# @param $(out) Object file name. This shall be (re)created by the compilation.
319# @param $(dep) Dependcy file. This may be (re)created by the compilation.
320# @param $(flags) Flags.
321# @param $(defs) Definitions.
322# @param $(incs) Includes.
323# @param $(outbase) Output basename (full). Use this for list files and such.
324#
325TOOL_QT4_UIC_UI_DEPEND =
326TOOL_QT4_UIC_UI_DEPORD =
327TOOL_QT4_UIC_UI_OUTPUT =
328TOOL_QT4_UIC_UI_OUTPUT_MAYBE =
329define TOOL_QT4_UIC_UI_CMDS
330 $(QUIET)$(TOOL_QT4_UIC)\
331 $(flags)\
332 -o $(out)\
333 $(source)
334endef
335
336## Compile a Qt resource file (.qrc).
337# @param $(target) Normalized main target name.
338# @param $(source) Source filename (relative).
339# @param $(out) Object file name. This shall be (re)created by the compilation.
340# @param $(dep) Dependcy file. This may be (re)created by the compilation.
341# @param $(flags) Flags.
342# @param $(defs) Definitions.
343# @param $(incs) Includes.
344# @param $(outbase) Output basename (full). Use this for list files and such.
345#
346# @remarks The sed script generating the dependency file is a bit naive.
347TOOL_QT4_RCC_QRC_DEPEND =
348TOOL_QT4_RCC_QRC_DEPORD =
349TOOL_QT4_RCC_QRC_OUTPUT =
350TOOL_QT4_RCC_QRC_OUTPUT_MAYBE =
351define TOOL_QT4_RCC_QRC_CMDS
352 $(QUIET)$(TOOL_QT4_RCC)\
353 $(flags)\
354 -o $(out)\
355 $(source)
356 $(APPEND) $(dep) '\'
357 $(APPEND) $(dep) '$(out): \'
358 $(APPEND) $(dep) '$(source) \'
359 $(SED) \
360 -e '/^[[:blank:]]*<file[[:blank:]][^>]*>/!d' \
361 -e 's/^.*<file[[:blank:]][^>]*>\([^<]*\)<\/file>.*$$$$/\1/' \
362 -e 's|^[^/]|$(abspathex $(dir $(source)),$(defpath))/&|' \
363 -e 's|$$$$| \\|' \
364 --append $(dep) \
365 $(source)
366 $(APPEND) $(dep)
367 $(SED) \
368 -e '/^[[:blank:]]*<file[[:blank:]][^>]*>/!d' \
369 -e 's/^.*<file[[:blank:]][^>]*>\([^<]*\)<\/file>.*$$$$/\1/' \
370 -e 's|^[^/]|$(abspathex $(dir $(source)),$(defpath))/&|' \
371 -e 's|$$$$|:\n|' \
372 --append $(dep) \
373 $(source)
374 $(APPEND) $(dep)
375endef
376
377## Compile a Qt translation file (.ts).
378# @param $(target) Normalized main target name.
379# @param $(source) Source filename (relative).
380# @param $(out) Object file name. This shall be (re)created by the compilation.
381# @param $(dep) Dependcy file. This may be (re)created by the compilation.
382# @param $(flags) Flags.
383# @param $(defs) Definitions.
384# @param $(incs) Includes.
385# @param $(outbase) Output basename (full). Use this for list files and such.
386#
387TOOL_QT4_LRC_TS_DEPEND =
388TOOL_QT4_LRC_TS_DEPORD =
389TOOL_QT4_LRC_TS_OUTPUT =
390TOOL_QT4_LRC_TS_OUTPUT_MAYBE =
391define TOOL_QT4_LRC_TS_CMDS
392 $(QUIET)$(TOOL_QT4_LRC)\
393 $(flags)\
394 $(source)\
395 -qm $(out)
396endef
397
398
399
400#
401#
402# Back to the Qt4 unit.
403#
404#
405
406
407## wrapper for the lrelease (LRC) command dependencies.
408ifndef NO_COMPILE_CMDS_DEPS
409 _UNIT_QT4_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
410else
411 _UNIT_QT4_LRC_CMDS_DEP =
412endif
413
414##
415# def_unit_qt4_target_pre_handle_translation helper that is expanded before evaluation.
416#
417# This is necessary to resolve reference to local variables before doing
418# assignments and setting up commands. They would otherwise be resolved
419# later in a different context and the result would be completely wrong.
420#
421define def_unit_qt4_target_pre_handle_translation_dx
422
423$(out) + $(more_output) +| $(maybe_output): \
424 $(deps) \
425 $(value _UNIT_QT4_LRC_CMDS_DEP) \
426 | \
427 $(orderdeps)
428 %$$(call MSG_TOOL,lrelease,$(target),$(source),$$@)
429 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
430
431$(cmds)
432
433ifndef NO_COMPILE_CMDS_DEPS
434 %$$(QUIET2)$$(APPEND) '$(dep)'
435 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_LRC_CMDS_PREV_'
436 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
437 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
438endif
439
440$(target)_OUT_FILES += $(out) $(more_output) $(maybe_output)
441$(target)-inst-nls_SOURCES += $(out)
442
443endef # def_unit_qt4_target_pre_handle_translation_dx
444
445##
446# Handle a source file listed in QT_TRANSLATIONS.
447#
448# The files listed in QT_TRANSLATIONS are translation files (.ts) which needs
449# to be translated into .qm files that are loadble by Qt.
450#
451# @remarks Invoked via $(evalvalctx ).
452define def_unit_qt4_target_pre_handle_translation
453local type := LRC
454
455# fetch the properties.
456local tool := $(kb-src-tool dummy_var)
457local qtnlsdir := $(PATH_$(target))/qtnls
458local outbase := $(qtnlsdir)/$(notdir $(basename $(source)))
459local out := $(outbase).qm
460local dep := $(out).dep
461local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
462local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
463local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
464
465# default path + source dep.
466ifneq ($(defpath),)
467local deps := $(abspathex $(deps) $(source),$($(target)_PATH))
468local incs := $(abspathex $(incs),$($(target)_PATH))
469else
470local deps += $(source)
471endif
472
473# call the tool
474ifndef TOOL_$(tool)_LRC_TS_CMDS
475 $(error kBuild: qt lrelease tool not found: TOOL_$(tool)_LRC_TS_CMDS)
476endif
477local cmds := $(TOOL_$(tool)_LRC_TS_CMDS)
478local more_output := $(TOOL_$(tool)_LRC_TS_OUTPUT)
479local maybe_output := $(TOOL_$(tool)_LRC_TS_OUTPUT_MAYBE)
480local deps += $(TOOL_$(tool)_LRC_TS_DEPEND)
481local orderdeps += $(TOOL_$(tool)_LRC_TS_DEPORD)
482
483# generate the link rule and update some source and target variables.
484ifndef NO_COMPILE_CMDS_DEPS
485 $(eval includedep $(dep))
486endif
487$(eval $(def_unit_qt4_target_pre_handle_translation_dx))
488
489endef # def_unit_qt4_target_pre_handle_translation
490
491
492
493## wrapper for the UIC command dependencies.
494ifndef NO_COMPILE_CMDS_DEPS
495 _UNIT_QT4_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_RCC_CMDS_PREV_),$$(commands $(out)),FORCE)
496else
497 _UNIT_QT4_RCC_CMDS_DEP =
498endif
499
500##
501# def_unit_qt4_target_pre_handle_qrc helper that is expanded before evaluation.
502#
503# This is necessary to resolve reference to local variables before doing
504# assignments and setting up commands. They would otherwise be resolved
505# later in a different context and the result would be completely wrong.
506#
507define def_unit_qt4_target_pre_handle_rcc_dx
508
509$(out) +| $(realout) $(more_output) $(maybe_output): \
510 $(deps) \
511 $(value _UNIT_QT4_RCC_CMDS_DEP) \
512 | \
513 $(orderdeps)
514 %$$(call MSG_TOOL,rcc,$(target),$(source),$$@)
515 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
516
517$(cmds)
518
519 $(QUIET)$(CP) --changed -f $(out) $(realout)
520ifndef NO_COMPILE_CMDS_DEPS
521 %$$(QUIET2)$$(APPEND) '$(dep)'
522 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_RCC_CMDS_PREV_'
523 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
524 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
525endif
526
527$(target)_INTERMEDIATES += $(realout)
528$(target)_GEN_SOURCES_ += $(realout)
529$(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
530
531endef # def_unit_qt4_target_pre_handle_rcc_dx
532
533##
534# Source handler for .qrc sources (Qt resource files).
535#
536# @remarks $(evalvalctx me).
537define def_unit_qt4_src_handler_qrc
538local type := RCC
539
540# fetch the properties.
541local tool := $(kb-src-tool dummy_var)
542local qtrccdir := $(PATH_$(target))/qtrcc
543local outbase := $(qtrccdir)/$(notdir $(basename $(source)))
544local out := $(outbase).tmp.gen.cpp
545local realout := $(outbase).gen.cpp
546local dep := $(realout).dep
547local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
548local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
549local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
550
551# default path + source dep.
552ifneq ($(defpath),)
553local deps := $(abspathex $(deps) $(source),$($(target)_PATH))
554local incs := $(abspathex $(incs),$($(target)_PATH))
555else
556local deps += $(source)
557endif
558
559# call the tool
560ifndef TOOL_$(tool)_RCC_QRC_CMDS
561 $(error kBuild: qt rcc tool not found: TOOL_$(tool)_RCC_QRC_CMDS)
562endif
563local cmds := $(TOOL_$(tool)_RCC_QRC_CMDS)
564local more_output := $(TOOL_$(tool)_RCC_QRC_OUTPUT)
565local maybe_output := $(TOOL_$(tool)_RCC_QRC_OUTPUT_MAYBE)
566local deps += $(TOOL_$(tool)_RCC_QRC_DEPEND)
567local orderdeps += $(TOOL_$(tool)_RCC_QRC_DEPORD)
568
569# generate the link rule and update some source and target variables.
570ifndef NO_COMPILE_CMDS_DEPS
571 $(eval includedep $(dep))
572endif
573$(eval $(def_unit_qt4_target_pre_handle_rcc_dx))
574
575endef # def_unit_qt4_src_handler_qrc
576
577
578
579## wrapper for the UIC command dependencies.
580ifndef NO_COMPILE_CMDS_DEPS
581 _UNIT_QT4_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_UIC_CMDS_PREV_),$$(commands $(out)),FORCE)
582else
583 _UNIT_QT4_UIC_CMDS_DEP =
584endif
585
586##
587# def_unit_qt4_src_handler_ui helper that is expanded before evaluation.
588#
589# This is necessary to resolve reference to local variables before doing
590# assignments and setting up commands. They would otherwise be resolved
591# later in a different context and the result would be completely wrong.
592#
593define def_unit_qt4_target_pre_handle_ui_dx
594
595$(out) +| $(realout) $(more_output) $(maybe_output): \
596 $(deps) \
597 $(value _UNIT_QT4_UIC_CMDS_DEP) \
598 | \
599 $(orderdeps)
600 %$$(call MSG_TOOL,uic,$(target),$(source),$$@)
601 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
602
603$(cmds)
604
605 $(QUIET)$(CP) --changed -f $(out) $(realout)
606ifndef NO_COMPILE_CMDS_DEPS
607 %$$(QUIET2)$$(APPEND) '$(dep)'
608 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_UIC_CMDS_PREV_'
609 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
610 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
611endif
612
613$(target)_INTERMEDIATES += $(realout)
614$(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
615
616endef # def_unit_qt4_target_pre_handle_ui_dx
617
618##
619# Source handler for .ui sources.
620#
621# @remarks $(evalvalctx me).
622define def_unit_qt4_src_handler_ui
623local type := UIC
624
625# fetch the properties.
626local tool := $(kb-src-tool dummy_var)
627local qtuicdir := $(PATH_$(target))/qtuic
628local outbase := $(qtuicdir)/$(notdir $(basename $(source)))
629local out := $(outbase).tmp.gen.h
630local realout := $(outbase).gen.h
631local dep := $(realout).dep
632local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
633local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
634local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
635
636# default path + source dep.
637ifneq ($(defpath),)
638local deps := $(abspathex $(deps) $(source),$($(target)_PATH))
639local incs := $(abspathex $(incs),$($(target)_PATH))
640else
641local deps += $(source)
642endif
643
644# call the tool
645ifndef TOOL_$(tool)_UIC_UI_CMDS
646 $(error kBuild: qt uic tool not found: TOOL_$(tool)_UIC_UI_CMDS)
647endif
648local cmds := $(TOOL_$(tool)_UIC_UI_CMDS)
649local more_output := $(TOOL_$(tool)_UIC_UI_OUTPUT)
650local maybe_output := $(TOOL_$(tool)_UIC_UI_OUTPUT_MAYBE)
651local deps += $(TOOL_$(tool)_UIC_UI_DEPEND)
652local orderdeps += $(TOOL_$(tool)_UIC_UI_DEPORD)
653
654# generate the link rule and update some source and target variables.
655ifndef NO_COMPILE_CMDS_DEPS
656 $(eval includedep $(dep))
657endif
658$(eval $(def_unit_qt4_target_pre_handle_ui_dx))
659
660endef # def_unit_qt4_src_handler_ui
661
662
663
664## wrapper for the MOC command dependencies.
665ifndef NO_COMPILE_CMDS_DEPS
666 _UNIT_QT4_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)
667else
668 _UNIT_QT4_MOC_HPP_CMDS_DEP =
669endif
670
671##
672# def_unit_qt4_target_pre_handle_moc_hdr helper that is expanded before evaluation.
673#
674# This is necessary to resolve reference to local variables before doing
675# assignments and setting up commands. They would otherwise be resolved
676# later in a different context and the result would be completely wrong.
677#
678define def_unit_qt4_target_pre_handle_moc_hdr_dx
679
680$(out) +| $(realout) $(more_output) $(maybe_output): \
681 $(deps) \
682 $(value _UNIT_QT4_MOC_HPP_CMDS_DEP) \
683 | \
684 $(orderdeps)
685 %$$(call MSG_TOOL,moc,$(target),$(source),$$@)
686 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
687
688$(cmds)
689
690 $(QUIET)$(CP) --changed -f $(out) $(realout)
691ifndef NO_COMPILE_CMDS_DEPS
692 %$$(QUIET2)$$(APPEND) '$(dep)'
693 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_MOC_HPP_CMDS_PREV_'
694 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
695 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
696endif
697
698$(target)_INTERMEDIATES += $(realout)
699$(target)_GEN_SOURCES_ += $(realout)
700$(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
701
702endef
703
704##
705# Handle a source file listed in QT_MOCHDRS.
706#
707# The files listed in QT_MOCHDRS uses the Q_OBJECT macro and we will
708# generate a .cpp file for each of them and add it to the generated
709# sources so that it's compiled and linked. (There is an alternative
710# way to do this where the .cpp file is included, this isn't currently
711# supported by this unit.)
712#
713# @remarks Invoked via $(evalvalctx ).
714define def_unit_qt4_target_pre_handle_moc_hdr
715local type := MOC
716
717# fetch the properties.
718local tool := $(kb-src-tool dummy_var)
719local outbase := $(qtmocdir)/$(notdir $(basename $(source)))
720local out := $(outbase).tmp.cpp
721local realout := $(outbase).cpp
722local dep := $(realout).dep
723local defs := $(kb-src-prop DEFS,dummy_var,left-to-right)
724local incs := $(kb-src-prop INCS,dummy_var,right-to-left)
725local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
726local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
727local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
728
729# default path + source dep.
730ifneq ($(defpath),)
731local deps := $(abspathex $(deps) $(source),$($(target)_PATH))
732local incs := $(abspathex $(incs),$($(target)_PATH))
733else
734local deps += $(source)
735endif
736
737# call the tool
738ifndef TOOL_$(tool)_MOC_HPP_CMDS
739 $(error kBuild: qt moc tool not found: TOOL_$(tool)_MOC_HPP_CMDS)
740endif
741local cmds := $(TOOL_$(tool)_MOC_HPP_CMDS)
742local more_output := $(TOOL_$(tool)_MOC_HPP_OUTPUT)
743local maybe_output := $(TOOL_$(tool)_MOC_HPP_OUTPUT_MAYBE)
744local deps += $(TOOL_$(tool)_MOC_HPP_DEPEND)
745local orderdeps += $(TOOL_$(tool)_MOC_HPP_DEPORD)
746
747# generate the link rule and update some source and target variables.
748ifndef NO_COMPILE_CMDS_DEPS
749 $(eval includedep $(dep))
750endif
751$(eval $(def_unit_qt4_target_pre_handle_moc_hdr_dx))
752
753endef # def_unit_qt4_target_pre_handle_moc_hdr
754
755
756## wrapper for the MOC command dependencies.
757ifndef NO_COMPILE_CMDS_DEPS
758 _UNIT_QT4_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)
759else
760 _UNIT_QT4_MOC_CPP_CMDS_DEP =
761endif
762
763##
764# def_unit_qt4_target_pre_handle_moc_src helper that is expanded before evaluation.
765#
766# This is necessary to resolve reference to local variables before doing
767# assignments and setting up commands. They would otherwise be resolved
768# later in a different context and the result would be completely wrong.
769#
770define def_unit_qt4_target_pre_handle_moc_src_dx
771
772$(out) +| $(realout) $(more_output) $(maybe_output): \
773 $(deps) \
774 $(value _UNIT_QT4_MOC_CPP_CMDS_DEP) \
775 | \
776 $(orderdeps)
777 %$$(call MSG_TOOL,moc,$(target),$(source),$$@)
778 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
779
780$(cmds)
781
782 $(QUIET)$(CP) --changed -f $(out) $(realout)
783ifndef NO_COMPILE_CMDS_DEPS
784 %$$(QUIET2)$$(APPEND) '$(dep)'
785 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_MOC_CPP_CMDS_PREV_'
786 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
787 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
788endif
789
790$(target)_INTERMEDIATES += $(realout)
791$(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
792
793endef
794
795##
796# Handle a source file listed in QT_MOCSRCS.
797#
798# The files listed in QT_MOCSRCS uses the Q_OBJECT macro and will include
799# a .moc file that we're expected to generate here.
800#
801# @remarks Invoked via $(evalvalctx ).
802define def_unit_qt4_target_pre_handle_moc_src
803local type := MOC
804
805# fetch the properties.
806local tool := $(kb-src-tool dummy_var)
807local outbase := $(qtmocdir)/$(notdir $(basename $(source)))
808local out := $(outbase).tmp.moc
809local realout := $(outbase).moc
810local dep := $(realout).dep
811local defs := $(kb-src-prop DEFS,dummy_var,left-to-right)
812local incs := $(kb-src-prop INCS,dummy_var,right-to-left)
813local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
814local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
815local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
816
817# default path + source dep.
818ifneq ($(defpath),)
819local deps := $(abspathex $(deps) $(source),$($(target)_PATH))
820local incs := $(abspathex $(incs),$($(target)_PATH))
821else
822local deps += $(source)
823endif
824
825# call the tool
826ifndef TOOL_$(tool)_MOC_CPP_CMDS
827 $(error kBuild: qt moc tool not found: TOOL_$(tool)_MOC_CPP_CMDS)
828endif
829local cmds := $(TOOL_$(tool)_MOC_CPP_CMDS)
830local more_output := $(TOOL_$(tool)_MOC_CPP_OUTPUT)
831local maybe_output := $(TOOL_$(tool)_MOC_CPP_OUTPUT_MAYBE)
832local deps += $(TOOL_$(tool)_MOC_CPP_DEPEND)
833local orderdeps += $(TOOL_$(tool)_MOC_CPP_DEPORD)
834
835# generate the link rule and update some source and target variables.
836ifndef NO_COMPILE_CMDS_DEPS
837 $(eval includedep $(dep))
838endif
839$(eval $(def_unit_qt4_target_pre_handle_moc_src_dx))
840
841endef # def_unit_qt4_target_pre_handle_moc_src
842
843
844##
845# Adds sources containing Q_OBJECT to QT_MOCSRCS.
846define def_unit_qt4_target_pre_cpp_source
847ifneq ($(file-size $(source)),-1)
848 ifneq ($(strip $(shell $(SED) -f $(KBUILD_PATH)/units/qt-Q_OBJECT.sed $(source))),)
849 $(eval $(target)_QT_MOCSRCS += $(source))
850 endif
851endif
852endef # def_unit_qt4_target_pre_cpp_source
853
854##
855# Invoked early in the processing of a target that uses the Qt unit.
856#
857# It will append the qt source handlers to the target (.h, .ui, .ts,
858# .png, .bmp, .gif).
859#
860# It will then check all the C++ sources and check which needs
861# a .moc files and generate rules and dependencies fofor these
862#
863define def_unit_qt4_target_pre
864
865# Make QTTOOL the default for the specific Qt tools instead of TOOL.
866ifneq ($($(target)_QTTOOL),)
867 ifeq ($($(target)_MOCTOOL),)
868 $(target)_MOCTOOL := $($(target)_QTTOOL)
869 endif
870 ifeq ($($(target)_UICTOOL),)
871 $(target)_UICTOOL := $($(target)_QTTOOL)
872 endif
873 ifeq ($($(target)_RCCTOOL),)
874 $(target)_RCCTOOL := $($(target)_QTTOOL)
875 endif
876 ifeq ($($(target)_LRCTOOL),)
877 $(target)_LRCTOOL := $($(target)_QTTOOL)
878 endif
879endif
880
881# Deal with QT_MODULES and QT_PREFIX.
882local qt_modules := \
883 $($(target)_QT_MODULES.$(bld_trg)) \
884 $($(target)_QT_MODULES.$(bld_trg_arch)) \
885 $($(target)_QT_MODULES.$(bld_trg).$(bld_trg_arch)) \
886 $($(target)_QT_MODULES.$(bld_trg_cpu)) \
887 $($(target)_QT_MODULES.$(bld_type)) \
888 $($(target)_QT_MODULES)
889local qt_prefix := $(firstword \
890 $($(target)_QT_PREFIX.$(bld_trg)) \
891 $($(target)_QT_PREFIX.$(bld_trg_arch)) \
892 $($(target)_QT_PREFIX.$(bld_trg).$(bld_trg_arch)) \
893 $($(target)_QT_PREFIX.$(bld_trg_cpu)) \
894 $($(target)_QT_PREFIX.$(bld_type)) \
895 $($(target)_QT_PREFIX))
896ifeq ($(bld_trg),darwin)
897 # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
898 $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
899 $(eval $(target)_LDFLAGS += -F$(PATH_SDK_QT4_LIB) $(addprefix -framework Qt$(qt_prefix),$(qt_modules)) )
900 $(eval $(target)_INCS += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module).framework/Versions/4/Headers) )
901else
902 ifeq ($(bld_trg),win)
903 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)4$(SUFF_LIB)) )
904 ifeq ($(tool_do),LINK_PROGRAM)
905 $(eval $(target)_LIBS += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(SUFF_LIB) )
906 endif
907 else
908 $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(SUFF_DLL)) )
909 endif
910 $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
911endif
912$(eval $(target)_DEFS += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
913
914
915# Autodetect source files with Q_OBJECT references if QT_MOCSRCS is undefined. (slow)
916# Tip: Use target_QT_MOCSRCS = $(NO_SUCH_VARIABLE) to avoid this.
917ifndef $(target)_QT_MOCSRCS
918 $(foreach source, $(filter %.cxx %.CXX %.cpp %.CPP %.cc %.CC,\
919 $($(target)_SOURCES.$(bld_trg)) \
920 $($(target)_SOURCES.$(bld_trg_arch)) \
921 $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
922 $($(target)_SOURCES.$(bld_trg_cpu)) \
923 $($(target)_SOURCES.$(bld_type)) \
924 $($(target)_SOURCES) \
925 ), $(evalval def_unit_qt4_target_pre_cpp_source))
926endif
927
928# Install source handlers for .ui files.
929$(target)_SRC_HANDLERS += \
930 .ui:def_unit_qt4_src_handler_ui \
931 .UI:def_unit_qt4_src_handler_ui \
932 .qrc:def_unit_qt4_src_handler_qrc \
933 .qrc:def_unit_qt4_src_handler_qrc
934
935# Calc the MOC and UI output directories and add them to BLDDIRS and INCS.
936local qtmocdir := $(PATH_$(target))/qtmoc
937local qtuicdir := $(PATH_$(target))/qtuic
938local qtrccdir := $(PATH_$(target))/qtrcc
939local qtnlsdir := $(PATH_$(target))/qtnls
940$(eval $(target)_BLDDIRS += $(qtmocdir) $(qtuicdir) $(qtrccdir) $(qtnlsdir))
941$(eval $(target)_INCS += $(qtmocdir) $(qtuicdir))
942
943# Deal with QT_MOCSRCS.
944$(foreach source, \
945 $($(target)_QT_MOCSRCS.$(bld_trg)) \
946 $($(target)_QT_MOCSRCS.$(bld_trg_arch)) \
947 $($(target)_QT_MOCSRCS.$(bld_trg).$(bld_trg_arch)) \
948 $($(target)_QT_MOCSRCS.$(bld_trg_cpu)) \
949 $($(target)_QT_MOCSRCS.$(bld_type)) \
950 $($(target)_QT_MOCSRCS) \
951 , $(evalvalctx def_unit_qt4_target_pre_handle_moc_src))
952
953# Deal with QT_MOCHDRS.
954$(foreach source, \
955 $($(target)_QT_MOCHDRS.$(bld_trg)) \
956 $($(target)_QT_MOCHDRS.$(bld_trg_arch)) \
957 $($(target)_QT_MOCHDRS.$(bld_trg).$(bld_trg_arch)) \
958 $($(target)_QT_MOCHDRS.$(bld_trg_cpu)) \
959 $($(target)_QT_MOCHDRS.$(bld_type)) \
960 $($(target)_QT_MOCHDRS) \
961 , $(evalvalctx def_unit_qt4_target_pre_handle_moc_hdr))
962
963# Deal with QT_TRANSLATIONS.
964# ASSUMES (_ALL_)INSTALLS is processed after the targets using this unit.
965local translations := \
966 $($(target)_QT_TRANSLATIONS.$(bld_trg)) \
967 $($(target)_QT_TRANSLATIONS.$(bld_trg_arch)) \
968 $($(target)_QT_TRANSLATIONS.$(bld_trg).$(bld_trg_arch)) \
969 $($(target)_QT_TRANSLATIONS.$(bld_trg_cpu)) \
970 $($(target)_QT_TRANSLATIONS.$(bld_type)) \
971 $($(target)_QT_TRANSLATIONS)
972ifneq ($(strip $(translations)),)
973 local expr := _ALL_INSTALLS += $(target)-inst-nls
974 $(eval $(expr))
975 ifdef $(target)_QT_TRANSLATIONS_TEMPLATE
976 $(target)-inst-nls_TEMPLATE := $($(target)_QT_TRANSLATIONS_TEMPLATE)
977 else
978 $(target)-inst-nls_MODE := 0644
979 endif
980 ifdef $(target)_QT_TRANSLATIONS_INST
981 $(target)-inst-nls_INST := $($(target)_QT_TRANSLATIONS_INST)
982 endif
983 $(target)-inst-nls_SOURCES :=
984 $(foreach source, $(translations)\
985 , $(evalvalctx def_unit_qt4_target_pre_handle_translation))
986endif
987
988endef # def_unit_qt4_target_pre
989
990
991#
992# Rule for debugging.
993#
994unit-qt4-show-vars:
995 @$(ECHO) 'The Qt4 SDK variables:'
996 @$(ECHO) ' PATH_SDK_QT4 = "$(PATH_SDK_QT4)"'
997 @$(ECHO) ' PATH_SDK_QT4_INC = "$(PATH_SDK_QT4_INC)"'
998 @$(ECHO) ' PATH_SDK_QT4_LIB = "$(PATH_SDK_QT4_LIB)"'
999 @$(ECHO) ' PATH_SDK_QT4_LIB.amd64 = "$(PATH_SDK_QT4_LIB.amd64)"'
1000 @$(ECHO) ' PATH_SDK_QT4_LIB.x86 = "$(PATH_SDK_QT4_LIB.x86)"'
1001 @$(ECHO) 'The Qt4 TOOL variables:'
1002 @$(ECHO) ' PATH_TOOL_QT4_BIN = "$(PATH_TOOL_QT4_BIN)"'
1003 @$(ECHO) ' TOOL_QT4_BIN_SUFF = "$(TOOL_QT4_BIN_SUFF)"'
1004 @$(ECHO) ' TOOL_QT4_MOC = "$(TOOL_QT4_MOC)"'
1005 @$(ECHO) ' TOOL_QT4_UIC = "$(TOOL_QT4_UIC)"'
1006 @$(ECHO) ' TOOL_QT4_RCC = "$(TOOL_QT4_RCC)"'
1007 @$(ECHO) ' TOOL_QT4_LRC = "$(TOOL_QT4_LRC)"'
1008 @$(ECHO) ' TOOL_QT4_LUPDATE = "$(TOOL_QT4_LUPDATE)"'
1009
Note: See TracBrowser for help on using the repository browser.