diff mbox series

[XEN,v6,09/31] build: clean "lib.a"

Message ID 20210701141011.785641-10-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen: Build system improvements | expand

Commit Message

Anthony PERARD July 1, 2021, 2:09 p.m. UTC
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Beulich July 7, 2021, 3:03 p.m. UTC | #1
On 01.07.2021 16:09, Anthony PERARD wrote:
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Hmm, I was clearly under the impression (or at least assuming)
that $(targets) would be included in what gets cleaned by the
general rule. But it looks I was wrong with this:
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan
Anthony PERARD July 12, 2021, 2:42 p.m. UTC | #2
On Wed, Jul 07, 2021 at 05:03:12PM +0200, Jan Beulich wrote:
> On 01.07.2021 16:09, Anthony PERARD wrote:
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Hmm, I was clearly under the impression (or at least assuming)
> that $(targets) would be included in what gets cleaned by the
> general rule.

Unfortunately, that not true for two reasons, the first is that `make
clean` doesn't actually remove anything from $(targets), but that could
be changed as Linux does remove files listed in $(targets). The second is
that `make clean` doesn't actually use anything from "Rules.mk" and
doesn't include it, so when running `make clean`, "lib.a" is never in
$(targets).

> Acked-by: Jan Beulich <jbeulich@suse.com>

Thanks,
diff mbox series

Patch

diff --git a/xen/Makefile b/xen/Makefile
index 360b4a1d1867..e4deceab2c9a 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -343,7 +343,7 @@  _clean: delete-unfresh-files
 	$(MAKE) $(clean) test
 	$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean
 	find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \
-		-o -name "*.gcno" -o -name ".*.cmd" \) -exec rm -f {} \;
+		-o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \;
 	rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core
 	rm -f asm-offsets.s include/asm-*/asm-offsets.h
 	rm -f .banner