[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] libs,tools/include: Clean "clean" targets



commit a03b3552d4771e8135b8beca8547ccb93349791c
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Fri Feb 25 15:13:08 2022 +0000
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Thu Jun 16 16:58:50 2022 +0100

    libs,tools/include: Clean "clean" targets
    
    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@xxxxxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/include/Makefile             |  1 +
 tools/include/xen-foreign/Makefile |  1 +
 tools/libs/ctrl/Makefile           |  5 +----
 tools/libs/guest/Makefile          |  3 +--
 tools/libs/libs.mk                 |  4 ++--
 tools/libs/light/Makefile          | 19 ++++++++-----------
 tools/libs/stat/Makefile           |  8 ++------
 tools/libs/util/Makefile           |  7 ++-----
 tools/libs/vchan/Makefile          |  5 +----
 9 files changed, 19 insertions(+), 34 deletions(-)

diff --git a/tools/include/Makefile b/tools/include/Makefile
index d965987f55..3a03a0b0fa 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -82,6 +82,7 @@ uninstall:
 clean:
        rm -rf xen xen-xsm acpi
        $(MAKE) -C xen-foreign clean
+       rm -f _*.h
 
 .PHONY: dist
 dist: install
diff --git a/tools/include/xen-foreign/Makefile 
b/tools/include/xen-foreign/Makefile
index 6ce51daf5e..b538d0ea94 100644
--- a/tools/include/xen-foreign/Makefile
+++ b/tools/include/xen-foreign/Makefile
@@ -13,6 +13,7 @@ clean:
        rm -f $(headers)
        rm -f checker checker.c
        rm -f *.pyc *.o *~
+       rm -rf __pycache__
 
 distclean: clean
 
diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile
index ef7362327f..f58c4ef1aa 100644
--- a/tools/libs/ctrl/Makefile
+++ b/tools/libs/ctrl/Makefile
@@ -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
diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile
index 2005d8a67d..56483c545f 100644
--- a/tools/libs/guest/Makefile
+++ b/tools/libs/guest/Makefile
@@ -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
diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index a173f59a8b..c2eaefc928 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -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)
diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile
index 769e2a83e2..0c04a5b5cb 100644
--- a/tools/libs/light/Makefile
+++ b/tools/libs/light/Makefile
@@ -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
diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile
index 1aef25a9bb..39a671d7ed 100644
--- a/tools/libs/stat/Makefile
+++ b/tools/libs/stat/Makefile
@@ -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)
diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile
index 72fecb4c49..7a658e9446 100644
--- a/tools/libs/util/Makefile
+++ b/tools/libs/util/Makefile
@@ -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
diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile
index 83a45d2817..4ccb4dd1f6 100644
--- a/tools/libs/vchan/Makefile
+++ b/tools/libs/vchan/Makefile
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.