chiark / gitweb /
build system: Switch to using subdirmk's clean and cdeps
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Nov 2019 22:48:40 +0000 (22:48 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 17:08:49 +0000 (17:08 +0000)
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 <ijackson@chiark.greenend.org.uk>
Perdir.sd.mk
Subdir.sd.mk
test-common.sd.mk
test-example/Subdir.sd.mk

index f5c524f98e49a7602da86429bdb0889496aa31e8..c5ca200c5e0f19c8f006a4c4c147e2957bb834ab 100644 (file)
@@ -1,2 +1,5 @@
 # &TARGETS_check
 # &TARGETS_fullcheck
+
+&:include subdirmk/cdeps.sd.mk
+&:include subdirmk/clean.sd.mk
index 1b79c438172420117a76e040253960b5e65eaf72..53b193502620f50d04d3ac77bc588da222a85321 100644 (file)
@@ -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
 
index 81b3722fdc71852ad21d46869b3fe3b3524ee7e0..bf9c6cf26a25a9ec4276209bfc80dc2b8c574dcc 100644 (file)
@@ -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
index 66cdaf80b13e7946b250e987a409744e23065b90..ae617f3b6a9540448a2ef276480aaf8ff24206d6 100644 (file)
@@ -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