git: 7ffa1f14e3c1 - main - Makefile.vm: Set CLEANDIRS correctly for vm-image

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 14 Apr 2024 23:46:00 UTC
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=7ffa1f14e3c19f0061ec9f38bb74c564a49ffc17

commit 7ffa1f14e3c19f0061ec9f38bb74c564a49ffc17
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-04-14 22:27:19 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-04-14 23:45:40 +0000

    Makefile.vm: Set CLEANDIRS correctly for vm-image
    
    With multiple filesystems and disk image formats, we now use different
    staging directories; we need to include them all in CLEANDIRS.
    
    Fixes:  97bd53ef4d20b "Makefile.vm: Fix duplicate rc.conf files"
    MFC after:      3 days
---
 release/Makefile.vm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/release/Makefile.vm b/release/Makefile.vm
index 83e3077b5bd4..2565a13ef671 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -145,9 +145,10 @@ cw-${_CW:tl}:	cw-${_CW:tl}-${${_CW:tu}_FORMAT:[1]}
 .endif
 
 .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
-CLEANDIRS+=	${VMTARGETS}
+CLEANFILES+=	vm-image
 . for FORMAT in ${VMFORMATS}
 .  for FS in ${VMFSLIST}
+CLEANDIRS+=	vm-image-${FORMAT}-${FS}
 CLEANFILES+=	${FORMAT}.${FS}.img
 CLEANFILES+=	${VMBASE}.${FS}.${FORMAT}
 .  endfor