[spp] [PATCH v2 1/2] makefile: update dist-clean task
Yasufumi Ogawa
yasufum.o at gmail.com
Tue Jan 21 08:36:30 CET 2020
This patch is to add drivers to dist-clean task. In this update,
dist-clean is divided into two tasks. It is because files named as
`_postclean` is generated in `src/drivers/*/` directory after cleaning
and still remained. First task named as `_dist-clean` is for removing
files generated while compilation, and second one is for removing
`_postclean`.
Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
GNUmakefile | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 274f709..9c0cea9 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -21,15 +21,24 @@ showversion:
# Compile RST documents
DOC_ROOT = docs/guides
+# Clean all files generated while compilation. It consists of two
+# tasks, _dist-clean and dist-clean. First one is for removing the
+# generated files, and second one is just for removing `_postclean`
+# which is generated after the first task.
.PHONY: dist-clean
-dist-clean:
+dist-clean: _dist-clean
+ rm -f $(wildcard src/drivers/*/_postclean)
+
+.PHONY: _dist-clean
+_dist-clean:
make clean
rm -rf $(wildcard src/*/$(RTE_TARGET))
- rm -rf $(wildcard src/*/*.pyc)
- rm -rf $(wildcard src/*/__pycache__)
rm -rf $(wildcard src/*/shared)
- rm -rf $(wildcard src/mirror/vf)
- rm -rf $(wildcard src/pcap/vf)
+ rm -rf $(wildcard src/drivers/*/$(RTE_TARGET))
+ rm -f $(wildcard src/*/*.pyc)
+ rm -f $(wildcard src/*/*/*.pyc)
+ rm -rf $(wildcard src/*/__pycache__)
+ rm -rf $(wildcard src/*/*/__pycache__)
.PHONY: doc
doc: doc-all
--
2.17.1
More information about the spp
mailing list