From howardjp@bokonon.iad.dead-dog.com Tue Aug 24 14:43:02 1999
Return-Path: <howardjp@bokonon.iad.dead-dog.com>
Received: from bokonon.iad.dead-dog.com (ashford-113-42.tidalwave.net [208.206.113.42])
	by hub.freebsd.org (Postfix) with ESMTP id 681C014CF3
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 24 Aug 1999 14:42:57 -0700 (PDT)
	(envelope-from howardjp@bokonon.iad.dead-dog.com)
Received: (from howardjp@localhost)
	by bokonon.irving.org (8.9.3/8.9.3) id AAA10407;
	Tue, 24 Aug 1999 00:33:46 -0400 (EDT)
	(envelope-from howardjp)
Message-Id: <199908240433.AAA10407@bokonon.irving.org>
Date: Tue, 24 Aug 1999 00:33:46 -0400 (EDT)
From: howardjp@wam.umd.edu
Sender: howardjp@bokonon.iad.dead-dog.com
Reply-To: howardjp@wam.umd.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: make clean in bsd.obj.mk no longer properly removes *.core and others
X-Send-Pr-Version: 3.2

>Number:         13358
>Category:       bin
>Synopsis:       make clean in bsd.obj.mk no longer properly removes *.core and others
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 24 14:50:01 PDT 1999
>Closed-Date:    Tue Aug 24 15:13:48 PDT 1999
>Last-Modified:  Tue Aug 24 15:15:04 PDT 1999
>Originator:     James Howard
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
University of Maryland
>Environment:

FreeBSD bokonon.irving.org 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Mon Aug 23 23:55:07 EDT 1999     irving@bokonon.irving.org:/usr/src/sys/compile/SANDERS  i386

>Description:

/usr/src/share/mk/bsd.README describes ``make clean'' as:

        clean:
                remove the program, any object files and the files a.out,
                Errs, errs, mklog, and ${PROG}.core.

However, make clean does not remove a.out, Errs, errs, mklog and
${PROG}.core any longer.  

>How-To-Repeat:

cd /usr/src/bin/cat (or anything else) and ``make clean''.  See what it
lists as files to delete.

>Fix:
	
Below is a diff which modifies /usr/src/share/mk/bsd.{prog,obj}.mk and
adds these files to CLEANFILES, the list of files which should be deleted.
I do not know if changes need to make to CLEANDIRS, I suspect not.  I
tested this are varius targets in /usr/src/bin and it worked every time.
Apply this diff to /usr/src/share/mk.  Thanks and have a nice day :)

diff -c mk/bsd.obj.mk mk-jph/bsd.obj.mk
*** mk/bsd.obj.mk	Tue Aug 24 00:10:30 1999
--- mk-jph/bsd.obj.mk	Tue Aug 24 00:14:23 1999
***************
*** 107,113 ****
  .if !target(clean)
  clean: _SUBDIR
  .if defined(CLEANFILES) && !empty(CLEANFILES)
! 	rm -f ${CLEANFILES} 
  .endif
  .if defined(CLEANDIRS) && !empty(CLEANDIRS)
  	rm -rf ${CLEANDIRS}
--- 107,113 ----
  .if !target(clean)
  clean: _SUBDIR
  .if defined(CLEANFILES) && !empty(CLEANFILES)
! 	rm -f a.out Errs errs mklog ${CLEANFILES} 
  .endif
  .if defined(CLEANDIRS) && !empty(CLEANDIRS)
  	rm -rf ${CLEANDIRS}
diff -c mk/bsd.prog.mk mk-jph/bsd.prog.mk
*** mk/bsd.prog.mk	Tue Aug 24 00:10:31 1999
--- mk-jph/bsd.prog.mk	Tue Aug 24 00:12:11 1999
***************
*** 67,73 ****
  .MAIN: all
  all: objwarn ${PROG} all-man _SUBDIR
  
! CLEANFILES+= ${PROG} ${OBJS}
  
  .if defined(PROG) && !defined(NOEXTRADEPEND)
  _EXTRADEPEND:
--- 67,73 ----
  .MAIN: all
  all: objwarn ${PROG} all-man _SUBDIR
  
! CLEANFILES+= ${PROG}.core ${PROG} ${OBJS}
  
  .if defined(PROG) && !defined(NOEXTRADEPEND)
  _EXTRADEPEND:

>Release-Note:
>Audit-Trail:

From: James Howard <howardjp@wam.umd.edu>
To: freebsd-gnats-submit@freebsd.org, howardjp@wam.umd.edu
Cc:  
Subject: Re: bin/13358: make clean in bsd.obj.mk no longer prop
Date: Tue, 24 Aug 1999 18:07:59 -0400 (EDT)

 This is a duplicate of bin/13350.  My mailer goofed and I resent.  
 Apparently the first worked afterall.
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Tue Aug 24 15:13:48 PDT 1999 
State-Changed-Why:  
Dupicate of PR 13350. 
>Unformatted:
