]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fdt: Allow swig options to be provided by Makefile
authorSimon Glass <sjg@chromium.org>
Sat, 27 May 2017 13:38:16 +0000 (07:38 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 2 Jun 2017 16:16:47 +0000 (10:16 -0600)
U-Boot needs to provide some swig include directories. Add this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/libfdt/pylibfdt/setup.py

index 38a844cb6d59fb8430bd2877e7ea72c1139e8764..daf1089425ddbb84daf46fd7b113d4447f359185 100755 (executable)
@@ -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(