Subject: Better fix for make rules
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Christos Zoulas <christos@deshaw.com>
List: current-users
Date: 07/19/1994 17:42:17
The previous one was not entirely correct, and it introduced an extra
variable where there is no need for that.

*** bsd.prog.mk.dist	Thu Jul  7 04:22:10 1994
--- bsd.prog.mk	Tue Jul 19 17:39:47 1994
***************
*** 58,73 ****
  OBJS+=  ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
  .endif
  
! .if defined(DESTDIR)
  
  ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
  	${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc
  
! .else
  
  ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
  	${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
  
  .endif
  
  .if	!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
--- 58,75 ----
  OBJS+=  ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
  .endif
  
! .if defined(OBJS) && !empty(OBJS)
! .   if defined(DESTDIR)
  
  ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
  	${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc
  
! .   else
  
  ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
  	${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
  
+ .   endif
  .endif
  
  .if	!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \

------------------------------------------------------------------------------