From 7c6b35cf95128a58b91a1d58b31469438fe1f5cc Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sat, 2 Sep 2023 23:42:34 +0100
Subject: unify build/clean scripts: use handle/make instead

The -c option is added for distclean, and -x for crossgcc-clean,
in handle/make/config

about 100 sloc removed from lbmk

Signed-off-by: Leah Rowe <leah@libreboot.org>
---
 script/build/release/src | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

(limited to 'script/build/release/src')

diff --git a/script/build/release/src b/script/build/release/src
index 4d5c3efe..9e2192ec 100755
--- a/script/build/release/src
+++ b/script/build/release/src
@@ -152,16 +152,14 @@ purge_files()
 	cd "${srcdir}/" || \
 	    err "purge_files 3: !cd ${srcdir}/"
 
-	for p in coreboot/*; do
-		[ -d "${p}" ] || continue
-		./handle make file -c "${p}" || \
-		    err "purge_files 1: ${p}: !make distclean"
-	done
-
 	./handle make file -c coreboot/default/util/kbc1126 || \
 	    err "purge_files 1: default/util/kbc1126: ! make clean"
-	./build clean all || \
-	    err "purge_files 1: ! ./build clean all"
+	./handle make config -x coreboot || \
+	    err "purge_files: coreboot: cannot clean crossgcc files"
+	for p in u-boot seabios coreboot; do
+		./handle make config -c "${p}" || \
+		    err "purge_files: ${p}: cannot clean the source trees"
+	done
 
 	for p in bios_extract flashrom grub ich9utils uefitool; do
 		./handle make file -c "${p}" || \
-- 
cgit v1.2.1