From 36f283592fd7c2ca072ea09fd1ac6565303d38b0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 24 Nov 2019 22:48:40 +0000 Subject: [PATCH] build system: Switch to using subdirmk's clean and cdeps Even in the toplevel. This cleans some more things but doesn't fix all the lack of clean bugs. Right now the effect is to remove Subdir.mk.tmp and main.mk.tmp, if they exist. Signed-off-by: Ian Jackson --- Perdir.sd.mk | 3 +++ Subdir.sd.mk | 2 -- test-common.sd.mk | 5 ++--- test-example/Subdir.sd.mk | 5 +---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Perdir.sd.mk b/Perdir.sd.mk index f5c524f..c5ca200 100644 --- a/Perdir.sd.mk +++ b/Perdir.sd.mk @@ -1,2 +1,5 @@ # &TARGETS_check # &TARGETS_fullcheck + +&:include subdirmk/cdeps.sd.mk +&:include subdirmk/clean.sd.mk diff --git a/Subdir.sd.mk b/Subdir.sd.mk index 1b79c43..53b1935 100644 --- a/Subdir.sd.mk +++ b/Subdir.sd.mk @@ -66,7 +66,6 @@ TEST_OBJECTS:= endif &OBJECTS += $(OBJECTS) $(TEST_OBJECTS) -&:include subdirmk/cdeps.sd.mk STALE_PYTHON_FILES= $(foreach e, py pyc, \ $(foreach p, /usr /usr/local, \ @@ -192,7 +191,6 @@ install-force: clean:: $(RM) -f *.o *.yy.[ch] *.tab.[ch] $(TARGETS) core version.c $(RM) -f *.pyc *~ eax-*-test.confirm eax-*-test - $(RM) $(&CLEAN) $(RM) -rf __pycache__ $(RM) -f msgcode-test.confirm msgcode-test diff --git a/test-common.sd.mk b/test-common.sd.mk index 81b3722..bf9c6cf 100644 --- a/test-common.sd.mk +++ b/test-common.sd.mk @@ -23,9 +23,8 @@ CHECK_SILENT ?= @ $(CHECK_SILENT) printf "&/$* " $(CHECK_SILENT) touch $@ +&CLEAN += & *.so + &clean:: - $(RM) -f & *.o *.so $(RM) -rf & tmp $(RM) -rf & d-* - -&:include subdirmk/clean.sd.mk diff --git a/test-example/Subdir.sd.mk b/test-example/Subdir.sd.mk index 66cdaf8..ae617f3 100644 --- a/test-example/Subdir.sd.mk +++ b/test-example/Subdir.sd.mk @@ -8,7 +8,4 @@ include common.make &sites.conf: $(src)/make-secnet-sites &^/sites Subdir.mk $(src)/make-secnet-sites &^/sites &sites.conf -&clean:: - rm -f *~ ./#*# *.new - -&:include subdirmk/clean.sd.mk +&CLEAN += *.new -- 2.30.2