From 181ce80cf3df9a8f6ba7efd3dee77d8e92158337 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 24 Feb 2023 01:31:21 +0000 Subject: moved the qt tool to qt3. Changed all QT envvars to be now prefixed with QT3 --- CHANGES.txt | 3 ++ RELEASE.txt | 5 +++ SCons/Tool/qt3.py | 6 +--- SCons/Warnings.py | 2 +- test/QT/qt3/QTFLAGS.py | 76 +++++++++++++++++++++--------------------- test/QT/qt3/Tool.py | 12 +++---- test/QT/qt3/copied-env.py | 2 +- test/QT/qt3/empty-env.py | 13 ++++---- test/QT/qt3/generated-ui.py | 5 ++- test/QT/qt3/installed.py | 18 +++++----- test/QT/qt3/manual.py | 8 ++--- test/QT/qt3/qt_warnings.py | 10 +++--- test/QT/qt3/reentrant.py | 2 +- test/QT/qt3/source-from-ui.py | 32 +++++++++--------- test/QT/qt3/up-to-date.py | 2 +- testing/framework/TestSCons.py | 9 +++-- 16 files changed, 105 insertions(+), 100 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6052a21..df06c2f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -41,6 +41,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Fixed Issue #4275 - when outputting compilation db and TEMPFILE was in use, the compilation db would have command lines using the generated tempfile for long command lines, instead of the full command line for the compilation step for the source/target pair. + - Renamed the qt tools to qt3 since the logic in that tool is only for QT version 3. Renamed all env vars + which affect qt3 from QT_ to QT3_. If you are still using SCons to build QT 3 code, you'll need to update + your SConscripts. Note that using 'qt' tool has been deprecated for some time. From David H: - Added JAVAPROCESSORPATH construction variable which populates -processorpath. diff --git a/RELEASE.txt b/RELEASE.txt index 91dbb86..32bb945 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -65,6 +65,11 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY always emitted in the order entered. Sorting is no longer required after Python interpreter improvements. There might be a one-time rebuild of targets that involved such sorted keys in their actions. +- Renamed the 'qt' tools to 'qt3' since the logic in that tool is only for QT version 3. + Renamed all env vars which affect qt3 from QT_ to QT3_. If you are still using SCons + to build QT 3 code, you'll need to update your SConscripts. Note that using 'qt' tool + has been deprecated for some time. + FIXES ----- diff --git a/SCons/Tool/qt3.py b/SCons/Tool/qt3.py index 2b31554..4e69756 100644 --- a/SCons/Tool/qt3.py +++ b/SCons/Tool/qt3.py @@ -271,10 +271,6 @@ def generate(env): Action = SCons.Action.Action Builder = SCons.Builder.Builder - SCons.Warnings.warn( - SCons.Warnings.ToolQtDeprecatedWarning, "Tool module for Qt version 3 is deprecated" - ) - qt3path = _detect_qt3(env) if qt3path is None: return None @@ -366,7 +362,7 @@ def generate(env): LIBS=['$QT3_LIB']) def exists(env): - return _detect(env) + return _detect_qt3(env) # Local Variables: # tab-width:4 diff --git a/SCons/Warnings.py b/SCons/Warnings.py index 754f05d..f77a24a 100644 --- a/SCons/Warnings.py +++ b/SCons/Warnings.py @@ -131,7 +131,7 @@ class DeprecatedDebugOptionsWarning(MandatoryDeprecatedWarning): class DeprecatedMissingSConscriptWarning(DeprecatedWarning): pass -class ToolQtDeprecatedWarning(FutureDeprecatedWarning): +class ToolQtDeprecatedWarning(DeprecatedWarning): pass # The below is a list of 2-tuples. The first element is a class object. diff --git a/test/QT/qt3/QTFLAGS.py b/test/QT/qt3/QTFLAGS.py index c759c2a..5653684 100644 --- a/test/QT/qt3/QTFLAGS.py +++ b/test/QT/qt3/QTFLAGS.py @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Testing the configuration mechanisms of the 'qt' tool. +Testing the configuration mechanisms of the 'qt3' tool. """ import TestSCons @@ -39,24 +39,24 @@ test.subdir('work1', 'work2') test.run( chdir=test.workpath('qt', 'lib'), - arguments="--warn=no-tool-qt-deprecated .", + arguments=".", stderr=TestSCons.noisy_ar, match=TestSCons.match_re_dotall, ) -QT = test.workpath('qt') -QT_LIB = 'myqt' -QT_MOC = '%s %s' % (_python_, test.workpath('qt', 'bin', 'mymoc.py')) -QT_UIC = '%s %s' % (_python_, test.workpath('qt', 'bin', 'myuic.py')) +QT3 = test.workpath('qt') +QT3_LIB = 'myqt' +QT3_MOC = '%s %s' % (_python_, test.workpath('qt', 'bin', 'mymoc.py')) +QT3_UIC = '%s %s' % (_python_, test.workpath('qt', 'bin', 'myuic.py')) def createSConstruct(test, place, overrides): test.write(place, """\ env = Environment( - tools=['default','qt'], - QTDIR = r'%s', - QT_LIB = r'%s', - QT_MOC = r'%s', - QT_UIC = r'%s', + tools=['default','qt3'], + QT3DIR = r'%s', + QT3_LIB = r'%s', + QT3_MOC = r'%s', + QT3_UIC = r'%s', %s # last because 'overrides' may add comma ) if ARGUMENTS.get('variant_dir', 0): @@ -70,23 +70,23 @@ else: sconscript = File('SConscript') Export("env") SConscript(sconscript) -""" % (QT, QT_LIB, QT_MOC, QT_UIC, overrides)) +""" % (QT3, QT3_LIB, QT3_MOC, QT3_UIC, overrides)) createSConstruct(test, ['work1', 'SConstruct'], - """QT_UICIMPLFLAGS='-x', - QT_UICDECLFLAGS='-y', - QT_MOCFROMHFLAGS='-z', - QT_MOCFROMCXXFLAGS='-i -w', - QT_UICDECLPREFIX='uic-', - QT_UICDECLSUFFIX='.hpp', - QT_UICIMPLPREFIX='', - QT_UICIMPLSUFFIX='.cxx', - QT_MOCHPREFIX='mmm', - QT_MOCHSUFFIX='.cxx', - QT_MOCCXXPREFIX='moc', - QT_MOCCXXSUFFIX='.inl', - QT_UISUFFIX='.myui',""") + """QT3_UICIMPLFLAGS='-x', + QT3_UICDECLFLAGS='-y', + QT3_MOCFROMHFLAGS='-z', + QT3_MOCFROMCXXFLAGS='-i -w', + QT3_UICDECLPREFIX='uic-', + QT3_UICDECLSUFFIX='.hpp', + QT3_UICIMPLPREFIX='', + QT3_UICIMPLSUFFIX='.cxx', + QT3_MOCHPREFIX='mmm', + QT3_MOCHSUFFIX='.cxx', + QT3_MOCCXXPREFIX='moc', + QT3_MOCCXXSUFFIX='.inl', + QT3_UISUFFIX='.myui',""") test.write(['work1', 'SConscript'],""" Import("env") env.Program('mytest', ['mocFromH.cpp', @@ -137,7 +137,7 @@ int main(void) { } """) -test.run(chdir='work1', arguments="--warn=no-tool-qt-deprecated mytest" + _exe) +test.run(chdir='work1', arguments="mytest" + _exe) test.must_exist( ['work1', 'mmmmocFromH.cxx'], @@ -173,32 +173,32 @@ test.write(['work2', 'SConstruct'], """ import os.path env1 = Environment( - tools=['qt'], - QTDIR=r'%(QTDIR)s', - QT_BINPATH='$QTDIR/bin64', - QT_LIBPATH='$QTDIR/lib64', - QT_CPPPATH='$QTDIR/h64', + tools=['qt3'], + QT3DIR=r'%(QT3DIR)s', + QT3_BINPATH='$QT3DIR/bin64', + QT3_LIBPATH='$QT3DIR/lib64', + QT3_CPPPATH='$QT3DIR/h64', ) cpppath = env1.subst('$CPPPATH') -if os.path.normpath(cpppath) != os.path.join(r'%(QTDIR)s', 'h64'): +if os.path.normpath(cpppath) != os.path.join(r'%(QT3DIR)s', 'h64'): print(cpppath) Exit(1) libpath = env1.subst('$LIBPATH') -if os.path.normpath(libpath) != os.path.join(r'%(QTDIR)s', 'lib64'): +if os.path.normpath(libpath) != os.path.join(r'%(QT3DIR)s', 'lib64'): print(libpath) Exit(2) -qt_moc = env1.subst('$QT_MOC') -if os.path.normpath(qt_moc) != os.path.join(r'%(QTDIR)s', 'bin64', 'moc'): +qt_moc = env1.subst('$QT3_MOC') +if os.path.normpath(qt_moc) != os.path.join(r'%(QT3DIR)s', 'bin64', 'moc'): print(qt_moc) Exit(3) env2 = Environment( - tools=['default', 'qt'], QTDIR=None, QT_LIB=None, QT_CPPPATH=None, QT_LIBPATH=None + tools=['default', 'qt3'], QT3DIR=None, QT3_LIB=None, QT3_CPPPATH=None, QT3_LIBPATH=None ) env2.Program('main.cpp') -""" % {'QTDIR':QT}) +""" % {'QT3DIR':QT3}) test.write(['work2', 'main.cpp'], """ int main(void) { return 0; } @@ -206,7 +206,7 @@ int main(void) { return 0; } # Ignore stderr, because if Qt is not installed, # there may be a warning about an empty QTDIR on stderr. -test.run(arguments="--warn=no-tool-qt-deprecated", chdir='work2', stderr=None) +test.run(chdir='work2', stderr=None) test.must_exist(['work2', 'main' + _exe]) diff --git a/test/QT/qt3/Tool.py b/test/QT/qt3/Tool.py index 122e7f4..1b34ea2 100644 --- a/test/QT/qt3/Tool.py +++ b/test/QT/qt3/Tool.py @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Verify that applying env.Tool('qt') after running Configure checks +Verify that applying env.Tool('qt3') after running Configure checks works properly. This was broken in 0.96.95. The configuration here is a moderately stripped-down version of the @@ -90,7 +90,7 @@ def CheckForQt(context): ] if 'QTDIR' in os.environ: - potential_qt_dirs.insert(0, os.environ[ 'QTDIR' ]) + potential_qt_dirs.insert(0, os.environ['QTDIR']) if env[ 'qt_directory' ] != "/": uic_path = os.path.join(env['qt_directory'], 'bin', 'uic') @@ -101,7 +101,7 @@ def CheckForQt(context): return 0 for i in potential_qt_dirs: - context.env.Replace(QTDIR = i) + context.env.Replace(QT3DIR = i) if CheckForQtAt(context, i): # additional checks to validate QT installation if not os.path.isfile(os.path.join(i, 'bin', 'uic')): @@ -133,7 +133,7 @@ opts = Variables('lprof.conf') opts.Add(PathVariable("qt_directory", "Path to Qt directory", "/")) opts.Update(env) -env['QT_LIB'] = 'qt-mt' +env['QT3_LIB'] = 'qt-mt' config = env.Configure(custom_tests = { 'CheckForQt' : CheckForQt, }) @@ -142,10 +142,10 @@ if not config.CheckForQt(): print("Failed to find valid QT environment.") Exit(1) -env.Tool('qt', ['$TOOL_PATH']) +env.Tool('qt3', ['$TOOL_PATH']) """) -test.run(arguments='--warn=no-tool-qt-deprecated .') +test.run(arguments='.') test.pass_test() diff --git a/test/QT/qt3/copied-env.py b/test/QT/qt3/copied-env.py index 3b2a83e..9bcb95b 100644 --- a/test/QT/qt3/copied-env.py +++ b/test/QT/qt3/copied-env.py @@ -63,7 +63,7 @@ test.write('MyForm.ui', r""" void aaa(void) """) -test.run(arguments="--warn=no-tool-qt-deprecated") +test.run() moc_MyForm = [x for x in test.stdout().split('\n') if x.find('moc_MyForm') != -1] diff --git a/test/QT/qt3/empty-env.py b/test/QT/qt3/empty-env.py index e9dfc81..cd14340 100644 --- a/test/QT/qt3/empty-env.py +++ b/test/QT/qt3/empty-env.py @@ -35,11 +35,11 @@ test.Qt_dummy_installation('qt') test.write('SConstruct', """\ orig = Environment() -env = orig.Clone(QTDIR = r'%s', - QT_LIB = r'%s', - QT_MOC = r'%s', - QT_UIC = r'%s', - tools=['qt']) +env = orig.Clone(QT3DIR = r'%s', + QT3_LIB = r'%s', + QT3_MOC = r'%s', + QT3_UIC = r'%s', + tools=['qt3']) env.Program('main', 'main.cpp', CPPDEFINES=['FOO'], LIBS=[]) """ % (test.QT, test.QT_LIB, test.QT_MOC, test.QT_UIC)) @@ -61,11 +61,10 @@ foo6(void) # we can receive warnings about a non detected qt (empty QTDIR) # these are not critical, but may be annoying. -test.run(stderr=None, arguments='--warn=no-tool-qt-deprecated') +test.run(stderr=None) test.run( program=test.workpath('main' + TestSCons._exe), - arguments='--warn=no-tool-qt-deprecated', stderr=None, stdout='qt/include/foo6.h\n', ) diff --git a/test/QT/qt3/generated-ui.py b/test/QT/qt3/generated-ui.py index fd368b3..d43b21b 100644 --- a/test/QT/qt3/generated-ui.py +++ b/test/QT/qt3/generated-ui.py @@ -45,7 +45,7 @@ test.write(['SConstruct'], """\ import os aa=os.getcwd() -env=Environment(tools=['default','expheaders','qt'],toolpath=[aa]) +env=Environment(tools=['default','expheaders','qt3'],toolpath=[aa]) if 'HOME' in os.environ: env['ENV']['HOME'] = os.environ['HOME'] env["EXP_HEADER_ABS"]=os.path.join(os.getcwd(),'include') @@ -120,12 +120,11 @@ test.write(['layer', 'aclock', 'qt_bug', 'migraform.ui'], """\ """) test.run( - arguments='--warn=no-tool-qt-deprecated', stderr=TestSCons.noisy_ar, match=TestSCons.match_re_dotall, ) -test.up_to_date(options="--warn=no-tool-qt-deprecated", arguments=".") +test.up_to_date(arguments=".") test.pass_test() diff --git a/test/QT/qt3/installed.py b/test/QT/qt3/installed.py index 9e8693e..71ff98f 100644 --- a/test/QT/qt3/installed.py +++ b/test/QT/qt3/installed.py @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Look if qt is installed, and try out all builders. +Look if qt3 is installed, and try out all builders. """ import os @@ -56,7 +56,7 @@ try: except KeyError: ENV_PATH=ENV.get('PATH', '') -env = Environment(tools=['default','qt'], +env = Environment(tools=['default','qt3'], ENV={'PATH':ENV_PATH, 'PATHEXT':os.environ.get('PATHEXT'), 'HOME':os.getcwd(), @@ -65,9 +65,9 @@ env = Environment(tools=['default','qt'], CXXFILESUFFIX=".cpp") conf = env.Configure() -if not conf.CheckLib(env.subst("$QT_LIB"), autoadd=0): - conf.env['QT_LIB'] = 'qt-mt' - if not conf.CheckLib(env.subst("$QT_LIB"), autoadd=0): +if not conf.CheckLib(env.subst("$QT3_LIB"), autoadd=0): + conf.env['QT3_LIB'] = 'qt-mt' + if not conf.CheckLib(env.subst("$QT3_LIB"), autoadd=0): Exit(0) env = conf.Finish() VariantDir('bld', '.') @@ -196,18 +196,18 @@ if test.stdout() != "Hello World\n" or test.stderr() != '' or test.status: sys.stdout.write('test_realqt returned status %s\n' % test.status) test.fail_test() -QTDIR = os.environ['QTDIR'] +QT3DIR = os.environ['QTDIR'] PATH = os.environ['PATH'] os.environ['QTDIR'] = '' os.environ['PATH'] = '.' test.run( stderr=None, - arguments="--warn=no-tool-qt-deprecated -c bld/test_realqt" + TestSCons._exe, + arguments="-c bld/test_realqt" + TestSCons._exe, ) -expect1 = "scons: warning: Could not detect qt, using empty QTDIR" -expect2 = "scons: warning: Could not detect qt, using moc executable as a hint" +expect1 = "scons: warning: Could not detect qt3, using empty QT3DIR" +expect2 = "scons: warning: Could not detect qt3, using moc executable as a hint" test.fail_test(expect1 not in test.stderr() and expect2 not in test.stderr()) diff --git a/test/QT/qt3/manual.py b/test/QT/qt3/manual.py index 84c6df8..f467b5a 100644 --- a/test/QT/qt3/manual.py +++ b/test/QT/qt3/manual.py @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Test the manual QT builder calls. +Test the manual QT3 builder calls. """ import TestSCons @@ -51,7 +51,7 @@ sources.extend(env.Uic('ui/ccc.ui')[1:]) # manual target specification sources.append(env.Moc('moc-ddd.cpp', 'include/ddd.h', - QT_MOCHPREFIX='')) # Watch out ! + QT3_MOCHPREFIX='')) # Watch out ! moc = env.Moc('moc_eee.cpp', 'eee.cpp') env.Ignore( moc, moc ) sources.extend(env.Uic(['include/uic_fff.hpp', 'fff.cpp', 'fff.moc.cpp'], @@ -61,7 +61,7 @@ print(list(map(str,sources))) env.Program(target='aaa', source=sources, CPPPATH=['$CPPPATH', './include'], - QT_AUTOSCAN=0) + QT3_AUTOSCAN=0) """) test.write('aaa.cpp', r""" @@ -123,7 +123,7 @@ int main(void) { } """) -test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_exe) +test.run(arguments=aaa_exe) # normal invocation test.must_exist(test.workpath('include', 'moc_aaa.cc')) diff --git a/test/QT/qt3/qt_warnings.py b/test/QT/qt3/qt_warnings.py index fb23a71..1cbf2b0 100644 --- a/test/QT/qt3/qt_warnings.py +++ b/test/QT/qt3/qt_warnings.py @@ -51,7 +51,7 @@ import os env.StaticLibrary('aaa.cpp') """) -test.run(arguments="--warn=no-tool-qt-deprecated", stderr=None) +test.run(stderr=None) match12 = r""" scons: warning: Generated moc file 'aaa.moc' is not included by 'aaa.cpp' @@ -64,7 +64,7 @@ if not re.search(match12, test.stderr()): os.environ['QTDIR'] = test.QT -test.run(arguments='--warn=no-tool-qt-deprecated -n noqtdir=1') +test.run(arguments='-n noqtdir=1') # We'd like to eliminate $QTDIR from the environment as follows: # del os.environ['QTDIR'] @@ -74,7 +74,7 @@ test.run(arguments='--warn=no-tool-qt-deprecated -n noqtdir=1') # environment, so it only gets removed from the Python dictionary. # Consequently, we need to just wipe out its value as follows> os.environ['QTDIR'] = '' -test.run(stderr=None, arguments='--warn=no-tool-qt-deprecated -n noqtdir=1') +test.run(stderr=None, arguments='-n noqtdir=1') moc = test.where_is('moc') if moc: @@ -83,13 +83,13 @@ if moc: qtdir = qtdir.replace('\\', '\\\\' ) expect = r""" -scons: warning: Could not detect qt, using moc executable as a hint \(QTDIR=%s\) +scons: warning: Could not detect qt3, using moc executable as a hint \(QT3DIR=%s\) File "%s", line \d+, in (\?|) """ % (qtdir, re.escape(SConstruct_path)) else: expect = r""" -scons: warning: Could not detect qt, using empty QTDIR +scons: warning: Could not detect qt3, using empty QT3DIR File "%s", line \d+, in (\?|) """ % re.escape(SConstruct_path) diff --git a/test/QT/qt3/reentrant.py b/test/QT/qt3/reentrant.py index 40fb1f1..be6d8a6 100644 --- a/test/QT/qt3/reentrant.py +++ b/test/QT/qt3/reentrant.py @@ -49,7 +49,7 @@ test.Qt_create_SConstruct('SConstruct') test.write('SConscript', """\ Import("env") -env = env.Clone(tools=['qt']) +env = env.Clone(tools=['qt3']) env.Program('main', 'main.cpp', CPPDEFINES=['FOO'], LIBS=[]) """) diff --git a/test/QT/qt3/source-from-ui.py b/test/QT/qt3/source-from-ui.py index 569fbab..1404f75 100644 --- a/test/QT/qt3/source-from-ui.py +++ b/test/QT/qt3/source-from-ui.py @@ -67,9 +67,9 @@ void useit() { } """) -test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll) +test.run(arguments=aaa_dll) -test.up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=aaa_dll) +test.up_to_date(options='-n', arguments=aaa_dll) test.write('aaa.ui', r""" /* a change */ @@ -81,11 +81,11 @@ test.write('aaa.ui', r""" DLLEXPORT void aaa(void) """) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=moc) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=cpp) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=h) +test.not_up_to_date(options='-n', arguments=moc) +test.not_up_to_date(options='-n', arguments=cpp) +test.not_up_to_date(options='-n', arguments=h) -test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll) +test.run(arguments=" " + aaa_dll) test.write('aaa.ui', r""" void aaa(void) @@ -93,28 +93,28 @@ void aaa(void) """) # test that non-existant ui.h files are ignored (as uic does) -test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll) +test.run(arguments=" " + aaa_dll) test.write('aaa.ui.h', r""" /* test dependency to .ui.h */ """) -test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll) +test.run(arguments=" " + aaa_dll) test.write('aaa.ui.h', r""" /* changed */ """) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=obj) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=cpp) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=h) -test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=moc) +test.not_up_to_date(options='-n', arguments=obj) +test.not_up_to_date(options='-n', arguments=cpp) +test.not_up_to_date(options='-n', arguments=h) +test.not_up_to_date(options='-n', arguments=moc) # clean up -test.run(arguments="--warn=no-tool-qt-deprecated -c " + aaa_dll) +test.run(arguments=" -c " + aaa_dll) test.run( - arguments="--warn=no-tool-qt-deprecated variant_dir=1 " + arguments="variant_dir=1 " + test.workpath('build', aaa_dll) ) @@ -129,7 +129,7 @@ cppContents = test.read(test.workpath('build', cpp), mode='r') test.fail_test(cppContents.find('#include "aaa.ui.h"') == -1) test.run( - arguments="--warn=no-tool-qt-deprecated variant_dir=1 chdir=1 " + arguments="variant_dir=1 chdir=1 " + test.workpath('build', aaa_dll) ) @@ -141,7 +141,7 @@ test.must_not_exist(test.workpath(cpp)) test.must_not_exist(test.workpath(h)) test.run( - arguments="--warn=no-tool-qt-deprecated variant_dir=1 chdir=1 dup=0 " + arguments=" variant_dir=1 chdir=1 dup=0 " + test.workpath('build_dup0', aaa_dll) ) diff --git a/test/QT/qt3/up-to-date.py b/test/QT/qt3/up-to-date.py index 06fb559..ec51238 100644 --- a/test/QT/qt3/up-to-date.py +++ b/test/QT/qt3/up-to-date.py @@ -53,7 +53,7 @@ test.write('SConstruct', """\ import os aa=os.getcwd() -env=Environment(tools=['default','expheaders','qt'],toolpath=[aa]) +env=Environment(tools=['default','expheaders','qt3'],toolpath=[aa]) env["EXP_HEADER_ABS"]=os.path.join(os.getcwd(),'include') if not os.access(env["EXP_HEADER_ABS"],os.F_OK): os.mkdir (env["EXP_HEADER_ABS"]) diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py index b6c9f09..224a8cf 100644 --- a/testing/framework/TestSCons.py +++ b/testing/framework/TestSCons.py @@ -1175,14 +1175,17 @@ else: def Qt_create_SConstruct(self, place, qt_tool='qt3'): if isinstance(place, list): place = test.workpath(*place) + + var_prefix=qt_tool.upper() self.write(place, f"""\ if ARGUMENTS.get('noqtdir', 0): - QTDIR = None + {var_prefix}DIR = None else: - QTDIR = r'{self.QT}' + {var_prefix}DIR = r'{self.QT}' DefaultEnvironment(tools=[]) # test speedup env = Environment( - QTDIR=QTDIR, QT_LIB=r'{self.QT_LIB}', QT_MOC=r'{self.QT_MOC}', QT_UIC=r'{self.QT_UIC}', tools=['default', '{qt_tool}'] + {var_prefix}DIR={var_prefix}DIR, {var_prefix}_LIB=r'{self.QT_LIB}', {var_prefix}_MOC=r'{self.QT_MOC}', + {var_prefix}_UIC=r'{self.QT_UIC}', tools=['default', '{qt_tool}'] ) dup = 1 if ARGUMENTS.get('variant_dir', 0): -- cgit v0.12