tools/include: Fix clean and rework COPYING for installed Xen public header
PATCH 1/1 tools/include: Fix clean and rework COPYING for installed Xen public header
Use actual include directory used to install the public header in COPYING file.
Also, move the input file out of "tools/include/xen/" because that directory is removed on make clean.
We can't used ./configure because $includedir contain another variable, so the change is done in Makefile.
---
Notes:
For 4.17 inclusion:
Doing make clean && make in the root dir is going to fail as make isn't going to find the COPYING file while trying to install the includes.
If that patch is too much, we could replace the sed by cp and just move COPYING instead of changing it.
tools/include/Makefile | 1 +
tools/include/{xen/COPYING => xen.COPYING.in} | 2 +-
tools/include/.gitignore | 1 +
tools/include/xen/.gitignore | 2 --
4 files changed, 3 insertions(+), 3 deletions(-)
rename tools/include/{xen/COPYING => xen.COPYING.in} (93%)
create mode 100644 tools/include/.gitignore
delete mode 100644 tools/include/xen/.gitignoretools/include/Makefile +1 -0
@@ -24,6 +24,7 @@ xen-foreign: xen-dir: mkdir -p xen/libelf acpi find xen/ acpi/ -type l -exec rm '{}' + + sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING ln -s $(XEN_ROOT)/xen/include/public/*.h xen/ ln -s $(XEN_ROOT)/xen/include/public/*/ xen/ ln -s ../xen-sys/$(XEN_OS) xen/sys
tools/include/xen.COPYING.in renamed from tools/include/xen/COPYING +1 -1
@@ -1,7 +1,7 @@ XEN NOTICE ========== -This licence applies to all files within this subdirectory ("/usr/include/xen") +This licence applies to all files within this subdirectory ("@includedir@") with the exception of "sys/" which may include headers under different licences.
tools/include/.gitignore new file +1 -0
@@ -0,0 +1 @@ +/xen/
tools/include/xen/.gitignore deleted +0 -2
@@ -1,2 +0,0 @@ -* -!COPYING
Signature · 1 line
Anthony PERARD
Quoted 11 lines · Anthony PERARD
Use actual include directory used to install the public header in COPYING file.
Also, move the input file out of "
tools/include/xen/" because that directory is removed onmake clean.We can't used ./configure because $includedir contain another variable, so the change is done in
Makefile.Fixes 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")Signed-off-by Anthony PERARD <[email protected]>
(with a question, perhaps just for my own education, at the end)
Quoted 8 lines
---
Notes:
For 4.17 inclusion: Doing `make clean && make` in the root dir is going to fail as make isn't going to find the COPYING file while trying to install the includes.
I second this would better be fixed for the release.
tools/include/Makefile xen-foreign: · line 27
Quoted 7 lines
tools/include/Makefile +1
-0@@ -24,6 +24,7 @@ xen-foreign: xen-dir: mkdir -p xen/libelf acpi find xen/ acpi/ -type l -exec rm '{}' + + sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING
Any particular reason for using -e here?
Jan
Quoted 13 lines · Jan Beulich
Quoted 11 lines · Anthony PERARD
Use actual include directory used to install the public header in COPYING file.
Also, move the input file out of "
tools/include/xen/" because that directory is removed onmake clean.We can't used ./configure because $includedir contain another variable, so the change is done in
Makefile.Fixes 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")Signed-off-by Anthony PERARD <[email protected]>
Quoted 6 lines
Reviewed-by Jan Beulich <[email protected]>(with a question, perhaps just for my own education, at the end)
tools/include/Makefile xen-foreign: · line 27
Quoted 1 line
tools/include/Makefile +1
-0+ sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYINGAny particular reason for using -e here?
No, I just often use it, even when unnecessary.
Thanks,
Signature · 1 line
Anthony PERARD
Hi
Quoted 11 lines
-----Original Message-----
Subject: Re: [XEN PATCH maybe for-4.17]tools/include: Fix clean and rework COPYING for installed Xen public headerQuoted 6 lines · Anthony PERARD
Use actual include directory used to install the public header in COPYING file.
Also, move the input file out of "
tools/include/xen/" because that directory is removed onmake clean.
Quoted 8 lines
Quoted 4 lines
We can't used ./configure because $includedir contain another variable, so the change is done in
Makefile.Fixes 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, dueto several licences")
Quoted 1 line
Signed-off-by Anthony PERARD <[email protected]>Reviewed-by Jan Beulich <[email protected]>
Kind regards,
Henry
Quoted 45 lines · Anthony PERARD
Use actual include directory used to install the public header in COPYING file.
Also, move the input file out of "
tools/include/xen/" because that directory is removed onmake clean.We can't used ./configure because $includedir contain another variable, so the change is done in
Makefile.Fixes 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")Signed-off-by Anthony PERARD <[email protected]>Reviewed-by Jan Beulich <[email protected]>---
Notes:
For 4.17 inclusion:Doing
make clean && makein the root dir is going to fail as make isn't going to find the COPYING file while trying to install the includes.If that patch is too much, we could replace the
sedbycpand just move COPYING instead of changing it.tools/include/Makefile | 1 + tools/include/{xen/COPYING => xen.COPYING.in} | 2 +- tools/include/.gitignore | 1 + tools/include/xen/.gitignore | 2 -- 4 files changed, 3 insertions(+), 3 deletions(-)rename
tools/include/{xen/COPYING=> xen.COPYING.in} (93%) create mode 100644tools/include/.gitignoredelete mode 100644tools/include/xen/.gitignoretools/include/Makefile +0
-0@@ -24,6 +24,7 @@ xen-foreign:xen-dir:
mkdir -p xen/libelf acpi
find xen/ acpi/ -type l -exec rm '{}' +
tools/include/Makefile xen-foreign: · line 27
Quoted 1 line
tools/include/Makefile +1
-0+ sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING
If I understand correctly, the -e can be dropped as this is the only command we are issuing to sed.
The patch looks good, I’ve tested it with and without the -e and it works
Cheers,
Luca