Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 1999 09:53:58 -0400 (EDT)
From:      James Howard <howardjp@wam.umd.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/13350: make clean in bsd.obj.mk no longer properly removes *.core and others
Message-ID:  <199908241353.JAA08644@rac9.wam.umd.edu>

next in thread | raw e-mail | index | archive | help

>Number:         13350
>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 24 07:00:00 PDT 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908241353.JAA08644>