[BACK]Return to bsd.lib.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.lib.mk between version 1.190 and 1.202

version 1.190, 2001/11/14 21:49:53 version 1.202, 2002/05/07 01:45:45
Line 9  realinstall: checkver libinstall
Line 9  realinstall: checkver libinstall
 clean:          cleanlib  clean:          cleanlib
   
 ##### Build and install rules  ##### Build and install rules
 CPPFLAGS+=      ${DESTDIR:D-nostdinc -isystem ${DESTDIR}/usr/include}  CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
   CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include/g++}
   
 .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})  .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})
 SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major  SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
Line 18  SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ;
Line 19  SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ;
   
 # Check for higher installed library versions.  # Check for higher installed library versions.
 .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \  .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
         exists(${BSDSRCDIR}/lib/checkver)          exists(${NETBSDSRCDIR}/lib/checkver)
 checkver:  checkver:
         @(cd ${.CURDIR} && \          @(cd ${.CURDIR} && \
                 sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \                  sh ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
                     -d ${DESTDIR}${LIBDIR} ${LIB})                      -d ${DESTDIR}${_LIBSODIR} ${LIB})
 .endif  .endif
 .endif  .endif
   
Line 115  MKPICLIB= no
Line 116  MKPICLIB= no
   
 .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \  .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
        ${OBJECT_FMT} == "ELF"         ${OBJECT_FMT} == "ELF"
   # If you use -fPIC you need to define BIGPIC to turn on 32-bit
   # relocations in asm code
 FPICFLAGS ?= -fPIC  FPICFLAGS ?= -fPIC
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC -DBIGPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?= -KPIC  APICFLAGS ?= -KPIC -DBIGPIC
   
 .else  .else
   
Line 334  ALLOBJS=${POBJS} ${SOBJS} 
Line 336  ALLOBJS=${POBJS} ${SOBJS} 
 ALLOBJS+=${LOBJS}  ALLOBJS+=${LOBJS}
 .endif  .endif
   
 .NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}  .NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
   
 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}  realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
   
Line 344  __archivebuild: .USE
Line 346  __archivebuild: .USE
         ${RANLIB} ${.TARGET}          ${RANLIB} ${.TARGET}
   
 __archiveinstall: .USE  __archiveinstall: .USE
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
         ${RANLIB} -t ${.TARGET}              ${UPDATE:D:U-a "${RANLIB} -t"} ${.ALLSRC} ${.TARGET}
         chmod ${LIBMODE} ${.TARGET}  
   
 DPSRCS+=        ${SRCS:M*.[ly]:C/..$/.c/}  __archivesymlinkpic: .USE
           ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
   
   DPSRCS+=        ${SRCS:M*.[ly]:C/\..$/.c/}
 CLEANFILES+=    ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}  CLEANFILES+=    ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}
   
 lib${LIB}.a:: ${OBJS} __archivebuild  lib${LIB}.a:: ${OBJS} __archivebuild
Line 369  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 373  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
             ${SHLIB_LDSTARTFILE} \              ${SHLIB_LDSTARTFILE} \
             --whole-archive ${SOLIB} \              --whole-archive ${SOLIB} \
             --no-whole-archive ${LDADD} \              --no-whole-archive ${LDADD} \
             -L${DESTDIR}${LIBDIR} -R${LIBDIR} \              -L${DESTDIR}${_LIBSODIR} -L${DESTDIR}${LIBDIR} \
               -R${_LIBSODIR} -R${LIBDIR} \
             ${SHLIB_LDENDFILE}              ${SHLIB_LDENDFILE}
 .else  .else
         $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
Line 378  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 383  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
             ${SHLIB_LDENDFILE}              ${SHLIB_LDENDFILE}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
   #  We don't use INSTALL_SYMLINK here because this is just
   #  happening inside the build directory/objdir. XXX Why does
   #  this spend so much effort on libraries that aren't live??? XXX
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp          ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
         mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}          mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp          ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
Line 414  libinstall::
Line 422  libinstall::
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
   
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
 .endif  .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
   .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
 .endif  .endif
 ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
 .endif  .endif
   .endif
   
 .if ${MKPROFILE} != "no"  .if ${MKPROFILE} != "no"
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
   
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
 .endif  .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
   .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
 .endif  .endif
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
 .endif  .endif
   .endif
   
 .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"  .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
   
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
 .endif  .endif
   .if ${MKPICLIB} == "no"
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
   .else
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
   .endif
   .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
 .endif  .endif
 .if ${MKPICLIB} == "no"  .if ${MKPICLIB} == "no"
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  
         ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  
 .else  .else
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
 .endif  .endif
 .endif  .endif
   .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)  .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  libinstall:: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  .PRECIOUS: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
   
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
   ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! .MADE
 .endif  .endif
   ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
   .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE  ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
   .endif
   ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}  
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${.ALLSRC} ${.TARGET}                  ${.ALLSRC} ${.TARGET}
   .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
               ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
   .endif
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
         /sbin/ldconfig -m ${LIBDIR}          /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\          ${INSTALL_SYMLINK} lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp              ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_MAJOR}
         mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\  .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}              ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
   .endif
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\          ${INSTALL_SYMLINK} lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp              ${DESTDIR}${_LIBSODIR}/lib${LIB}.so
         mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\  .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so              ${DESTDIR}${LIBDIR}/lib${LIB}.so
 .endif  .endif
 .endif  .endif
 .endif  .endif
   .endif
   
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
 .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
   
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
   ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
 .endif  .endif
   ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
   .else
 .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)  .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
 .endif  .endif
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
   .endif
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}                  ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
 .endif  .endif

Legend:
Removed from v.1.190  
changed lines
  Added in v.1.202

CVSweb <webmaster@jp.NetBSD.org>