source: trunk/kBuild/units/qt3.kmk@ 3121

Last change on this file since 3121 was 3121, checked in by bird, 8 years ago

(C) year)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 33.1 KB
Line 
1# $Id: qt3.kmk 3121 2017-10-31 10:58:59Z bird $
2## @file
3# Qt 3.3.x unit.
4#
5
6#
7# Copyright (c) 2008-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@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# As a special exception you are granted permission to include this file, via
27# the kmk include directive, as you wish without this in itself causing the
28# resulting makefile, program or whatever to be covered by the GPL license.
29# This exception does not however invalidate any other reasons why the makefile,
30# program, whatever should not be covered the GPL.
31#
32#
33
34
35ifdef UNIT_qt3
36 $(error kBuild: The qt3 unit was included twice!)
37endif
38UNIT_qt3 = qt3
39
40
41if !defined(UNIT_qt4) && !defined(UNIT_qt5)
42 # Add our target properties (same as qt4 & qt5).
43 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
44 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS
45endif
46PROPS_SINGLE +=
47PROPS_ACCUMULATE_R += QT_IMAGES
48
49
50#
51# The QT3 SDK.
52#
53# This is implemented here rather than in sdks/QT3.kmk to enforce the global USES.
54# It also makes things easier to develop, with fewer files I mean.
55#
56## @todo the SDK might actually not be necessary as it turns out... For now it servers
57# a purpose if the host differs from the target, in theory at least.
58SDK_QT3 = Qt3
59
60# SDK Specific Properties
61# PATH_SDK_QT3 - the general location of the Qt3 SDK stuff.
62# PATH_SDK_QT3_INC - the Qt3 include directory.
63# PATH_SDK_QT3_LIB - the Qt3 library directory for KBUILD_TARGET.
64# PATH_SDK_QT3_LIB.amd64 - the Qt3 library directory for AMD64.
65# PATH_SDK_QT3_LIB.x86 - the Qt3 library directory for X86.
66ifndef PATH_SDK_QT3
67 PATH_SDK_QT3 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3*)))
68 ifeq ($(PATH_SDK_QT3),)
69 # If target == host, try look for Qt in the various platform specific places.
70 ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
71 ifeq ($(KBUILD_TARGET),darwin)
72 # No idea here yet...
73 else ifeq ($(KBUILD_TARGET),os2)
74 # No idea here yet... Check QTDIR perhaps, but for now users have toset PATH_SDK_QT3.
75 else ifeq ($(KBUILD_TARGET),win)
76 # No idea here yet... Check QTDIR perhaps, but for now users have toset PATH_SDK_QT3.
77 else
78 # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT3_LIB* stuff if it doesn't work.
79 # Try find the general location of the thing by looking for the qm2ts program, then try looking for
80 # the moc program in likely and unlikely places save /usr[/local]/bin to avoid mistaking it with Qt4.
81 PATH_SDK_QT3 := $(patsubst %/bin/qm2ts,%,$(firstword $(wildcard \
82 /usr/lib/qt-3.3/bin/qm2ts \
83 /usr/lib64/qt-3.3/bin/qm2ts \
84 /usr/qt/3/bin/qm2ts \
85 $(if $(QTDIR),$(QTDIR)/bin/qm2ts) \
86 /usr/bin/qm2ts \
87 /usr/local/bin/qm2ts \
88 /usr/share/qt3/bin/qm2ts \
89 )))
90 ifeq ($(PATH_SDK_QT3),) # Try with moc, but not in /usr/bin and /usr/local/bin.
91 PATH_SDK_QT3 := $(patsubst %/bin/moc,%,$(firstword $(wildcard \
92 /usr/lib/qt-3.3/bin/moc \
93 /usr/lib64/qt-3.3/bin/moc \
94 /usr/qt/3/bin/moc \
95 /usr/share/qt3/bin/moc \
96 $(if $(QTDIR),$(QTDIR)/bin/moc) \
97 )))
98 endif
99 ifneq ($(PATH_SDK_QT3),)
100 # Found something! Export the variable for the benefit of recursive make instances.
101 export PATH_SDK_QT3
102
103 # Determin the include directory.
104 ifeq ($(PATH_SDK_QT3_INC),)
105 PATH_SDK_QT3_INC := $(patsubst %/private/qfiledefs_p.h,%,$(firstword $(wildcard \
106 $(PATH_SDK_QT3)/include/private/qfiledefs_p.h \
107 $(PATH_SDK_QT3)/include/qt3/private/qfiledefs_p.h \
108 /usr/include/qt3/private/qfiledefs_p.h)))
109 ifneq ($(PATH_SDK_QT3_INC),)
110 export PATH_SDK_QT3_INC
111 endif
112 endif
113
114 # Determin the most likely x86 and AMD64 lib directories (only used for making PATH_SDK_QT3_LIB).
115 ifeq ($(PATH_SDK_QT3_LIB.x86),)
116 PATH_SDK_QT3_LIB.x86 := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
117 $(PATH_SDK_QT3)/lib32/libqt-mt$(SUFF_DLL) \
118 $(PATH_SDK_QT3)/lib32/qt3/libqt-mt$(SUFF_DLL) \
119 $(PATH_SDK_QT3)/lib32/qt3-3/lib/libqt-mt$(SUFF_DLL) \
120 /usr/lib32/libqt-mt$(SUFF_DLL) \
121 /usr/lib32/qt3/libqt-mt$(SUFF_DLL) \
122 /usr/lib/i386-linux-gnu/libqt-mt$(SUFF_DLL) \
123 /usr/local/lib32/libqt-mt$(SUFF_DLL) \
124 /usr/local/lib32/qt3/libqt-mt$(SUFF_DLL) \
125 /usr/local/lib32/qt3-3/lib/libqt-mt$(SUFF_DLL) \
126 /usr/local/lib/i386-linux-gnu/libqt-mt$(SUFF_DLL) \
127 $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
128 $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
129 $(PATH_SDK_QT3)/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
130 $(PATH_SDK_QT3)/lib/i386-linux-gnu/libqt-mt$(SUFF_DLL) \
131 )))
132 ifneq ($(PATH_SDK_QT3_LIB.x86),)
133 export PATH_SDK_QT3_LIB.x86
134 endif
135 endif
136 ifeq ($(PATH_SDK_QT3_LIB.amd64),)
137 PATH_SDK_QT3_LIB.amd64 := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
138 $(PATH_SDK_QT3)/lib64/libqt-mt$(SUFF_DLL) \
139 $(PATH_SDK_QT3)/lib64/qt3/libqt-mt$(SUFF_DLL) \
140 $(PATH_SDK_QT3)/lib64/qt3-3/lib/libqt-mt$(SUFF_DLL) \
141 $(PATH_SDK_QT3)/lib/amd64/libqt-mt$(SUFF_DLL) \
142 $(PATH_SDK_QT3)/lib/64/libqt-mt$(SUFF_DLL) \
143 /usr/lib64/libqt-mt$(SUFF_DLL) \
144 /usr/lib64/qt3/libqt-mt$(SUFF_DLL) \
145 /usr/lib64/qt3-3/lib/libqt-mt$(SUFF_DLL) \
146 /usr/lib/amd64/libqt-mt$(SUFF_DLL) \
147 /usr/lib/64/libqt-mt$(SUFF_DLL) \
148 /usr/lib/x86_64-linux-gnu/libqt-mt$(SUFF_DLL) \
149 /usr/local/lib64/libqt-mt$(SUFF_DLL) \
150 /usr/local/lib64/qt3/libqt-mt$(SUFF_DLL) \
151 /usr/local/lib64/qt3-3/lib/libqt-mt$(SUFF_DLL) \
152 /usr/local/lib/amd64/libqt-mt$(SUFF_DLL) \
153 /usr/local/lib/64/libqt-mt$(SUFF_DLL) \
154 /usr/local/lib/x86_64-linux-gnu/libqt-mt$(SUFF_DLL) \
155 $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
156 $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
157 $(PATH_SDK_QT3)/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
158 $(PATH_SDK_QT3)/lib/x86_64-linux-gnu/libqt-mt$(SUFF_DLL) \
159 )))
160 ifneq ($(PATH_SDK_QT3_LIB.amd64),)
161 export PATH_SDK_QT3_LIB.amd64
162 endif
163 endif
164
165 # Determin the KBUILD_TARGET lib directory.
166 ifeq ($(PATH_SDK_QT3_LIB),)
167 PATH_SDK_QT3_LIB := $(PATH_SDK_QT3_LIB.$(KBUILD_TARGET_ARCH))
168 ifeq ($(PATH_SDK_QT3_LIB),)
169 PATH_SDK_QT3_LIB := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
170 $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
171 $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
172 $(PATH_SDK_QT3)/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
173 /usr/lib/libqt-mt$(SUFF_DLL) \
174 /usr/lib/qt3/libqt-mt$(SUFF_DLL) \
175 /usr/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
176 /usr/local/lib/libqt-mt$(SUFF_DLL) \
177 /usr/local/lib/qt3/libqt-mt$(SUFF_DLL) \
178 /usr/local/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
179 )))
180 ifneq ($(PATH_SDK_QT3_LIB),)
181 export PATH_SDK_QT3_LIB
182 endif
183 endif
184 endif
185
186 endif
187 endif # Unices
188 endif
189 # Found it?
190 ifeq ($(PATH_SDK_QT3),)
191 $(warning kBuild: Couldn't find the Qt3 headers and libaries...)
192 PATH_SDK_QT3 := $(PATH_DEVTOOLS_TRG)/qt/not-found
193 endif
194 endif
195else
196 # Resolve any fancy stuff once and for all.
197 PATH_SDK_QT3 := $(PATH_SDK_QT3)
198endif
199
200# Libraries can be in either Frameworks or lib depending on how you
201# build it on the mac. The .dmg installs into Frameworks but builds into lib.
202PATH_SDK_QT3_LIB ?= $(PATH_SDK_QT3)/lib
203PATH_SDK_QT3_INC ?= $(PATH_SDK_QT3)/include
204
205# The bits that kBuild picks up.
206# (nothing here)
207
208
209#
210# The QT3 tool.
211#
212# This is implemented here rather than in tools/QT3.kmk to enforce the global USES.
213# It also makes things easier to develop, with fewer files I mean.
214#
215TOOL_QT3 = Qt3
216
217# Tool Specific Properties (PATH_TOOL_QT3_BIN and TOOL_QT3_BIN_SUFF)
218# TOOL_QT3_BIN_SUFF - the '-qt3' bit found on debian.
219# PATH_TOOL_QT3_BIN - the directory containing moc, uic, lrelease, lupdate and qm2ts.
220ifndef PATH_TOOL_QT3_BIN
221 PATH_TOOL_QT3_BIN := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v3*/bin)))
222 ifeq ($(PATH_TOOL_QT3_BIN),)
223 if1of ($(KBUILD_HOST), win os2)
224 # Sorry, no joy here. Check QTDIR perhaps, but for now users have to set PATH_TOOL_QT3_BIN.
225 else
226 ifdef TOOL_QT3_BIN_SUFF
227 TOOL_QT3_BIN_SUFF := $(TOOL_QT3_BIN_SUFF)
228 endif
229 PATH_TOOL_QT3_BIN := $(patsubst %/qm2ts$(TOOL_QT3_BIN_SUFF),%,$(firstword $(wildcard \
230 /usr/lib/qt-3.3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
231 /usr/lib64/qt-3.3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
232 /usr/qt/3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
233 $(if $(QTDIR),$(QTDIR)/bin/qm2ts$(TOOL_QT3_BIN_SUFF)) \
234 /usr/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
235 /usr/local/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
236 /usr/share/qt3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
237 )))
238 ifeq ($(PATH_TOOL_QT3_BIN),)
239 # If we couldn't find the qt3 specific tool qm2ts, debian and other skip
240 # this (thanks a bundle). Try with look for 'moc' with a '-qt3' extension,
241 # then for just moc. In the latter case don't search /usr[/local]/bin to
242 # void finding the qt4 tools and messing up.
243 ifeq ($(TOOL_QT3_BIN_SUFF),)
244 PATH_TOOL_QT3_BIN := $(patsubst %/moc-qt3,%,$(firstword $(wildcard \
245 /usr/bin/moc-qt3 \
246 /usr/local/bin/moc-qt3 \
247 /usr/lib/qt-3.3/bin/moc-qt3 \
248 /usr/lib64/qt-3.3/bin/moc-qt3 \
249 /usr/qt/3/bin/moc-qt3 \
250 /usr/share/qt3/bin/moc-qt3 \
251 $(if $(QTDIR),$(QTDIR)/bin/moc-qt3) \
252 )))
253 endif
254 ifneq ($(PATH_TOOL_QT3_BIN),)
255 export TOOL_QT3_BIN_SUFF := -qt3
256 else
257 PATH_TOOL_QT3_BIN := $(patsubst %/moc$(TOOL_QT3_BIN_SUFF),%,$(firstword $(wildcard \
258 /usr/lib/qt-3.3/bin/moc$(TOOL_QT3_BIN_SUFF) \
259 /usr/lib64/qt-3.3/bin/moc$(TOOL_QT3_BIN_SUFF) \
260 /usr/qt/3/bin/moc$(TOOL_QT3_BIN_SUFF) \
261 /usr/share/qt3/bin/moc$(TOOL_QT3_BIN_SUFF) \
262 $(if $(QTDIR),$(QTDIR)/bin/moc$(TOOL_QT3_BIN_SUFF)) \
263 )))
264 endif
265 endif
266 ifneq ($(PATH_TOOL_QT3_BIN),)
267 export PATH_TOOL_QT3_BIN
268 endif
269 endif
270 endif
271 # If not found, we'll enter the 'pathless' mode.
272else
273 # Resolve any fancy stuff once and for all.
274 PATH_TOOL_QT3_BIN := $(PATH_TOOL_QT3_BIN)
275 TOOL_QT3_BIN_SUFF := $(TOOL_QT3_BIN_SUFF)
276endif
277ifneq ($(PATH_TOOL_QT3_BIN),)
278 ifeq ($(KBUILD_HOST),os2)
279 TOOL_QT3_ENV_SETUP ?= $(REDIRECT) -E 'BEGINLIBPATH=$(PATH_TOOL_QT3_BIN);$(libpath BEGINLIBPATH)' --
280 endif
281 TOOL_QT3_MOC ?= $(TOOL_QT3_ENV_SETUP) $(PATH_TOOL_QT3_BIN)/moc$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
282 TOOL_QT3_UIC ?= $(TOOL_QT3_ENV_SETUP) $(PATH_TOOL_QT3_BIN)/uic$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
283 TOOL_QT3_LRC ?= $(TOOL_QT3_ENV_SETUP) $(PATH_TOOL_QT3_BIN)/lrelease$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
284 TOOL_QT3_LUPDATE ?= $(TOOL_QT3_ENV_SETUP) $(PATH_TOOL_QT3_BIN)/lupdate$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
285else
286 # Pathless, relies on the environment.
287 TOOL_QT3_MOC ?= moc$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
288 TOOL_QT3_UIC ?= uic$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
289 TOOL_QT3_LRC ?= lrelease$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
290 TOOL_QT3_LUPDATE ?= lupdate$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
291endif
292
293# General Properties used by kBuild and/or units/qt.kmk
294TOOL_QT3_MOCFLAGS ?=
295TOOL_QT3_UICFLAGS ?=
296TOOL_QT3_LRCFLAGS ?=
297
298
299## MOC a C++ source file.
300# @param $(target) Normalized main target name.
301# @param $(source) Source filename (relative).
302# @param $(out) Object file name. This shall be (re)created by the compilation.
303# @param $(dep) Dependcy file. This may be (re)created by the compilation.
304# @param $(flags) Flags.
305# @param $(outbase) Output basename (full). Use this for list files and such.
306#
307TOOL_QT3_MOC_CPP_DEPEND =
308TOOL_QT3_MOC_CPP_DEPORD =
309TOOL_QT3_MOC_CPP_OUTPUT =
310TOOL_QT3_MOC_CPP_OUTPUT_MAYBE =
311define TOOL_QT3_MOC_CPP_CMDS
312 $(QUIET)$(TOOL_QT3_MOC)\
313 $(flags)\
314 -o $(out)\
315 -i \
316 $(source)
317endef
318
319## MOC a C++ header file.
320# @param $(target) Normalized main target name.
321# @param $(source) Source filename (relative).
322# @param $(out) Object file name. This shall be (re)created by the compilation.
323# @param $(dep) Dependcy file. This may be (re)created by the compilation.
324# @param $(flags) Flags.
325# @param $(outbase) Output basename (full). Use this for list files and such.
326#
327TOOL_QT3_MOC_HPP_DEPEND =
328TOOL_QT3_MOC_HPP_DEPORD =
329TOOL_QT3_MOC_HPP_OUTPUT =
330TOOL_QT3_MOC_HPP_OUTPUT_MAYBE =
331define TOOL_QT3_MOC_HPP_CMDS
332 $(QUIET)$(TOOL_QT3_MOC)\
333 $(flags)\
334 -o $(out)\
335 $(source)
336endef
337
338## Compile a Qt user interface file (.ui).
339# @param $(target) Normalized main target name.
340# @param $(source) Source filename (relative).
341# @param $(out.cpp) The C++ source file to be generated.
342# @param $(out.h) The C++ header file to be generated.
343# @param $(dep) Dependcy file. This may be (re)created by the compilation.
344# @param $(flags) Flags.
345# @param $(outbase) Output basename (full). Use this for list files and such.
346#
347TOOL_QT3_UIC_UI_DEPEND =
348TOOL_QT3_UIC_UI_DEPORD =
349TOOL_QT3_UIC_UI_OUTPUT =
350TOOL_QT3_UIC_UI_OUTPUT_MAYBE =
351define TOOL_QT3_UIC_UI_CMDS
352 $(QUIET)$(TOOL_QT3_UIC)\
353 $(flags)\
354 -o $(out.h)\
355 $(source)
356 $(QUIET)$(TOOL_QT3_UIC)\
357 $(flags)\
358 -i $(out.h) \
359 -o $(out.cpp)\
360 $(source)
361endef
362
363## Compile a Qt translation file (.ts).
364# @param $(target) Normalized main target name.
365# @param $(source) Source filename (relative).
366# @param $(out) Object file name. This shall be (re)created by the compilation.
367# @param $(dep) Dependcy file. This may be (re)created by the compilation.
368# @param $(flags) Flags.
369# @param $(defs) Definitions.
370# @param $(incs) Includes.
371# @param $(outbase) Output basename (full). Use this for list files and such.
372#
373TOOL_QT3_LRC_TS_DEPEND =
374TOOL_QT3_LRC_TS_DEPORD =
375TOOL_QT3_LRC_TS_OUTPUT =
376TOOL_QT3_LRC_TS_OUTPUT_MAYBE =
377define TOOL_QT3_LRC_TS_CMDS
378 $(QUIET)$(TOOL_QT3_LRC)\
379 $(flags)\
380 $(source)\
381 -qm $(out)
382endef
383
384
385
386#
387#
388# Back to the Qt3 unit.
389#
390#
391
392
393## wrapper for the lrelease (LRC) command dependencies.
394ifndef NO_COMPILE_CMDS_DEPS
395 _UNIT_QT3_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
396else
397 _UNIT_QT3_LRC_CMDS_DEP =
398endif
399
400##
401# def_unit_qt3_target_pre_handle_translation helper that is expanded before evaluation.
402#
403# This is necessary to resolve reference to local variables before doing
404# assignments and setting up commands. They would otherwise be resolved
405# later in a different context and the result would be completely wrong.
406#
407define def_unit_qt3_target_pre_handle_translation_dx
408
409$(out) + $(more_output) +| $(maybe_output): \
410 $(deps) \
411 $(value _UNIT_QT3_LRC_CMDS_DEP) \
412 | \
413 $(orderdeps)
414 %$$(call MSG_TOOL,lrelease,$(target),$(source),$$@)
415 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
416
417$(cmds)
418
419ifndef NO_COMPILE_CMDS_DEPS
420 %$$(QUIET2)$$(APPEND) '$(dep)'
421 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_LRC_CMDS_PREV_'
422 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
423 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
424endif
425
426$(target)_CLEAN += $(out) $(more_output) $(maybe_output) $(dep)
427$(target)-inst-nls_SOURCES += $(out)
428
429endef # def_unit_qt3_target_pre_handle_translation_dx
430
431##
432# Handle a source file listed in QT_TRANSLATIONS.
433#
434# The files listed in QT_TRANSLATIONS are translation files (.ts) which needs
435# to be translated into .qm files that are loadble by Qt.
436#
437# @remarks Invoked via $(evalvalctx ).
438define def_unit_qt3_target_pre_handle_translation
439local type := LRC
440
441# fetch the properties.
442local tool := $(kb-src-tool dummy_var)
443local qtnlsdir := $($(target)_0_OUTDIR)/qtnls
444local outbase := $(qtnlsdir)/$(notdir $(basename $(source)))
445local out := $(outbase).qm
446local dep := $(out).dep
447local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
448local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
449local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
450
451# default path + source dep.
452ifneq ($(defpath),)
453local source := $(abspathex $(source),$(defpath))
454local deps := $(abspathex $(deps),$(defpath)) $(source)
455local incs := $(abspathex $(incs),$(defpath))
456else
457local deps += $(source)
458endif
459
460# call the tool
461ifndef TOOL_$(tool)_LRC_TS_CMDS
462 $(error kBuild: qt lrelease tool not found: TOOL_$(tool)_LRC_TS_CMDS)
463endif
464local cmds := $(TOOL_$(tool)_LRC_TS_CMDS)
465local more_output := $(TOOL_$(tool)_LRC_TS_OUTPUT)
466local maybe_output := $(TOOL_$(tool)_LRC_TS_OUTPUT_MAYBE)
467local deps += $(TOOL_$(tool)_LRC_TS_DEPEND)
468local orderdeps += $(TOOL_$(tool)_LRC_TS_DEPORD)
469
470# generate the link rule and update some source and target variables.
471ifndef NO_COMPILE_CMDS_DEPS
472 $(eval includedep $(dep))
473endif
474$(eval $(def_unit_qt3_target_pre_handle_translation_dx))
475
476endef # def_unit_qt3_target_pre_handle_translation
477
478
479
480## wrapper for the UIC command dependencies.
481ifndef NO_COMPILE_CMDS_DEPS
482 _UNIT_QT3_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_UIC_CMDS_PREV_),$$(commands $(out.h)),FORCE)
483else
484 _UNIT_QT3_UIC_CMDS_DEP =
485endif
486
487##
488# def_unit_qt3_src_handler_ui helper that is expanded before evaluation.
489#
490# This is necessary to resolve reference to local variables before doing
491# assignments and setting up commands. They would otherwise be resolved
492# later in a different context and the result would be completely wrong.
493#
494define def_unit_qt3_target_pre_handle_ui_dx
495
496$(out.h) + $(out.cpp) +| $(realout.h) $(realout.cpp) $(more_output) $(maybe_output): \
497 $(deps) \
498 $(value _UNIT_QT3_UIC_CMDS_DEP) \
499 | \
500 $(orderdeps)
501 %$$(call MSG_TOOL,uic,$(target),$(source),$(out.h) $(out.cpp))
502 $(QUIET2)$(RM) -f $(out.h) $(out.cpp) $(more_output) $(maybe_output) $(dep)
503
504$(cmds)
505
506 $(QUIET)$(CP) --changed -f $(out.h) $(realout.h)
507 $(QUIET)$(CP) --changed -f $(out.cpp) $(realout.cpp)
508ifndef NO_COMPILE_CMDS_DEPS
509 %$$(QUIET2)$$(APPEND) '$(dep)'
510 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_UIC_CMDS_PREV_'
511 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out.h)'
512 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
513endif
514
515$(target)_INTERMEDIATES += $(realout.h)
516$(target)_GEN_SOURCES_ += $(realout.cpp)
517$(target)_CLEAN += $(out.h) $(out.cpp) $(realout.h) $(realout.cpp) $(more_output) $(maybe_output) $(dep)
518
519endef # def_unit_qt3_target_pre_handle_ui_dx
520
521##
522# Source handler for .ui sources.
523#
524# @remarks $(evalvalctx me).
525define def_unit_qt3_src_handler_ui
526local type := UIC
527
528# fetch the properties.
529local tool := $(kb-src-tool dummy_var)
530local qtuicdir := $($(target)_0_OUTDIR)/qtuic
531local outbase := $(qtuicdir)/$(notdir $(basename $(source)))
532local out.h := $(outbase).tmp.h
533local out.cpp := $(outbase).tmp.cpp
534local realout.h := $(outbase).h
535local realout.cpp:=$(outbase).cpp
536local dep := $(realout.h).dep
537local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
538local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
539local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
540
541# default path + source dep.
542ifneq ($(defpath),)
543local source := $(abspathex $(source),$(defpath))
544local deps := $(abspathex $(deps),$(defpath)) $(source)
545local incs := $(abspathex $(incs),$(defpath))
546else
547local deps += $(source)
548endif
549
550# call the tool
551ifndef TOOL_$(tool)_UIC_UI_CMDS
552 $(error kBuild: qt uic tool not found: TOOL_$(tool)_UIC_UI_CMDS)
553endif
554local cmds := $(TOOL_$(tool)_UIC_UI_CMDS)
555local more_output := $(TOOL_$(tool)_UIC_UI_OUTPUT)
556local maybe_output := $(TOOL_$(tool)_UIC_UI_OUTPUT_MAYBE)
557local deps += $(TOOL_$(tool)_UIC_UI_DEPEND)
558local orderdeps += $(TOOL_$(tool)_UIC_UI_DEPORD)
559
560# generate the link rule and update some source and target variables.
561ifndef NO_COMPILE_CMDS_DEPS
562 $(eval includedep $(dep))
563endif
564$(eval $(def_unit_qt3_target_pre_handle_ui_dx))
565
566endef # def_unit_qt3_src_handler_ui
567
568
569
570## wrapper for the MOC command dependencies.
571ifndef NO_COMPILE_CMDS_DEPS
572 _UNIT_QT3_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)
573else
574 _UNIT_QT3_MOC_HPP_CMDS_DEP =
575endif
576
577##
578# def_unit_qt3_target_pre_handle_moc_hdr helper that is expanded before evaluation.
579#
580# This is necessary to resolve reference to local variables before doing
581# assignments and setting up commands. They would otherwise be resolved
582# later in a different context and the result would be completely wrong.
583#
584define def_unit_qt3_target_pre_handle_moc_hdr_dx
585
586$(out) +| $(realout) $(more_output) $(maybe_output): \
587 $(deps) \
588 $(value _UNIT_QT3_MOC_HPP_CMDS_DEP) \
589 | \
590 $(orderdeps)
591 %$$(call MSG_TOOL,moc,$(target),$(source),$(realout))
592 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
593
594$(cmds)
595
596 $(QUIET)$(CP) --changed -f $(out) $(realout)
597ifndef NO_COMPILE_CMDS_DEPS
598 %$$(QUIET2)$$(APPEND) '$(dep)'
599 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_MOC_HPP_CMDS_PREV_'
600 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
601 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
602endif
603
604$(target)_INTERMEDIATES += $(realout)
605$(target)_GEN_SOURCES_ += $(realout)
606$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
607
608endef
609
610##
611# Handle a source file listed in QT_MOCHDRS.
612#
613# The files listed in QT_MOCHDRS uses the Q_OBJECT macro and we will
614# generate a .cpp file for each of them and add it to the generated
615# sources so that it's compiled and linked. (There is an alternative
616# way to do this where the .cpp file is included, this isn't currently
617# supported by this unit.)
618#
619# @remarks Invoked via $(evalvalctx ).
620define def_unit_qt3_target_pre_handle_moc_hdr
621local type := MOC
622
623# fetch the properties.
624local tool := $(kb-src-tool dummy_var)
625local outbase := $(qtmocdir)/$(notdir $(basename $(source)))
626local out := $(outbase).tmp.cpp
627local realout := $(outbase).cpp
628local dep := $(realout).dep
629local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
630local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
631local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
632
633# default path + source dep.
634ifneq ($(defpath),)
635local source := $(abspathex $(source),$(defpath))
636local deps := $(abspathex $(deps),$(defpath)) $(source)
637else
638local deps += $(source)
639endif
640
641# call the tool
642ifndef TOOL_$(tool)_MOC_HPP_CMDS
643 $(error kBuild: qt moc tool not found: TOOL_$(tool)_MOC_HPP_CMDS)
644endif
645local cmds := $(TOOL_$(tool)_MOC_HPP_CMDS)
646local more_output := $(TOOL_$(tool)_MOC_HPP_OUTPUT)
647local maybe_output := $(TOOL_$(tool)_MOC_HPP_OUTPUT_MAYBE)
648local deps += $(TOOL_$(tool)_MOC_HPP_DEPEND)
649local orderdeps += $(TOOL_$(tool)_MOC_HPP_DEPORD)
650
651# generate the link rule and update some source and target variables.
652ifndef NO_COMPILE_CMDS_DEPS
653 $(eval includedep $(dep))
654endif
655$(eval $(def_unit_qt3_target_pre_handle_moc_hdr_dx))
656
657endef # def_unit_qt3_target_pre_handle_moc_hdr
658
659
660
661## wrapper for the MOC command dependencies.
662ifndef NO_COMPILE_CMDS_DEPS
663 _UNIT_QT3_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)
664else
665 _UNIT_QT3_MOC_CPP_CMDS_DEP =
666endif
667
668##
669# def_unit_qt3_target_pre_handle_moc_src helper that is expanded before evaluation.
670#
671# This is necessary to resolve reference to local variables before doing
672# assignments and setting up commands. They would otherwise be resolved
673# later in a different context and the result would be completely wrong.
674#
675define def_unit_qt3_target_pre_handle_moc_src_dx
676
677$(out) +| $(realout) $(more_output) $(maybe_output): \
678 $(deps) \
679 $(value _UNIT_QT3_MOC_CPP_CMDS_DEP) \
680 | \
681 $(orderdeps)
682 %$$(call MSG_TOOL,moc,$(target),$(source),$(realout))
683 $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
684
685$(cmds)
686
687 $(QUIET)$(CP) --changed -f $(out) $(realout)
688ifndef NO_COMPILE_CMDS_DEPS
689 %$$(QUIET2)$$(APPEND) '$(dep)'
690 %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_MOC_CPP_CMDS_PREV_'
691 %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
692 %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
693endif
694
695$(target)_INTERMEDIATES += $(realout)
696$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
697
698endef
699
700##
701# Handle a source file listed in QT_MOCSRCS.
702#
703# The files listed in QT_MOCSRCS uses the Q_OBJECT macro and will include
704# a .moc file that we're expected to generate here.
705#
706# @remarks Invoked via $(evalvalctx ).
707define def_unit_qt3_target_pre_handle_moc_src
708local type := MOC
709
710# fetch the properties.
711local tool := $(kb-src-tool dummy_var)
712local outbase := $(qtmocdir)/$(notdir $(basename $(source)))
713local out := $(outbase).tmp.moc
714local realout := $(outbase).moc
715local dep := $(realout).dep
716local flags := $(kb-src-prop FLAGS,dummy_var,right-to-left)
717local deps := $(kb-src-prop DEPS,dummy_var,left-to-right)
718local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
719
720# default path + source dep.
721ifneq ($(defpath),)
722local source := $(abspathex $(source),$(defpath))
723local deps := $(abspathex $(deps),$(defpath)) $(source)
724local incs := $(abspathex $(incs),$(defpath))
725else
726local deps += $(source)
727endif
728
729# call the tool
730ifndef TOOL_$(tool)_MOC_CPP_CMDS
731 $(error kBuild: qt moc tool not found: TOOL_$(tool)_MOC_CPP_CMDS)
732endif
733local cmds := $(TOOL_$(tool)_MOC_CPP_CMDS)
734local more_output := $(TOOL_$(tool)_MOC_CPP_OUTPUT)
735local maybe_output := $(TOOL_$(tool)_MOC_CPP_OUTPUT_MAYBE)
736local deps += $(TOOL_$(tool)_MOC_CPP_DEPEND)
737local orderdeps += $(TOOL_$(tool)_MOC_CPP_DEPORD)
738
739# generate the link rule and update some source and target variables.
740ifndef NO_COMPILE_CMDS_DEPS
741 $(eval includedep $(dep))
742endif
743$(eval $(def_unit_qt3_target_pre_handle_moc_src_dx))
744
745endef # def_unit_qt3_target_pre_handle_moc_src
746
747
748##
749# Adds sources containing Q_OBJECT to QT_MOCSRCS.
750define def_unit_qt3_target_pre_cpp_source
751ifneq ($(file-size $(source)),-1)
752 ifneq ($(strip $(shell $(SED) -f $(KBUILD_PATH)/units/qt-Q_OBJECT.sed $(source))),)
753 $(eval $(target)_QT_MOCSRCS += $(source))
754 endif
755endif
756endef # def_unit_qt3_target_pre_cpp_source
757
758
759##
760# Invoked early in the processing of a target that uses the Qt unit.
761#
762# It will append the qt source handlers to the target (.h, .ui, .ts,
763# .png, .bmp, .gif).
764#
765# It will then check all the C++ sources and check which needs
766# a .moc files and generate rules and dependencies fofor these
767#
768define def_unit_qt3_target_pre
769
770# Make QTTOOL the default for the specific Qt tools instead of TOOL.
771ifneq ($($(target)_QTTOOL),)
772 ifeq ($($(target)_MOCTOOL),)
773 $(target)_MOCTOOL := $($(target)_QTTOOL)
774 endif
775 ifeq ($($(target)_UICTOOL),)
776 $(target)_UICTOOL := $($(target)_QTTOOL)
777 endif
778 ifeq ($($(target)_LRCTOOL),)
779 $(target)_LRCTOOL := $($(target)_QTTOOL)
780 endif
781endif
782
783# Deal with QT_MODULES and QT_PREFIX.
784local qt_prefix := $(firstword \
785 $($(target)_QT_PREFIX.$(bld_trg)) \
786 $($(target)_QT_PREFIX.$(bld_trg_arch)) \
787 $($(target)_QT_PREFIX.$(bld_trg).$(bld_trg_arch)) \
788 $($(target)_QT_PREFIX.$(bld_trg_cpu)) \
789 $($(target)_QT_PREFIX.$(bld_type)) \
790 $($(target)_QT_PREFIX))
791ifeq ($(bld_trg),win)
792 local qt_lib := $(firstword $(wildcard \
793 $(PATH_SDK_QT3_LIB)/dynamic/$(qt_prefix)qt-mt3*$(SUFF_LIB) \
794 $(PATH_SDK_QT3_LIB)/$(qt_prefix)qt-mt3*$(SUFF_LIB) \
795 $(PATH_SDK_QT3_LIB)/dynamic/$(qt_prefix)qt-mt$(SUFF_LIB) \
796 $(PATH_SDK_QT3_LIB)/$(qt_prefix)qt-mt$(SUFF_LIB) \
797 $(PATH_SDK_QT3_LIB)/dynamic/$(qt_prefix)Qt3*$(SUFF_LIB) \
798 $(PATH_SDK_QT3_LIB)/$(qt_prefix)Qt3*$(SUFF_LIB) \
799 $(PATH_SDK_QT3_LIB)/dynamic/$(qt_prefix)Qt*$(SUFF_LIB) \
800 $(PATH_SDK_QT3_LIB)/$(qt_prefix)Qt*$(SUFF_LIB) \
801 ) $(PATH_SDK_QT3_LIB)/$(qt_prefix)qt-mt$(SUFF_LIB) )
802 $(eval $(target)_LIBS += $(qt_lib) )
803 ifeq ($(tool_do),LINK_PROGRAM)
804 local qt_main_lib := $(firstword $(wildcard \
805 $(PATH_SDK_QT3_LIB)/$(qt_prefix)qtmain$(SUFF_LIB) \
806 $(PATH_SDK_QT3_LIB)/qtmain$(SUFF_LIB) \
807 ) $(PATH_SDK_QT3_LIB)/$(qt_prefix)qtmain$(SUFF_LIB) )
808 $(eval $(target)_LIBS += $(qt_main_lib) )
809 endif
810else ifeq ($(bld_trg),os2)
811 # This is a real PITA since the dll/lib can be called (almost) anything. :-(
812 local qt_lib := $(firstword $(wildcard \
813 $(PATH_SDK_QT3_LIB)/$(qt_prefix)*qt3*$(SUFF_LIB) \
814 $(PATH_SDK_QT3_LIB)/$(qt_prefix)*qt*$(SUFF_LIB) \
815 ))
816 ifeq ($(qt_lib),)
817 local qt_prls := $(basename $(wildcard $(PATH_SDK_QT3_LIB)/$(qt_prefix)*.prl))
818 local qt_defs := $(basename $(wildcard $(PATH_SDK_QT3_LIB)/$(qt_prefix)*.def))
819 local qt_dlls := $(basename $(wildcard $(PATH_SDK_QT3_LIB)/$(qt_prefix)*.dll))
820 local qt_libs := $(basename $(wildcard $(PATH_SDK_QT3_LIB)/$(qt_prefix)*.lib))
821 local qt_lib := $(firstword \
822 $(addsuffix .lib,$(filter $(qt_prls), $(filter $(qt_defs), $(filter $(qt_dlls), $(qt_libs))))) \
823 $(PATH_SDK_QT3_LIB)/myqt.lib )
824 endif
825 $(eval $(target)_LIBS += $(qt_lib) )
826else
827 local qt_lib := $(PATH_SDK_QT3_LIB)/lib$(qt_prefix)qt-mt$(SUFF_DLL)
828 $(eval $(target)_LIBS += $(qt_lib) )
829endif
830$(eval $(target)_INCS += $(PATH_SDK_QT3_INC) )
831
832# On Qt3 we will try pickup the QMAKE_PRL_DEFINES listed in the .prl file (in libs).
833local qt_prl := $(firstword $(wildcard \
834 $(patsubst %$(SUFF_DLL),%,$(patsubst %$(SUFF_LIB),%,$(qt_lib))).prl \
835 $(dir $(qt_lib))/$(qt_prefix)qt-mt.prl \
836 $(dir $(qt_lib))/*qt-mt*.prl \
837 $(dir $(qt_lib))/*qt*.prl \
838 ))
839ifneq ($(qt_prl),)
840 include $(qt_prl)
841 $(eval $(target)_DEFS += $(QMAKE_PRL_DEFINES))
842endif
843
844# Autodetect source files with Q_OBJECT references if QT_MOCSRCS is undefined. (slow)
845# Tip: Use target_QT_MOCSRCS = $(NO_SUCH_VARIABLE) to avoid this.
846ifndef $(target)_QT_MOCSRCS
847 $(foreach source, $(filter %.cxx %.CXX %.cpp %.CPP %.cc %.CC,\
848 $($(target)_SOURCES.$(bld_trg)) \
849 $($(target)_SOURCES.$(bld_trg_arch)) \
850 $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
851 $($(target)_SOURCES.$(bld_trg_cpu)) \
852 $($(target)_SOURCES.$(bld_type)) \
853 $($(target)_SOURCES) \
854 ), $(evalval def_unit_qt3_target_pre_cpp_source))
855endif
856
857# Install source handlers for .ui files.
858$(target)_SRC_HANDLERS += \
859 .ui:def_unit_qt3_src_handler_ui \
860 .UI:def_unit_qt3_src_handler_ui
861
862# Calc the MOC and UI output directories and add them to BLDDIRS and INCS.
863local qtmocdir := $($(target)_0_OUTDIR)/qtmoc
864local qtuicdir := $($(target)_0_OUTDIR)/qtuic
865local qtnlsdir := $($(target)_0_OUTDIR)/qtnls
866$(eval $(target)_BLDDIRS += $(qtmocdir) $(qtuicdir) $(qtnlsdir) )
867$(eval $(target)_INCS += $(qtmocdir) $(qtuicdir) )
868
869# Calc .ui sources so we can add them to the QT_MOCSRCS and QT_MOCHDRS.
870local ui_sources := $(notdir $(basename $(filter %.ui %.UI, \
871 $($(target)_SOURCES.$(bld_trg)) \
872 $($(target)_SOURCES.$(bld_trg_arch)) \
873 $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
874 $($(target)_SOURCES.$(bld_trg_cpu)) \
875 $($(target)_SOURCES.$(bld_type)) \
876 $($(target)_SOURCES) \
877 )))
878#$(error ui_sources:=$(ui_sources))
879
880# Deal with QT_MOCSRCS.
881$(foreach source, \
882 $($(target)_QT_MOCSRCS.$(bld_trg)) \
883 $($(target)_QT_MOCSRCS.$(bld_trg_arch)) \
884 $($(target)_QT_MOCSRCS.$(bld_trg).$(bld_trg_arch)) \
885 $($(target)_QT_MOCSRCS.$(bld_trg_cpu)) \
886 $($(target)_QT_MOCSRCS.$(bld_type)) \
887 $($(target)_QT_MOCSRCS) \
888 $(addsuffix .h,$(addprefix $(qtuicdir)/,$(notdir $(basename $(ui_sources))))) \
889 , $(evalvalctx def_unit_qt3_target_pre_handle_moc_src))
890
891# Deal with QT_MOCHDRS.
892$(foreach source, \
893 $($(target)_QT_MOCHDRS.$(bld_trg)) \
894 $($(target)_QT_MOCHDRS.$(bld_trg_arch)) \
895 $($(target)_QT_MOCHDRS.$(bld_trg).$(bld_trg_arch)) \
896 $($(target)_QT_MOCHDRS.$(bld_trg_cpu)) \
897 $($(target)_QT_MOCHDRS.$(bld_type)) \
898 $($(target)_QT_MOCHDRS) \
899 $(addsuffix .h,$(addprefix $(qtuicdir)/,$(notdir $(basename $(ui_sources))))) \
900 , $(evalvalctx def_unit_qt3_target_pre_handle_moc_hdr))
901
902# Deal with QT_TRANSLATIONS.
903# ASSUMES (_ALL_)INSTALLS is processed after the targets using this unit.
904local translations := \
905 $($(target)_QT_TRANSLATIONS.$(bld_trg)) \
906 $($(target)_QT_TRANSLATIONS.$(bld_trg_arch)) \
907 $($(target)_QT_TRANSLATIONS.$(bld_trg).$(bld_trg_arch)) \
908 $($(target)_QT_TRANSLATIONS.$(bld_trg_cpu)) \
909 $($(target)_QT_TRANSLATIONS.$(bld_type)) \
910 $($(target)_QT_TRANSLATIONS)
911ifneq ($(strip $(translations)),)
912 local expr := _ALL_INSTALLS_IMPLICIT += $(target)-inst-nls
913 $(eval $(expr))
914 ifdef $(target)_QT_TRANSLATIONS_TEMPLATE
915 $(target)-inst-nls_TEMPLATE := $($(target)_QT_TRANSLATIONS_TEMPLATE)
916 else
917 $(target)-inst-nls_MODE := 0644
918 endif
919 ifdef $(target)_QT_TRANSLATIONS_INST
920 $(target)-inst-nls_INST := $($(target)_QT_TRANSLATIONS_INST)
921 endif
922 $(target)-inst-nls_SOURCES :=
923 $(foreach source, $(translations)\
924 , $(evalvalctx def_unit_qt3_target_pre_handle_translation))
925endif
926
927endef # def_unit_qt3_target_pre
928
929
930#
931# Rule for debugging.
932#
933unit-qt3-show-vars:
934 @$(ECHO) 'The Qt3 SDK variables:'
935 @$(ECHO) ' PATH_SDK_QT3 = "$(PATH_SDK_QT3)"'
936 @$(ECHO) ' PATH_SDK_QT3_INC = "$(PATH_SDK_QT3_INC)"'
937 @$(ECHO) ' PATH_SDK_QT3_LIB = "$(PATH_SDK_QT3_LIB)"'
938 @$(ECHO) ' PATH_SDK_QT3_LIB.amd64 = "$(PATH_SDK_QT3_LIB.amd64)"'
939 @$(ECHO) ' PATH_SDK_QT3_LIB.x86 = "$(PATH_SDK_QT3_LIB.x86)"'
940 @$(ECHO) 'The Qt3 TOOL variables:'
941 @$(ECHO) ' PATH_TOOL_QT3_BIN = "$(PATH_TOOL_QT3_BIN)"'
942 @$(ECHO) ' TOOL_QT3_BIN_SUFF = "$(TOOL_QT3_BIN_SUFF)"'
943 @$(ECHO) ' TOOL_QT3_MOC = "$(TOOL_QT3_MOC)"'
944 @$(ECHO) ' TOOL_QT3_UIC = "$(TOOL_QT3_UIC)"'
945 @$(ECHO) ' TOOL_QT3_LRC = "$(TOOL_QT3_LRC)"'
946 @$(ECHO) ' TOOL_QT3_LUPDATE = "$(TOOL_QT3_LUPDATE)"'
947
Note: See TracBrowser for help on using the repository browser.