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

Re: [PATCH] build: generic top-level rule to build individual files


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 29 Mar 2022 11:28:13 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 29 Mar 2022 10:28:27 +0000
  • Ironport-data: A9a23:N4tfdKLdjPoQJrJLFE+R85UlxSXFcZb7ZxGr2PjKsXjdYENS0GEPy GAWUGuCbKzcYmX9fdB0OYvj9ksEsZKAydBmQAtlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh2dQ52YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NxUtp+1Vxp3BZLBvckHU0NhDwQuL5QTrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBMDtIIMYvGAm1TzDBOwqaZvCX7/L9ZlT2zJYasVmQ6iOO ptGNWMHgBLoRUZXJk4HB7EEp9ihiFncKx5Bjwqbuv9ii4TU5FMoi+W8WDbPQfSRXtlclEuco mPA/kz6DwscOdjZziCKmlqzgsffkCW9X5gdfJW66/prjVu71mEVThoMWjOTo/O0l0q/UNJ3M FEP92wlqq1a3FymSJzxUgO1pFaAvwUAQJxAHusi8gaPx6HIpQGDCQA5oiVpMYJ88pVsHHpzi wHPz4iB6SFTXKO9QGue9bKKsG2JBiUwAHUCPxYYaFsX2oy2yG0stS7nQtFmGa+zq9T6HzDs3 jyHxBQDa6UvYd0jjPviow2e6964jt2QF1NuuF2LNo6wxlkhDLNJcbBE/rQyARxoCI+CBmeMs 3Ef8yR1xLBfVMrd/MBhrQhkIV1I2xpnGGCH6bKMN8N4n9hIx5JFVdoKiN2ZDB01WvvogRezP CfuVfp5vfe/xkeCY65teJ6WAM8316XmHtmNfqmKMooSOscrLlHconEGiausM4bFyhJEfUYXY 8rzTCpRJSxCVfQPIMSeGY/xLoPHNghhnDiOFPgXPjys0KaEZW79dFv2GADmUwzN14vd+F+92 48Gb6OikkwDOMWjMni/2dNCdjgicClkba0aXuQKL4Zv1CI9Qzp/YxIQqJt8E7FYc1N9y76Qp yrnCxYCoLc97FWeQTi3hrlYQOuHdf5CQbgTZETA4X7AN6AfXLuS
  • Ironport-hdrordr: A9a23:hUoyl6PATKCs18BcTsGjsMiBIKoaSvp037Eqv3oedfVwSL39qy nOpoV/6faaslsssR0b9exofZPwJk80lqQFg7X5X43DYOCOggLBR+tfBMnZsl7d8kXFh4hgPM xbEpSWZueeMWRH
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Mar 28, 2022 at 09:41:26AM +0200, Jan Beulich wrote:
> --- a/Makefile
> +++ b/Makefile
> @@ -75,6 +75,13 @@ ifeq (x86_64,$(XEN_TARGET_ARCH))
>       XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub-if-enabled
>  endif
>  
> +define do-subtree
> +$(1)/%: FORCE
> +     $$(MAKE) -C $(1) $$*
> +endef
> +
> +$(foreach m,$(wildcard */Makefile),$(eval $(call do-subtree,$(patsubst 
> %/Makefile,%,$(m)))))

Any reason to not use $(SUBSYSTEMS) instead of $(wildcard ) ? Or maybe
you would rather been able to run `make xen/foo/bar.o` even after
running `./configure --disable-xen`.

> +
>  .PHONY: build-docs
>  build-docs:
>       $(MAKE) -C docs build
> @@ -334,3 +341,6 @@ uninstall: uninstall-tools-public-header
>  .PHONY: xenversion
>  xenversion:
>       @$(MAKE) --no-print-directory -C xen xenversion
> +
> +PHONY += FORCE

That's a Kbuild construct which will not work here. You need to write
".PHONY: FORCE" instead.

In Kbuild, there's a ".PHONY: $(PHONY)", and various macros needs to
know what's .PHONY.


With at least the .PHONY business taking care of: Reviewed-by: Anthony PERARD 
<anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

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