1# Cookie: SYNOPSIS TARGET VARIABLE EN DOCUMENTATION
2### bps.clean.mk -- Service pour l'effacement de fichiers
3
4# Auteur: Michael Grünewald
5# Date: Ven 10 fév 2006 10:40:49 GMT
6
7# BSD Owl Scripts (https://bitbucket.org/michipili/bsdowl)
8# This file is part of BSD Owl Scripts
9#
10# Copyright © 2005–2014 Michael Grünewald
11#
12# This file must be used under the terms of the CeCILL-B.
13# This source file is licensed as described in the file COPYING, which
14# you should have received as part of this distribution. The terms
15# are also available at
16# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
17
18
19### SYNOPSIS
20
21# CLEANFILES+= ${OBJ}
22# CLEANDIRS+= ${OBJDIR}
23# DISTCLEANFILES+= ${CONFOBJ}
24# DISTCLEANDIRS+= ${CONFOBJDIR}
25# REALCLEANFILES+= ${CONF}
26# REALCLEANDIRS+= ${CONFDIR}
27#
28# .include "bps.clean.mk"
29
30
31### DESCRIPTION
32
33# Le module `bps.clean.mk' fournit un service pour effacer les
34# fichiers objets et remettre le répertoire de travail dans son état
35# initial.
36#
37# Pour cela, le module `bps.clean.mk' utilise les valeurs des
38# variables CLEANFILES, CLEANDIRS, DISTCLEANFILES, DISTCLEANDIRS,
39# REALCLEANFILES, REALCLEANDIRFILES, pour créer des cibles
40# do-cleanfiles, do-cleandirs, do-distcleanfiles, do-distcleandirs,
41# do-realcleanfiles et do-realcleandirs et les faire dépendre de
42# do-clean et do-distclean respectivement.
43
44.if !target(__<bps.clean.mk>__)
45__<bps.clean.mk>__:
46#
47# Clean files
48#
49.if defined(CLEANFILES)&&!empty(CLEANFILES)
50do-clean: do-clean-cleanfiles
51do-clean-cleanfiles:
52	${RM} -f ${CLEANFILES}
53.endif
54#
55# Clean dirs
56#
57.if defined(CLEANDIRS)&&!empty(CLEANDIRS)
58do-clean: do-clean-cleandirs
59do-clean-cleandirs:
60	${RM} -f -r ${CLEANDIRS}
61.endif
62#
63# Distclean files
64#
65.if defined(DISTCLEANFILES)&&!empty(DISTCLEANFILES)
66do-distclean: do-distclean-distcleanfiles
67do-distclean-distcleanfiles:
68	${RM} -f ${DISTCLEANFILES}
69.endif
70#
71# Distclean dirs
72#
73.if defined(DISTCLEANDIRS)&&!empty(DISTCLEANDIRS)
74do-distclean: do-distclean-distcleandirs
75do-distclean-distcleandirs:
76	${RM} -f -r ${DISTCLEANDIRS}
77.endif
78#
79# Realclean files
80#
81.if defined(REALCLEANFILES)&&!empty(REALCLEANFILES)
82do-realclean: do-realclean-realcleanfiles
83do-realclean-realcleanfiles:
84	${RM} -f ${REALCLEANFILES}
85.endif
86#
87# Realclean dirs
88#
89.if defined(REALCLEANDIRS)&&!empty(REALCLEANDIRS)
90do-realclean: do-realclean-realcleandirs
91do-realclean-realcleandirs:
92	${RM} -f -r ${REALCLEANDIRS}
93.endif
94
95
96#
97# Cookies
98#
99
100# A ``cookie'' is a peristant bit of information used my the
101# ``Makefile'' infrastructure to keep track of some event.
102# There is two kind of cookies: ordinary cookies and hard cookies.  An
103# ordinary cookie is removed by a simple `clean' while a hard
104# cookie remains until a `distclean' or a `realclean' happens.
105
106.if defined(COOKIEFILES)&&!empty(COOKIEFILES)
107do-clean-cookies:
108	@${RM} -f ${COOKIEFILES}
109
110do-clean: do-clean-cookies
111.endif
112
113.if defined(HARDCOOKIEFILES)&&!empty(HARDCOOKIEFILES)
114do-clean-hardcookies:
115	@${RM} -f ${HARDCOOKIEFILES}
116
117do-distclean: do-clean-hardcookies
118.endif
119
120
121.if target(do-clean)
122clean: do-clean
123distclean: do-clean
124realclean: do-clean
125.endif
126
127.if target(do-distclean)
128distclean: do-distclean
129realclean: do-distclean
130.endif
131
132.if target(do-realclean)
133realclean: do-realclean
134.endif
135
136.ORDER: do-realclean do-distclean do-clean
137
138.endif # !target(__<bps.clean.mk>__)
139
140### End of file `bps.clean.mk'
141