diff mbox series

tools: Fix removal of COPYING and .gitignore

Message ID 9f8818c9fe3f3ed43aa42bd0a06645af69c46034.1670311329.git.viresh.kumar@linaro.org (mailing list archive)
State New, archived
Headers show
Series tools: Fix removal of COPYING and .gitignore | expand

Commit Message

Viresh Kumar Dec. 6, 2022, 7:25 a.m. UTC
The Makefile continues to remove the entire tools/include/xen/ directory
on "make clean", which isn't the right thing to do anymore since this
file contains files like COPYING and .gitignore now.

Since there are only two files at the moment, use "xen/[a-z]*" regex to
remove everything else.

Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
I got into trouble as my build script does a "make clean" before building
everything again and so build fails without the COPYING file.

Based of:

https://xenbits.xen.org/gitweb/?p=people/julieng/xen-unstable.git;a=shortlog;h=refs/heads/for-next/4.18

 tools/include/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jürgen Groß Dec. 6, 2022, 7:45 a.m. UTC | #1
On 06.12.22 08:25, Viresh Kumar wrote:
> The Makefile continues to remove the entire tools/include/xen/ directory
> on "make clean", which isn't the right thing to do anymore since this
> file contains files like COPYING and .gitignore now.

I don't see a .gitignore file in tools/include/xen, and the COYPING file
is created by tools/include/Makefile when creating tools/include/xen.

> Since there are only two files at the moment, use "xen/[a-z]*" regex to
> remove everything else.
> 
> Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

NAK.

> ---
> I got into trouble as my build script does a "make clean" before building
> everything again and so build fails without the COPYING file.

This is working just fine for me.

> Based of:
> 
> https://xenbits.xen.org/gitweb/?p=people/julieng/xen-unstable.git;a=shortlog;h=refs/heads/for-next/4.18

Maybe in the tree you are using commit 25b55688e1f20ebb is missing?


Juergen
Viresh Kumar Dec. 6, 2022, 8:43 a.m. UTC | #2
On 06-12-22, 08:45, Juergen Gross wrote:
> Maybe in the tree you are using commit 25b55688e1f20ebb is missing?

Yes, that's the missing part I think.
diff mbox series

Patch

diff --git a/tools/include/Makefile b/tools/include/Makefile
index f838171e8cd5..2ca344cba521 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -84,7 +84,7 @@  install: all
 
 .PHONY: clean
 clean:
-	rm -rf xen xen-xsm acpi
+	rm -rf xen/[a-z]* xen-xsm acpi
 	$(MAKE) -C xen-foreign clean
 	rm -f _*.h