build: use obj-y += subdir/ instead of subdir-y
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 6 Mar 2020 09:11:23 +0000 (10:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 6 Mar 2020 09:11:23 +0000 (10:11 +0100)
commit6e290e389de3d8cf1d146e9a45ca312c4d116f34
treeb88acd8967bc38e6ac27eb30b4b9f2a33e917b44
parent40213cd8626bac712fa69c4978993e87b57a7d0c
build: use obj-y += subdir/ instead of subdir-y

This is part of upgrading our build system and import more of Linux's
one.

In Linux, subdir-y in Makefiles is only used to descend into
subdirectory when there are no object to build, Xen doesn't have that
and all subdir have object to be included in the final binary.

To allow the new syntax, the "obj-y" and "subdir-*" calculation in
Rules.mk is changed and partially imported from Linux's Kbuild.

The command used to modify the Makefile was:
    sed -i -r 's#^subdir-(.*)#obj-\1/#;' **/Makefile

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
19 files changed:
xen/Rules.mk
xen/arch/arm/Makefile
xen/arch/arm/arm32/Makefile
xen/arch/arm/arm64/Makefile
xen/arch/x86/Makefile
xen/arch/x86/acpi/Makefile
xen/arch/x86/cpu/Makefile
xen/arch/x86/guest/Makefile
xen/arch/x86/hvm/Makefile
xen/arch/x86/mm/Makefile
xen/arch/x86/x86_64/Makefile
xen/common/Makefile
xen/drivers/Makefile
xen/drivers/acpi/Makefile
xen/drivers/passthrough/Makefile
xen/drivers/passthrough/vtd/Makefile
xen/lib/Makefile
xen/xsm/Makefile
xen/xsm/flask/Makefile