chiark / gitweb /
subdirmk: clean.sd.mk: Delete .*~ too (eg .gitignore~)
[secnet.git] / subdirmk / clean.sd.mk
index e235fcd8e251bbf8a45b9ac073b3e1415ccd0b91..045561cf84fa0c61fd74d7e71538575a868ea235 100644 (file)
@@ -3,7 +3,19 @@
 #  Copyright 2019 Ian Jackson
 # SPDX-License-Identifier: LGPL-2.0-or-later
 
-&CLEAN += & *~ *.tmp
+&# Usage:
+&#   &:include subdirmk/clean.sd.mk
+&# (probably in Perdir.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 += $(&TARGETS)