summaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/install-extmod-build7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
index 7ec1f061a519..64d958ee45f3 100755
--- a/scripts/package/install-extmod-build
+++ b/scripts/package/install-extmod-build
@@ -51,6 +51,13 @@ mkdir -p "${destdir}"
if [ "${CC}" != "${HOSTCC}" ]; then
echo "Rebuilding host programs with ${CC}..."
+ # This leverages external module building.
+ # - Clear sub_make_done to allow the top-level Makefile to redo sub-make.
+ # - Filter out --no-print-directory to print "Entering directory" logs
+ # when Make changes the working directory.
+ unset sub_make_done
+ MAKEFLAGS=$(echo "${MAKEFLAGS}" | sed s/--no-print-directory//)
+
cat <<-'EOF' > "${destdir}/Kbuild"
subdir-y := scripts
EOF