Subject: misc/14148: "make cleandir" in gnu/usr.bin/gcc/f771 fails to clean up properly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sketch@rd.bbc.co.uk>
List: netbsd-bugs
Date: 10/03/2001 03:58:08
>Number: 14148
>Category: misc
>Synopsis: "make cleandir" in gnu/usr.bin/gcc/f771 fails to clean up properly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 03 03:59:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Perkin
>Release: 1.5Y
>Organization:
British Broadcasting Corporation
>Environment:
NetBSD batfink.spodnet.org.uk 1.5Y NetBSD 1.5Y (GENERIC-$Revision: 1.429 $) #0: Tue Oct 2 22:12:02 BST 2001 sketch@batfink.spodnet.org.uk:/usr/src/sys/arch/i386/compile/BATFINK i386
>Description:
"cleandir" target in gnu/usr.bin/gcc/f771 fails to pick up the .j and
.h files properly, as defined by CLEANFILES+= directive in Makefile.
As such these files never get cleaned up, and then cause problems with
ie cvs:
batfink# cvs -q update -dP
? gnu/usr.bin/gcc/f771/str-1t.j
? gnu/usr.bin/gcc/f771/str-1t.h
? gnu/usr.bin/gcc/f771/str-2t.j
[snip]
>How-To-Repeat:
# cd /usr/src/gnu/usr.bin/gcc/f771
# make cleandir
# ls
>Fix:
It seems to be fixed by moving the ".for [..] .endfor" case in the
Makefile after the inclusion of "../Makefile.backend". I'm not too
hot on make(1) internals or bsd.*.mk, so this could be the wrong
solution, but It Works For Me [tm].
Index: Makefile
===================================================================
RCS file: /home/ncvs/gnusrc/gnu/usr.bin/gcc/f771/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 2001/07/18 13:59:17 1.2
+++ Makefile 2001/10/03 10:35:51
@@ -7,6 +7,16 @@
HOST_CPPFLAGS+= -I${GCCARCH} -DUSE_HCONFIG= \
${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
+.for f in 1t 2t fo io nq op ot
+CLEANFILES+= str-${f}.h str-${f}.j
+
+str-${f}.h str-${f}.j: str-${f}.fin fini.c proj.c
+ @cd ${.CURDIR} && ${MAKE} fini
+ ./fini ${>:M*.fin} str-${f}.j str-${f}.h
+
+${OBJS} .depend: str-${f}.h
+.endfor
+
.include "../Makefile.backend"
# See comment in ../backend/Makefile for the reason for
@@ -19,15 +29,5 @@
.BEGIN:
@rm -f fini
.endif
-
-.for f in 1t 2t fo io nq op ot
-CLEANFILES+= str-${f}.h str-${f}.j
-
-str-${f}.h str-${f}.j: str-${f}.fin fini.c proj.c
- @cd ${.CURDIR} && ${MAKE} fini
- ./fini ${>:M*.fin} str-${f}.j str-${f}.h
-
-${OBJS} .depend: str-${f}.h
-.endfor
.PATH: ${DIST}/gcc/f
>Release-Note:
>Audit-Trail:
>Unformatted: