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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 12:23:37 +0200
  • 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=WUp7Plbc2kXtBLdSWWqlV8g55m/2J4f6Qht55ExnldM=; b=UzqGkiwfyl4+0Bm+tBtXKc7UBpim4UQK7TwRMxaDyUFN99YQNpxGCftM0KGBEBhfnIGzWnk4UEhzPErzo274PR8/IzwG/IirX7FXnzZnMwQ0/dGfDwLaeOBt9grmbsy1tQBkhYBsRfOr9jm6E2rlaAiCD/16vXV0zfBaNibdOm2812Lpp0tozkpR9y3trd0ghAyQE6U9jp3C/JzdU8vhv8T0oYVeGEJhBifkbFMGPXLbj6+U189f1ReQL5dgrOD+Q8ZeXINV391fjS7XEmvFcEedpuu0WTQt20q3pfJ3VA6aAzdtFso20QLLhHW3QkdfgrufQ0e++eylbdPrDMRX3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBf4jZHXck5Lx+va/zVqp5fnSzUM4R84romrJBcFLjTMkGnzspnqoedircjRnq+UcydUVonaMf0sX7S6/wD3YD8kn4bX4EeNk9SGmw5n7UeKluszWtD2j2cD13sAp+V2L2p4/WZuyHZ8/YgdYqXnpxEb03gGAJbn7Kmv/cW6AbXzahEaujMb3LZH+WybJf36S2sAliMdc2WsDKcxl0p50YflhfwrMe5M27FiuhSwgIJbt5WJU0GHxs6oPba4zlJ70W8EBlkl6xu5XNWgpBX9uqJxNN6CQU75MlhANFsPV2BfkS4n1O7Hn4fSDSjRL2+THOG+AqL+jv7LkI7vJ1GQNQ==
  • 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 29 Mar 2023 10:23:49 +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/acm_policy.h
 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®.