summaryrefslogtreecommitdiff
path: root/mk/fetch/distclean.mk
blob: da94a6f9d4732de845f5dd7ebe359b6f1720fd55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $NetBSD: distclean.mk,v 1.4 2007/10/13 13:49:19 rillig Exp $
#
# === make targets for pkgsrc users ===
#
# distclean:
#	Removes the distfiles of the current package.
#

.PHONY: pre-distclean
.if !target(pre-distclean)
pre-distclean:
	@${DO_NADA}
.endif

.PHONY: distclean
.if !target(distclean)
distclean: pre-distclean clean
	@${PHASE_MSG} "Dist cleaning for ${PKGNAME}"
	${RUN} [ -d ${_DISTDIR} ] || exit 0;				\
	cd ${_DISTDIR};							\
	${RM} -f ${ALLFILES} ${ALLFILES:S/$/.pkgsrc.resume/}
.  if defined(DIST_SUBDIR)
	${RUN} ${RMDIR} ${_DISTDIR} 2>/dev/null ${TRUE}
.  endif
	${RUN} ${RM} -f README.html
.endif