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

[PATCH] build: shorten macro references


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 4 May 2023 18:16:13 +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=XShP+I010xYQHT+tjQ/t6tTbyUcOlkO/Qe5OKDnivA0=; b=jeYMry1EH9lkAX9Z5SgWbby6ko5SSBRl33BTGZKb0PtySXR7qXZpNT8a6niPJOsbq23dIFwy2Pu/GYd1fH/WTASO3AK+H26nDh9RpGVfVsTqYoRCsEwxWkoDBYic2/30wlOWDTGUcS1Ty2OdQ0UdrMRjP+F6OjyAiEYEUVxk7+K7vsFzV8mVXrm1JE0q/sW2EibTalklpNj8Uym6Lnq40ispg6b4T21Wo/2RXQpguO3CQVrnib2dH4EbvVHKpj1uj2UOk96kMvhgzs+Tf+YeAdwIZZBuwnn3OX0PNE0PZNgcAd+3rQhJC/UPpVpAUCme5z9UDDvPp1CJYAWs9DN/iQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fAPZt5EH1bG/JD1PnkOnmqHz5Bm+krvubRyDUOZujf5iertOEbV/yRHRYrw11JQz3xag1Ksh0ZYUYsGIym1GsilgQg7ZoO+GY0gZa6OPEAGD8/33aOgfD2M7ZYJi3X2qtfFPdOxxDU5reCdlxv7Ez7I8QwrH0jUngUwc2TLkO99KHmJYNXoNY0d7PHAOh10dXyXWfHaCzh/5OddAj4MJApZvnyTWZ+14SBpFVS8cLeSkbBToZckG26e24bzuknV/8fQs6ROkJhMTOG89LLQnpsTHjtrni2uy6yqHHmhsrD7WasLEmulFks5Hf926VIpOMSwY0Ouw932KTr/0nKT7yQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Bobby Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 04 May 2023 16:16:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Presumably by copy-and-paste we've accumulated a number of instances of
$(@D)/$(@F), which really is nothing else than $@. The split form only
needs using when we want to e.g. insert a leading . at the beginning of
the file name portion of the full name.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -104,9 +104,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
        $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
            $(@D)/.$(@F).1.o -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv 
--sort \
-               >$(@D)/$(@F).map
+               >$@.map
        rm -f $(@D)/.$(@F).[0-9]*
 
 .PHONY: include
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -10,9 +10,9 @@ $(TARGET): $(TARGET)-syms
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv 
--sort \
-               >$(@D)/$(@F).map
+               >$@.map
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
        $(call if_changed_dep,cpp_lds_S)
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -150,9 +150,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
        $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
            $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv 
--sort \
-               >$(@D)/$(@F).map
+               >$@.map
        rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
        $(SHELL) $(srctree)/tools/check-endbr.sh $@
@@ -224,8 +224,9 @@ endif
        $(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
        $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
              $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) 
$(note_file_option) -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
-               | $(objtree)/tools/symbols --all-symbols --xensyms --sysv 
--sort >$(@D)/$(@F).map
+       $(NM) -pa --format=sysv $@ \
+               | $(objtree)/tools/symbols --all-symbols --xensyms --sysv 
--sort \
+               >$@.map
 ifeq ($(CONFIG_DEBUG_INFO),y)
        $(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O 
elf64-x86-64 $@ $@.elf
 endif



 


Rackspace

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