diff options
author | Fred Wright <fw@fwright.net> | 2016-03-08 12:51:09 -0800 |
---|---|---|
committer | Jon Schlueter <jon.schlueter@gmail.com> | 2016-03-08 20:50:18 -0500 |
commit | bd11bf845d8764667244154db995d6749ae84e17 (patch) | |
tree | 73ccd4709f7001f3ad2838d2c8f58c996a216211 /SConstruct | |
parent | 286046427488c1200cb375388f30bb11ac3b85bf (diff) | |
download | gpsd-bd11bf845d8764667244154db995d6749ae84e17.tar.gz |
Fixes cleaning of Qt objects.
The recent rework of the 'clean' handling broke the cleaning of the Qt
objects, which was missed because Qt wasn't enabled in the testing.
This fixes it by moving the Qt object setup outside the "not cleaning
or helping" conditional, while suppressing the call on pkg_config in
that case.
It also creates the variables 'cleaning' and 'helping', so as not to
have to make multiple calls on GetOption() for those options.
TESTED:
Ran "scons -c" after building with Qt, and verified that all build
products were removed.
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -496,7 +496,11 @@ def CheckC11(context): def GetLoadPath(context): context.Message("Getting system load path ...") -if env.GetOption("clean") or env.GetOption("help"): + +cleaning = env.GetOption('clean') +helping = env.GetOption('help') + +if cleaning or helping: dbusflags = [] rtlibs = [] usbflags = [] @@ -505,7 +509,6 @@ if env.GetOption("clean") or env.GetOption("help"): confdefs = [] manbuilder = False htmlbuilder = False - qt_env = None else: config = Configure(env, custom_tests={'CheckPKG': CheckPKG, 'CheckXsltproc': CheckXsltproc, @@ -842,19 +845,20 @@ int clock_gettime(clockid_t, struct timespec *); announce("This is a Gentoo system.") announce("Adjust your PYTHONPATH to see library directories under /usr/local/lib") - # Should we build the Qt binding? - if env["qt"] and env["shared"]: - qt_env = env.Clone() - qt_env.MergeFlags('-DUSE_QT') - qt_env.Append(OBJPREFIX='qt-') +# Should we build the Qt binding? +if env["qt"] and env["shared"]: + qt_env = env.Clone() + qt_env.MergeFlags('-DUSE_QT') + qt_env.Append(OBJPREFIX='qt-') + if not (cleaning or helping): try: qt_env.MergeFlags(pkg_config(qt_net_name)) except OSError: announce("pkg_config is confused about the state of %s." % qt_net_name) qt_env = None - else: - qt_env = None +else: + qt_env = None ## Two shared libraries provide most of the code for the C programs @@ -1984,7 +1988,7 @@ sconsclean = Utility("sconsclean", '', ["rm -fr .sconf_temp .scons-option-cache # Default targets -if env.GetOption('clean'): +if cleaning: env.Default(build_all, audit, clean_misc) else: env.Default(build) |