All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Anthony PERARD <anthony.perard@gmail.com>,
	Anthony PERARD <anthony.perard@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>,
	Juergen Gross <jgross@suse.com>
Subject: [XEN PATCH 42/57] libs,tools/include: Clean "clean" targets
Date: Mon, 6 Dec 2021 17:02:25 +0000	[thread overview]
Message-ID: <20211206170241.13165-43-anthony.perard@citrix.com> (raw)
In-Reply-To: <20211206170241.13165-1-anthony.perard@citrix.com>

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/util:
  - fix clean of version-script file.

include/xen-foreign:
  - remove __pycache__

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/libs/libs.mk                 |  4 ++--
 tools/include/Makefile             |  1 +
 tools/include/xen-foreign/Makefile |  1 +
 tools/libs/ctrl/Makefile           |  5 +----
 tools/libs/guest/Makefile          |  3 +--
 tools/libs/light/Makefile          | 19 ++++++++-----------
 tools/libs/stat/Makefile           |  5 +----
 tools/libs/util/Makefile           |  7 ++-----
 tools/libs/vchan/Makefile          |  5 +----
 9 files changed, 18 insertions(+), 32 deletions(-)

diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 7f2c676be4..3078e45cf4 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -121,8 +121,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/include/Makefile b/tools/include/Makefile
index 42605d46b9..a9c11d06c8 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -80,6 +80,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 5d866b8d04..a46e30a168 100644
--- a/tools/libs/ctrl/Makefile
+++ b/tools/libs/ctrl/Makefile
@@ -56,8 +56,5 @@ include $(XEN_ROOT)/tools/libs/libs.mk
 
 -include $(DEPS_INCLUDE)
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
+clean::
 	rm -f libxenctrl.map
diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile
index 636b4ea5cb..67837c4e73 100644
--- a/tools/libs/guest/Makefile
+++ b/tools/libs/guest/Makefile
@@ -106,6 +106,5 @@ libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz
 
 -include $(DEPS_INCLUDE)
 
-.PHONY: cleanlocal
-cleanlocal:
+clean::
 	rm -f libxenguest.map
diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile
index 5e52db9b30..719630eda2 100644
--- a/tools/libs/light/Makefile
+++ b/tools/libs/light/Makefile
@@ -250,17 +250,14 @@ 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
 
 -include $(DEPS_INCLUDE)
diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile
index c8c81048c0..24b5949b3e 100644
--- a/tools/libs/stat/Makefile
+++ b/tools/libs/stat/Makefile
@@ -115,10 +115,7 @@ install: install-perl-bindings
 uninstall: uninstall-perl-bindings
 endif
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
+clean::
 	rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM)
 	rm -f libxenstat.map
 
diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile
index 87425d862a..4e41bc9ff0 100644
--- a/tools/libs/util/Makefile
+++ b/tools/libs/util/Makefile
@@ -51,8 +51,5 @@ $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS)
 
 -include $(DEPS_INCLUDE)
 
-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 df112f1b88..f6f1002800 100644
--- a/tools/libs/vchan/Makefile
+++ b/tools/libs/vchan/Makefile
@@ -13,8 +13,5 @@ NO_HEADERS_CHK := y
 include $(XEN_ROOT)/tools/libs/libs.mk
 -include $(DEPS_INCLUDE)
 
-clean: cleanlocal
-
-.PHONY: cleanlocal
-cleanlocal:
+clean::
 	rm -f libxenvchan.map
-- 
Anthony PERARD



  parent reply	other threads:[~2021-12-06 17:08 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 17:01 [XEN PATCH 00/57] Toolstack build system improvement, toward non-recursive makefiles Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 01/57] .gitignore: Non existing toolcore/include files Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 02/57] tools/configure.ac: Remove left over system_aio Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 03/57] tools/Rules.mk: Remove $(CFLAGS.opic) from %.opic: %.S Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 04/57] libs: Remove _paths.h from libs ctrl and util Anthony PERARD
