diff options
author | phk <phk@FreeBSD.org> | 1996-06-29 03:12:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-06-29 03:12:49 +0000 |
commit | 6d4faa5ec8c26fa388ab6704f78b2a232e9201b9 (patch) | |
tree | 98a54d42cdf4e775dcf4065ea3a99d371d34f838 | |
parent | 0d2b2ebbd58132ee9400f412ae8ad88db85959ba (diff) | |
download | FreeBSD-src-6d4faa5ec8c26fa388ab6704f78b2a232e9201b9.zip FreeBSD-src-6d4faa5ec8c26fa388ab6704f78b2a232e9201b9.tar.gz |
Make cleandirs more safe
Suggested by: bde
-rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1df5d8c..c0603d8 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 -# $Id: bsd.lib.mk,v 1.35 1996/06/17 15:59:51 phk Exp $ +# $Id: bsd.lib.mk,v 1.36 1996/06/24 04:24:03 jkh Exp $ # .if exists(${.CURDIR}/../Makefile.inc) @@ -177,7 +177,7 @@ clean: _SUBDIR rm -f ${POBJS} profiled/*.o lib${LIB}_p.a rm -f ${SOBJS} shared/*.o rm -f lib${LIB}.so.*.* lib${LIB}_pic.a -.if defined(CLEANDIRS) +.if defined(CLEANDIRS) && !empty(CLEANDIRS) rm -rf ${CLEANDIRS} .endif .endif diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index a8275a0..c0233a2 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.33 1996/06/22 06:01:57 phk Exp $ +# $Id: bsd.prog.mk,v 1.34 1996/06/24 04:24:13 jkh Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -140,7 +140,7 @@ all: ${PROG} all-man _SUBDIR .if !target(clean) clean: _SUBDIR rm -f a.out Errs errs mklog ${PROG} ${OBJS} ${CLEANFILES} -.if defined(CLEANDIRS) +.if defined(CLEANDIRS) && !empty(CLEANDIRS) rm -rf ${CLEANDIRS} .endif .endif |