Subject: lib/3990: some lib/csu makefiles are out of date.
To: None <gnats-bugs@gnats.netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: netbsd-bugs
Date: 08/15/1997 23:36:41
>Number: 3990
>Category: lib
>Synopsis: some lib/csu makefiles are out of date.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 15 06:50:00 1997
>Last-Modified:
>Originator: Simon Burge
>Organization:
IBM Global Services Australia
>Release: NetBSD-current 970815
>Environment:
System: NetBSD vlad 1.2G NetBSD 1.2G (MONA) #0: Fri Aug 8 23:36:18 EST 1997 simonb@vlad:/usr/src/sys/arch/pmax/compile/MONA pmax
>Description:
Some ports (alpha, arm32, mips, powerpc, sparc & vax) csu
makefiles are out of date with respect to other ports makefiles.
They define they're own install rules, instead of using the
FILES make variable. The end result is that the crt* files
get reinstalled every time a "make install" happens, even with
UPDATE set.
>How-To-Repeat:
"make build UPDATE=1 ; make build UPDATE=1", and then watch
in amazement as everything get relinked again after crt0.o is
reinstalled.
>Fix:
The following works for the pmax (mips) port, I assume something
similar for the other ports would do as well. I'm not sure
about the "CPPFLAGS+= -DDYNAMIC" bit, but it seems to be common
amonst the other ports that use this style of makefile.
*** /usr/src/lib/csu/mips/Makefile.orig Sat Jun 28 21:42:00 1997
--- /usr/src/lib/csu/mips/Makefile Fri Aug 15 23:23:18 1997
***************
*** 27,35 ****
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
! install:
! ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
! ${DESTDIR}/usr/lib
! ln -f ${DESTDIR}/usr/lib/crt0.o ${DESTDIR}/usr/lib/scrt0.o
.include <bsd.prog.mk>
--- 27,43 ----
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
! .if make(depend)
! CPPFLAGS+= -DDYNAMIC
! .endif
!
! afterdepend: .depend
! @(TMP=/tmp/_depend$$$$; \
! sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o s\1.o:/' \
! < .depend > $$TMP; \
! mv $$TMP .depend)
!
! FILES=${OBJS}
! FILESDIR=/usr/lib
.include <bsd.prog.mk>
>Audit-Trail:
>Unformatted: