Skip to contentSkip to conversation

build: simplify clean handling of extras directory

PATCH In review Juergen Gross 2 participants 2 messages Aug 23, 2023 – Nov 2, 2023 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: simplify clean handling of extras directory

The extras directory is used only as a download target for Mini-OS sources. Instead of special handling extras/mini-os* in .gitignore and the clean targets, just use extras for that purpose.

So add "extras" to .gitignore and remove it when doing a "make distclean".

---
 .gitignore | 2 +-
 .hgignore  | 6 +-----
 Makefile   | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)
.gitignore +1 -1
index c1b73b0968..2d4baa4395 100644
@@ -63,7 +63,7 @@ docs/man7/
 docs/man8/
 docs/pdf/
 docs/txt/
-extras/mini-os*
+extras/
 install/*
 stubdom/*-minios-config.mk
 stubdom/autom4te.cache/
.hgignore +1 -5
index 2d41670632..030d97803e 100644
@@ -77,11 +77,7 @@
 ^docs/xen-api/vm_lifecycle.eps$
 ^docs/xen-api/xenapi-datamodel-graph.eps$
 ^docs/xen-api/xenapi.out$
-^extras/mini-os/include/list\.h$
-^extras/mini-os/include/mini-os$
-^extras/mini-os/include/x86/mini-os$
-^extras/mini-os/include/xen$
-^extras/mini-os/mini-os.*$
+^extras/
 ^install/.*$
 ^linux-[^/]*-paravirt/.*$
 ^linux-2.6[^/]*/.*$
Makefile +1 -1
index b93b22c752..a6ca348476 100644
@@ -246,6 +246,7 @@ clean-docs:
 # clean, but blow away tarballs
 .PHONY: distclean
 distclean: $(TARGS_DISTCLEAN)
+	rm -rf extras
 	$(MAKE) -C tools/include distclean
 	rm -f config/Toplevel.mk
 	rm -rf dist
@@ -265,7 +266,6 @@ distclean-stubdom:
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
-	rm -rf extras/mini-os extras/mini-os-remote
 
 .PHONY: distclean-docs
 distclean-docs:
Signature · 1 line
2.35.3
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Juergen Gross

The extras directory is used only as a download target for Mini-OS sources. Instead of special handling extras/mini-os* in .gitignore and the clean targets, just use extras for that purpose.

So add "extras" to .gitignore and remove it when doing a "make distclean".

of course with ...

Quoted 5 lines
---
 .gitignore | 2 +-
 .hgignore  | 6 +-----
 Makefile   | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

... the no longer applicable .hgignore hunk dropped.

Makefile clean-docs: · line 249

Quoted 7 lines
Makefile +1 -0
@@ -246,6 +246,7 @@ clean-docs:
 # clean, but blow away tarballs
 .PHONY: distclean
 distclean: $(TARGS_DISTCLEAN)
+	rm -rf extras

I'd also be inclined to add a trailing / here, but I guess I'll better leave the change untouched while committing.

Jan