Ignore:
Timestamp:
Jul 15, 2008, 4:26:07 AM (17 years ago)
Author:
bird
Message:

qt3 unit: initial coding. (todo: testing + QT_IMAGES)

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/units/qt3.kmk

    r1681 r1684  
    11# $Id$
    22## @file
    3 # Qt 4 unit.
     3# Qt 3 unit.
    44#
    55
     
    2525#
    2626
    27 UNIT_qt4 = qt4
    28 
    29 # Add our target properties.
    30 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL RCCTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
    31 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS RCCFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS QT_MODULES
    32 
    33 
    34 #
    35 # The QT4 SDK.
     27ifdef UNIT_qt3
     28 $(error kBuild: The qt3 unit was included twice!)
     29endif
     30UNIT_qt3 = qt3
     31
     32
     33ifndef UNIT_qt4
     34 # Add our target properties (same as qt4).
     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 +=
     39PROPS_ACCUMULATE_R +=
     40
     41
     42#
     43# The QT3 SDK.
    3644#
    3745# This is implemented here rather than in sdks/QT4.kmk to enforce the global USES.
     
    4048## @todo the SDK might actually not be necessary as it turns out... For now it servers
    4149# a purpose if the host differs from the target, in theory at least.
    42 SDK_QT4 = Qt4
     50SDK_QT3 = Qt3
    4351
    4452# SDK Specific Properties
    45 ifndef PATH_SDK_QT4
    46  PATH_SDK_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    47  ifeq ($(PATH_SDK_QT4),)
     53ifndef PATH_SDK_QT3
     54 PATH_SDK_QT3 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3*)))
     55 ifeq ($(PATH_SDK_QT3),)
    4856  # If target == host, try look for Qt in the various platform specific places.
    4957  ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
    5058   ifeq ($(KBUILD_TARGET),darwin)
    51     PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
     59    # No idea here yet...
     60   else ifeq ($(KBUILD_TARGET),os2)
     61    # No idea here yet...
    5262   else ifeq ($(KBUILD_TARGET),win)
    5363    # No idea here yet...
    5464   else
    55     # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work.
    56     PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard /usr/bin/qt3to4 /usr/local/bin/qt3to4 /usr/qt/4/bin/qt3to4)))
    57     ifneq ($(PATH_SDK_QT4),)
    58      ifeq ($(PATH_SDK_QT4_INC),)
    59       PATH_SDK_QT4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard $(PATH_SDK_QT4)/include/QtCore/qglobal.h $(PATH_SDK_QT4)/include/qt4/QtCore/qglobal.h)))
     65    # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT3_LIB* stuff if it doesn't work.
     66    PATH_SDK_QT3 := $(patsubst %/bin/qm2ts,%,$(firstword $(wildcard /usr/bin/qm2ts /usr/local/bin/qm2ts /usr/qt/3/bin/qm2ts)))
     67    ifneq ($(PATH_SDK_QT3),)
     68     ifeq ($(PATH_SDK_QT3_INC),)
     69      PATH_SDK_QT3_INC := $(patsubst %/private/qfiledefs_p.h,%,$(firstword $(wildcard $(PATH_SDK_QT3)/include/private/qfiledefs_p.h $(PATH_SDK_QT3)/include/qt3/private/qfiledefs_p.h)))
    6070     endif
    61      ifeq ($(PATH_SDK_QT4_LIB.x86),)
    62       PATH_SDK_QT4_LIB.x86   := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    63         $(PATH_SDK_QT4)/lib32/libQtCore$(SUFF_DLL) \
    64         $(PATH_SDK_QT4)/lib32/qt4/libQtCore$(SUFF_DLL) \
    65         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    66         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
     71     ifeq ($(PATH_SDK_QT3_LIB.x86),)
     72      PATH_SDK_QT3_LIB.x86   := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
     73        $(PATH_SDK_QT3)/lib32/libqt-mt$(SUFF_DLL) \
     74        $(PATH_SDK_QT3)/lib32/qt3/libqt-mt$(SUFF_DLL) \
     75        $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
     76        $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
    6777        )))
    6878     endif
    69      ifeq ($(PATH_SDK_QT4_LIB.amd64),)
    70       PATH_SDK_QT4_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    71         $(PATH_SDK_QT4)/lib64/libQtCore$(SUFF_DLL) \
    72         $(PATH_SDK_QT4)/lib64/qt4/libQtCore$(SUFF_DLL) \
    73         $(PATH_SDK_QT4)/lib/amd64/libQtCore$(SUFF_DLL) \
    74         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    75         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
     79     ifeq ($(PATH_SDK_QT3_LIB.amd64),)
     80      PATH_SDK_QT3_LIB.amd64 := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
     81        $(PATH_SDK_QT3)/lib64/libqt-mt$(SUFF_DLL) \
     82        $(PATH_SDK_QT3)/lib64/qt3/libqt-mt$(SUFF_DLL) \
     83        $(PATH_SDK_QT3)/lib/amd64/libqt-mt$(SUFF_DLL) \
     84        $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
     85        $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
    7686        )))
    7787     endif
    78      ifeq ($(PATH_SDK_QT4_LIB),)
    79       PATH_SDK_QT4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET))
    80       ifeq ($(PATH_SDK_QT4_LIB),)
    81        PATH_SDK_QT4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    82         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    83         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
     88     ifeq ($(PATH_SDK_QT3_LIB),)
     89      PATH_SDK_QT3_LIB := $(PATH_SDK_QT3_LIB.$(KBUILD_TARGET))
     90      ifeq ($(PATH_SDK_QT3_LIB),)
     91       PATH_SDK_QT3_LIB := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
     92        $(PATH_SDK_QT3)/lib/libqt-mt$(SUFF_DLL) \
     93        $(PATH_SDK_QT3)/lib/qt3/libqt-mt$(SUFF_DLL) \
    8494        )))
    8595      endif
     
    8999  endif
    90100  # Found it?
    91   ifeq ($(PATH_SDK_QT4),)
     101  ifeq ($(PATH_SDK_QT3),)
    92102   $(warning kBuild: Couldn't find the Qt4 headers and libaries...)
    93    PATH_SDK_QT4 := $(PATH_DEVTOOLS_TRG)/qt/not-found
     103   PATH_SDK_QT3 := $(PATH_DEVTOOLS_TRG)/qt/not-found
    94104  endif
    95105 endif
    96106else
    97107 # Resolve any fancy stuff once and for all.
    98  PATH_SDK_QT4 := $(PATH_SDK_QT4)
     108 PATH_SDK_QT3 := $(PATH_SDK_QT3)
    99109endif
    100110
    101111# Libraries can be in either Frameworks or lib depending on how you
    102112# build it on the mac. The .dmg installs into Frameworks but builds into lib.
    103 ifeq ($(KBUILD_TARGET),darwin)
    104  ifndef PATH_SDK_QT4_LIB
    105   ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
    106    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
    107   else
    108    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    109   endif
    110  endif
    111 else
    112  PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    113  PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
    114 endif
     113PATH_SDK_QT3_LIB ?= $(PATH_SDK_QT3)/lib
     114PATH_SDK_QT3_INC ?= $(PATH_SDK_QT3)/include
    115115
    116116# The bits that kBuild picks up.
     
    119119
    120120#
    121 # The QT4 tool.
    122 #
    123 # This is implemented here rather than in tools/QT4.kmk to enforce the global USES.
     121# The QT3 tool.
     122#
     123# This is implemented here rather than in tools/QT3.kmk to enforce the global USES.
    124124# It also makes things easier to develop, with fewer files I mean.
    125125#
    126 TOOL_QT4 = Qt4
     126TOOL_QT3 = Qt3
    127127
    128128# Tool Specific Properties
    129 ifndef PATH_TOOL_QT4
    130  PATH_TOOL_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v4*)))
     129ifndef PATH_TOOL_QT3
     130 PATH_TOOL_QT3 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v3*)))
     131 ifeq ($(PATH_TOOL_QT3),)
     132  PATH_TOOL_QT3 := $(patsubst %/bin/qm2ts,%,$(firstword $(wildcard /usr/bin/qm2ts /usr/local/bin/qm2ts /usr/qt/3/bin/qm2ts)))
     133 endif
    131134 # If not found, we'll enter the 'pathless' mode.
    132135else
    133136 # Resolve any fancy stuff once and for all.
    134  PATH_TOOL_QT4 := $(PATH_TOOL_QT4)
    135 endif
    136 ifneq ($(PATH_TOOL_QT4),)
    137  PATH_TOOL_QT4_BIN  ?= $(PATH_TOOL_QT4)/bin
    138  TOOL_QT4_MOC       ?= $(PATH_TOOL_QT4_BIN)/moc$(HOST_SUFF_EXE)
    139  TOOL_QT4_UIC       ?= $(PATH_TOOL_QT4_BIN)/uic$(HOST_SUFF_EXE)
    140  TOOL_QT4_RCC       ?= $(PATH_TOOL_QT4_BIN)/rcc$(HOST_SUFF_EXE)
    141  TOOL_QT4_LRC       ?= $(PATH_TOOL_QT4_BIN)/lrelease$(HOST_SUFF_EXE)
    142  TOOL_QT4_LUPDATE   ?= $(PATH_TOOL_QT4_BIN)/lupdate$(HOST_SUFF_EXE)
     137 PATH_TOOL_QT3 := $(PATH_TOOL_QT3)
     138endif
     139ifneq ($(PATH_TOOL_QT3),)
     140 PATH_TOOL_QT3_BIN  ?= $(PATH_TOOL_QT3)/bin
     141 TOOL_QT3_MOC       ?= $(PATH_TOOL_QT3_BIN)/moc$(HOST_SUFF_EXE)
     142 TOOL_QT3_UIC       ?= $(PATH_TOOL_QT3_BIN)/uic$(HOST_SUFF_EXE)
     143 TOOL_QT3_LRC       ?= $(PATH_TOOL_QT3_BIN)/lrelease$(HOST_SUFF_EXE)
     144 TOOL_QT3_LUPDATE   ?= $(PATH_TOOL_QT3_BIN)/lupdate$(HOST_SUFF_EXE)
    143145else
    144146 # Pathless, relies on the environment.
    145  TOOL_QT4_MOC       ?= moc$(HOST_SUFF_EXE)
    146  TOOL_QT4_UIC       ?= uic$(HOST_SUFF_EXE)
    147  TOOL_QT4_RCC       ?= rcc$(HOST_SUFF_EXE)
    148  TOOL_QT4_LRC       ?= lrelease$(HOST_SUFF_EXE)
    149  TOOL_QT4_LUPDATE   ?= lupdate$(HOST_SUFF_EXE)
     147 TOOL_QT3_MOC       ?= moc$(HOST_SUFF_EXE)
     148 TOOL_QT3_UIC       ?= uic$(HOST_SUFF_EXE)
     149 TOOL_QT3_LRC       ?= lrelease$(HOST_SUFF_EXE)
     150 TOOL_QT3_LUPDATE   ?= lupdate$(HOST_SUFF_EXE)
    150151endif
    151152
    152153# General Properties used by kBuild and/or units/qt.kmk
    153 TOOL_QT4_MOCFLAGS           ?=
    154 TOOL_QT4_MOCINCS            ?=
    155 TOOL_QT4_MOCDEFS            ?=
    156 TOOL_QT4_MOCDEFS.darwin     ?= __APPLE__ __GNUC__
    157 TOOL_QT4_MOCDEFS.solaris    ?= __sun
    158 TOOL_QT4_MOCDEFS.win.amd64  ?= WIN64
    159 TOOL_QT4_MOCDEFS.win.x86    ?= WIN32
     154TOOL_QT3_MOCFLAGS   ?=
     155TOOL_QT3_UICFLAGS   ?=
     156TOOL_QT3_LRCFLAGS   ?=
    160157
    161158
     
    166163# @param    $(dep)      Dependcy file. This may be (re)created by the compilation.
    167164# @param    $(flags)    Flags.
    168 # @param    $(defs)     Definitions.
    169 # @param    $(incs)     Includes.
    170165# @param    $(outbase)  Output basename (full). Use this for list files and such.
    171166#
    172 TOOL_QT4_MOC_CPP_DEPEND =
    173 TOOL_QT4_MOC_CPP_DEPORD =
    174 TOOL_QT4_MOC_CPP_OUTPUT =
    175 TOOL_QT4_MOC_CPP_OUTPUT_MAYBE =
    176 define TOOL_QT4_MOC_CPP_CMDS
    177         $(QUIET)$(TOOL_QT4_MOC)\
     167TOOL_QT3_MOC_CPP_DEPEND =
     168TOOL_QT3_MOC_CPP_DEPORD =
     169TOOL_QT3_MOC_CPP_OUTPUT =
     170TOOL_QT3_MOC_CPP_OUTPUT_MAYBE =
     171define TOOL_QT3_MOC_CPP_CMDS
     172        $(QUIET)$(TOOL_QT3_MOC)\
    178173                $(flags)\
    179                 $(addprefix -I, $(incs))\
    180                 $(addprefix -D, $(defs))\
    181174                -o $(out)\
     175                -i \
    182176                $(source)
    183177endef
     
    189183# @param    $(dep)      Dependcy file. This may be (re)created by the compilation.
    190184# @param    $(flags)    Flags.
    191 # @param    $(defs)     Definitions.
    192 # @param    $(incs)     Includes.
    193185# @param    $(outbase)  Output basename (full). Use this for list files and such.
    194186#
    195 TOOL_QT4_MOC_HPP_DEPEND =
    196 TOOL_QT4_MOC_HPP_DEPORD =
    197 TOOL_QT4_MOC_HPP_OUTPUT =
    198 TOOL_QT4_MOC_HPP_OUTPUT_MAYBE =
    199 define TOOL_QT4_MOC_HPP_CMDS
    200         $(QUIET)$(TOOL_QT4_MOC)\
    201                 $(flags)\
    202                 $(addprefix -I, $(incs))\
    203                 $(addprefix -D, $(defs))\
    204                 -o $(out)\
    205                 $(source)
    206 endef
    207 
    208 ## Compile a Qt user interface file (.ui).
    209 # @param    $(target)   Normalized main target name.
    210 # @param    $(source)   Source filename (relative).
    211 # @param    $(out)      Object file name. This shall be (re)created by the compilation.
    212 # @param    $(dep)      Dependcy file. This may be (re)created by the compilation.
    213 # @param    $(flags)    Flags.
    214 # @param    $(defs)     Definitions.
    215 # @param    $(incs)     Includes.
    216 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    217 #
    218 TOOL_QT4_UIC_UI_DEPEND =
    219 TOOL_QT4_UIC_UI_DEPORD =
    220 TOOL_QT4_UIC_UI_OUTPUT =
    221 TOOL_QT4_UIC_UI_OUTPUT_MAYBE =
    222 define TOOL_QT4_UIC_UI_CMDS
    223         $(QUIET)$(TOOL_QT4_UIC)\
     187TOOL_QT3_MOC_HPP_DEPEND =
     188TOOL_QT3_MOC_HPP_DEPORD =
     189TOOL_QT3_MOC_HPP_OUTPUT =
     190TOOL_QT3_MOC_HPP_OUTPUT_MAYBE =
     191define TOOL_QT3_MOC_HPP_CMDS
     192        $(QUIET)$(TOOL_QT3_MOC)\
    224193                $(flags)\
    225194                -o $(out)\
     
    227196endef
    228197
    229 ## Compile a Qt resource file (.qrc).
     198## Compile a Qt user interface file (.ui).
    230199# @param    $(target)   Normalized main target name.
    231200# @param    $(source)   Source filename (relative).
    232 # @param    $(out)      Object file name. This shall be (re)created by the compilation.
     201# @param    $(out.cpp)  The C++ source file to be generated.
     202# @param    $(out.h)    The C++ header file to be generated.
    233203# @param    $(dep)      Dependcy file. This may be (re)created by the compilation.
    234204# @param    $(flags)    Flags.
    235 # @param    $(defs)     Definitions.
    236 # @param    $(incs)     Includes.
    237205# @param    $(outbase)  Output basename (full). Use this for list files and such.
    238206#
    239 # @remarks  The sed script generating the dependency file is a bit naive.
    240 TOOL_QT4_RCC_QRC_DEPEND =
    241 TOOL_QT4_RCC_QRC_DEPORD =
    242 TOOL_QT4_RCC_QRC_OUTPUT =
    243 TOOL_QT4_RCC_QRC_OUTPUT_MAYBE =
    244 define TOOL_QT4_RCC_QRC_CMDS
    245         $(QUIET)$(TOOL_QT4_RCC)\
     207TOOL_QT3_UIC_UI_DEPEND =
     208TOOL_QT3_UIC_UI_DEPORD =
     209TOOL_QT3_UIC_UI_OUTPUT =
     210TOOL_QT3_UIC_UI_OUTPUT_MAYBE =
     211define TOOL_QT3_UIC_UI_CMDS
     212        $(QUIET)$(TOOL_QT3_UIC)\
    246213                $(flags)\
    247                 -o $(out)\
     214                -o $(out.h)\
    248215                $(source)
    249         $(APPEND) $(dep) '$(source): \'
    250         $(SED) \
    251                 -e '/^[[:blank:]]*<file[[:blank:]][^>]*>/!d' \
    252                 -e 's/^.*<file[[:blank:]][^>]*>\([^<]*\)<\/file>.*$$$$/\1/' \
    253                 -e 's|^[^/]|$(abspathex $(dir $(source)),$(defpath))/&|' \
    254                 -e 's|$$$$| \\|' \
    255                 --append $(dep) \
     216        $(QUIET)$(TOOL_QT3_UIC)\
     217                $(flags)\
     218                -i $(out.h) \
     219                -o $(out.cpp)\
    256220                $(source)
    257         $(APPEND) $(dep)
    258         $(SED) \
    259                 -e '/^[[:blank:]]*<file[[:blank:]][^>]*>/!d' \
    260                 -e 's/^.*<file[[:blank:]][^>]*>\([^<]*\)<\/file>.*$$$$/\1/' \
    261                 -e 's|^[^/]|$(abspathex $(dir $(source)),$(defpath))/&|' \
    262                 -e 's|$$$$|:\n|' \
    263                 --append $(dep) \
    264                 $(source)
    265         $(APPEND) $(dep)
    266221endef
    267222
     
    276231# @param    $(outbase)  Output basename (full). Use this for list files and such.
    277232#
    278 TOOL_QT4_LRC_TS_DEPEND =
    279 TOOL_QT4_LRC_TS_DEPORD =
    280 TOOL_QT4_LRC_TS_OUTPUT =
    281 TOOL_QT4_LRC_TS_OUTPUT_MAYBE =
    282 define TOOL_QT4_LRC_TS_CMDS
    283         $(QUIET)$(TOOL_QT4_LRC)\
     233TOOL_QT3_LRC_TS_DEPEND =
     234TOOL_QT3_LRC_TS_DEPORD =
     235TOOL_QT3_LRC_TS_OUTPUT =
     236TOOL_QT3_LRC_TS_OUTPUT_MAYBE =
     237define TOOL_QT3_LRC_TS_CMDS
     238        $(QUIET)$(TOOL_QT3_LRC)\
    284239                $(flags)\
    285240                $(source)\
     
    298253## wrapper for the lrelease (LRC) command dependencies.
    299254ifndef NO_COMPILE_CMDS_DEPS
    300  _UNIT_QT_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
    301 else
    302  _UNIT_QT_LRC_CMDS_DEP =
    303 endif
    304 
    305 ##
    306 # def_unit_qt4_target_pre_handle_translation helper that is expanded before evaluation.
     255 _UNIT_QT3_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
     256else
     257 _UNIT_QT3_LRC_CMDS_DEP =
     258endif
     259
     260##
     261# def_unit_qt3_target_pre_handle_translation helper that is expanded before evaluation.
    307262#
    308263# This is necessary to resolve reference to local variables before doing
     
    310265# later in a different context and the result would be completely wrong.
    311266#
    312 define def_unit_qt4_target_pre_handle_translation_dx
     267define def_unit_qt3_target_pre_handle_translation_dx
    313268
    314269$(out) + $(more_output) +| $(maybe_output): \
    315270                $(deps) \
    316                 $(value _UNIT_QT_LRC_CMDS_DEP) \
     271                $(value _UNIT_QT3_LRC_CMDS_DEP) \
    317272                | \
    318273                $(orderdeps)
     
    324279ifndef NO_COMPILE_CMDS_DEPS
    325280        %$$(QUIET2)$$(APPEND) '$(dep)'
    326         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT_LRC_CMDS_PREV_'
     281        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_LRC_CMDS_PREV_'
    327282        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    328283        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    332287$(target)-inst-nls_SOURCES += $(out)
    333288
    334 endef # def_unit_qt4_target_pre_handle_translation_dx
     289endef # def_unit_qt3_target_pre_handle_translation_dx
    335290
    336291##
     
    341296#
    342297# @remarks Invoked via $(evalvalctx ).
    343 define def_unit_qt4_target_pre_handle_translation
     298define def_unit_qt3_target_pre_handle_translation
    344299local type      := LRC
    345300
     
    376331 $(eval includedep $(dep))
    377332endif
    378 $(eval $(def_unit_qt4_target_pre_handle_translation_dx))
    379 
    380 endef # def_unit_qt4_target_pre_handle_translation
     333$(eval $(def_unit_qt3_target_pre_handle_translation_dx))
     334
     335endef # def_unit_qt3_target_pre_handle_translation
    381336
    382337
     
    384339## wrapper for the UIC command dependencies.
    385340ifndef NO_COMPILE_CMDS_DEPS
    386  _UNIT_QT_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT_RCC_CMDS_PREV_),$$(commands $(out)),FORCE)
    387 else
    388  _UNIT_QT_RCC_CMDS_DEP =
    389 endif
    390 
    391 ##
    392 # def_unit_qt4_target_pre_handle_qrc helper that is expanded before evaluation.
     341 _UNIT_QT3_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_UIC_CMDS_PREV_),$$(commands $(out.h)),FORCE)
     342else
     343 _UNIT_QT3_UIC_CMDS_DEP =
     344endif
     345
     346##
     347# def_unit_qt3_src_handler_ui helper that is expanded before evaluation.
    393348#
    394349# This is necessary to resolve reference to local variables before doing
     
    396351# later in a different context and the result would be completely wrong.
    397352#
    398 define def_unit_qt4_target_pre_handle_rcc_dx
    399 
    400 $(out) +| $(realout) $(more_output) $(maybe_output): \
     353define def_unit_qt3_target_pre_handle_ui_dx
     354
     355$(out.h) + $(out.cpp) +| $(realout.h) $(realout.cpp) $(more_output) $(maybe_output): \
    401356                $(deps) \
    402                 $(value _UNIT_QT_RCC_CMDS_DEP) \
     357                $(value _UNIT_QT3_UIC_CMDS_DEP) \
    403358                | \
    404359                $(orderdeps)
    405         %$$(call MSG_TOOL,rcc,$(target),$(source),$$@)
    406         $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
     360        %$$(call MSG_TOOL,uic,$(target),$(source),$(out.h) $(out.cpp))
     361        $(QUIET2)$(RM) -f $(out.h) $(out.cpp) $(more_output) $(maybe_output) $(dep)
    407362
    408363$(cmds)
    409364
    410         $(QUIET)$(CP) --changed -f $(out) $(realout)
     365        $(QUIET)$(CP) --changed -f $(out.h) $(realout.h)
     366        $(QUIET)$(CP) --changed -f $(out.cpp) $(realout.cpp)
    411367ifndef NO_COMPILE_CMDS_DEPS
    412368        %$$(QUIET2)$$(APPEND) '$(dep)'
    413         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT_RCC_CMDS_PREV_'
    414         %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
     369        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_UIC_CMDS_PREV_'
     370        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out.h)'
    415371        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
    416372endif
    417373
    418 $(target)_INTERMEDIATES += $(realout)
    419 $(target)_GEN_SOURCES_ += $(realout)
    420 $(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
    421 
    422 endef # def_unit_qt4_target_pre_handle_rcc_dx
    423 
    424 ##
    425 # Source handler for .qrc sources (Qt resource files).
     374$(target)_INTERMEDIATES += $(realout.h)
     375$(target)_GEN_SOURCES_ += $(realout.cpp)
     376$(target)_OUT_FILES += $(out.h) $(out.cpp) $(realout.h) $(realout.cpp) $(more_output) $(maybe_output)
     377
     378endef # def_unit_qt3_target_pre_handle_ui_dx
     379
     380##
     381# Source handler for .ui sources.
    426382#
    427383# @remarks $(evalvalctx me).
    428 define def_unit_qt4_src_handler_qrc
    429 local type      := RCC
    430 
    431 # fetch the properties.
    432 local tool      := $(kb-src-tool dummy_var)
    433 local qtrccdir  := $(PATH_$(target))/qtrcc
    434 local outbase   := $(qtrccdir)/$(notdir $(basename $(source)))
    435 local out       := $(outbase).tmp.gen.cpp
    436 local realout   := $(outbase).gen.cpp
    437 local dep       := $(realout).dep
    438 local flags     := $(kb-src-prop FLAGS,dummy_var,right-to-left)
    439 local deps      := $(kb-src-prop DEPS,dummy_var,left-to-right)
    440 local orderdeps := $(call DIRDEP,$(dir $(outbase))) $(kb-src-prop ORDERDEPS,dummy_var,left-to-right)
    441 
    442 # default path + source dep.
    443 ifneq ($(defpath),)
    444 local deps      := $(abspathex $(deps) $(source),$($(target)_PATH))
    445 local incs      := $(abspathex $(incs),$($(target)_PATH))
    446 else
    447 local deps      += $(source)
    448 endif
    449 
    450 # call the tool
    451 ifndef TOOL_$(tool)_RCC_QRC_CMDS
    452  $(error kBuild: qt rcc tool not found: TOOL_$(tool)_RCC_QRC_CMDS)
    453 endif
    454 local cmds         := $(TOOL_$(tool)_RCC_QRC_CMDS)
    455 local more_output  := $(TOOL_$(tool)_RCC_QRC_OUTPUT)
    456 local maybe_output := $(TOOL_$(tool)_RCC_QRC_OUTPUT_MAYBE)
    457 local deps         += $(TOOL_$(tool)_RCC_QRC_DEPEND)
    458 local orderdeps    += $(TOOL_$(tool)_RCC_QRC_DEPORD)
    459 
    460 # generate the link rule and update some source and target variables.
    461 ifndef NO_COMPILE_CMDS_DEPS
    462  $(eval includedep $(dep))
    463 endif
    464 $(eval $(def_unit_qt4_target_pre_handle_rcc_dx))
    465 
    466 endef # def_unit_qt4_src_handler_qrc
    467 
    468 
    469 
    470 ## wrapper for the UIC command dependencies.
    471 ifndef NO_COMPILE_CMDS_DEPS
    472  _UNIT_QT_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT_UIC_CMDS_PREV_),$$(commands $(out)),FORCE)
    473 else
    474  _UNIT_QT_UIC_CMDS_DEP =
    475 endif
    476 
    477 ##
    478 # def_unit_qt4_src_handler_ui helper that is expanded before evaluation.
    479 #
    480 # This is necessary to resolve reference to local variables before doing
    481 # assignments and setting up commands. They would otherwise be resolved
    482 # later in a different context and the result would be completely wrong.
    483 #
    484 define def_unit_qt4_target_pre_handle_ui_dx
    485 
    486 $(out) +| $(realout) $(more_output) $(maybe_output): \
    487                 $(deps) \
    488                 $(value _UNIT_QT_UIC_CMDS_DEP) \
    489                 | \
    490                 $(orderdeps)
    491         %$$(call MSG_TOOL,uic,$(target),$(source),$$@)
    492         $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
    493 
    494 $(cmds)
    495 
    496         $(QUIET)$(CP) --changed -f $(out) $(realout)
    497 ifndef NO_COMPILE_CMDS_DEPS
    498         %$$(QUIET2)$$(APPEND) '$(dep)'
    499         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT_UIC_CMDS_PREV_'
    500         %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    501         %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
    502 endif
    503 
    504 $(target)_INTERMEDIATES += $(realout)
    505 $(target)_OUT_FILES += $(out) $(realout) $(more_output) $(maybe_output)
    506 
    507 endef # def_unit_qt4_target_pre_handle_ui_dx
    508 
    509 ##
    510 # Source handler for .ui sources.
    511 #
    512 # @remarks $(evalvalctx me).
    513 define def_unit_qt4_src_handler_ui
     384define def_unit_qt3_src_handler_ui
    514385local type      := UIC
    515386
     
    518389local qtuicdir  := $(PATH_$(target))/qtuic
    519390local outbase   := $(qtuicdir)/$(notdir $(basename $(source)))
    520 local out       := $(outbase).tmp.gen.h
    521 local realout   := $(outbase).gen.h
    522 local dep       := $(realout).dep
     391local out.h     := $(outbase).tmp.h
     392local out.cpp   := $(outbase).tmp.cpp
     393local realout.h := $(outbase).h
     394local realout.cpp:=$(outbase).cpp
     395local dep       := $(realout.h).dep
    523396local flags     := $(kb-src-prop FLAGS,dummy_var,right-to-left)
    524397local deps      := $(kb-src-prop DEPS,dummy_var,left-to-right)
     
    547420 $(eval includedep $(dep))
    548421endif
    549 $(eval $(def_unit_qt4_target_pre_handle_ui_dx))
    550 
    551 endef # def_unit_qt4_src_handler_ui
     422$(eval $(def_unit_qt3_target_pre_handle_ui_dx))
     423
     424endef # def_unit_qt3_src_handler_ui
    552425
    553426
     
    555428## wrapper for the MOC command dependencies.
    556429ifndef NO_COMPILE_CMDS_DEPS
    557  _UNIT_QT_MOC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT_MOC_CMDS_PREV_),$$(commands $(out)),FORCE)
    558 else
    559  _UNIT_QT_MOC_CMDS_DEP =
    560 endif
    561 
    562 ##
    563 # def_unit_qt4_target_pre_handle_moc_hdr helper that is expanded before evaluation.
     430 _UNIT_QT3_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)
     431else
     432 _UNIT_QT3_MOC_HPP_CMDS_DEP =
     433endif
     434
     435##
     436# def_unit_qt3_target_pre_handle_moc_hdr helper that is expanded before evaluation.
    564437#
    565438# This is necessary to resolve reference to local variables before doing
     
    567440# later in a different context and the result would be completely wrong.
    568441#
    569 define def_unit_qt4_target_pre_handle_moc_hdr_dx
     442define def_unit_qt3_target_pre_handle_moc_hdr_dx
    570443
    571444$(out) +| $(realout) $(more_output) $(maybe_output): \
    572445                $(deps) \
    573                 $(value _UNIT_QT_MOC_CMDS_DEP) \
     446                $(value _UNIT_QT3_MOC_HPP_CMDS_DEP) \
    574447                | \
    575448                $(orderdeps)
    576         %$$(call MSG_TOOL,moc,$(target),$(source),$$@)
     449        %$$(call MSG_TOOL,moc,$(target),$(source),$(realout))
    577450        $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
    578451
     
    582455ifndef NO_COMPILE_CMDS_DEPS
    583456        %$$(QUIET2)$$(APPEND) '$(dep)'
    584         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT_MOC_CMDS_PREV_'
     457        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_MOC_HPP_CMDS_PREV_'
    585458        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    586459        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    594467
    595468##
    596 # Handle a source file listed in QT_MOCHDRSS.
     469# Handle a source file listed in QT_MOCHDRS.
    597470#
    598471# The files listed in QT_MOCHDRS uses the Q_OBJECT macro and we will
     
    603476#
    604477# @remarks Invoked via $(evalvalctx ).
    605 define def_unit_qt4_target_pre_handle_moc_hdr
     478define def_unit_qt3_target_pre_handle_moc_hdr
    606479local type      := MOC
    607480
     
    612485local realout   := $(outbase).cpp
    613486local dep       := $(realout).dep
    614 local defs      := $(kb-src-prop DEFS,dummy_var,left-to-right)
    615 local incs      := $(kb-src-prop INCS,dummy_var,right-to-left)
    616487local flags     := $(kb-src-prop FLAGS,dummy_var,right-to-left)
    617488local deps      := $(kb-src-prop DEPS,dummy_var,left-to-right)
     
    621492ifneq ($(defpath),)
    622493local deps      := $(abspathex $(deps) $(source),$($(target)_PATH))
    623 local incs      := $(abspathex $(incs),$($(target)_PATH))
    624494else
    625495local deps      += $(source)
     
    640510 $(eval includedep $(dep))
    641511endif
    642 $(eval $(def_unit_qt4_target_pre_handle_moc_hdr_dx))
    643 
    644 endef # def_unit_qt4_target_pre_handle_moc_hdr
    645 
    646 
    647 ##
    648 # def_unit_qt4_target_pre_handle_moc_src helper that is expanded before evaluation.
     512$(eval $(def_unit_qt3_target_pre_handle_moc_hdr_dx))
     513
     514endef # def_unit_qt3_target_pre_handle_moc_hdr
     515
     516
     517
     518## wrapper for the MOC command dependencies.
     519ifndef NO_COMPILE_CMDS_DEPS
     520 _UNIT_QT3_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT3_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)
     521else
     522 _UNIT_QT3_MOC_CPP_CMDS_DEP =
     523endif
     524
     525##
     526# def_unit_qt3_target_pre_handle_moc_src helper that is expanded before evaluation.
    649527#
    650528# This is necessary to resolve reference to local variables before doing
     
    652530# later in a different context and the result would be completely wrong.
    653531#
    654 define def_unit_qt4_target_pre_handle_moc_src_dx
     532define def_unit_qt3_target_pre_handle_moc_src_dx
    655533
    656534$(out) +| $(realout) $(more_output) $(maybe_output): \
    657535                $(deps) \
    658                 $(value _UNIT_QT_MOC_CMDS_DEP) \
     536                $(value _UNIT_QT3_MOC_CPP_CMDS_DEP) \
    659537                | \
    660538                $(orderdeps)
    661         %$$(call MSG_TOOL,moc,$(target),$(source),$$@)
     539        %$$(call MSG_TOOL,moc,$(target),$(source),$(realout))
    662540        $(QUIET2)$(RM) -f $(out) $(more_output) $(maybe_output) $(dep)
    663541
     
    667545ifndef NO_COMPILE_CMDS_DEPS
    668546        %$$(QUIET2)$$(APPEND) '$(dep)'
    669         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT_MOC_CMDS_PREV_'
     547        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT3_MOC_CPP_CMDS_PREV_'
    670548        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    671549        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    684562#
    685563# @remarks Invoked via $(evalvalctx ).
    686 define def_unit_qt4_target_pre_handle_moc_src
     564define def_unit_qt3_target_pre_handle_moc_src
    687565local type      := MOC
    688566
     
    693571local realout   := $(outbase).moc
    694572local dep       := $(realout).dep
    695 local defs      := $(kb-src-prop DEFS,dummy_var,left-to-right)
    696 local incs      := $(kb-src-prop INCS,dummy_var,right-to-left)
    697573local flags     := $(kb-src-prop FLAGS,dummy_var,right-to-left)
    698574local deps      := $(kb-src-prop DEPS,dummy_var,left-to-right)
     
    721597 $(eval includedep $(dep))
    722598endif
    723 $(eval $(def_unit_qt4_target_pre_handle_moc_src_dx))
    724 
    725 endef # def_unit_qt4_target_pre_handle_moc_src
     599$(eval $(def_unit_qt3_target_pre_handle_moc_src_dx))
     600
     601endef # def_unit_qt3_target_pre_handle_moc_src
    726602
    727603
    728604##
    729605# Adds sources containing Q_OBJECT to QT_MOCSRCS.
    730 define def_unit_qt4_target_pre_cpp_source
     606define def_unit_qt3_target_pre_cpp_source
    731607ifneq ($(file-size $(source)),-1)
    732608 ifneq ($(strip $(shell $(SED) -f $(KBUILD_PATH)/units/qt-Q_OBJECT.sed $(source))),)
     
    734610 endif
    735611endif
    736 endef # def_unit_qt4_target_pre_cpp_source
     612endef # def_unit_qt3_target_pre_cpp_source
     613
    737614
    738615##
     
    745622# a .moc files and generate rules and dependencies fofor these
    746623#
    747 define def_unit_qt4_target_pre
     624define def_unit_qt3_target_pre
    748625
    749626# Make QTTOOL the default for the specific Qt tools instead of TOOL.
    750627ifneq ($($(target)_QTTOOL),)
    751628 ifeq ($($(target)_MOCTOOL),)
    752   $($(target)_MOCTOOL := $($(target)_QTTOOL)
     629  $(target)_MOCTOOL := $($(target)_QTTOOL)
    753630 endif
    754631 ifeq ($($(target)_UICTOOL),)
    755   $($(target)_UICTOOL := $($(target)_QTTOOL)
    756  endif
    757  ifeq ($($(target)_RCCTOOL),)
    758   $($(target)_RCCTOOL := $($(target)_QTTOOL)
     632  $(target)_UICTOOL := $($(target)_QTTOOL)
    759633 endif
    760634 ifeq ($($(target)_LRCTOOL),)
    761   $($(target)_LRCTOOL := $($(target)_QTTOOL)
     635  $(target)_LRCTOOL := $($(target)_QTTOOL)
    762636 endif
    763637endif
    764638
    765639# Deal with QT_MODULES and QT_PREFIX.
    766 local qt_modules := \
    767         $($(target)_QT_MODULES.$(_bld_trg)) \
    768         $($(target)_QT_MODULES.$(_bld_trg_arch)) \
    769         $($(target)_QT_MODULES.$(_bld_trg).$(_bld_trg_arch)) \
    770         $($(target)_QT_MODULES.$(_bld_trg_cpu)) \
    771         $($(target)_QT_MODULES.$(_bld_type)) \
    772         $($(target)_QT_MODULES)
    773640local qt_prefix := $(firstword \
    774641        $($(target)_QT_PREFIX.$(_bld_trg)) \
     
    778645        $($(target)_QT_PREFIX.$(_bld_type)) \
    779646        $($(target)_QT_PREFIX))
    780 ifeq ($(bld_trg),darwin)
    781  # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
    782  $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    783  $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(addprefix -framework Qt$(qt_prefix),$(qt_modules)) )
    784  $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module).framework/Versions/4/Headers) )
    785 else
    786  ifeq ($(bld_trg),win)
    787   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)4$(SUFF_LIB)) )
    788   ifeq ($(tool_do),LINK_PROGRAM)
    789    $(eval $(target)_LIBS   += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(SUFF_LIB) )
    790   endif
    791  else
    792   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(SUFF_DLL)) )
    793  endif
    794  $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
    795 endif
    796 $(eval $(target)_DEFS      += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
    797 
     647ifeq ($(bld_trg),win)
     648 $(eval $(target)_LIBS    += $(PATH_SDK_QT3_LIB)/$(qt_prefix)qt-mt$(SUFF_LIB)) )
     649 ifeq ($(tool_do),LINK_PROGRAM)
     650  $(eval $(target)_LIBS   += $(PATH_SDK_QT3_LIB)/$(qt_prefix)qtmain$(SUFF_LIB) )
     651 endif
     652else
     653 $(eval $(target)_LIBS    += $(PATH_SDK_QT3_LIB)/lib$(qt_prefix)qt-mt$(SUFF_DLL) )
     654endif
     655$(eval $(target)_INCS     += $(PATH_SDK_QT3_INC) )
    798656
    799657# Autodetect source files with Q_OBJECT references if QT_MOCSRCS is undefined. (slow)
     
    807665        $($(target)_SOURCES.$(_bld_type)) \
    808666        $($(target)_SOURCES) \
    809         ), $(evalval def_unit_qt4_target_pre_cpp_source))
     667        ), $(evalval def_unit_qt3_target_pre_cpp_source))
    810668endif
    811669
    812670# Install source handlers for .ui files.
    813671$(target)_SRC_HANDLERS += \
    814          .ui:def_unit_qt4_src_handler_ui \
    815          .UI:def_unit_qt4_src_handler_ui \
    816         .qrc:def_unit_qt4_src_handler_qrc \
    817         .qrc:def_unit_qt4_src_handler_qrc
     672         .ui:def_unit_qt3_src_handler_ui \
     673         .UI:def_unit_qt3_src_handler_ui
    818674
    819675# Calc the MOC and UI output directories and add them to BLDDIRS and INCS.
    820676local qtmocdir := $(PATH_$(target))/qtmoc
    821677local qtuicdir := $(PATH_$(target))/qtuic
    822 local qtrccdir := $(PATH_$(target))/qtrcc
    823678local qtnlsdir := $(PATH_$(target))/qtnls
    824 $(eval $(target)_BLDDIRS += $(qtmocdir) $(qtuicdir) $(qtrccdir) $(qtnlsdir))
    825 $(eval $(target)_INCS    += $(qtmocdir) $(qtuicdir))
     679$(eval $(target)_BLDDIRS += $(qtmocdir) $(qtuicdir) $(qtnlsdir) )
     680$(eval $(target)_INCS    += $(qtmocdir) $(qtuicdir) )
     681
     682# Calc .ui sources so we can add them to the QT_MOCSRCS and QT_MOCHDRS.
     683local ui_sources := $(notdir $(basename $(filter %.ui %.UI, \
     684        $($(target)_SOURCES.$(_bld_trg)) \
     685        $($(target)_SOURCES.$(_bld_trg_arch)) \
     686        $($(target)_SOURCES.$(_bld_trg).$(_bld_trg_arch)) \
     687        $($(target)_SOURCES.$(_bld_trg_cpu)) \
     688        $($(target)_SOURCES.$(_bld_type)) \
     689        $($(target)_SOURCES) \
     690        )))
     691#$(error ui_sources:=$(ui_sources))
    826692
    827693# Deal with QT_MOCSRCS.
     
    833699        $($(target)_QT_MOCSRCS.$(_bld_type)) \
    834700        $($(target)_QT_MOCSRCS) \
    835         , $(evalvalctx def_unit_qt4_target_pre_handle_moc_src))
     701        $(addsuffix .h,$(addprefix $(qtuicdir)/,$(notdir $(basename $(ui_sources))))) \
     702        , $(evalvalctx def_unit_qt3_target_pre_handle_moc_src))
    836703
    837704# Deal with QT_MOCHDRS.
     
    843710        $($(target)_QT_MOCHDRS.$(_bld_type)) \
    844711        $($(target)_QT_MOCHDRS) \
    845         , $(evalvalctx def_unit_qt4_target_pre_handle_moc_hdr))
     712        $(addsuffix .h,$(addprefix $(qtuicdir)/,$(notdir $(basename $(ui_sources))))) \
     713        , $(evalvalctx def_unit_qt3_target_pre_handle_moc_hdr))
    846714
    847715# Deal with QT_TRANSLATIONS.
     
    865733 $(target)-inst-nls_SOURCES :=
    866734 $(foreach source, $(translations)\
    867         , $(evalvalctx def_unit_qt4_target_pre_handle_translation))
    868 endif
    869 
    870 endef # def_unit_qt4_target_pre
    871 
     735        , $(evalvalctx def_unit_qt3_target_pre_handle_translation))
     736endif
     737
     738endef # def_unit_qt3_target_pre
     739
Note: See TracChangeset for help on using the changeset viewer.