diff mbox series

[XEN,52/57] stubdom: only build libxen*.a from tools/libs/

Message ID 20211206170241.13165-53-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Toolstack build system improvement, toward non-recursive makefiles | expand

Commit Message

Anthony PERARD Dec. 6, 2021, 5:02 p.m. UTC
Avoid generating *.map files or running headers.chk when all we need
is the libxen*.a.

Also, allow force make to check again if libxen*.a needs rebuilt by
adding a '.PHONY' prerequisite.

Also, remove DESTDIR= as we don't do installation in this target, so
the value of DESTDIR doesn't matter.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Samuel Thibault Dec. 11, 2021, 11:47 p.m. UTC | #1
Anthony PERARD, le lun. 06 déc. 2021 17:02:35 +0000, a ecrit:
> Avoid generating *.map files or running headers.chk when all we need
> is the libxen*.a.
> 
> Also, allow force make to check again if libxen*.a needs rebuilt by
> adding a '.PHONY' prerequisite.
> 
> Also, remove DESTDIR= as we don't do installation in this target, so
> the value of DESTDIR doesn't matter.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  stubdom/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index ccfcf5b75f..5fb5dbc341 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -354,8 +354,8 @@ define BUILD_lib
>   .PHONY: libxen$(1) clean-libxen$(1)
>   libxen$(1): libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a
>   libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: $$(LIBDEPS_$(1)) $$(LIBDEP_$(1))
> - libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE)
> -	CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libs-$$(XEN_TARGET_ARCH)/$(1)
> + libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE) .phony
> +	CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y -C $$(@D) $$(@F)
>  
>   clean-libxen$(1):
>  	[ ! -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ] || $$(MAKE) DESTDIR= -C libs-$$(XEN_TARGET_ARCH)/$(1) clean
> -- 
> Anthony PERARD
>
diff mbox series

Patch

diff --git a/stubdom/Makefile b/stubdom/Makefile
index ccfcf5b75f..5fb5dbc341 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -354,8 +354,8 @@  define BUILD_lib
  .PHONY: libxen$(1) clean-libxen$(1)
  libxen$(1): libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a
  libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: $$(LIBDEPS_$(1)) $$(LIBDEP_$(1))
- libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE)
-	CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libs-$$(XEN_TARGET_ARCH)/$(1)
+ libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE) .phony
+	CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y -C $$(@D) $$(@F)
 
  clean-libxen$(1):
 	[ ! -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ] || $$(MAKE) DESTDIR= -C libs-$$(XEN_TARGET_ARCH)/$(1) clean