summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-03-08 12:51:09 -0800
committerJon Schlueter <jon.schlueter@gmail.com>2016-03-08 20:50:18 -0500
commitbd11bf845d8764667244154db995d6749ae84e17 (patch)
tree73ccd4709f7001f3ad2838d2c8f58c996a216211 /SConstruct
parent286046427488c1200cb375388f30bb11ac3b85bf (diff)
downloadgpsd-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--SConstruct24
1 files changed, 14 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct
index 0e71fe67..63873e32 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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)