summaryrefslogtreecommitdiff
path: root/scripts/dtc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc')
-rw-r--r--scripts/dtc/Makefile5
-rw-r--r--scripts/dtc/pylibfdt/Makefile4
2 files changed, 4 insertions, 5 deletions
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index faa72d95e28..a714c68365e 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -1,15 +1,14 @@
# SPDX-License-Identifier: GPL-2.0
# scripts/dtc makefile
-hostprogs-y := dtc
-always := $(hostprogs-y)
+hostprogs-always-y += dtc
dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
srcpos.o checks.o util.o
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
# Source files need to get at the userspace version of libfdt_env.h to compile
-HOST_EXTRACFLAGS := -I$(src)/libfdt
+HOST_EXTRACFLAGS := -I$(srctree)/$(src)/libfdt
# Generated files need one more search path to include headers in source tree
HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
index e442d5c2420..ce9c2d093b8 100644
--- a/scripts/dtc/pylibfdt/Makefile
+++ b/scripts/dtc/pylibfdt/Makefile
@@ -26,7 +26,7 @@ quiet_cmd_pymod = PYMOD $@
SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
$(PYTHON3) $< --quiet build_ext --inplace
-rebuild: $(src)/setup.py $(PYLIBFDT_srcs)
+rebuild: $(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
@@ -39,6 +39,6 @@ rebuild: $(src)/setup.py $(PYLIBFDT_srcs)
$(obj)/_libfdt.so $(obj)/libfdt.py &: rebuild
@:
-always += _libfdt.so libfdt.py
+always-y += _libfdt.so libfdt.py
clean-files += libfdt.i _libfdt.so libfdt.py libfdt_wrap.c