2021-12-07  7:43   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 05/57] libs: Remove -Iinclude from CFLAGS Anthony PERARD
2021-12-07  7:44   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 06/57] libs/libs.mk: Remove generic variable that already exist Anthony PERARD
2021-12-07  7:46   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 07/57] libs/guest: Drop spurious include in Makefile Anthony PERARD
2021-12-07  7:48   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 08/57] libs/light: Remove non-existing CFLAGS_libxl.o var Anthony PERARD
2021-12-07  7:49   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 09/57] libs/light: Remove -I Anthony PERARD
2021-12-07  7:59   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 10/57] libs/stat: Remove duplicated CFLAGS from deps Anthony PERARD
2021-12-07  8:01   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 11/57] libs/store: Remove PKG_CONFIG_REMOVE Anthony PERARD
2021-12-07  8:05   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 12/57] tools: remove some unneeded subdir-distclean-* targets Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 13/57] tools/firmware/hvmloader: remove "subdirs-*" prerequisite Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 14/57] tools/flask/utils: remove unused variables/targets from Makefile Anthony PERARD
2021-12-16 12:35   ` Daniel P. Smith
2021-12-16 12:36   ` Andrew Cooper
2021-12-21 17:00     ` Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 15/57] tools/libacpi: cleanup Makefile, don't check for iasl binary Anthony PERARD
2021-12-16 11:47   ` Andrew Cooper
2021-12-06 17:01 ` [XEN PATCH 16/57] tools/ocaml: Remove generation of _paths.h Anthony PERARD
2021-12-16 14:09   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 17/57] tools/xl: Remove unnecessary -I. from CFLAGS Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 18/57] tools: Use config.h from autoconf instead of "buildmakevars2header" Anthony PERARD
2021-12-07 10:08   ` Juergen Gross
2021-12-07 10:49     ` Anthony PERARD
2021-12-07 10:53       ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 19/57] tools/configure.ac: Create ZLIB_LIBS and ZLIB_CFLAGS Anthony PERARD
2021-12-07 10:20   ` Juergen Gross
2021-12-16 17:16   ` Andrew Cooper
2021-12-21 17:17     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 20/57] tools/Rules.mk: introduce FORCE target Anthony PERARD
2021-12-07 10:54   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 21/57] tools/include/xen-foreign: avoid to rely on default .SUFFIXES Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 22/57] tools/console: have one Makefile per program/directory Anthony PERARD
2021-12-16 17:26   ` Andrew Cooper
2021-12-21 17:25     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 23/57] tools/debugger: Allow make to recurse into debugger/ Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 24/57] tools/debugger/gdbsx: Fix and cleanup makefiles Anthony PERARD
2021-12-16 17:55   ` Andrew Cooper
2021-12-21 17:30     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 25/57] tools/examples: cleanup Makefile Anthony PERARD
2021-12-16 17:57   ` Andrew Cooper
2021-12-21 17:38     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 26/57] tools/firmware/hvmloader: rework Makefile Anthony PERARD
2021-12-16 18:03   ` Andrew Cooper
2021-12-21 17:45     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 27/57] tools/fuzz/libelf: rework makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 28/57] tools/fuzz/x86_instruction_emulator: " Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 29/57] tools/helper: Cleanup Makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 30/57] tools/hotplug: cleanup Makefiles Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 31/57] tools/libfsimage: Cleanup makefiles Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 32/57] tools/misc: rework Makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 33/57] tools/vchan: Collect targets in TARGETS Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 34/57] tools/xcutils: rework Makefile Anthony PERARD
2021-12-16 18:20   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 35/57] tools/xenpaging: Rework makefile Anthony PERARD
2021-12-16 18:25   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 36/57] tools/xenstore: Cleanup makefile Anthony PERARD
2021-12-07 11:21   ` Juergen Gross
2021-12-16 17:19   ` Andrew Cooper
2021-12-16 18:34   ` Andrew Cooper
2021-12-17  5:24     ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 37/57] tools/xentop: rework makefile Anthony PERARD
2021-12-16 18:36   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 38/57] tools/xenstrace: rework Makefile Anthony PERARD
2021-12-16 18:38   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 39/57] libs: Remove both "libs" and "build" target Anthony PERARD
2021-12-07 12:14   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 40/57] libs: rename LDUSELIBS to LDLIBS and use it instead of APPEND_LDFLAGS Anthony PERARD
2021-12-07 12:17   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 41/57] libs: Remove need for *installlocal targets Anthony PERARD
2021-12-07 13:20   ` Juergen Gross
2021-12-21 17:59     ` Anthony PERARD
2021-12-06 17:02 ` Anthony PERARD [this message]
2021-12-07 13:21   ` [XEN PATCH 42/57] libs,tools/include: Clean "clean" targets Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 43/57] libs: Rename $(SRCS-y) to $(OBJS-y) Anthony PERARD
2021-12-07 13:24   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 44/57] libs/guest: rename ELF_OBJS to LIBELF_OBJS Anthony PERARD
2021-12-07 13:26   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 45/57] libs/guest: rework CFLAGS Anthony PERARD
2021-12-07 13:29   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 46/57] libs/store: use of -iquote instead of -I Anthony PERARD
2021-12-07 13:30   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 47/57] libs/stat: Fix and rework python-bindings build Anthony PERARD
2021-12-07 14:45   ` Juergen Gross
2021-12-16 18:47   ` Andrew Cooper
2021-12-21 18:03     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 48/57] libs/stat: Fix and rework perl-binding build Anthony PERARD
2021-12-07 14:46   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 49/57] libs/toolcore: don't install xentoolcore_internal.h anymore Anthony PERARD
2021-12-07 14:47   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 50/57] tools/Rules.mk: Cleanup %.pc rules Anthony PERARD
2021-12-16 18:51   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 51/57] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 52/57] stubdom: only build libxen*.a from tools/libs/ Anthony PERARD
2021-12-11 23:47   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 53/57] stubdom: introduce xenlibs.mk Anthony PERARD
2021-12-11 23:49   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 54/57] tools/libs: create Makefile.common to be used by stubdom build system Anthony PERARD
2021-12-07 14:57   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 55/57] tools/xenstore: introduce Makefile.common to be used by stubdom Anthony PERARD
2021-12-07 14:58   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 56/57] stubdom: build xenstore*-stubdom using new Makefile.common Anthony PERARD
2021-12-11 23:51   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 57/57] stubdom: xenlibs linkfarm, ignore non-regular files Anthony PERARD
2021-12-11 23:53   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206170241.13165-43-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=anthony.perard@gmail.com \
    --cc=iwj@xenproject.org \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.