On Wed, Mar 15, 2023 at 03:56:21PM +0100, Jan Beulich wrote: > This symlink is getting in the way of using e.g. "find" on the xen/ > subtree, and it isn't really needed when not building out-of-tree: > the one use that there was can easily be avoided. > > Signed-off-by: Jan Beulich <[email protected]> > > --- a/xen/common/efi/efi-common.mk > +++ b/xen/common/efi/efi-common.mk > @@ -5,11 +5,16 @@ CFLAGS-y += -fshort-wchar > CFLAGS-y += -iquote $(srctree)/common/efi > CFLAGS-y += -iquote $(srcdir) > > +source := > +ifneq ($(abs_objtree),$(abs_srctree))
Could you use "ifdef building_out_of_srctree" instead, or at least use the variable $(building_out_of_srctree)? At least that mean there's a single way in the tree to differentiate between both kind of build. > +source := source/ > +endif > + > # Part of the command line transforms $(obj) > # e.g.: It transforms "dir/foo/bar" into successively > # "dir foo bar", ".. .. ..", "../../.." > $(obj)/%.c: $(srctree)/common/efi/%.c FORCE > - $(Q)ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, > ,$(obj))))/source/common/efi/$(<F) $@ > + $(Q)ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, > ,$(obj))))/$(source)common/efi/$(<F) $@ Instead of $(source), I did proposed initially "$(if $(building_out_of_srctree),source/)" for here, or it that making the command line too long? https://lore.kernel.org/xen-devel/YebpHJk1JIArcdvW@perard/t/#u Having "source := $(if $(building_out_of_srctree),source/)" might be an ok alternative in place of the use if "ifneq/endif" which take 4 lines? Thanks, -- Anthony PERARD
