@ -199,7 +199,7 @@ class _Macro:
class Makefile :
""" The base class for the different types of Makefiles.
"""
def __init__ ( self , configuration , console = 0 , qt= 0 , opengl = 0 , python = 0 ,
def __init__ ( self , configuration , console = 0 , t qt= 0 , opengl = 0 , python = 0 ,
threaded = 0 , warnings = 1 , debug = 0 , dir = None ,
makefile = " Makefile " , installs = None , universal = None ,
arch = None ) :
@ -208,13 +208,13 @@ class Makefile:
configuration is the current configuration .
console is set if the target is a console ( rather than windows ) target .
qt is set if the target uses Qt. For Qt v4 a list of Qt libraries may
t qt is set if the target uses T Qt. For Qt v4 a list of Qt libraries may
be specified and a simple non - zero value implies QtCore and QtGui .
opengl is set if the target uses OpenGL .
python is set if the target #includes Python.h.
debug is set to generated a debugging version of the target .
threaded is set if the target requires thread support . It is
automatically set if the target uses Qt and Qt has thread support
automatically set if the target uses T Qt and T Qt has thread support
enabled .
warnings is set if compiler warning messages are required .
debug is set if debugging symbols should be generated .
@ -229,17 +229,17 @@ class Makefile:
arch is the space separated MacOS / X architectures to build . If it is
None then it is taken from the configuration .
"""
if qt:
if not hasattr ( configuration , " qt_version" ) :
error ( " The target uses Qt but pyqtconfig has not been imported." )
if t qt:
if not hasattr ( configuration , " t qt_version" ) :
error ( " The target uses T Qt but pyt qtconfig has not been imported." )
self . _threaded = configuration . qt_threaded
self . _threaded = configuration . t qt_threaded
else :
self . _threaded = threaded
self . config = configuration
self . console = console
self . _ qt = qt
self . _ t qt = t qt
self . _opengl = opengl
self . _python = python
self . _warnings = warnings
@ -326,14 +326,14 @@ class Makefile:
""" Finalise the macros by doing any consolidation that isn ' t specific
to a Makefile .
"""
# Extract the things we might need from the Windows Qt configuration.
# Note that we used to think that if Qt was built with exceptions, RTTI
# Extract the things we might need from the Windows T Qt configuration.
# Note that we used to think that if T Qt was built with exceptions, RTTI
# and STL support enabled then anything that linked against it also
# needed the same flags. However, detecting this was broken for some
# time and nobody complained. For the moment we'll leave the code in
# but it will never be used.
if self . _ qt:
wcfg = self . config . qt_winconfig. split ( )
if self . _ t qt:
wcfg = self . config . t qt_winconfig. split ( )
win_shared = ( " shared " in wcfg )
win_exceptions = ( " exceptions " in wcfg )
win_rtti = ( " rtti " in wcfg )
@ -394,7 +394,7 @@ class Makefile:
for l in self . extra_libs :
libs . append ( self . platform_lib ( l ) )
if self . _ qt:
if self . _ t qt:
libs . extend ( self . _dependent_libs ( l ) )
libs . extend ( self . optional_list ( " LIBS " ) )
@ -522,9 +522,9 @@ class Makefile:
cxxflags . extend ( self . optional_list ( " CXXFLAGS_THREAD " ) )
lflags . extend ( self . optional_list ( " LFLAGS_THREAD " ) )
if self . _ qt:
if self . _ t qt:
if self . generator != " UNIX " and win_shared :
defines . append ( " QT_DLL" )
defines . append ( " T QT_DLL" )
if not self . _debug :
defines . append ( " TQT_NO_DEBUG " )
@ -533,27 +533,27 @@ class Makefile:
defines . append ( " TQT_THREAD_SUPPORT " )
# Handle library directories.
libdir_ qt = self . optional_list ( " LIBDIR_TQT " )
libdir . extend ( libdir_ qt)
rpaths . extend ( libdir_ qt)
libdir_ t qt = self . optional_list ( " LIBDIR_TQT " )
libdir . extend ( libdir_ t qt)
rpaths . extend ( libdir_ t qt)
# Windows needs the version number appended if Qt is a DLL.
qt_lib = self . config . qt_lib
# Windows needs the version number appended if T Qt is a DLL.
t qt_lib = self . config . t qt_lib
if self . generator in ( " MSVC " , " MSVC.NET " , " BMAKE " ) and win_shared :
qt_lib = qt_lib + version_to_string ( self . config . qt_version) . replace ( " . " , " " )
t qt_lib = t qt_lib + version_to_string ( self . config . t qt_version) . replace ( " . " , " " )
if self . config . qt_edition == " non-commercial " :
qt_lib = qt_lib + " nc "
if self . config . t qt_edition == " non-commercial " :
t qt_lib = t qt_lib + " nc "
libs . append ( self . platform_lib ( qt_lib) )
libs . extend ( self . _dependent_libs ( self . config . qt_lib) )
libs . append ( self . platform_lib ( t qt_lib) )
libs . extend ( self . _dependent_libs ( self . config . t qt_lib) )
# Handle header directories.
try :
specd_base = self . config . qt_data_dir
specd_base = self . config . t qt_data_dir
except AttributeError :
specd_base = self . config . qt_dir
specd_base = self . config . t qt_dir
specd = os . path . join ( specd_base , " mkspecs " , " default " )
@ -562,11 +562,11 @@ class Makefile:
incdir . append ( specd )
qtincdir = self . optional_list ( " INCDIR_TQT " )
t qtincdir = self . optional_list ( " INCDIR_TQT " )
if qtincdir:
if t qtincdir:
# This must go after the module include directories.
incdir . extend ( qtincdir)
incdir . extend ( t qtincdir)
if self . _opengl :
incdir . extend ( self . optional_list ( " INCDIR_OPENGL " ) )
@ -574,7 +574,7 @@ class Makefile:
libdir . extend ( self . optional_list ( " LIBDIR_OPENGL " ) )
libs . extend ( self . optional_list ( " LIBS_OPENGL " ) )
if self . _ qt or self . _opengl :
if self . _ t qt or self . _opengl :
incdir . extend ( self . optional_list ( " INCDIR_X11 " ) )
libdir . extend ( self . optional_list ( " LIBDIR_X11 " ) )
libs . extend ( self . optional_list ( " LIBS_X11 " ) )
@ -680,9 +680,9 @@ class Makefile:
prl_libs = [ ]
if self . generator in ( " MSVC " , " MSVC.NET " , " BMAKE " ) :
prl_name = os . path . join ( self . config . qt_lib_dir, clib + " .prl " )
prl_name = os . path . join ( self . config . t qt_lib_dir, clib + " .prl " )
else :
prl_name = os . path . join ( self . config . qt_lib_dir, " lib " + clib + " .prl " )
prl_name = os . path . join ( self . config . t qt_lib_dir, " lib " + clib + " .prl " )
if os . access ( prl_name , os . F_OK ) :
try :
@ -777,7 +777,7 @@ class Makefile:
olist . append ( root + ext )
for f in bdict [ " tqmoc_headers " ] . split ( ) :
if not self . _ qt:
if not self . _ t qt:
error ( " \" %s \" defines \" tqmoc_headers \" for a non-Qt module. " % bfname )
root , discard = os . path . splitext ( f )
@ -893,7 +893,7 @@ class Makefile:
mfile . write ( " LIBS = %s \n " % ' ' . join ( libs ) )
if self . _ qt:
if self . _ t qt:
mfile . write ( " MOC = %s \n " % _quote ( self . required_string ( " MOC " ) ) )
if self . _src_dir != self . dir :
@ -1163,7 +1163,7 @@ class ModuleMakefile(Makefile):
""" The class that represents a Python extension module Makefile
"""
def __init__ ( self , configuration , build_file , install_dir = None , static = 0 ,
console = 0 , qt= 0 , opengl = 0 , threaded = 0 , warnings = 1 , debug = 0 ,
console = 0 , t qt= 0 , opengl = 0 , threaded = 0 , warnings = 1 , debug = 0 ,
dir = None , makefile = " Makefile " , installs = None , strip = 1 ,
export_all = 0 , universal = None , arch = None ) :
""" Initialise an instance of a module Makefile.
@ -1179,7 +1179,7 @@ class ModuleMakefile(Makefile):
increases the size of the module and slows down module load times but
may avoid problems with modules that use exceptions . The default is 0.
"""
Makefile . __init__ ( self , configuration , console , qt, opengl , 1 , threaded , warnings , debug , dir , makefile , installs , universal , arch )
Makefile . __init__ ( self , configuration , console , t qt, opengl , 1 , threaded , warnings , debug , dir , makefile , installs , universal , arch )
self . _build = self . parse_build_file ( build_file )
self . _install_dir = install_dir
@ -1479,7 +1479,7 @@ class SIPModuleMakefile(ModuleMakefile):
""" The class that represents a SIP-TQt generated module Makefile.
"""
def __init__ ( self , configuration , build_file , install_dir = None , static = 0 ,
console = 0 , qt= 0 , opengl = 0 , threaded = 0 , warnings = 1 , debug = 0 ,
console = 0 , t qt= 0 , opengl = 0 , threaded = 0 , warnings = 1 , debug = 0 ,
dir = None , makefile = " Makefile " , installs = None , strip = 1 ,
export_all = 0 , universal = None , arch = None , prot_is_public = 0 ) :
""" Initialise an instance of a SIP-TQt generated module Makefile.
@ -1491,7 +1491,7 @@ class SIPModuleMakefile(ModuleMakefile):
For all other arguments see ModuleMakefile .
"""
ModuleMakefile . __init__ ( self , configuration , build_file , install_dir ,
static , console , qt, opengl , threaded , warnings , debug , dir ,
static , console , t qt, opengl , threaded , warnings , debug , dir ,
makefile , installs , strip , export_all , universal , arch )
self . _prot_is_public = prot_is_public
@ -1512,7 +1512,7 @@ class ProgramMakefile(Makefile):
""" The class that represents a program Makefile.
"""
def __init__ ( self , configuration , build_file = None , install_dir = None ,
console = 0 , qt= 0 , opengl = 0 , python = 0 , threaded = 0 , warnings = 1 ,
console = 0 , t qt= 0 , opengl = 0 , python = 0 , threaded = 0 , warnings = 1 ,
debug = 0 , dir = None , makefile = " Makefile " , installs = None ,
universal = None , arch = None ) :
""" Initialise an instance of a program Makefile.
@ -1521,7 +1521,7 @@ class ProgramMakefile(Makefile):
it is a dictionary instead then its contents are validated .
install_dir is the directory the target will be installed in .
"""
Makefile . __init__ ( self , configuration , console , qt, opengl , python , threaded , warnings , debug , dir , makefile , installs , universal , arch )
Makefile . __init__ ( self , configuration , console , t qt, opengl , python , threaded , warnings , debug , dir , makefile , installs , universal , arch )
self . _install_dir = install_dir