All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH] tools/libs: Fix build dependencies
@ 2022-02-08 10:39 Anthony PERARD
  2022-02-08 11:09 ` Juergen Gross
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2022-02-08 10:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony PERARD, Wei Liu, Juergen Gross

Some libs' Makefile aren't loading the dependencies files *.d2.

We can load them from "libs.mk" as none of the Makefile here are
changing $(DEPS) or $(DEPS_INCLUDE) so it is fine to move the
"include" to "libs.mk".

As a little improvement, don't load the dependencies files (and thus
avoid regenerating the *.d2 files) during `make clean`.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/libs/ctrl/Makefile  | 2 --
 tools/libs/guest/Makefile | 2 --
 tools/libs/light/Makefile | 2 --
 tools/libs/stat/Makefile  | 2 --
 tools/libs/store/Makefile | 2 --
 tools/libs/util/Makefile  | 2 --
 tools/libs/vchan/Makefile | 1 -
 tools/libs/libs.mk        | 4 ++++
 8 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile
index 5d866b8d04..ef7362327f 100644
--- a/tools/libs/ctrl/Makefile
+++ b/tools/libs/ctrl/Makefile
@@ -54,8 +54,6 @@ NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
--include $(DEPS_INCLUDE)
-
 clean: cleanlocal
 
 .PHONY: cleanlocal
diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile
index 8f5f3acd21..7f74ac0e7d 100644
--- a/tools/libs/guest/Makefile
+++ b/tools/libs/guest/Makefile
@@ -106,8 +106,6 @@ include $(XEN_ROOT)/tools/libs/libs.mk
 libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(filter -l%,$(zlib-options))
 libxenguest.so.$(MAJOR).$(MINOR): APPEND_LDFLAGS += $(COMPRESSION_LIBS) -lz
 
--include $(DEPS_INCLUDE)
-
 .PHONY: cleanlocal
 cleanlocal:
 	rm -f libxenguest.map
diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile
index be32d95d39..35685ab7ee 100644
--- a/tools/libs/light/Makefile
+++ b/tools/libs/light/Makefile
@@ -268,5 +268,3 @@ cleanlocal:
 	$(RM) -f libxenlight.map
 	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 	$(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
-
--include $(DEPS_INCLUDE)
diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile
index 01417b5334..5840213376 100644
--- a/tools/libs/stat/Makefile
+++ b/tools/libs/stat/Makefile
@@ -121,5 +121,3 @@ clean: cleanlocal
 cleanlocal:
 	rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM)
 	rm -f libxenstat.map
-
--include $(DEPS_INCLUDE)
diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile
index c208dbb48a..8e33db6a66 100644
--- a/tools/libs/store/Makefile
+++ b/tools/libs/store/Makefile
@@ -29,8 +29,6 @@ ifeq ($(CONFIG_Linux),y)
 xs.opic: CFLAGS += -DUSE_DLSYM
 endif
 
--include $(DEPS_INCLUDE)
-
 .PHONY: install
 install: install-headers
 
diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile
index 87425d862a..72fecb4c49 100644
--- a/tools/libs/util/Makefile
+++ b/tools/libs/util/Makefile
@@ -49,8 +49,6 @@ $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS)
 	@rm -f $*.[ch]
 	$(FLEX) --header-file=$*.h --outfile=$*.c $<
 
--include $(DEPS_INCLUDE)
-
 clean: cleanlocal
 
 .PHONY: cleanlocal
diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile
index df112f1b88..83a45d2817 100644
--- a/tools/libs/vchan/Makefile
+++ b/tools/libs/vchan/Makefile
@@ -11,7 +11,6 @@ SRCS-y += io.c
 NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
--include $(DEPS_INCLUDE)
 
 clean: cleanlocal
 
diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 847eb4851f..b3d784c57f 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -132,3 +132,7 @@ clean:
 
 .PHONY: distclean
 distclean: clean
+
+ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
+-include $(DEPS_INCLUDE)
+endif
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [XEN PATCH] tools/libs: Fix build dependencies
  2022-02-08 10:39 [XEN PATCH] tools/libs: Fix build dependencies Anthony PERARD
@ 2022-02-08 11:09 ` Juergen Gross
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2022-02-08 11:09 UTC (permalink / raw)
  To: Anthony PERARD, xen-devel; +Cc: Wei Liu


[-- Attachment #1.1.1: Type: text/plain, Size: 534 bytes --]

On 08.02.22 11:39, Anthony PERARD wrote:
> Some libs' Makefile aren't loading the dependencies files *.d2.
> 
> We can load them from "libs.mk" as none of the Makefile here are
> changing $(DEPS) or $(DEPS_INCLUDE) so it is fine to move the
> "include" to "libs.mk".
> 
> As a little improvement, don't load the dependencies files (and thus
> avoid regenerating the *.d2 files) during `make clean`.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-08 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 10:39 [XEN PATCH] tools/libs: Fix build dependencies Anthony PERARD
2022-02-08 11:09 ` Juergen Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.