Commit cf7af3c7 authored by Simon Glass's avatar Simon Glass
Browse files

libfdt: Tidy up pylibfdt build rule

At present the build rule for pylibfdt depends on but modern
Python versions add a different suffix to the output file, resulting in
something like

The result is that pylibfdt is rebuilt every time.

Rename the file the standard name so that the rule works correctly. Also
add to the dependencies, so that file is always created if
Signed-off-by: Simon Glass's avatarSimon Glass <>
(updated to add || true after seeing an unexplained test failure)
parent 4c6f6507
......@@ -23,12 +23,16 @@ quiet_cmd_pymod = PYMOD $@
SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
$(PYTHON3) $< --quiet build_ext --inplace
$(obj)/ $(src)/ $(PYLIBFDT_srcs) FORCE
$(obj)/ $(obj)/ &: $(src)/ $(PYLIBFDT_srcs)
@# Remove the library since otherwise Python doesn't seem to regenerate
@# the file if it is missing.
rm -f $(obj)/_libfdt*.so
@rm -f $(obj)/_libfdt*.so
$(call if_changed,pymod)
@# Rename the file to so this Makefile doesn't run every time
@if [ ! -e $(obj)/ ]; then \
mv $(obj)/_libfdt*.so $(obj)/ || true; \
always +=
always +=
clean-files += libfdt.i libfdt_wrap.c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment