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.per...@citrix.com> > Acked-by: Jan Beulich <jbeul...@suse.com> > --- > > 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 <dpsm...@apertussolutions.com> V/r, Daniel P. Smith Apertus Solutions, LLC