tools/libs: Fix build dependencies
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 8 Feb 2022 10:39:59 +0000 (10:39 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Feb 2022 11:15:53 +0000 (11:15 +0000)
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>
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 5d866b8d0423c99190b9546431b24783e3283e73..ef7362327feb929fd2664cc15101f65ed5abcb3f 100644 (file)
@@ -54,8 +54,6 @@ NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
--include $(DEPS_INCLUDE)
-
 clean: cleanlocal
 
 .PHONY: cleanlocal
index 8f5f3acd21aff53c7363ec36ee5906c030055e09..7f74ac0e7d93b26ca6ae8f122273a8a73aa2a2f9 100644 (file)
@@ -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
index 847eb4851fa97d99babf4f6b9a320b9c8e6a1ce2..b3d784c57f21f4e20e6b247208cec3c9aab0faab 100644 (file)
@@ -132,3 +132,7 @@ clean:
 
 .PHONY: distclean
 distclean: clean
+
+ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
+-include $(DEPS_INCLUDE)
+endif
index 56429556723121d81d8e95d28ed91f81481c7155..453bea00672360db86f9f4a990f2a17cabc3b24f 100644 (file)
@@ -264,5 +264,3 @@ cleanlocal:
        $(RM) -f libxenlight.map
        $(RM) -f $(AUTOSRCS) $(AUTOINCS)
        $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
-
--include $(DEPS_INCLUDE)
index 01417b5334a6f16e67766ff55a0d4eb242d3f5e2..58402133765a04fea31cde48711d07b161113539 100644 (file)
@@ -121,5 +121,3 @@ clean: cleanlocal
 cleanlocal:
        rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM)
        rm -f libxenstat.map
-
--include $(DEPS_INCLUDE)
index c208dbb48ad92c9f0735b7989d8ef2ff4c2f0227..8e33db6a6673cbdd3bd9b420689122b11dabe662 100644 (file)
@@ -29,8 +29,6 @@ ifeq ($(CONFIG_Linux),y)
 xs.opic: CFLAGS += -DUSE_DLSYM
 endif
 
--include $(DEPS_INCLUDE)
-
 .PHONY: install
 install: install-headers
 
index 87425d862a68b94dc663698ae2e7be14613920dd..72fecb4c495e07b3f1ee5285811125701c82dca7 100644 (file)
@@ -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
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