VirtualBox

Changeset 2805 in kBuild for trunk


Ignore:
Timestamp:
Jan 28, 2016 11:08:44 AM (9 years ago)
Author:
bird
Message:

units/qt5.kmk: Quick conversion.

Location:
trunk/kBuild/units
Files:
2 edited
1 copied

Legend:

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

    r2726 r2805  
    55
    66#
    7 # Copyright (c) 2008-2014 knut st. osmundsen <[email protected]>
     7# Copyright (c) 2008-2016 knut st. osmundsen <[email protected]>
    88#
    99# This file is part of kBuild.
     
    3939
    4040
    41 ifndef UNIT_qt4
    42  # Add our target properties (same as qt4).
     41if !defined(UNIT_qt4) && !defined(UNIT_qt5)
     42 # Add our target properties (same as qt4 & qt5).
    4343 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
    4444 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS
  • trunk/kBuild/units/qt4.kmk

    r2787 r2805  
    55
    66#
    7 # Copyright (c) 2008-2014 knut st. osmundsen <[email protected]>
     7# Copyright (c) 2008-2016 knut st. osmundsen <[email protected]>
    88#
    99# This file is part of kBuild.
     
    3939
    4040
    41 ifndef UNIT_qt3
    42  # Add our target properties (same as qt3).
     41if !defined(UNIT_qt3) && !defined(UNIT_qt5)
     42 # Add our target properties (same as qt3 & qt5).
    4343 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
    4444 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS
  • trunk/kBuild/units/qt5.kmk

    r2804 r2805  
    11# $Id$
    22## @file
    3 # Qt 4 unit.
    4 #
    5 
    6 #
    7 # Copyright (c) 2008-2014 knut st. osmundsen <[email protected]>
     3# Qt 5 unit.
     4#
     5
     6#
     7# Copyright (c) 2008-2016 knut st. osmundsen <[email protected]>
    88#
    99# This file is part of kBuild.
     
    3333
    3434
    35 ifdef UNIT_qt4
    36  $(error kBuild: The qt4 unit was included twice!)
    37 endif
    38 UNIT_qt4 = qt4
    39 
    40 
    41 ifndef UNIT_qt3
    42  # Add our target properties (same as qt3).
     35ifdef UNIT_qt5
     36 $(error kBuild: The qt5 unit was included twice!)
     37endif
     38UNIT_qt5 = qt5
     39
     40
     41if !defined(UNIT_qt3) && !defined(UNIT_qt4)
     42 # Add our target properties (same as qt3 & qt4).
    4343 PROPS_SINGLE += QTTOOL MOCTOOL UICTOOL LRCTOOL QT_TRANSLATIONS_INST QT_TRANSLATIONS_TEMPLATE QT_PREFIX
    4444 PROPS_ACCUMULATE_R += MOCDEFS MOCFLAGS UICFLAGS LRCFLAGS QT_TRANSLATIONS QT_MOCSRCS QT_MOCHDRS
     
    5151
    5252#
    53 # The QT4 SDK.
    54 #
    55 # This is implemented here rather than in sdks/QT4.kmk to enforce the global USES.
     53# The QT5 SDK.
     54#
     55# This is implemented here rather than in sdks/QT5.kmk to enforce the global USES.
    5656# It also makes things easier to develop, with fewer files I mean.
    5757#
    5858## @todo the SDK might actually not be necessary as it turns out... For now it servers
    5959# a purpose if the host differs from the target, in theory at least.
    60 SDK_QT4 = Qt4
     60SDK_QT5 = Qt5
    6161
    6262# SDK Specific Properties
    63 #       PATH_SDK_QT4           - The general Qt4 root directory.
    64 #       PATH_SDK_QT4_INC       - The include directory.
    65 #       PATH_SDK_QT4_LIB.amd64 - The lib directory for AMD64.
    66 #       PATH_SDK_QT4_LIB.x86   - The lib directory for X86.
    67 #       PATH_SDK_QT4_LIB       - The lib directory for KBUILD_TARGET.
    68 ifndef PATH_SDK_QT4
    69  PATH_SDK_QT4 := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v4*)))
    70  ifeq ($(PATH_SDK_QT4),)
     63#       PATH_SDK_QT5           - The general Qt5 root directory.
     64#       PATH_SDK_QT5_INC       - The include directory.
     65#       PATH_SDK_QT5_LIB.amd64 - The lib directory for AMD64.
     66#       PATH_SDK_QT5_LIB.x86   - The lib directory for X86.
     67#       PATH_SDK_QT5_LIB       - The lib directory for KBUILD_TARGET.
     68ifndef PATH_SDK_QT5
     69 PATH_SDK_QT5 := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v4*)))
     70 ifeq ($(PATH_SDK_QT5),)
    7171  # If target == host, try look for Qt in the various platform specific places.
    7272  ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
    7373   ifeq ($(KBUILD_TARGET),darwin)
    74     PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
     74    PATH_SDK_QT5 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
    7575   else ifeq ($(KBUILD_TARGET),win)
    7676    # No idea here yet...
     
    7878    # No port...
    7979   else
    80     # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work.
    81     # Try find the general root of thing by looking for the qt3to4 program, if not found, then look for rcc.
    82     PATH_SDK_QT4 := $(patsubst %/bin/qt3to4-qt4,%,$(firstword $(wildcard \
    83         /usr/bin/qt3to4-qt4 \
    84         /usr/local/bin/qt3to4-qt4 \
    85         /usr/qt/4/bin/qt3to4-qt4 \
    86         /usr/share/qt4/bin/qt3to4-qt4 \
     80    # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT5_LIB* stuff if it doesn't work.
     81    # Try find the general root of thing by looking for the qt4to5 program, if not found, then look for rcc.
     82    PATH_SDK_QT5 := $(patsubst %/bin/qt4to5-qt5,%,$(firstword $(wildcard \
     83        /usr/bin/qt4to5-qt5 \
     84        /usr/local/bin/qt4to5-qt5 \
     85        /usr/qt/4/bin/qt4to5-qt5 \
     86        /usr/share/qt5/bin/qt4to5-qt5 \
    8787        )))
    88     ifeq ($(PATH_SDK_QT4),)
    89      PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \
    90         /usr/bin/qt3to4 \
    91         /usr/local/bin/qt3to4 \
    92         /usr/qt/4/bin/qt3to4 \
    93         /usr/share/qt4/bin/qt3to4 \
     88    ifeq ($(PATH_SDK_QT5),)
     89     PATH_SDK_QT5 := $(patsubst %/bin/qt4to5,%,$(firstword $(wildcard \
     90        /usr/bin/qt4to5 \
     91        /usr/local/bin/qt4to5 \
     92        /usr/qt/4/bin/qt4to5 \
     93        /usr/share/qt5/bin/qt4to5 \
    9494        )))
    9595    endif
    96     ifeq ($(PATH_SDK_QT4),)
    97      PATH_SDK_QT4 := $(patsubst %/bin/rcc-qt4,%,$(firstword $(wildcard \
    98         /usr/bin/rcc-qt4 \
    99         /usr/local/bin/rcc-qt4 \
    100         /usr/qt/4/bin/rcc-qt4 \
    101         /usr/share/qt4/bin/rcc-qt4 \
     96    ifeq ($(PATH_SDK_QT5),)
     97     PATH_SDK_QT5 := $(patsubst %/bin/rcc-qt5,%,$(firstword $(wildcard \
     98        /usr/bin/rcc-qt5 \
     99        /usr/local/bin/rcc-qt5 \
     100        /usr/qt/4/bin/rcc-qt5 \
     101        /usr/share/qt5/bin/rcc-qt5 \
    102102        )))
    103103    endif
    104     ifeq ($(PATH_SDK_QT4),)
    105      PATH_SDK_QT4 := $(patsubst %/bin/rcc,%,$(firstword $(wildcard \
     104    ifeq ($(PATH_SDK_QT5),)
     105     PATH_SDK_QT5 := $(patsubst %/bin/rcc,%,$(firstword $(wildcard \
    106106        /usr/bin/rcc \
    107107        /usr/local/bin/rcc \
    108108        /usr/qt/4/bin/rcc \
    109         /usr/share/qt4/bin/rcc \
     109        /usr/share/qt5/bin/rcc \
    110110        )))
    111111    endif
    112     ifneq ($(PATH_SDK_QT4),)
    113      export PATH_SDK_QT4
     112    ifneq ($(PATH_SDK_QT5),)
     113     export PATH_SDK_QT5
    114114
    115115     # Locate the include files.
    116      ifeq ($(PATH_SDK_QT4_INC),)
    117       PATH_SDK_QT4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \
    118         $(PATH_SDK_QT4)/include/QtCore/qglobal.h \
    119         $(PATH_SDK_QT4)/include/qt4/QtCore/qglobal.h \
    120         /usr/include/qt4/QtCore/qtglobal.h \
    121         /usr/local/include/qt4/QtCore/qtglobal.h \
     116     ifeq ($(PATH_SDK_QT5_INC),)
     117      PATH_SDK_QT5_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \
     118        $(PATH_SDK_QT5)/include/QtCore/qglobal.h \
     119        $(PATH_SDK_QT5)/include/qt5/QtCore/qglobal.h \
     120        /usr/include/qt5/QtCore/qtglobal.h \
     121        /usr/local/include/qt5/QtCore/qtglobal.h \
    122122        )))
    123       ifneq ($(PATH_SDK_QT4_INC),)
    124        export PATH_SDK_QT4_INC
     123      ifneq ($(PATH_SDK_QT5_INC),)
     124       export PATH_SDK_QT5_INC
    125125      endif
    126126     endif
    127127
    128128     # Now for the libraries (mostly for helping out finding the KBUILD_TARGET libs).
    129      ifeq ($(PATH_SDK_QT4_LIB.x86),)
    130       PATH_SDK_QT4_LIB.x86   := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    131         $(PATH_SDK_QT4)/lib32/libQtCore$(SUFF_DLL) \
    132         $(PATH_SDK_QT4)/lib32/qt4/libQtCore$(SUFF_DLL) \
     129     ifeq ($(PATH_SDK_QT5_LIB.x86),)
     130      PATH_SDK_QT5_LIB.x86   := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
     131        $(PATH_SDK_QT5)/lib32/libQtCore$(SUFF_DLL) \
     132        $(PATH_SDK_QT5)/lib32/qt5/libQtCore$(SUFF_DLL) \
    133133        /usr/lib32/libQtCore$(SUFF_DLL) \
    134         /usr/lib32/qt4/libQtCore$(SUFF_DLL) \
     134        /usr/lib32/qt5/libQtCore$(SUFF_DLL) \
    135135        /usr/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \
    136136        /usr/local/lib32/libQtCore$(SUFF_DLL) \
    137         /usr/local/lib32/qt4/libQtCore$(SUFF_DLL) \
     137        /usr/local/lib32/qt5/libQtCore$(SUFF_DLL) \
    138138        /usr/local/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \
    139         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    140         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
    141         $(PATH_SDK_QT4)/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \
     139        $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \
     140        $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \
     141        $(PATH_SDK_QT5)/lib/i386-linux-gnu/libQtCore$(SUFF_DLL) \
    142142        )))
    143       ifneq ($(PATH_SDK_QT4_LIB.x86),)
    144        export PATH_SDK_QT4_LIB.x86
     143      ifneq ($(PATH_SDK_QT5_LIB.x86),)
     144       export PATH_SDK_QT5_LIB.x86
    145145      endif
    146146     endif
    147      ifeq ($(PATH_SDK_QT4_LIB.amd64),)
    148       PATH_SDK_QT4_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    149         $(PATH_SDK_QT4)/lib64/libQtCore$(SUFF_DLL) \
    150         $(PATH_SDK_QT4)/lib64/qt4/libQtCore$(SUFF_DLL) \
    151         $(PATH_SDK_QT4)/lib/amd64/libQtCore$(SUFF_DLL) \
     147     ifeq ($(PATH_SDK_QT5_LIB.amd64),)
     148      PATH_SDK_QT5_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
     149        $(PATH_SDK_QT5)/lib64/libQtCore$(SUFF_DLL) \
     150        $(PATH_SDK_QT5)/lib64/qt5/libQtCore$(SUFF_DLL) \
     151        $(PATH_SDK_QT5)/lib/amd64/libQtCore$(SUFF_DLL) \
    152152        /usr/lib64/libQtCore$(SUFF_DLL) \
    153         /usr/lib64/qt4/libQtCore$(SUFF_DLL) \
     153        /usr/lib64/qt5/libQtCore$(SUFF_DLL) \
    154154        /usr/lib/amd64/libQtCore$(SUFF_DLL) \
    155155        /usr/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \
    156156        /usr/local/lib64/libQtCore$(SUFF_DLL) \
    157         /usr/local/lib64/qt4/libQtCore$(SUFF_DLL) \
     157        /usr/local/lib64/qt5/libQtCore$(SUFF_DLL) \
    158158        /usr/local/lib/amd64/libQtCore$(SUFF_DLL) \
    159159        /usr/local/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \
    160         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    161         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
    162         $(PATH_SDK_QT4)/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \
     160        $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \
     161        $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \
     162        $(PATH_SDK_QT5)/lib/x86_64-linux-gnu/libQtCore$(SUFF_DLL) \
    163163        )))
    164       ifneq ($(PATH_SDK_QT4_LIB.amd64),)
    165        export PATH_SDK_QT4_LIB.amd64
     164      ifneq ($(PATH_SDK_QT5_LIB.amd64),)
     165       export PATH_SDK_QT5_LIB.amd64
    166166      endif
    167167     endif
    168168
    169169     # And finally, the library path for KBUILD_TARGET.
    170      ifeq ($(PATH_SDK_QT4_LIB),)
    171       PATH_SDK_QT4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET_ARCH))
    172       ifeq ($(PATH_SDK_QT4_LIB),)
    173        PATH_SDK_QT4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
    174         $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \
    175         $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \
     170     ifeq ($(PATH_SDK_QT5_LIB),)
     171      PATH_SDK_QT5_LIB := $(PATH_SDK_QT5_LIB.$(KBUILD_TARGET_ARCH))
     172      ifeq ($(PATH_SDK_QT5_LIB),)
     173       PATH_SDK_QT5_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \
     174        $(PATH_SDK_QT5)/lib/libQtCore$(SUFF_DLL) \
     175        $(PATH_SDK_QT5)/lib/qt5/libQtCore$(SUFF_DLL) \
    176176        /usr/lib/libQtCore$(SUFF_DLL) \
    177         /usr/lib/qt4/libQtCore$(SUFF_DLL) \
     177        /usr/lib/qt5/libQtCore$(SUFF_DLL) \
    178178        /usr/local/lib/libQtCore$(SUFF_DLL) \
    179         /usr/local/lib/qt4/libQtCore$(SUFF_DLL) \
     179        /usr/local/lib/qt5/libQtCore$(SUFF_DLL) \
    180180        )))
    181181      endif
    182       ifneq ($(PATH_SDK_QT4_LIB),)
    183        export PATH_SDK_QT4_LIB
     182      ifneq ($(PATH_SDK_QT5_LIB),)
     183       export PATH_SDK_QT5_LIB
    184184      endif
    185185     endif
     
    189189  endif
    190190  # Found it?
    191   ifeq ($(PATH_SDK_QT4),)
    192    $(warning kBuild: Couldn't find the Qt4 headers and libaries...)
    193    PATH_SDK_QT4 := $(KBUILD_DEVTOOLS_TRG)/qt/not-found
     191  ifeq ($(PATH_SDK_QT5),)
     192   $(warning kBuild: Couldn't find the Qt5 headers and libaries...)
     193   PATH_SDK_QT5 := $(KBUILD_DEVTOOLS_TRG)/qt/not-found
    194194  endif
    195195 endif
    196196else
    197197 # Resolve any fancy stuff once and for all.
    198  PATH_SDK_QT4 := $(PATH_SDK_QT4)
     198 PATH_SDK_QT5 := $(PATH_SDK_QT5)
    199199endif
    200200
     
    202202# build it on the mac. The .dmg installs into Frameworks but builds into lib.
    203203ifeq ($(KBUILD_TARGET),darwin)
    204  ifndef PATH_SDK_QT4_LIB
    205   ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
    206    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
     204 ifndef PATH_SDK_QT5_LIB
     205  ifneq ($(wildcard $(PATH_SDK_QT5)/Frameworks),)
     206   PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/Frameworks
    207207  else
    208    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
     208   PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/lib
    209209  endif
    210210 endif
    211211else
    212  PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    213  PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
     212 PATH_SDK_QT5_LIB ?= $(PATH_SDK_QT5)/lib
     213 PATH_SDK_QT5_INC ?= $(PATH_SDK_QT5)/include
    214214endif
    215215
     
    219219
    220220#
    221 # The QT4 tool.
    222 #
    223 # This is implemented here rather than in tools/QT4.kmk to enforce the global USES.
     221# The QT5 tool.
     222#
     223# This is implemented here rather than in tools/QT5.kmk to enforce the global USES.
    224224# It also makes things easier to develop, with fewer files I mean.
    225225#
    226 TOOL_QT4 = Qt4
     226TOOL_QT5 = Qt5
    227227
    228228# Tool Specific Properties
    229 #       PATH_TOOL_QT4     - Obsolete.
    230 #       PATH_TOOL_QT4_BIN - The
    231 #       TOOL_QT4_BIN_SUFF -
    232 if !defined(PATH_TOOL_QT4_BIN) && defined(PATH_TOOL_QT4)
    233  PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4)/bin
    234 endif
    235 ifndef PATH_TOOL_QT4_BIN
    236  PATH_TOOL_QT4_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/qt/v4*/bin)))
    237  if "$(PATH_TOOL_QT4_BIN)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != ""
    238   PATH_TOOL_QT4_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/qt/v4*/bin)))
    239  endif
    240  ifeq ($(PATH_TOOL_QT4_BIN),)
    241   ifdef TOOL_QT4_BIN_SUFF
    242    TOOL_QT4_BIN_SUFF := $(TOOL_QT4_BIN_SUFF)
     229#       PATH_TOOL_QT5     - Obsolete.
     230#       PATH_TOOL_QT5_BIN - The
     231#       TOOL_QT5_BIN_SUFF -
     232if !defined(PATH_TOOL_QT5_BIN) && defined(PATH_TOOL_QT5)
     233 PATH_TOOL_QT5_BIN := $(PATH_TOOL_QT5)/bin
     234endif
     235ifndef PATH_TOOL_QT5_BIN
     236 PATH_TOOL_QT5_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/qt/v4*/bin)))
     237 if "$(PATH_TOOL_QT5_BIN)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != ""
     238  PATH_TOOL_QT5_BIN := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/qt/v4*/bin)))
     239 endif
     240 ifeq ($(PATH_TOOL_QT5_BIN),)
     241  ifdef TOOL_QT5_BIN_SUFF
     242   TOOL_QT5_BIN_SUFF := $(TOOL_QT5_BIN_SUFF)
    243243  endif
    244   # Try looking for moc-qt4 / moc-$(suffix) first.
    245   ifneq ($(TOOL_QT4_BIN_SUFF),)
    246    PATH_TOOL_QT4_BIN := $(patsubst %/moc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \
    247          /usr/lib/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \
    248          /usr/qt/4/bin/moc$(TOOL_QT4_BIN_SUFF) \
    249          /usr/share/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \
    250          /usr/local/bin/moc$(TOOL_QT4_BIN_SUFF) \
    251          /usr/bin/moc$(TOOL_QT4_BIN_SUFF) \
     244  # Try looking for moc-qt5 / moc-$(suffix) first.
     245  ifneq ($(TOOL_QT5_BIN_SUFF),)
     246   PATH_TOOL_QT5_BIN := $(patsubst %/moc$(TOOL_QT5_BIN_SUFF),%,$(firstword $(wildcard \
     247         /usr/lib/qt5/bin/moc$(TOOL_QT5_BIN_SUFF) \
     248         /usr/qt/4/bin/moc$(TOOL_QT5_BIN_SUFF) \
     249         /usr/share/qt5/bin/moc$(TOOL_QT5_BIN_SUFF) \
     250         /usr/local/bin/moc$(TOOL_QT5_BIN_SUFF) \
     251         /usr/bin/moc$(TOOL_QT5_BIN_SUFF) \
    252252         )))
    253253  else
    254    PATH_TOOL_QT4_BIN := $(patsubst %/moc-qt4,%,$(firstword $(wildcard \
    255         /usr/lib/qt4/bin/moc-qt4 \
    256         /usr/qt/4/bin/moc-qt4 \
    257         /usr/share/qt4/bin/moc-qt4 \
    258         /usr/local/bin/moc-qt4 \
    259         /usr/bin/moc-qt4 \
     254   PATH_TOOL_QT5_BIN := $(patsubst %/moc-qt5,%,$(firstword $(wildcard \
     255        /usr/lib/qt5/bin/moc-qt5 \
     256        /usr/qt/4/bin/moc-qt5 \
     257        /usr/share/qt5/bin/moc-qt5 \
     258        /usr/local/bin/moc-qt5 \
     259        /usr/bin/moc-qt5 \
    260260        )))
    261    ifneq ($(PATH_TOOL_QT4_BIN),)
    262     TOOL_QT4_BIN_SUFF := -qt4
     261   ifneq ($(PATH_TOOL_QT5_BIN),)
     262    TOOL_QT5_BIN_SUFF := -qt5
    263263   else
    264     # If no luck, try looking for moc in the qt4 specific locations.
    265     PATH_TOOL_QT4_BIN := $(patsubst %/moc,%,$(firstword $(wildcard \
    266         /usr/lib/qt4/bin/moc \
     264    # If no luck, try looking for moc in the qt5 specific locations.
     265    PATH_TOOL_QT5_BIN := $(patsubst %/moc,%,$(firstword $(wildcard \
     266        /usr/lib/qt5/bin/moc \
    267267        /usr/qt/4/bin/moc \
    268         /usr/share/qt4/bin/moc \
     268        /usr/share/qt5/bin/moc \
    269269        )))
    270270   endif
    271271  endif
    272   # If still no go, try looking for qt3to4 and rcc.
    273   ifeq ($(PATH_TOOL_QT4_BIN),)
    274    PATH_TOOL_QT4_BIN := $(patsubst %/qt3to4,%,$(firstword $(wildcard \
    275         /usr/lib/qt4/bin/qt3to4 \
    276         /usr/qt/4/bin/qt3to4 \
    277         /usr/share/qt4/bin/qt3to4 \
    278         /usr/local/bin/qt3to4 \
    279         /usr/bin/qt3to4 \
     272  # If still no go, try looking for qt4to5 and rcc.
     273  ifeq ($(PATH_TOOL_QT5_BIN),)
     274   PATH_TOOL_QT5_BIN := $(patsubst %/qt4to5,%,$(firstword $(wildcard \
     275        /usr/lib/qt5/bin/qt4to5 \
     276        /usr/qt/4/bin/qt4to5 \
     277        /usr/share/qt5/bin/qt4to5 \
     278        /usr/local/bin/qt4to5 \
     279        /usr/bin/qt4to5 \
    280280        )))
    281281  endif
    282   ifeq ($(PATH_TOOL_QT4_BIN),)
    283    PATH_TOOL_QT4_BIN := $(patsubst %/rcc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \
    284         /usr/lib/qt4/bin/rcc$(TOOL_QT4_BIN_SUFF) \
    285         /usr/qt/4/bin/rcc$(TOOL_QT4_BIN_SUFF) \
    286         /usr/share/qt4/bin/rcc$(TOOL_QT4_BIN_SUFF) \
    287         /usr/local/bin/rcc$(TOOL_QT4_BIN_SUFF) \
    288         /usr/bin/rcc$(TOOL_QT4_BIN_SUFF) \
     282  ifeq ($(PATH_TOOL_QT5_BIN),)
     283   PATH_TOOL_QT5_BIN := $(patsubst %/rcc$(TOOL_QT5_BIN_SUFF),%,$(firstword $(wildcard \
     284        /usr/lib/qt5/bin/rcc$(TOOL_QT5_BIN_SUFF) \
     285        /usr/qt/4/bin/rcc$(TOOL_QT5_BIN_SUFF) \
     286        /usr/share/qt5/bin/rcc$(TOOL_QT5_BIN_SUFF) \
     287        /usr/local/bin/rcc$(TOOL_QT5_BIN_SUFF) \
     288        /usr/bin/rcc$(TOOL_QT5_BIN_SUFF) \
    289289        )))
    290290  endif
    291   if "$(PATH_TOOL_QT4_BIN)" == "" && "$(TOOL_QT4_BIN_SUFF)" != ""
    292    PATH_TOOL_QT4_BIN := $(patsubst %/rcc,%,$(firstword $(wildcard \
    293         /usr/lib/qt4/bin/rcc \
     291  if "$(PATH_TOOL_QT5_BIN)" == "" && "$(TOOL_QT5_BIN_SUFF)" != ""
     292   PATH_TOOL_QT5_BIN := $(patsubst %/rcc,%,$(firstword $(wildcard \
     293        /usr/lib/qt5/bin/rcc \
    294294        /usr/qt/4/bin/rcc \
    295         /usr/share/qt4/bin/rcc \
     295        /usr/share/qt5/bin/rcc \
    296296        /usr/local/bin/rcc \
    297297        /usr/bin/rcc \
    298298        )))
    299299  endif
    300   ifneq ($(PATH_TOOL_QT4_BIN),)
    301    export PATH_TOOL_QT4_BIN
     300  ifneq ($(PATH_TOOL_QT5_BIN),)
     301   export PATH_TOOL_QT5_BIN
    302302  endif
    303303 endif
     
    305305else
    306306 # Resolve any fancy stuff once and for all.
    307  PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4_BIN)
    308 endif
    309 ifneq ($(PATH_TOOL_QT4_BIN),)
    310  TOOL_QT4_MOC       ?= $(PATH_TOOL_QT4_BIN)/moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    311  TOOL_QT4_UIC       ?= $(PATH_TOOL_QT4_BIN)/uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    312  ifndef TOOL_QT4_RCC
    313   TOOL_QT4_RCC      := $(PATH_TOOL_QT4_BIN)/rcc$(HOST_SUFF_EXE)
    314   ifeq ($(wildcard $(TOOL_QT4_RCC)),)
    315    TOOL_QT4_RCC     := $(PATH_TOOL_QT4_BIN)/rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
     307 PATH_TOOL_QT5_BIN := $(PATH_TOOL_QT5_BIN)
     308endif
     309ifneq ($(PATH_TOOL_QT5_BIN),)
     310 TOOL_QT5_MOC       ?= $(PATH_TOOL_QT5_BIN)/moc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     311 TOOL_QT5_UIC       ?= $(PATH_TOOL_QT5_BIN)/uic$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     312 ifndef TOOL_QT5_RCC
     313  TOOL_QT5_RCC      := $(PATH_TOOL_QT5_BIN)/rcc$(HOST_SUFF_EXE)
     314  ifeq ($(wildcard $(TOOL_QT5_RCC)),)
     315   TOOL_QT5_RCC     := $(PATH_TOOL_QT5_BIN)/rcc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
    316316  endif
    317317 endif
    318  TOOL_QT4_LRC       ?= $(PATH_TOOL_QT4_BIN)/lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    319  TOOL_QT4_LUPDATE   ?= $(PATH_TOOL_QT4_BIN)/lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
     318 TOOL_QT5_LRC       ?= $(PATH_TOOL_QT5_BIN)/lrelease$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     319 TOOL_QT5_LUPDATE   ?= $(PATH_TOOL_QT5_BIN)/lupdate$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
    320320else
    321321 # Pathless, relies on the environment.
    322  TOOL_QT4_MOC       ?= moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    323  TOOL_QT4_UIC       ?= uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    324  TOOL_QT4_RCC       ?= rcc$(HOST_SUFF_EXE)
    325  TOOL_QT4_LRC       ?= lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
    326  TOOL_QT4_LUPDATE   ?= lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE)
     322 TOOL_QT5_MOC       ?= moc$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     323 TOOL_QT5_UIC       ?= uic$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     324 TOOL_QT5_RCC       ?= rcc$(HOST_SUFF_EXE)
     325 TOOL_QT5_LRC       ?= lrelease$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
     326 TOOL_QT5_LUPDATE   ?= lupdate$(TOOL_QT5_BIN_SUFF)$(HOST_SUFF_EXE)
    327327endif
    328328
    329329# General Properties used by kBuild and/or units/qt.kmk
    330 TOOL_QT4_MOCFLAGS           ?=
    331 TOOL_QT4_MOCINCS            ?=
    332 TOOL_QT4_MOCDEFS            ?=
    333 TOOL_QT4_MOCDEFS.darwin     ?= __APPLE__ __GNUC__
    334 TOOL_QT4_MOCDEFS.solaris    ?= __sun
    335 TOOL_QT4_MOCDEFS.win.amd64  ?= WIN64
    336 TOOL_QT4_MOCDEFS.win.x86    ?= WIN32
     330TOOL_QT5_MOCFLAGS           ?=
     331TOOL_QT5_MOCINCS            ?=
     332TOOL_QT5_MOCDEFS            ?=
     333TOOL_QT5_MOCDEFS.darwin     ?= __APPLE__ __GNUC__
     334TOOL_QT5_MOCDEFS.solaris    ?= __sun
     335TOOL_QT5_MOCDEFS.win.amd64  ?= WIN64
     336TOOL_QT5_MOCDEFS.win.x86    ?= WIN32
    337337
    338338
     
    347347# @param    $(outbase)  Output basename (full). Use this for list files and such.
    348348#
    349 TOOL_QT4_MOC_CPP_DEPEND =
    350 TOOL_QT4_MOC_CPP_DEPORD =
    351 TOOL_QT4_MOC_CPP_OUTPUT =
    352 TOOL_QT4_MOC_CPP_OUTPUT_MAYBE =
    353 define TOOL_QT4_MOC_CPP_CMDS
    354         $(QUIET)$(TOOL_QT4_MOC)\
     349TOOL_QT5_MOC_CPP_DEPEND =
     350TOOL_QT5_MOC_CPP_DEPORD =
     351TOOL_QT5_MOC_CPP_OUTPUT =
     352TOOL_QT5_MOC_CPP_OUTPUT_MAYBE =
     353define TOOL_QT5_MOC_CPP_CMDS
     354        $(QUIET)$(TOOL_QT5_MOC)\
    355355                $(flags)\
    356356                $(addprefix -I, $(incs))\
     
    370370# @param    $(outbase)  Output basename (full). Use this for list files and such.
    371371#
    372 TOOL_QT4_MOC_HPP_DEPEND =
    373 TOOL_QT4_MOC_HPP_DEPORD =
    374 TOOL_QT4_MOC_HPP_OUTPUT =
    375 TOOL_QT4_MOC_HPP_OUTPUT_MAYBE =
    376 define TOOL_QT4_MOC_HPP_CMDS
    377         $(QUIET)$(TOOL_QT4_MOC)\
     372TOOL_QT5_MOC_HPP_DEPEND =
     373TOOL_QT5_MOC_HPP_DEPORD =
     374TOOL_QT5_MOC_HPP_OUTPUT =
     375TOOL_QT5_MOC_HPP_OUTPUT_MAYBE =
     376define TOOL_QT5_MOC_HPP_CMDS
     377        $(QUIET)$(TOOL_QT5_MOC)\
    378378                $(flags)\
    379379                $(addprefix -I, $(incs))\
     
    393393# @param    $(outbase)  Output basename (full). Use this for list files and such.
    394394#
    395 TOOL_QT4_UIC_UI_DEPEND =
    396 TOOL_QT4_UIC_UI_DEPORD =
    397 TOOL_QT4_UIC_UI_OUTPUT =
    398 TOOL_QT4_UIC_UI_OUTPUT_MAYBE =
    399 define TOOL_QT4_UIC_UI_CMDS
    400         $(QUIET)$(TOOL_QT4_UIC)\
     395TOOL_QT5_UIC_UI_DEPEND =
     396TOOL_QT5_UIC_UI_DEPORD =
     397TOOL_QT5_UIC_UI_OUTPUT =
     398TOOL_QT5_UIC_UI_OUTPUT_MAYBE =
     399define TOOL_QT5_UIC_UI_CMDS
     400        $(QUIET)$(TOOL_QT5_UIC)\
    401401                $(flags)\
    402402                -o $(out)\
     
    415415#
    416416# @remarks  The sed script generating the dependency file is a bit naive.
    417 TOOL_QT4_RCC_QRC_DEPEND =
    418 TOOL_QT4_RCC_QRC_DEPORD =
    419 TOOL_QT4_RCC_QRC_OUTPUT =
    420 TOOL_QT4_RCC_QRC_OUTPUT_MAYBE =
    421 define TOOL_QT4_RCC_QRC_CMDS
    422         $(QUIET)$(TOOL_QT4_RCC)\
     417TOOL_QT5_RCC_QRC_DEPEND =
     418TOOL_QT5_RCC_QRC_DEPORD =
     419TOOL_QT5_RCC_QRC_OUTPUT =
     420TOOL_QT5_RCC_QRC_OUTPUT_MAYBE =
     421define TOOL_QT5_RCC_QRC_CMDS
     422        $(QUIET)$(TOOL_QT5_RCC)\
    423423                $(flags)\
    424424                -o $(out)\
     
    455455# @param    $(outbase)  Output basename (full). Use this for list files and such.
    456456#
    457 TOOL_QT4_LRC_TS_DEPEND =
    458 TOOL_QT4_LRC_TS_DEPORD =
    459 TOOL_QT4_LRC_TS_OUTPUT =
    460 TOOL_QT4_LRC_TS_OUTPUT_MAYBE =
    461 define TOOL_QT4_LRC_TS_CMDS
    462         $(QUIET)$(TOOL_QT4_LRC)\
     457TOOL_QT5_LRC_TS_DEPEND =
     458TOOL_QT5_LRC_TS_DEPORD =
     459TOOL_QT5_LRC_TS_OUTPUT =
     460TOOL_QT5_LRC_TS_OUTPUT_MAYBE =
     461define TOOL_QT5_LRC_TS_CMDS
     462        $(QUIET)$(TOOL_QT5_LRC)\
    463463                $(flags)\
    464464                $(source)\
     
    470470#
    471471#
    472 # Back to the Qt4 unit.
     472# Back to the Qt5 unit.
    473473#
    474474#
     
    477477## wrapper for the lrelease (LRC) command dependencies.
    478478ifndef NO_COMPILE_CMDS_DEPS
    479  _UNIT_QT4_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
    480 else
    481  _UNIT_QT4_LRC_CMDS_DEP =
    482 endif
    483 
    484 ##
    485 # def_unit_qt4_target_pre_handle_translation helper that is expanded before evaluation.
     479 _UNIT_QT5_LRC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_LRC_CMDS_PREV_),$$(commands $(out)),FORCE)
     480else
     481 _UNIT_QT5_LRC_CMDS_DEP =
     482endif
     483
     484##
     485# def_unit_qt5_target_pre_handle_translation helper that is expanded before evaluation.
    486486#
    487487# This is necessary to resolve reference to local variables before doing
     
    489489# later in a different context and the result would be completely wrong.
    490490#
    491 define def_unit_qt4_target_pre_handle_translation_dx
     491define def_unit_qt5_target_pre_handle_translation_dx
    492492
    493493$(out) + $(more_output) +| $(maybe_output): \
    494494                $(deps) \
    495                 $(value _UNIT_QT4_LRC_CMDS_DEP) \
     495                $(value _UNIT_QT5_LRC_CMDS_DEP) \
    496496                | \
    497497                $(orderdeps)
     
    503503ifndef NO_COMPILE_CMDS_DEPS
    504504        %$$(QUIET2)$$(APPEND) '$(dep)'
    505         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_LRC_CMDS_PREV_'
     505        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_LRC_CMDS_PREV_'
    506506        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    507507        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    511511$(target)-inst-nls_SOURCES += $(out)
    512512
    513 endef # def_unit_qt4_target_pre_handle_translation_dx
     513endef # def_unit_qt5_target_pre_handle_translation_dx
    514514
    515515##
     
    520520#
    521521# @remarks Invoked via $(evalvalctx ).
    522 define def_unit_qt4_target_pre_handle_translation
     522define def_unit_qt5_target_pre_handle_translation
    523523local type      := LRC
    524524
     
    556556 $(eval includedep $(dep))
    557557endif
    558 $(eval $(def_unit_qt4_target_pre_handle_translation_dx))
    559 
    560 endef # def_unit_qt4_target_pre_handle_translation
     558$(eval $(def_unit_qt5_target_pre_handle_translation_dx))
     559
     560endef # def_unit_qt5_target_pre_handle_translation
    561561
    562562
     
    564564## wrapper for the UIC command dependencies.
    565565ifndef NO_COMPILE_CMDS_DEPS
    566  _UNIT_QT4_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_RCC_CMDS_PREV_),$$(commands $(out)),FORCE)
    567 else
    568  _UNIT_QT4_RCC_CMDS_DEP =
    569 endif
    570 
    571 ##
    572 # def_unit_qt4_target_pre_handle_qrc helper that is expanded before evaluation.
     566 _UNIT_QT5_RCC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_RCC_CMDS_PREV_),$$(commands $(out)),FORCE)
     567else
     568 _UNIT_QT5_RCC_CMDS_DEP =
     569endif
     570
     571##
     572# def_unit_qt5_target_pre_handle_qrc helper that is expanded before evaluation.
    573573#
    574574# This is necessary to resolve reference to local variables before doing
     
    576576# later in a different context and the result would be completely wrong.
    577577#
    578 define def_unit_qt4_target_pre_handle_rcc_dx
     578define def_unit_qt5_target_pre_handle_rcc_dx
    579579
    580580$(out) +| $(realout) $(more_output) $(maybe_output): \
    581581                $(deps) \
    582                 $(value _UNIT_QT4_RCC_CMDS_DEP) \
     582                $(value _UNIT_QT5_RCC_CMDS_DEP) \
    583583                | \
    584584                $(orderdeps)
     
    591591ifndef NO_COMPILE_CMDS_DEPS
    592592        %$$(QUIET2)$$(APPEND) '$(dep)'
    593         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_RCC_CMDS_PREV_'
     593        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_RCC_CMDS_PREV_'
    594594        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    595595        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    600600$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    601601
    602 endef # def_unit_qt4_target_pre_handle_rcc_dx
     602endef # def_unit_qt5_target_pre_handle_rcc_dx
    603603
    604604##
     
    606606#
    607607# @remarks $(evalvalctx me).
    608 define def_unit_qt4_src_handler_qrc
     608define def_unit_qt5_src_handler_qrc
    609609local type      := RCC
    610610
     
    643643 $(eval includedep $(dep))
    644644endif
    645 $(eval $(def_unit_qt4_target_pre_handle_rcc_dx))
    646 
    647 endef # def_unit_qt4_src_handler_qrc
     645$(eval $(def_unit_qt5_target_pre_handle_rcc_dx))
     646
     647endef # def_unit_qt5_src_handler_qrc
    648648
    649649
     
    651651## wrapper for the UIC command dependencies.
    652652ifndef NO_COMPILE_CMDS_DEPS
    653  _UNIT_QT4_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_UIC_CMDS_PREV_),$$(commands $(out)),FORCE)
    654 else
    655  _UNIT_QT4_UIC_CMDS_DEP =
    656 endif
    657 
    658 ##
    659 # def_unit_qt4_src_handler_ui helper that is expanded before evaluation.
     653 _UNIT_QT5_UIC_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_UIC_CMDS_PREV_),$$(commands $(out)),FORCE)
     654else
     655 _UNIT_QT5_UIC_CMDS_DEP =
     656endif
     657
     658##
     659# def_unit_qt5_src_handler_ui helper that is expanded before evaluation.
    660660#
    661661# This is necessary to resolve reference to local variables before doing
     
    663663# later in a different context and the result would be completely wrong.
    664664#
    665 define def_unit_qt4_target_pre_handle_ui_dx
     665define def_unit_qt5_target_pre_handle_ui_dx
    666666
    667667$(out) +| $(realout) $(more_output) $(maybe_output): \
    668668                $(deps) \
    669                 $(value _UNIT_QT4_UIC_CMDS_DEP) \
     669                $(value _UNIT_QT5_UIC_CMDS_DEP) \
    670670                | \
    671671                $(orderdeps)
     
    678678ifndef NO_COMPILE_CMDS_DEPS
    679679        %$$(QUIET2)$$(APPEND) '$(dep)'
    680         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_UIC_CMDS_PREV_'
     680        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_UIC_CMDS_PREV_'
    681681        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    682682        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    686686$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    687687
    688 endef # def_unit_qt4_target_pre_handle_ui_dx
     688endef # def_unit_qt5_target_pre_handle_ui_dx
    689689
    690690##
     
    692692#
    693693# @remarks $(evalvalctx me).
    694 define def_unit_qt4_src_handler_ui
     694define def_unit_qt5_src_handler_ui
    695695local type      := UIC
    696696
     
    729729 $(eval includedep $(dep))
    730730endif
    731 $(eval $(def_unit_qt4_target_pre_handle_ui_dx))
    732 
    733 endef # def_unit_qt4_src_handler_ui
     731$(eval $(def_unit_qt5_target_pre_handle_ui_dx))
     732
     733endef # def_unit_qt5_src_handler_ui
    734734
    735735
     
    737737## wrapper for the MOC command dependencies.
    738738ifndef NO_COMPILE_CMDS_DEPS
    739  _UNIT_QT4_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)
    740 else
    741  _UNIT_QT4_MOC_HPP_CMDS_DEP =
    742 endif
    743 
    744 ##
    745 # def_unit_qt4_target_pre_handle_moc_hdr helper that is expanded before evaluation.
     739 _UNIT_QT5_MOC_HPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_MOC_HPP_CMDS_PREV_),$$(commands $(out)),FORCE)
     740else
     741 _UNIT_QT5_MOC_HPP_CMDS_DEP =
     742endif
     743
     744##
     745# def_unit_qt5_target_pre_handle_moc_hdr helper that is expanded before evaluation.
    746746#
    747747# This is necessary to resolve reference to local variables before doing
     
    749749# later in a different context and the result would be completely wrong.
    750750#
    751 define def_unit_qt4_target_pre_handle_moc_hdr_dx
     751define def_unit_qt5_target_pre_handle_moc_hdr_dx
    752752
    753753$(out) +| $(realout) $(more_output) $(maybe_output): \
    754754                $(deps) \
    755                 $(value _UNIT_QT4_MOC_HPP_CMDS_DEP) \
     755                $(value _UNIT_QT5_MOC_HPP_CMDS_DEP) \
    756756                | \
    757757                $(orderdeps)
     
    764764ifndef NO_COMPILE_CMDS_DEPS
    765765        %$$(QUIET2)$$(APPEND) '$(dep)'
    766         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_MOC_HPP_CMDS_PREV_'
     766        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_MOC_HPP_CMDS_PREV_'
    767767        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    768768        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    785785#
    786786# @remarks Invoked via $(evalvalctx ).
    787 define def_unit_qt4_target_pre_handle_moc_hdr
     787define def_unit_qt5_target_pre_handle_moc_hdr
    788788local type      := MOC
    789789
     
    823823 $(eval includedep $(dep))
    824824endif
    825 $(eval $(def_unit_qt4_target_pre_handle_moc_hdr_dx))
    826 
    827 endef # def_unit_qt4_target_pre_handle_moc_hdr
     825$(eval $(def_unit_qt5_target_pre_handle_moc_hdr_dx))
     826
     827endef # def_unit_qt5_target_pre_handle_moc_hdr
    828828
    829829
    830830## wrapper for the MOC command dependencies.
    831831ifndef NO_COMPILE_CMDS_DEPS
    832  _UNIT_QT4_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT4_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)
    833 else
    834  _UNIT_QT4_MOC_CPP_CMDS_DEP =
    835 endif
    836 
    837 ##
    838 # def_unit_qt4_target_pre_handle_moc_src helper that is expanded before evaluation.
     832 _UNIT_QT5_MOC_CPP_CMDS_DEP = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_QT5_MOC_CPP_CMDS_PREV_),$$(commands $(out)),FORCE)
     833else
     834 _UNIT_QT5_MOC_CPP_CMDS_DEP =
     835endif
     836
     837##
     838# def_unit_qt5_target_pre_handle_moc_src helper that is expanded before evaluation.
    839839#
    840840# This is necessary to resolve reference to local variables before doing
     
    842842# later in a different context and the result would be completely wrong.
    843843#
    844 define def_unit_qt4_target_pre_handle_moc_src_dx
     844define def_unit_qt5_target_pre_handle_moc_src_dx
    845845
    846846$(out) +| $(realout) $(more_output) $(maybe_output): \
    847847                $(deps) \
    848                 $(value _UNIT_QT4_MOC_CPP_CMDS_DEP) \
     848                $(value _UNIT_QT5_MOC_CPP_CMDS_DEP) \
    849849                | \
    850850                $(orderdeps)
     
    857857ifndef NO_COMPILE_CMDS_DEPS
    858858        %$$(QUIET2)$$(APPEND) '$(dep)'
    859         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT4_MOC_CPP_CMDS_PREV_'
     859        %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_QT5_MOC_CPP_CMDS_PREV_'
    860860        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
    861861        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     
    874874#
    875875# @remarks Invoked via $(evalvalctx ).
    876 define def_unit_qt4_target_pre_handle_moc_src
     876define def_unit_qt5_target_pre_handle_moc_src
    877877local type      := MOC
    878878
     
    912912 $(eval includedep $(dep))
    913913endif
    914 $(eval $(def_unit_qt4_target_pre_handle_moc_src_dx))
    915 
    916 endef # def_unit_qt4_target_pre_handle_moc_src
     914$(eval $(def_unit_qt5_target_pre_handle_moc_src_dx))
     915
     916endef # def_unit_qt5_target_pre_handle_moc_src
    917917
    918918
    919919##
    920920# Adds sources containing Q_OBJECT to QT_MOCSRCS.
    921 define def_unit_qt4_target_pre_cpp_source
     921define def_unit_qt5_target_pre_cpp_source
    922922ifneq ($(file-size $(source)),-1)
    923923 ifneq ($(strip $(shell $(SED) -f $(KBUILD_PATH)/units/qt-Q_OBJECT.sed $(source))),)
     
    925925 endif
    926926endif
    927 endef # def_unit_qt4_target_pre_cpp_source
     927endef # def_unit_qt5_target_pre_cpp_source
    928928
    929929##
     
    936936# a .moc files and generate rules and dependencies fofor these
    937937#
    938 define def_unit_qt4_target_pre
     938define def_unit_qt5_target_pre
    939939
    940940# Make QTTOOL the default for the specific Qt tools instead of TOOL.
     
    978978ifeq ($(bld_trg),darwin)
    979979 # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
    980  $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    981  $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    982  $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
    983  $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
     980 $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT5_LIB) )
     981 $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT5_LIB) )
     982 $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT5_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
     983 $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
    984984else
    985985 ifeq ($(bld_trg),win)
    986   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )
     986  $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )
    987987  ifeq ($(tool_do),LINK_PROGRAM)
    988    $(eval $(target)_LIBS   += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )
     988   $(eval $(target)_LIBS   += $(PATH_SDK_QT5_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )
    989989  endif
    990990 else
    991   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
    992  endif
    993  $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
     991  $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
     992 endif
     993 $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT5_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT5_INC) )
    994994endif
    995995$(eval $(target)_DEFS      += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
     
    10061006        $($(target)_SOURCES.$(bld_type)) \
    10071007        $($(target)_SOURCES) \
    1008         ), $(evalval def_unit_qt4_target_pre_cpp_source))
     1008        ), $(evalval def_unit_qt5_target_pre_cpp_source))
    10091009endif
    10101010
    10111011# Install source handlers for .ui files.
    10121012$(target)_SRC_HANDLERS += \
    1013          .ui:def_unit_qt4_src_handler_ui \
    1014          .UI:def_unit_qt4_src_handler_ui \
    1015         .qrc:def_unit_qt4_src_handler_qrc \
    1016         .qrc:def_unit_qt4_src_handler_qrc
     1013         .ui:def_unit_qt5_src_handler_ui \
     1014         .UI:def_unit_qt5_src_handler_ui \
     1015        .qrc:def_unit_qt5_src_handler_qrc \
     1016        .qrc:def_unit_qt5_src_handler_qrc
    10171017
    10181018# Calc the MOC and UI output directories and add them to BLDDIRS and INCS.
     
    10321032        $($(target)_QT_MOCSRCS.$(bld_type)) \
    10331033        $($(target)_QT_MOCSRCS) \
    1034         , $(evalvalctx def_unit_qt4_target_pre_handle_moc_src))
     1034        , $(evalvalctx def_unit_qt5_target_pre_handle_moc_src))
    10351035
    10361036# Deal with QT_MOCHDRS.
     
    10421042        $($(target)_QT_MOCHDRS.$(bld_type)) \
    10431043        $($(target)_QT_MOCHDRS) \
    1044         , $(evalvalctx def_unit_qt4_target_pre_handle_moc_hdr))
     1044        , $(evalvalctx def_unit_qt5_target_pre_handle_moc_hdr))
    10451045
    10461046# Deal with QT_TRANSLATIONS.
     
    10661066 $(target)-inst-nls_SOURCES :=
    10671067 $(foreach source, $(translations)\
    1068         , $(evalvalctx def_unit_qt4_target_pre_handle_translation))
    1069 endif
    1070 
    1071 endef # def_unit_qt4_target_pre
     1068        , $(evalvalctx def_unit_qt5_target_pre_handle_translation))
     1069endif
     1070
     1071endef # def_unit_qt5_target_pre
    10721072
    10731073
     
    10751075# Rule for debugging.
    10761076#
    1077 unit-qt4-show-vars:
    1078         @$(ECHO) 'The Qt4 SDK variables:'
    1079         @$(ECHO) '  PATH_SDK_QT4           = "$(PATH_SDK_QT4)"'
    1080         @$(ECHO) '  PATH_SDK_QT4_INC       = "$(PATH_SDK_QT4_INC)"'
    1081         @$(ECHO) '  PATH_SDK_QT4_LIB       = "$(PATH_SDK_QT4_LIB)"'
    1082         @$(ECHO) '  PATH_SDK_QT4_LIB.amd64 = "$(PATH_SDK_QT4_LIB.amd64)"'
    1083         @$(ECHO) '  PATH_SDK_QT4_LIB.x86   = "$(PATH_SDK_QT4_LIB.x86)"'
    1084         @$(ECHO) 'The Qt4 TOOL variables:'
    1085         @$(ECHO) '  PATH_TOOL_QT4_BIN      = "$(PATH_TOOL_QT4_BIN)"'
    1086         @$(ECHO) '  TOOL_QT4_BIN_SUFF      = "$(TOOL_QT4_BIN_SUFF)"'
    1087         @$(ECHO) '  TOOL_QT4_MOC           = "$(TOOL_QT4_MOC)"'
    1088         @$(ECHO) '  TOOL_QT4_UIC           = "$(TOOL_QT4_UIC)"'
    1089         @$(ECHO) '  TOOL_QT4_RCC           = "$(TOOL_QT4_RCC)"'
    1090         @$(ECHO) '  TOOL_QT4_LRC           = "$(TOOL_QT4_LRC)"'
    1091         @$(ECHO) '  TOOL_QT4_LUPDATE       = "$(TOOL_QT4_LUPDATE)"'
    1092 
     1077unit-qt5-show-vars:
     1078        @$(ECHO) 'The Qt5 SDK variables:'
     1079        @$(ECHO) '  PATH_SDK_QT5           = "$(PATH_SDK_QT5)"'
     1080        @$(ECHO) '  PATH_SDK_QT5_INC       = "$(PATH_SDK_QT5_INC)"'
     1081        @$(ECHO) '  PATH_SDK_QT5_LIB       = "$(PATH_SDK_QT5_LIB)"'
     1082        @$(ECHO) '  PATH_SDK_QT5_LIB.amd64 = "$(PATH_SDK_QT5_LIB.amd64)"'
     1083        @$(ECHO) '  PATH_SDK_QT5_LIB.x86   = "$(PATH_SDK_QT5_LIB.x86)"'
     1084        @$(ECHO) 'The Qt5 TOOL variables:'
     1085        @$(ECHO) '  PATH_TOOL_QT5_BIN      = "$(PATH_TOOL_QT5_BIN)"'
     1086        @$(ECHO) '  TOOL_QT5_BIN_SUFF      = "$(TOOL_QT5_BIN_SUFF)"'
     1087        @$(ECHO) '  TOOL_QT5_MOC           = "$(TOOL_QT5_MOC)"'
     1088        @$(ECHO) '  TOOL_QT5_UIC           = "$(TOOL_QT5_UIC)"'
     1089        @$(ECHO) '  TOOL_QT5_RCC           = "$(TOOL_QT5_RCC)"'
     1090        @$(ECHO) '  TOOL_QT5_LRC           = "$(TOOL_QT5_LRC)"'
     1091        @$(ECHO) '  TOOL_QT5_LUPDATE       = "$(TOOL_QT5_LUPDATE)"'
     1092
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette