From 12e0852a7aef67a8b0c1d32a42ae8765802a6787 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Mon, 13 May 2002 15:23:56 +0000 Subject: [PATCH] CLEANFILES are too long for libc. --- share/mk/bsd.lib.mk | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index ad7728763377..b3069169e356 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -164,8 +164,6 @@ lib${LIB}.a: ${OBJS} ${STATICOBJS} @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} ${RANLIB} ${.TARGET} -CLEANFILES+= a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS} - .if !defined(INTERNALLIB) .if !defined(NOPROFILE) @@ -177,14 +175,10 @@ lib${LIB}_p.a: ${POBJS} @rm -f ${.TARGET} @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} ${RANLIB} ${.TARGET} - -CLEANFILES+= ${POBJS} ${POBJS:S/$/.tmp/} .endif SOBJS+= ${OBJS:.o=.So} -CLEANFILES+= ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/} - .if defined(SHLIB_NAME) _LIBS+= ${SHLIB_NAME} @@ -203,8 +197,6 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `lorder ${SOBJS} | tsort -q` ${LDADD} .endif - -CLEANFILES+= ${SHLIB_LINK} lib${LIB}.so.* lib${LIB}.so .endif .if defined(INSTALL_PIC_ARCHIVE) @@ -226,21 +218,42 @@ ${LINTLIB}: ${LINTOBJS} @${ECHO} building lint library ${.TARGET} @rm -f ${.TARGET} ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} - -CLEANFILES+= ${LINTOBJS} .endif .endif !defined(INTERNALLIB) all: ${_LIBS} -CLEANFILES+= ${_LIBS} .endif defined(LIB) && !empty(LIB) .if !defined(NOMAN) all: _manpages .endif +.if !target(clean) +clean: + rm -f ${CLEANFILES} +.if defined(LIB) && !empty(LIB) + rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS} +.if !defined(INTERNALLIB) +.if !defined(NOPROFILE) + rm -f ${POBJS} ${POBJS:S/$/.tmp/} +.endif + rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/} +.if defined(SHLIB_NAME) + rm -f ${SHLIB_LINK} lib${LIB}.so.* lib${LIB}.so +.endif +.if defined(WANT_LINT) + rm -f ${LINTOBJS} +.endif +.endif !defined(INTERNALLIB) + rm -f ${_LIBS} +.endif defined(LIB) && !empty(LIB) +.if defined(CLEANDIRS) && !empty(CLEANDIRS) + rm -rf ${CLEANDIRS} +.endif +.endif + _EXTRADEPEND: @TMP=_depend$$$$; \ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < ${DEPENDFILE} \