[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v9 30/30] build: adding out-of-tree support to the xen build



On 1/25/22 06:01, Anthony PERARD wrote:
> This implement out-of-tree support, there's two ways to create an
> out-of-tree build tree (after that, `make` in that new directory
> works):
>     make O=build
>     mkdir build; cd build; make -f ../Makefile
> also works with an absolute path for both.
> 
> This implementation only works if the source tree is clean, as we use
> VPATH.
> 
> This patch copies most new code with handling out-of-tree build from
> Linux v5.12.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> 
> Notes:
>     v9:
>     - acked
>     - add "source -> ." symlink in the in-tree build as well. This allow to
>       make relative symlink to the "common/efi/*.c" sources.
>     - also now, the "source" symlink is removed on `distclean`, add added to
>       .gitignore.
>     
>     v8:
>     - replace script/mkmakefile by cmd_makefile like it's been done in Linux
>       5.13.
>     - fix GNU Make version, replace few 0.81 by 3.81.
>     - reorder include header path in CFLAGS ( -I ), to have the $(objtree)
>       paths listed before the $(srctree) paths. This will be usefull later
>       if we allow to build out-of-tree from a dirty source tree.
>     - make use of -iquote
>     - sometime, add -iquote path even when not necessary when building 
> in-tree.
>     - extract code movement into a separate patch
>     - make use of the new "$(srcdir)" shortcut
>     - split command line in headers*.chk target into more lines
> 
>  .gitignore                   |   1 +
>  xen/Makefile                 | 143 +++++++++++++++++++++++++++++++----
>  xen/Rules.mk                 |  11 ++-
>  xen/arch/x86/arch.mk         |   5 +-
>  xen/arch/x86/boot/Makefile   |   6 ++
>  xen/common/efi/efi-common.mk |   3 +-
>  xen/include/Makefile         |  11 ++-
>  xen/test/livepatch/Makefile  |   2 +
>  xen/xsm/flask/Makefile       |   3 +-
>  xen/xsm/flask/ss/Makefile    |   1 +
>  10 files changed, 164 insertions(+), 22 deletions(-)
> 

<snip/>

> diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
> index a99038cb5722..d25312f4fa1c 100644
> --- a/xen/xsm/flask/Makefile
> +++ b/xen/xsm/flask/Makefile
> @@ -4,7 +4,8 @@ obj-y += flask_op.o
>  
>  obj-y += ss/
>  
> -CFLAGS-y += -I$(obj)/include
> +CFLAGS-y += -iquote $(obj)/include
> +CFLAGS-y += -I$(srcdir)/include
>  
>  AWK = awk
>  
> diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile
> index aba1339f3808..ffe92ec19ed6 100644
> --- a/xen/xsm/flask/ss/Makefile
> +++ b/xen/xsm/flask/ss/Makefile
> @@ -8,4 +8,5 @@ obj-y += services.o
>  obj-y += conditional.o
>  obj-y += mls.o
>  
> +CFLAGS-y += -iquote $(objtree)/xsm/flask/include
>  CFLAGS-y += -I$(srctree)/xsm/flask/include

Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>

V/r,
Daniel P. Smith
Apertus Solutions, LLC



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.