diff options
| author | Tom Rini <trini@konsulko.com> | 2021-04-05 11:29:57 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2021-04-05 11:29:57 -0400 |
| commit | 90eba245a66aa20589404ba537215faf2012c1a3 (patch) | |
| tree | c581cd1f00dd162aeac4262bb4e74c2a9fea98c9 /scripts/dtc | |
| parent | b46dd116ce03e235f2a7d4843c6278e1da44b5e1 (diff) | |
| parent | db8b46120aed6554d1ff405260ea6d2cc2439fcc (diff) | |
Merge branch 'next'
Diffstat (limited to 'scripts/dtc')
| -rw-r--r-- | scripts/dtc/pylibfdt/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile index 80b6ad2ae7..4782dd45c6 100644 --- a/scripts/dtc/pylibfdt/Makefile +++ b/scripts/dtc/pylibfdt/Makefile @@ -23,12 +23,18 @@ quiet_cmd_pymod = PYMOD $@ SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \ $(PYTHON3) $< --quiet build_ext --inplace -$(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE +rebuild: $(src)/setup.py $(PYLIBFDT_srcs) @# Remove the library since otherwise Python doesn't seem to regenerate @# the libfdt.py file if it is missing. - rm -f $(obj)/_libfdt*.so + @rm -f $(obj)/_libfdt*.so $(call if_changed,pymod) + @# Rename the file to _libfdt.so so this Makefile doesn't run every time + @if [ ! -e $(obj)/_libfdt.so ]; then \ + mv $(obj)/_libfdt*.so $(obj)/_libfdt.so; \ + fi -always += _libfdt.so +$(obj)/_libfdt.so $(obj)/libfdt.py &: rebuild + +always += _libfdt.so libfdt.py clean-files += libfdt.i _libfdt.so libfdt.py libfdt_wrap.c |
