Subject: misc/2301: some Makefiles use LDADD without corresponding DPADD
To: None <gnats-bugs@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: netbsd-bugs
Date: 04/05/1996 03:08:35
>Number:         2301
>Category:       misc
>Synopsis:       some Makefiles use LDADD without corresponding DPADD
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr  5 03:35:03 1996
>Last-Modified:
>Originator:     Mike Long <mike.long@analog.com>
>Organization:
	grep-lovers anonymous
>Release:        960320
>Environment:
	
System: NetBSD azathoth 1.1B NetBSD 1.1B (AZATHOTH) #32: Tue Mar 19 23:11:54 EST 1996 root@azathoth:/usr/src/sys/arch/i386/compile/AZATHOTH i386

>Description:
	NetBSD's Makefiles use the DPADD variable to ensure binaries
are rebuilt if any of the libraries listed in the LDADD variable
change.  Some makefiles in the tree use LDADD, but lack the
corresponding DPADD.

/usr/share/mk/bsd.prog.mk lacks a definition for LIBY, and needs some
alphabetization.

>How-To-Repeat:
	cd /usr/src
	make
	touch /usr/lib/lib*.a
	make
>Fix:
	Apply these patches:

*** src/share/mk/bsd.prog.mk~      Mon Dec 11 15:31:26 1995
--- src/share/mk/bsd.prog.mk       Thu Mar 21 01:26:43 1996
***************
*** 21,28 ****
  LIBEDIT?=     ${DESTDIR}/usr/lib/libedit.a
  LIBGCC?=      ${DESTDIR}/usr/lib/libgcc.a
- LIBL?=                ${DESTDIR}/usr/lib/libl.a
  LIBKDB?=      ${DESTDIR}/usr/lib/libkdb.a
  LIBKRB?=      ${DESTDIR}/usr/lib/libkrb.a
  LIBKVM?=      ${DESTDIR}/usr/lib/libkvm.a
  LIBM?=                ${DESTDIR}/usr/lib/libm.a
  LIBMP?=               ${DESTDIR}/usr/lib/libmp.a
--- 21,28 ----
  LIBEDIT?=     ${DESTDIR}/usr/lib/libedit.a
  LIBGCC?=      ${DESTDIR}/usr/lib/libgcc.a
  LIBKDB?=      ${DESTDIR}/usr/lib/libkdb.a
  LIBKRB?=      ${DESTDIR}/usr/lib/libkrb.a
  LIBKVM?=      ${DESTDIR}/usr/lib/libkvm.a
+ LIBL?=                ${DESTDIR}/usr/lib/libl.a
  LIBM?=                ${DESTDIR}/usr/lib/libm.a
  LIBMP?=               ${DESTDIR}/usr/lib/libmp.a
***************
*** 34,37 ****
--- 34,38 ----
  LIBTERMCAP?=  ${DESTDIR}/usr/lib/libtermcap.a
  LIBUTIL?=     ${DESTDIR}/usr/lib/libutil.a
+ LIBY?=                ${DESTDIR}/usr/lib/liby.a
  
  .if defined(SHAREDSTRINGS)

*** src/sbin/fsdb/Makefile~        Fri Oct 13 21:10:00 1995
--- src/sbin/fsdb/Makefile Thu Mar 21 01:45:09 1996
***************
*** 9,12 ****
--- 9,13 ----
  CFLAGS+= -I${.CURDIR}/../../sbin/fsck
  LDADD+= -ledit -ltermcap
+ DPADD+=       ${LIBEDIT} ${LIBTERMCAP}
  .PATH:        ${.CURDIR}/../../sbin/fsck ${.CURDIR}/../../sys/ufs/ffs
  

*** src/usr.sbin/gspa/gspahextoc/Makefile~ Fri Oct 13 23:56:50 1995
--- src/usr.sbin/gspa/gspahextoc/Makefile  Thu Mar 21 01:25:33 1996
***************
*** 3,6 ****
--- 3,7 ----
  NOMAN=        noman
  LDADD=        -ll
+ DPADD=        ${LIBL}
  
  .include <bsd.prog.mk>

*** src/usr.sbin/spray/Makefile~   Sat Oct 14 01:07:11 1995
--- src/usr.sbin/spray/Makefile    Thu Mar 21 01:23:35 1996
***************
*** 4,7 ****
--- 4,8 ----
  MAN=  spray.8
  LDADD=        -lrpcsvc
+ DPADD=        ${LIBRPCSVC}
  
  .include <bsd.prog.mk>

*** src/domestic/usr.bin/bdes/Makefile~    Tue Dec 12 07:11:43 1995
--- src/domestic/usr.bin/bdes/Makefile     Thu Mar 21 00:52:55 1996
***************
*** 6,9 ****
--- 6,10 ----
  #BINDIR= /usr/bin
  LDADD+= -lcrypt
+ DPADD+=       ${LIBCRYPT}
  
  .include <bsd.prog.mk>

*** src/sys/arch/i386/isa/pcvt/Util/vgaio/Makefile~        Mon Feb  5 07:23:15 1996
--- src/sys/arch/i386/isa/pcvt/Util/vgaio/Makefile Thu Mar 21 01:10:57 1996
***************
*** 10,13 ****
--- 10,14 ----
  LFLAGS+= -I
  LDADD=        -lm -ly -ll
+ DPADD=        ${LIBM} ${LIBY} ${LIBL}
  
  CFLAGS+= -I. -g

*** src/sys/arch/i386/isa/pcvt/Util/kbdio/Makefile~        Mon Feb  5 07:23:07 1996
--- src/sys/arch/i386/isa/pcvt/Util/kbdio/Makefile Thu Mar 21 01:14:11 1996
***************
*** 9,12 ****
--- 9,13 ----
  
  LDADD=        -lm -ly -ll
+ DPADD=        ${LIBM} ${LIBY} ${LIBL}
  
  NOMAN=

>Audit-Trail:
>Unformatted: