Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Implement my MKLINKLIB=yes fix a bit differently. ...



details:   https://anonhg.NetBSD.org/src/rev/e431d267d531
branches:  trunk
changeset: 485704:e431d267d531
user:      matt <matt%NetBSD.org@localhost>
date:      Wed May 03 15:15:50 2000 +0000

description:
Implement my MKLINKLIB=yes fix a bit differently.  Don't include ${OBJS}
in ${ALLOBJS} if MKLINKLIB=yes.  This allows Makefiles to continue to
modify ${OBJS}.

diffstat:

 share/mk/bsd.lib.mk |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 20f55d9f74df -r e431d267d531 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Wed May 03 14:53:15 2000 +0000
+++ b/share/mk/bsd.lib.mk       Wed May 03 15:15:50 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.166 2000/05/03 03:44:12 matt Exp $
+#      $NetBSD: bsd.lib.mk,v 1.167 2000/05/03 15:15:50 matt Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .if !target(__initialized__)
@@ -221,20 +221,18 @@
        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
        @rm -f ${.TARGET}.o
 
-_OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
 .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
        || ${MKLINKLIB} != "no"
 _LIBS=lib${LIB}.a
-OBJS+=${_OBJS}
 .else
 _LIBS=
 .endif
 
+OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
 
 .if ${MKPROFILE} != "no"
 _LIBS+=lib${LIB}_p.a
-POBJS+=${_OBJS:.o=.po}
+POBJS+=${OBJS:.o=.po}
 .endif
 
 .if ${MKPIC} != "no"
@@ -243,7 +241,7 @@
 .else
 SOLIB=lib${LIB}_pic.a
 _LIBS+=${SOLIB}
-SOBJS+=${_OBJS:.o=.so}
+SOBJS+=${OBJS:.o=.so}
 .endif
 .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
 _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
@@ -255,7 +253,12 @@
 LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .endif
 
+.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
+       || ${MKLINKLIB} != "no"
 ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}
+.else
+ALLOBJS=${POBJS} ${SOBJS} ${LOBJS}
+.endif
 .NOPATH: ${ALLOBJS} ${_LIBS}
 
 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}



Home | Main Index | Thread Index | Old Index