tools/libs: Fix build dependencies
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 16 Feb 2022 14:53:49 +0000 (15:53 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 16 Feb 2022 14:53:49 +0000 (15:53 +0100)
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>
master commit: e62cc29f9b6c42b67182a1362e2ea18bad75b5ff
master date: 2022-02-08 11:15:53 +0000

tools/libs/ctrl/Makefile
tools/libs/guest/Makefile
tools/libs/libs.mk
tools/libs/light/Makefile
tools/libs/stat/Makefile
tools/libs/store/Makefile
tools/libs/util/Makefile
tools/libs/vchan/Makefile

index 519246b0d60f511e208da3dc189b527ade7a930b..6ff591879853c43ad3478d70441791e7b12e79b1 100644 (file)
@@ -59,8 +59,6 @@ $(eval $(genpath-target))
 
 $(LIB_OBJS) $(PIC_OBJS): _paths.h
 
--include $(DEPS_INCLUDE)
-
 clean: cleanlocal
 
 .PHONY: cleanlocal
index 2ce92d247ef153e68345c7b053af2481a5be8881..35f39e74cd3f1b1a5d6257f2952eedf9b1ada5b2 100644 (file)
@@ -113,8 +113,6 @@ $(eval $(genpath-target))
 
 xc_private.h: _paths.h
 
--include $(DEPS_INCLUDE)
-
 .PHONY: cleanlocal
 cleanlocal:
        rm -f libxenguest.map
index ebdb2a47825a88e152ca901b7d02c099ed6f0b49..f1554462fbbda17d051120ba5950f24140aabd9f 100644 (file)
@@ -142,3 +142,7 @@ distclean: clean
 
 .PHONY: FORCE
 FORCE:
+
+ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
+-include $(DEPS_INCLUDE)
+endif
index 194bc5f2681b8a6c5f1f349ef7ddf361f01a9ffc..dd43f37b4c424f898b469b92788ce1df7fdaed7a 100644 (file)
@@ -273,5 +273,3 @@ cleanlocal:
        $(RM) -f libxenlight.map
        $(RM) -f $(AUTOSRCS) $(AUTOINCS)
        $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
-
--include $(DEPS_INCLUDE)
index c99508ae6ba813b18934af10af4cc553a59fe719..89b54121329ba15bf2d3daf904c3c31302c337e5 100644 (file)
@@ -124,7 +124,5 @@ cleanlocal:
        rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM) _paths.h
        rm -f libxenstat.map
 
--include $(DEPS_INCLUDE)
-
 genpath-target = $(call buildmakevars2header,_paths.h)
 $(eval $(genpath-target))
index 43b018aa8c19a1aba93a363ad76c36de025414f3..2b435220acfd609bdbf3d01db324ade40f432ee9 100644 (file)
@@ -31,8 +31,6 @@ else
 PKG_CONFIG_REMOVE += -ldl
 endif
 
--include $(DEPS_INCLUDE)
-
 .PHONY: install
 install: install-headers
 
index f5f9e89fee68c66051b58e147a8dfa913c1a2df2..b739360be7c2d123f81b6f34e57b82ffbb6ca3c4 100644 (file)
@@ -52,8 +52,6 @@ $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) _paths.h
 genpath-target = $(call buildmakevars2header,_paths.h)
 $(eval $(genpath-target))
 
--include $(DEPS_INCLUDE)
-
 clean: cleanlocal
 
 .PHONY: cleanlocal
index df112f1b8853b71e63cdf75a95ffc80d0000d9be..83a45d2817b8b465e12603cc0f23c35cf8ea31a0 100644 (file)
@@ -11,7 +11,6 @@ SRCS-y += io.c
 NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
--include $(DEPS_INCLUDE)
 
 clean: cleanlocal