VirtualBox

儲存庫 kBuild 的更動 1765


忽略:
時間撮記:
2008-9-7 下午11:28:08 (16 年 以前)
作者:
bird
訊息:

qt3: more detection work.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/kBuild/units/qt3.kmk

    r1764 r1765  
    5151
    5252# SDK Specific Properties
     53#       PATH_SDK_QT3           - the general location of the Qt3 SDK stuff.
     54#       PATH_SDK_QT3_INC       - the Qt3 include directory.
     55#       PATH_SDK_QT3_LIB       - the Qt3 library directory for KBUILD_TARGET.
     56#       PATH_SDK_QT3_LIB.amd64 - the Qt3 library directory for AMD64.
     57#       PATH_SDK_QT3_LIB.x86   - the Qt3 library directory for X86.
    5358ifndef PATH_SDK_QT3
    5459 PATH_SDK_QT3 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v3*)))
     
    6469   else
    6570    # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT3_LIB* stuff if it doesn't work.
     71    # Try find the general location of the thing by looking for the qm2ts program, then try looking for
     72    # the moc program in likely and unlikely places save /usr[/local]/bin to avoid mistaking it with Qt4.
    6673    PATH_SDK_QT3 := $(patsubst %/bin/qm2ts,%,$(firstword $(wildcard \
    6774        /usr/lib/qt-3.3/bin/qm2ts \
     
    8390    endif
    8491    ifneq ($(PATH_SDK_QT3),)
     92     # Found something! Export the variable for the benefit of recursive make instances.
     93     export PATH_SDK_QT3
     94
     95     # Determin the include directory.
    8596     ifeq ($(PATH_SDK_QT3_INC),)
    86       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 /usr/include/qt3/private/qfiledefs_p.h)))
     97      PATH_SDK_QT3_INC := $(patsubst %/private/qfiledefs_p.h,%,$(firstword $(wildcard \
     98        $(PATH_SDK_QT3)/include/private/qfiledefs_p.h \
     99        $(PATH_SDK_QT3)/include/qt3/private/qfiledefs_p.h \
     100        /usr/include/qt3/private/qfiledefs_p.h)))
     101      ifneq ($(PATH_SDK_QT3_INC),)
     102       export PATH_SDK_QT3_INC
     103      endif
    87104     endif
     105
     106     # Determin the most likely x86 and AMD64 lib directories (only used for making PATH_SDK_QT3_LIB).
    88107     ifeq ($(PATH_SDK_QT3_LIB.x86),)
    89108      PATH_SDK_QT3_LIB.x86   := $(patsubst %/libqt-mt$(SUFF_DLL),%,$(firstword $(wildcard \
     
    101120        $(PATH_SDK_QT3)/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
    102121        )))
     122      ifneq ($(PATH_SDK_QT3_LIB.x86),)
     123       export PATH_SDK_QT3_LIB.x86
     124      endif
    103125     endif
    104126     ifeq ($(PATH_SDK_QT3_LIB.amd64),)
     
    123145        $(PATH_SDK_QT3)/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
    124146        )))
     147      ifneq ($(PATH_SDK_QT3_LIB.amd64),)
     148       export PATH_SDK_QT3_LIB.amd64
     149      endif
    125150     endif
     151
     152     # Determin the KBUILD_TARGET lib directory.
    126153     ifeq ($(PATH_SDK_QT3_LIB),)
    127154      PATH_SDK_QT3_LIB := $(PATH_SDK_QT3_LIB.$(KBUILD_TARGET))
     
    138165        /usr/local/lib/qt3-3/lib/libqt-mt$(SUFF_DLL) \
    139166        )))
     167       ifneq ($(PATH_SDK_QT3_LIB),)
     168        export PATH_SDK_QT3_LIB
     169       endif
    140170      endif
    141171     endif
     172
    142173    endif
    143174   endif # Unices
     
    171202TOOL_QT3 = Qt3
    172203
    173 # Tool Specific Properties
    174 ifndef PATH_TOOL_QT3
    175  PATH_TOOL_QT3 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v3*)))
    176  ifeq ($(PATH_TOOL_QT3),)
    177   PATH_TOOL_QT3 := $(patsubst %/bin/qm2ts,%,$(firstword $(wildcard \
    178         /usr/lib/qt-3.3/bin/qm2ts \
    179         /usr/lib64/qt-3.3/bin/qm2ts \
    180         /usr/qt/3/bin/qm2ts \
    181         $(if $(QTDIR),$(QTDIR)/bin/qm2ts) \
    182         /usr/bin/qm2ts \
    183         /usr/local/bin/qm2ts \
    184         /usr/share/qt3/bin/qm2ts \
    185         )))
    186   ifeq ($(PATH_SDK_QT3),) # Try with moc, but not in /usr/bin and /usr/local/bin.
    187    PATH_TOOL_QT3 := $(patsubst %/bin/moc,%,$(firstword $(wildcard \
    188         /usr/lib/qt-3.3/bin/moc \
    189         /usr/lib64/qt-3.3/bin/moc \
    190         /usr/qt/3/bin/moc \
    191         /usr/share/qt3/bin/moc \
    192         $(if $(QTDIR),$(QTDIR)/bin/moc) \
    193         )))
     204# Tool Specific Properties (PATH_TOOL_QT3_BIN and TOOL_QT3_BIN_SUFF)
     205#       TOOL_QT3_BIN_SUFF - the '-qt3' bit found on debian.
     206#       PATH_TOOL_QT3_BIN - the directory containing moc, uic, lrelease, lupdate and qm2ts.
     207ifndef PATH_TOOL_QT3_BIN
     208 PATH_TOOL_QT3_BIN := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v3*/bin)))
     209 ifeq ($(PATH_TOOL_QT3_BIN),)
     210  if1of ($(KBUILD_HOST), win os2)
     211   # sorry, no joy here.
     212  else
     213   ifdef TOOL_QT3_BIN_SUFF
     214    TOOL_QT3_BIN_SUFF := $(TOOL_QT3_BIN_SUFF)
     215   endif
     216    PATH_TOOL_QT3_BIN := $(patsubst %/qm2ts$(TOOL_QT3_BIN_SUFF),%,$(firstword $(wildcard \
     217        /usr/lib/qt-3.3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     218        /usr/lib64/qt-3.3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     219        /usr/qt/3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     220        $(if $(QTDIR),$(QTDIR)/bin/qm2ts$(TOOL_QT3_BIN_SUFF)) \
     221        /usr/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     222        /usr/local/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     223        /usr/share/qt3/bin/qm2ts$(TOOL_QT3_BIN_SUFF) \
     224        )))
     225   ifeq ($(PATH_TOOL_QT3_BIN),)
     226    # If we couldn't find the qt3 specific tool qm2ts, debian and other skip
     227    # this (thanks a bundle). Try with look for 'moc' with a '-qt3' extension,
     228    # then for just moc. In the latter case don't search /usr[/local]/bin to
     229    # void finding the qt4 tools and messing up.
     230    ifeq ($(TOOL_QT3_BIN_SUFF),)
     231     PATH_TOOL_QT3_BIN := $(patsubst %/moc-qt3,%,$(firstword $(wildcard \
     232        /usr/bin/moc-qt3 \
     233        /usr/local/bin/moc-qt3 \
     234        /usr/lib/qt-3.3/bin/moc-qt3 \
     235        /usr/lib64/qt-3.3/bin/moc-qt3 \
     236        /usr/qt/3/bin/moc-qt3 \
     237        /usr/share/qt3/bin/moc-qt3 \
     238        $(if $(QTDIR),$(QTDIR)/bin/moc-qt3) \
     239        )))
     240    endif
     241    ifneq ($(PATH_TOOL_QT3_BIN),)
     242     export TOOL_QT3_BIN_SUFF := -qt3
     243    else
     244     PATH_TOOL_QT3_BIN := $(patsubst %/moc$(TOOL_QT3_BIN_SUFF),%,$(firstword $(wildcard \
     245        /usr/lib/qt-3.3/bin/moc$(TOOL_QT3_BIN_SUFF) \
     246        /usr/lib64/qt-3.3/bin/moc$(TOOL_QT3_BIN_SUFF) \
     247        /usr/qt/3/bin/moc$(TOOL_QT3_BIN_SUFF) \
     248        /usr/share/qt3/bin/moc$(TOOL_QT3_BIN_SUFF) \
     249        $(if $(QTDIR),$(QTDIR)/bin/moc$(TOOL_QT3_BIN_SUFF)) \
     250        )))
     251    endif
     252   endif
     253   ifneq ($(PATH_TOOL_QT3_BIN),)
     254    export PATH_TOOL_QT3_BIN
     255   endif
    194256  endif
    195257 endif
     
    197259else
    198260 # Resolve any fancy stuff once and for all.
    199  PATH_TOOL_QT3 := $(PATH_TOOL_QT3)
    200 endif
    201 ifneq ($(PATH_TOOL_QT3),)
    202  PATH_TOOL_QT3_BIN  ?= $(PATH_TOOL_QT3)/bin
    203  TOOL_QT3_MOC       ?= $(PATH_TOOL_QT3_BIN)/moc$(HOST_SUFF_EXE)
    204  TOOL_QT3_UIC       ?= $(PATH_TOOL_QT3_BIN)/uic$(HOST_SUFF_EXE)
    205  TOOL_QT3_LRC       ?= $(PATH_TOOL_QT3_BIN)/lrelease$(HOST_SUFF_EXE)
    206  TOOL_QT3_LUPDATE   ?= $(PATH_TOOL_QT3_BIN)/lupdate$(HOST_SUFF_EXE)
     261 PATH_TOOL_QT3_BIN := $(PATH_TOOL_QT3_BIN)
     262 TOOL_QT3_BIN_SUFF := $(TOOL_QT3_BIN_SUFF)
     263endif
     264ifneq ($(PATH_TOOL_QT3_BIN),)
     265 TOOL_QT3_MOC       ?= $(PATH_TOOL_QT3_BIN)/moc$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     266 TOOL_QT3_UIC       ?= $(PATH_TOOL_QT3_BIN)/uic$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     267 TOOL_QT3_LRC       ?= $(PATH_TOOL_QT3_BIN)/lrelease$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     268 TOOL_QT3_LUPDATE   ?= $(PATH_TOOL_QT3_BIN)/lupdate$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
    207269else
    208270 # Pathless, relies on the environment.
    209  TOOL_QT3_MOC       ?= moc$(HOST_SUFF_EXE)
    210  TOOL_QT3_UIC       ?= uic$(HOST_SUFF_EXE)
    211  TOOL_QT3_LRC       ?= lrelease$(HOST_SUFF_EXE)
    212  TOOL_QT3_LUPDATE   ?= lupdate$(HOST_SUFF_EXE)
     271 TOOL_QT3_MOC       ?= moc$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     272 TOOL_QT3_UIC       ?= uic$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     273 TOOL_QT3_LRC       ?= lrelease$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
     274 TOOL_QT3_LUPDATE   ?= lupdate$(TOOL_QT3_BIN_SUFF)$(HOST_SUFF_EXE)
    213275endif
    214276
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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