chiark / gitweb /
Drop Perdir.sd.mk from explicit MAKEFILE_TEMPLATES
[subdirmk.git] / subdirmk / clean.sd.mk
index 7df2e218880470af82a03d38f9b6a9bc03a60646..08f8dcc61e5cd584618e97a8d81b696f0dfd50ca 100644 (file)
@@ -3,9 +3,20 @@
 #  Copyright 2019 Ian Jackson
 # SPDX-License-Identifier: LGPL-2.0-or-later
 
+&# 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 += $(&DEPFILES)
 &CLEAN += $(&TARGETS)
 
 # &TARGETS_clean