X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=subdirmk%2Fclean.sd.mk;h=08f8dcc61e5cd584618e97a8d81b696f0dfd50ca;hb=41682cf1c6108dce44a3e7a57eaacec0c0b058bd;hp=017de63b01b111cc7b95a02471ac7a3569e2a304;hpb=3ab6a4c8c214d9f050112249359bc4e0f7876a58;p=subdirmk.git diff --git a/subdirmk/clean.sd.mk b/subdirmk/clean.sd.mk index 017de63..08f8dcc 100644 --- a/subdirmk/clean.sd.mk +++ b/subdirmk/clean.sd.mk @@ -1,6 +1,22 @@ +# subdirmk - useful rules for clean target +# Copyright 2019 Mark Wooding +# 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