From cc82b733d3dbf5f91badede6daf88ba724a0d9d8 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 8 Jul 2025 13:20:28 +0100 Subject: tree.sh: Place target builds under tree/target/ as opposed to target/ for example: image the command: ./mk -b u-boot amd64coreboot This would put the U-Boot binaries here: elf/u-boot/amd64coreboot/default/ With this change, they now go here: elf/u-boot/x86_64/amd64coreboot/default/ This solves a problem that existed previously, where you could modify a given tree in a multi-tree project, but cached builds for targets branching separately off of each tree would not be deleted, and thus not re-built. This accomplishes such a result, without needing to further check hashes of individual targets. The latter will still be done, in a future change, because this change doesn't fix another problem: If you change a given config, e.g. targetname "foo" which uses tree "bar", elf/foo/ would not be removed automatically for re-build. So this change only deletes individual target builds when their master tree changes. Where the target and tree are the same, this also means elf/tree/target/ for example: seabios/default would create binaries in: elf/seabios/default/default/ not: elf/seabios/default/ Signed-off-by: Leah Rowe --- include/tree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/tree.sh') diff --git a/include/tree.sh b/include/tree.sh index 85f97101..59dd765c 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -264,7 +264,7 @@ gnu_setver() check_defconfig() { [ -f "$defconfig" ] || $dry err "$project/$target: missing defconfig" - dest_dir="$elfdir/$target/${defconfig#"$target_dir/config/"}" + dest_dir="$elfdir/$tree/$target/${defconfig#"$target_dir/config/"}" $dry elfcheck || return 1; : # skip build if a previous one exists } -- cgit v1.2.1