chiark / gitweb /
logging: Move "starting" message earlier
[secnet.git] / subdirmk / clean.sd.mk
index accb2f5b3ad41b91cf4d55434d18f1d51c3e4efb..a38fb221e2a09ee45672c3e313483613c92f7aec 100644 (file)
@@ -1,9 +1,26 @@
-&CLEAN += & *~ *.tmp
+# subdirmk - useful rules for clean target
+#  Copyright 2019 Mark Wooding
+#  Copyright 2019 Ian Jackson
+# SPDX-License-Identifier: LGPL-2.0-or-later
+# There is NO WARRANTY.
+
+&# Usage:
+&#   &:include subdirmk/clean.sd.mk
+&# (probably in Suffix.sd.mk)
+&#
+&# Provides a per-directory `clean' target, which deletes all the files
+&# in &CLEAN.  &OBJECTS, &DEPFILES and &TARGETS are automatically deleted.
+&#
+&# If you want to delete a directory, extend the target with
+&#   &/clean::
+&#     $(RM) -r somethingn
+&# ($(RM) conventionally contains `-f'.)
+
+&CLEAN += & *~ .*~ *.tmp
 &CLEAN += $(&OBJECTS)
-&CLEAN += $(&DEPFILES)
 &CLEAN += $(&TARGETS)
 
-# &TARGETS_clean
+&TARGETS_clean +=
 
-&/clean:
+&/clean::
        $(RM) $(&CLEAN)