summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-10-08 19:13:28 -0700
committerGary E. Miller <gem@rellim.com>2018-10-08 19:13:28 -0700
commit5aec91b3867fc9a699db747a2eb517f5934e9096 (patch)
treea5675f069a54abffef3366fde43d5c227c950655 /SConstruct
parentd074afe174592986aadab61cbc19ac2e079b1aae (diff)
downloadgpsd-5aec91b3867fc9a699db747a2eb517f5934e9096.tar.gz
SConstruct: Fix running "scons check" as non-root.
The python-versions check was checking the installed versions, not the version in the source.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct13
1 files changed, 7 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index 7ab79bd6..b70fee26 100644
--- a/SConstruct
+++ b/SConstruct
@@ -383,7 +383,8 @@ for key, value in os.environ.items():
# Placeholder so we can kluge together something like VPATH builds.
# $SRCDIR replaces occurrences for $(srcdir) in the autotools build.
-env['SRCDIR'] = '.'
+# scons can get confused if this is not a full path
+env['SRCDIR'] = os.getcwd()
# We may need to force slow regression tests to get around race
# conditions in the pty layer, especially on a loaded machine.
@@ -1590,7 +1591,7 @@ else:
rev = gpsd_version
revision = '''/* Automatically generated file, do not edit */
#define REVISION "%s"
-''' % (polystr(rev.strip()),)
+''' % (polystr(rev.strip()),)
env.Textfile(target="revision.h", source=[revision])
# leapseconds.cache is a local cache for information on leapseconds issued
@@ -1913,10 +1914,10 @@ if python_progs:
vchk = ''
verenv = env['ENV'].copy()
verenv['DISPLAY'] = '' # Avoid launching X11 in X11 progs
- for prog in python_progs:
- vchk += '$SRCDIR/%s -V\n' % prog
- python_versions = Utility('python-versions', [python_progs], vchk,
- ENV=verenv)
+ pp = []
+ for p in python_progs:
+ pp.append("$SRCDIR/%s -V" % p)
+ python_versions = Utility('python-versions', python_progs, pp, ENV=verenv)
else:
python_versions = None