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

[PATCH] build: omit "source" symlink when building hypervisor in-tree


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Mar 2023 15:56:21 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KDPy47sNC5VH+IRcfbbFuhuXJwhwTiwBQolUW2VF7I8=; b=ZjMs4ApRqjC7kj0eTyVdA1B5/zObpX20xztCbIqQg1KBZlbYkrgaAxjIRbttK+MH0GfIAho6Q+J8P9bfQpcw0M+9sF7c9GNXb2IkhtOGDX2FIzb3AZGxO+zLTVARVC4TVjdOdaxe4HuaSh9UhcWA2xP0e9C9xayPIZntvJ3Aj+39Lq3r9jAj653k62Q3sT49EFe+LLcy9wYfyWSM1Eqv/pnraraYbNyloSkrYAtjs+jfub4zJ3VC+/g7pQVKVWLbvwzRPKLyaC+PHbEVD94acAfIgxD29V+IHnP3XRWwVf3S0uBgg19A+yw6q7Y0iGPPUo7YCRLdwta9hQz/PgsemQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bb02jUtaHDrvuXBagkL4IiO6QocBiolOEziSzvdxAjQGvSOuESbaLjoJGIkl/hYlT9dTG0lTDqKvrmo5mtOzIQWzIfGqR1fueFl6xXSVfSJVhqL+N1NOyUJ4lVxUFF6jxj3/nHqEeOfL0d5bMQOXGQGRA9b6Letj9BU1VYsa6I/FUJqimjlj4EvQSRiPOxP0PxfoWav3eaSI3EwtXhkk8IZz+FgwXEB9t2ryLJZotMFI0yF2kb5aCLQs/6H3W3NL5s9IvLIgN4iYv2CgBODSNSRvSQp3219Gx/BI5t43OHqFcxlZ79caqC5NUG1M/J+fLJ4zeiwGUvc5ksNjcDezAg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Mar 2023 14:56:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <jbeulich@xxxxxxxx>

--- a/.gitignore
+++ b/.gitignore
@@ -295,7 +295,6 @@ xen/include/xen/*.new
 xen/include/xen/compile.h
 xen/include/xen/hypercall-defs.h
 xen/include/xen/lib/x86/cpuid-autogen.h
-xen/source
 xen/test/livepatch/config.h
 xen/test/livepatch/expect_config.h
 xen/test/livepatch/*.livepatch
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -310,7 +310,6 @@ cmd_makefile = { \
     } > Makefile
 
 outputmakefile:
-       $(Q)ln -fsn $(srctree) source
 ifdef building_out_of_srctree
        $(Q)if [ -f $(srctree)/.config -o \
                 -d $(srctree)/include/config -o \
@@ -321,6 +320,7 @@ ifdef building_out_of_srctree
                echo >&2 "***"; \
                false; \
        fi
+       $(Q)ln -fsn $(srctree) source
        $(call cmd,makefile)
        $(Q)test -e .gitignore || \
        { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
--- 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))
+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) $@
 
 clean-files += $(patsubst %.o, %.c, $(EFIOBJ-y:.init.o=.o) $(EFIOBJ-))
 clean-files += common-stub.c



 


Rackspace

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