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

Re: [XEN PATCH v9 26/30] build: replace $(BASEDIR) and use $(srctree)


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 25 Jan 2022 11:10:31 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643127131; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=a+oPP2M7d6P3zr6pbFs2njrmeT1J0gwDJU7cTXHyolY=; b=AaDkWlTShoIXqOCCQ5evmyYzB1DnWOfZkunmccS2oMQB+sS8vjxEiTBo9TB66Y4GZY/E3uVuSR3cSqnLPK5sslUnTxYMEYZeApsxbeGv6b9K9XBMyKBYfNYaDtIBgLhRNiHjrIabKlXyKbvJWLH3+vI/7tXnYvrki/qVBCRwe6Q=
  • Arc-seal: i=1; a=rsa-sha256; t=1643127131; cv=none; d=zohomail.com; s=zohoarc; b=YeGQyUQqDwo2SyhAUsIQvWOAYbhRNxhRKU8jbwUosZunKEY6umkI5Jcs0ykSq0XxA0wgQEbv1kXjfffLGm1duTHR1idnIHWY3/5hdDyJZOu++CDM/1hFgfPunkfAFn/3bRzqLksNI0A/QruJUTMJZsmWJBc1zfV+rs9gUJkH7Rg=
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 25 Jan 2022 16:12:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 1/25/22 06:00, Anthony PERARD wrote:
> $(srctree) is a better description for the source directory than
> $(BASEDIR) that has been used for both source and build directory
> (which where the same).
> 
> This adds $(srctree) to a few path where make's VPATH=$(srctree) won't
> apply. And replace $(BASEDIR) by $(srctree).
> 
> Introduce "$(srcdir)" as a shortcut for "$(srctree)/$(src)" as the
> later is used often enough.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> 
> Notes:
>     v9:
>     - acked
>     - reword "# shortcut for $(srctree)/$(src)" into "# shortcuts" in both
>       places.
>     
>     v8:
>     - merge of two patchs from v7:
>         build: add $(srctree) in few key places
>         build: replace $(BASEDIR) by $(srctree)
>       both patch were acked
>     - introduce $(srcdir) as a shortcut for $(srctree)/$(src)
> 
>  xen/Kconfig                 |  4 ++--
>  xen/Makefile                |  7 +++----
>  xen/Rules.mk                |  9 ++++++---
>  xen/arch/x86/arch.mk        |  2 +-
>  xen/build.mk                |  4 ++--
>  xen/common/Makefile         |  2 +-
>  xen/common/libfdt/Makefile  |  2 +-
>  xen/include/Makefile        | 14 +++++++-------
>  xen/scripts/Kconfig.include |  2 +-
>  xen/scripts/Makefile.clean  |  5 ++++-
>  xen/xsm/flask/Makefile      | 10 +++++-----
>  11 files changed, 33 insertions(+), 28 deletions(-)

<snip/>

> diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
> index 4ac6fb8778ae..a99038cb5722 100644
> --- a/xen/xsm/flask/Makefile
> +++ b/xen/xsm/flask/Makefile
> @@ -8,8 +8,8 @@ CFLAGS-y += -I$(obj)/include
>  
>  AWK = awk
>  
> -FLASK_H_DEPEND := $(addprefix $(src)/policy/,security_classes initial_sids)
> -AV_H_DEPEND = $(src)/policy/access_vectors
> +FLASK_H_DEPEND := $(addprefix $(srcdir)/policy/,security_classes 
> initial_sids)
> +AV_H_DEPEND := $(srcdir)/policy/access_vectors
>  
>  FLASK_H_FILES := flask.h class_to_string.h initial_sid_to_string.h
>  AV_H_FILES := av_perm_to_string.h av_permissions.h
> @@ -18,14 +18,14 @@ ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) 
> $(AV_H_FILES))
>  $(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix 
> $(obj)/,$(ALL_H_FILES))
>  extra-y += $(ALL_H_FILES)
>  
> -mkflask := $(src)/policy/mkflask.sh
> +mkflask := $(srcdir)/policy/mkflask.sh
>  quiet_cmd_mkflask = MKFLASK $@
>  cmd_mkflask = $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND)
>  
>  $(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE
>       $(call if_changed,mkflask)
>  
> -mkaccess := $(src)/policy/mkaccess_vector.sh
> +mkaccess := $(srcdir)/policy/mkaccess_vector.sh
>  quiet_cmd_mkaccess = MKACCESS VECTOR $@
>  cmd_mkaccess = $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND)
>  
> @@ -36,7 +36,7 @@ obj-bin-$(CONFIG_XSM_FLASK_POLICY) += flask-policy.o
>  $(obj)/flask-policy.o: $(obj)/policy.bin
>  
>  $(obj)/flask-policy.S: BINFILE_FLAGS := -i
> -$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE
> +$(obj)/flask-policy.S: $(srctree)/tools/binfile FORCE
>       $(call if_changed,binfile,$(obj)/policy.bin xsm_flask_init_policy)
>  targets += flask-policy.S
>  

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®.