summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-27 13:38:16 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-02 16:16:47 (GMT)
commit7e91b10253ba649a8970852ed8756c67c86d27aa (patch)
tree57c06a8897993c5a593853a0be3e06c72a24c2f4 /lib
parenta2b2caae5a351809a3648bd95e8498c3370ab052 (diff)
downloadu-boot-7e91b10253ba649a8970852ed8756c67c86d27aa.tar.xz
fdt: Allow swig options to be provided by Makefile
U-Boot needs to provide some swig include directories. Add this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/libfdt/pylibfdt/setup.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libfdt/pylibfdt/setup.py b/lib/libfdt/pylibfdt/setup.py
index 38a844c..daf1089 100755
--- a/lib/libfdt/pylibfdt/setup.py
+++ b/lib/libfdt/pylibfdt/setup.py
@@ -97,12 +97,12 @@ files = os.environ.get('SOURCES', '').split()
cflags = os.environ.get('CPPFLAGS', '').split()
objdir = os.environ.get('OBJDIR')
version = os.environ.get('VERSION')
-swig_opts = []
+swig_opts = os.environ.get('SWIG_OPTS', '').split()
# If we were called directly rather than through our Makefile (which is often
# the case with Python module installation), read the settings from the
# Makefile.
-if not all((version, files, cflags, objdir)):
+if not all((swig_opts, version, files, cflags, objdir)):
swig_opts, version, files, cflags, objdir = GetEnvFromMakefiles()
libfdt_module = Extension(