Subject: port-m68k/6244: Unexpected behaviour of "make cleandir" in kernel build dir
To: None <>
From: Frederick Bruckman <>
List: netbsd-bugs
Date: 10/04/1998 15:39:03
>Number:         6244
>Category:       port-m68k
>Synopsis:       "make cleandir" in kernel build directory fails to remove fpsp objects.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Oct  4 13:50:01 1998
>Originator:     Frederick Bruckman

>Release:        October 4, 1998
System: NetBSD 1.3G NetBSD 1.3G (FB) #96: Sun Aug 30 11:30:21 CDT 1998 mac68k

	The expectation, is that "make cleandir" or "make distclean", if they do
	anything at all, will remove at least as many targets as "make clean" does.
	This expectation is not borne out in the kernel build
	directory--specifically, the lib/fpsp directory is left untouched!
	Investigation reveals that the "cleandir" target is commented out of
	sys/arch/m68k/fpsp/, which is perhaps related to the fact
	that the "depends" target is also commented out. That would all be
	reasonable in a top-level directory, but in this case it produces the
	following unexpected result. 
	Configure and build a kernel with "options FPSP". That option is
	suitable for a 68040. Now type "make cleandir" in the build
	directory. Notice that all the targets are cleaned out of the main
	directory, also the lib/kern and lib/compat directories, but that all
	the objects remain in the lib/fpsp directory. "make clean" _does_ clean
	the objects out of the fpsp directory, but of course it leaves the
	.depend files in the first three directories. There's actually very
	little consequence, if any, to not cleaning out the fpsp directory. 
	It's just odd, that's all.
--- src/sys/arch/m68k/fpsp/    Sun Oct  4 12:20:14 1998
+++ src/sys/arch/m68k/fpsp/ Sun Oct  4 12:23:42 1998
@@ -47,10 +47,14 @@
@echo cleaning the 68040 FPSP objects
@${FPSPMAKE} clean
-#cleandir distclean:   .NOTMAIN cleandirfpsp
-#cleandirfpsp: .NOTMAIN __always_make_fpsp
-#      @echo cleandiring the 68040 FPSP objects
-#      @${FPSPMAKE} cleandir
+cleandir distclean:    .NOTMAIN cleandirfpsp
+cleandirfpsp:  .NOTMAIN __always_make_fpsp
+# So we don't really need a cleandir target without a depend target.
+# On the other hand, were "make cleandir" in the kernel build
+# directory to fail to remove all the floating point objects, that
+# would tend to violate the principle of least surprise!
+       @echo cleaning the 68040 FPSP objects
+       @${FPSPMAKE} clean
#depend:                       .NOTMAIN dependfpsp
#dependfpsp:           .NOTMAIN __always_make_fpsp