libs,tools/include: Clean "clean" targets
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 Feb 2022 15:13:08 +0000 (15:13 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 16 Jun 2022 15:58:50 +0000 (16:58 +0100)
There is no need for an extra "cleanlocal" target, we can use
double-colon rules instead.

Generated headers are now in tools/include/, so remove those file
there.

Remove -f flag as it's already in $(RM).

libs.mk:
  - don't try to remove "*.rpm" anymore.

libs/light:
  - "_paths.*.tmp" isn't created anymore.
  - clean "libxenlight_test.so" and "libxl_test_*.opic".

libs/stat:
  - don't remove $(DEPS_RM) from here as it is already done in
    "libs.mk".

libs/util:
  - fix clean of version-script file.

include/xen-foreign:
  - remove __pycache__

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/include/Makefile
tools/include/xen-foreign/Makefile
tools/libs/ctrl/Makefile
tools/libs/guest/Makefile
tools/libs/libs.mk
tools/libs/light/Makefile
tools/libs/stat/Makefile
tools/libs/util/Makefile
tools/libs/vchan/Makefile

index d965987f55854b7876488888a6012f82815e4625..3a03a0b0fa4d92b22a0b4c5bf785a334f4cb64a1 100644 (file)
@@ -82,6 +82,7 @@ uninstall:
 clean:
        rm -rf xen xen-xsm acpi
        $(MAKE) -C xen-foreign clean
+       rm -f _*.h
 
 .PHONY: dist
 dist: install
index 6ce51daf5eedea35a50e7c270846ecc67ff91e17..b538d0ea9475bea781ecae95ec4e6c2f2e6e0fba 100644 (file)
@@ -13,6 +13,7 @@ clean:
        rm -f $(headers)
        rm -f checker checker.c
        rm -f *.pyc *.o *~
+       rm -rf __pycache__
 
 distclean: clean
 
index ef7362327feb929fd2664cc15101f65ed5abcb3f..f58c4ef1aad4a4d47ca39624dfe8064de3d813a3 100644 (file)
@@ -54,8 +54,5 @@ NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
+clean::
        rm -f libxenctrl.map
index 2005d8a67dfd332ee9ab8c5a905beea64f32227c..56483c545fda3af458cec425b6c894405b08984d 100644 (file)
@@ -104,6 +104,5 @@ include $(XEN_ROOT)/tools/libs/libs.mk
 
 libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz
 
-.PHONY: cleanlocal
-cleanlocal:
+clean::
        rm -f libxenguest.map
index a173f59a8b045ef0dfac6c1a3435eb56a07b4e14..c2eaefc9286afd01022539bc37eb3a9e39ce8bbb 100644 (file)
@@ -124,8 +124,8 @@ TAGS:
        etags -t *.c *.h
 
 .PHONY: clean
-clean:
-       rm -rf *.rpm $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS)
+clean::
+       rm -rf $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS)
        rm -f lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) lib$(LIB_FILE_NAME).so.$(MAJOR)
        rm -f headers.chk headers.lst
        rm -f $(PKG_CONFIG)
index 769e2a83e2177284722650223d6ebd6db86a6ac9..0c04a5b5cb759ee2b65bf58fd173f7fc3bb369e9 100644 (file)
@@ -246,15 +246,12 @@ install:: $(LIBHEADERS) libxl-save-helper
 uninstall::
        rm -f $(DESTDIR)$(LIBEXEC_BIN)/libxl-save-helper
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
-       $(RM) -f _*.h *.o $(CLIENTS)
-       $(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
-       $(RM) -f testidl.c.new testidl.c *.api-ok
-       $(RM) -f $(TEST_PROGS)
-       $(RM) -rf __pycache__
-       $(RM) -f libxenlight.map
-       $(RM) -f $(AUTOSRCS) $(AUTOINCS)
+clean::
+       $(RM) _*.h *.o $(CLIENTS)
+       $(RM) _*.c *.pyc _*.api-for-check
+       $(RM) testidl.c.new testidl.c *.api-ok
+       $(RM) $(TEST_PROGS) libxenlight_test.so libxl_test_*.opic
+       $(RM) -r __pycache__
+       $(RM) libxenlight.map
+       $(RM) $(AUTOSRCS) $(AUTOINCS)
        $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
index 1aef25a9bbd7c73d4ca15872f0df1d7345764ba3..39a671d7eda1f21342559e9528890b778e6481d6 100644 (file)
@@ -115,9 +115,5 @@ install:: install-perl-bindings
 uninstall:: uninstall-perl-bindings
 endif
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
-       rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM)
-       rm -f libxenstat.map
+clean::
+       $(RM) libxenstat.map $(BINDINGS) $(BINDINGSRC)
index 72fecb4c495e07b3f1ee5285811125701c82dca7..7a658e9446968aae81e5d3d7b44cd739a01b8ddf 100644 (file)
@@ -49,8 +49,5 @@ $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS)
        @rm -f $*.[ch]
        $(FLEX) --header-file=$*.h --outfile=$*.c $<
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
-       $(RM) -f libxlutil.map
+clean::
+       $(RM) libxenutil.map
index 83a45d2817b8b465e12603cc0f23c35cf8ea31a0..4ccb4dd1f60b39f49f7ba8dae03cacdcf297c381 100644 (file)
@@ -12,8 +12,5 @@ NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
+clean::
        rm -f libxenvchan.map