blob: c4134f4b5860649e09bc0abf4e8826b51dc4184c [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 3c5fb3a8691ac711ea93edf8e0b42bffc62b197e Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Tue, 24 Apr 2012 11:52:35 +0200
4Subject: [PATCH 1/4] SConstruct: respect sysroot also in SPLINTOPTS
5
6Upstream-Status: Inappropriate [embedded specific]
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
10Signed-off-by: Peter A. Bigot <pab@pabigot.com>
11---
12 SConstruct | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/SConstruct b/SConstruct
16index 14e2f59..f0cafa8 100644
17--- a/SConstruct
18+++ b/SConstruct
19@@ -1414,7 +1414,10 @@ def Utility(target, source, action):
20 # Report splint warnings
21 # Note: test_bits.c is unsplintable because of the PRI64 macros.
22 # If you get preprocessor or fatal errors, add +showscan.
23-splintopts = "-I/usr/include/libusb-1.0 +quiet"
24+if not env['sysroot']:
25+ splintopts = "-I/usr/include/libusb-1.0 +quiet"
26+else:
27+ splintopts = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot']
28 # splint does not know about multi-arch, work around that
29 ma_status, ma = _getstatusoutput('dpkg-architecture -qDEB_HOST_MULTIARCH')
30 if ma_status == 0:
31--
321.8.5.5
33