summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-09 18:39:33 -0600
committerSimon Glass <sjg@chromium.org>2020-07-20 11:37:47 -0600
commit8beed3d7ac5a3253a850bdadcb2dbc1fec6aff6c (patch)
tree1466dc535d9ea9bbf139af8482b54dfe32feae00 /scripts
parentfe04f647a27df076cd53208b9b3117c97dac4f89 (diff)
downloadu-boot-8beed3d7ac5a3253a850bdadcb2dbc1fec6aff6c.tar.gz
u-boot-8beed3d7ac5a3253a850bdadcb2dbc1fec6aff6c.tar.xz
u-boot-8beed3d7ac5a3253a850bdadcb2dbc1fec6aff6c.zip
binman: Adjust pylibfdt for incremental build
If the pylibfdt shared-object file is detected, then Python assumes that the libfdt.py file exists also. Sometimes when an incremental build aborts, the shared-object file is built but the libfdt.py is not. The only way out at this point is to use 'make mkproper', or similar. Fix this by removing the .so file before it is built. This seems to make Python rebuild everything. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/pylibfdt/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
index 42342c75bb..80b6ad2ae7 100644
--- a/scripts/dtc/pylibfdt/Makefile
+++ b/scripts/dtc/pylibfdt/Makefile
@@ -24,6 +24,9 @@ quiet_cmd_pymod = PYMOD $@
$(PYTHON3) $< --quiet build_ext --inplace
$(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE
+ @# Remove the library since otherwise Python doesn't seem to regenerate
+ @# the libfdt.py file if it is missing.
+ rm -f $(obj)/_libfdt*.so
$(call if_changed,pymod)
always += _libfdt.so