[BACK]Return to bsd.prog.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.prog.mk between version 1.125 and 1.218

version 1.125, 2001/01/14 09:40:35 version 1.218, 2006/11/10 17:13:15
Line 1 
Line 1 
 #       $NetBSD$  #       $NetBSD$
 #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94  #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
   
 .if !target(__initialized__)  .ifndef HOSTPROG
 __initialized__:  
 .if exists(${.CURDIR}/../Makefile.inc)  .include <bsd.init.mk>
 .include "${.CURDIR}/../Makefile.inc"  .include <bsd.shlib.mk>
 .endif  .include <bsd.gcc.mk>
 .include <bsd.own.mk>  
 .include <bsd.obj.mk>  .if defined(PROG_CXX)
 .include <bsd.depall.mk>  PROG=   ${PROG_CXX}
 .MAIN:          all  
 .endif  .endif
   
 .PHONY:         cleanprog proginstall scriptsinstall  .if defined(PROG_PAX)
   PROG_PAX.${PROG}?= ${PROG_PAX}
   .endif
   
   ##### Basic targets
 realinstall:    proginstall scriptsinstall  realinstall:    proginstall scriptsinstall
 clean cleandir distclean: cleanprog  clean:          cleanprog
   
   ##### PROG specific flags.
   COPTS+=     ${COPTS.${PROG}}
   CPPFLAGS+=  ${CPPFLAGS.${PROG}}
   CXXFLAGS+=  ${CXXFLAGS.${PROG}}
   OBJCOPTS+=  ${OBJCOPTS.${PROG}}
   LDADD+=     ${LDADD.${PROG}}
   LDFLAGS+=   ${LDFLAGS.${PROG}}
   LDSTATIC+=  ${LDSTATIC.${PROG}}
   
   ##### Default values
   CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
   CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   OBJCFLAGS+=     ${OBJCOPTS}
   MKDEP_SUFFIXES?=        .o .ln
   
 # ELF platforms depend on crtbegin.o and crtend.o  # ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
 LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o  .ifndef LIBCRTBEGIN
 LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o  LIBCRTBEGIN=    ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN}
   .MADE: ${LIBCRTBEGIN}
   .endif
   .ifndef LIBCRTEND
   LIBCRTEND=      ${_GCC_CRTEND} ${DESTDIR}/usr/lib/crtn.o
   .MADE: ${LIBCRTEND}
   .endif
   _SHLINKER=      ${SHLINKDIR}/ld.elf_so
 .else  .else
 LIBCRTBEGIN?=  LIBCRTBEGIN?=
 LIBCRTEND?=  LIBCRTEND?=
   _SHLINKER=      ${SHLINKDIR}/ld.so
 .endif  .endif
   
 LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o  .ifndef LIBCRT0
   LIBCRT0=        ${DESTDIR}/usr/lib/crt0.o
   .MADE: ${LIBCRT0}
   .endif
   
   ##### Installed system library definitions
   #
   #       E.g.
   #               LIBC?=${DESTDIR}/usr/lib/libc.a
   #               LIBX11?=${DESTDIR}/usr/X11R6/lib/libX11.a
   #       etc..
   
   .for _lib in \
           asn1 bluetooth bsdmalloc bz2 c c_pic cdk com_err compat crypt \
           crypto crypto_idea crypto_mdc2 crypto_rc5 \
           curses dbm des edit event \
           form fl g2c gcc gnumalloc gssapi hdb intl ipsec \
           kadm5clnt kadm5srv kafs krb5 kvm l \
           m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \
           puffs radius resolv rmt roken rpcsvc rt sdp skey sl ss ssh ssl termcap \
           usbhid util wrap y z
   .ifndef LIB${_lib:tu}
   LIB${_lib:tu}=  ${DESTDIR}/usr/lib/lib${_lib}.a
   .MADE:          ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
   .endif
   .endfor
   
 LIBBZ2?=        ${DESTDIR}/usr/lib/libbz2.a  # PAM applications, if linked statically, need more libraries
 LIBC?=          ${DESTDIR}/usr/lib/libc.a  .if (${MKPIC} == "no")
 LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a  .if (${MKCRYPTO} != "no")
 LIBCDK?=        ${DESTDIR}/usr/lib/libcdk.a  PAM_STATIC_LDADD+= -lssh
 LIBCOM_ERR?=    ${DESTDIR}/usr/lib/libcom_err.a  PAM_STATIC_DPADD+= ${LIBSSH}
 LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a  .endif
 LIBCRYPT?=      ${DESTDIR}/usr/lib/libcrypt.a  .if (${MKKERBEROS} != "no")
 LIBCRYPTO?=     ${DESTDIR}/usr/lib/libcrypto.a  PAM_STATIC_LDADD+= -lkafs -lkrb5 -lasn1 -lroken -lcom_err -lcrypto
 LIBCRYPTO_RC5?= ${DESTDIR}/usr/lib/libcrypto_rc5.a  PAM_STATIC_DPADD+= ${LIBKAFS} ${LIBKRB5} ${LIBASN1} ${LIBROKEN} \
 LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a          ${LIBCOM_ERR} ${LIBCRYPTO}
 LIBCURSES?=     ${DESTDIR}/usr/lib/libcurses.a  .endif
 LIBDBM?=        ${DESTDIR}/usr/lib/libdbm.a  .if (${MKSKEY} != "no")
 LIBDES?=        ${DESTDIR}/usr/lib/libdes.a  PAM_STATIC_LDADD+= -lskey
 LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a  PAM_STATIC_DPADD+= ${LIBSKEY}
 LIBFORM?=       ${DESTDIR}/usr/lib/libform.a  .endif
 LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a  PAM_STATIC_LDADD+= -lradius -lcrypt -lrpcsvc -lutil
 LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a  PAM_STATIC_DPADD+= ${LIBRADIUS} ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
 LIBGSSAPI?=     ${DESTDIR}/usr/lib/libgssapi.a  .else
 LIBHDB?=        ${DESTDIR}/usr/lib/libhdb.a  PAM_STATIC_LDADD=
 LIBINTL?=       ${DESTDIR}/usr/lib/libintl.a  PAM_STATIC_DPADD=
 LIBIPSEC?=      ${DESTDIR}/usr/lib/libipsec.a  .endif
 LIBKADM?=       ${DESTDIR}/usr/lib/libkadm.a  
 LIBKADM5CLNT?=  ${DESTDIR}/usr/lib/libkadm5clnt.a  # These need + -> X transformations
 LIBKADM5SRV?=   ${DESTDIR}/usr/lib/libkadm5srv.a  .ifndef LIBSTDCXX
 LIBKAFS?=       ${DESTDIR}/usr/lib/libkafs.a  LIBSTDCXX=      ${DESTDIR}/usr/lib/libstdc++.a
 LIBKDB?=        ${DESTDIR}/usr/lib/libkdb.a  .MADE:          ${LIBSTDCXX}
 LIBKRB?=        ${DESTDIR}/usr/lib/libkrb.a  .endif
 LIBKRB5?=       ${DESTDIR}/usr/lib/libkrb5.a  
 LIBKSTREAM?=    ${DESTDIR}/usr/lib/libkstream.a  .ifndef LIBSUPCXX
 LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a  LIBSUPCXX=      ${DESTDIR}/usr/lib/libsupc++.a
 LIBL?=          ${DESTDIR}/usr/lib/libl.a  .MADE:          ${LIBSUPCXX}
 LIBM?=          ${DESTDIR}/usr/lib/libm.a  .endif
 LIBMENU?=       ${DESTDIR}/usr/lib/libmenu.a  
 LIBOBJC?=       ${DESTDIR}/usr/lib/libobjc.a  .for _lib in \
 LIBOSSAUDIO?=   ${DESTDIR}/usr/lib/libossaudio.a          dps expat fntstubs fontcache fontconfig fontenc freetype FS \
 LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a          GL GLU ICE lbxutil SM X11 Xau Xaw Xdmcp Xext Xfont Xft \
 LIBPOSIX?=      ${DESTDIR}/usr/lib/libposix.a          Xi Xinerama xkbfile Xmu Xmuu Xpm Xrandr Xrender Xss Xt \
 LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a          XTrap Xtst Xv Xxf86dga Xxf86misc Xxf86vm
 LIBRMT?=        ${DESTDIR}/usr/lib/librmt.a  .ifndef LIB${_lib:tu}
 LIBROKEN?=      ${DESTDIR}/usr/lib/libroken.a  LIB${_lib:tu}=  ${DESTDIR}/usr/X11R6/lib/lib${_lib}.a
 LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a  .MADE:          ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
 LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a  .endif
 LIBSS?=         ${DESTDIR}/usr/lib/libss.a  .endfor
 LIBSSL?=        ${DESTDIR}/usr/lib/liblss.a  
 LIBSL?=         ${DESTDIR}/usr/lib/libsl.a  
 LIBTERMCAP?=    ${DESTDIR}/usr/lib/libtermcap.a  
 LIBTELNET?=     ${DESTDIR}/usr/lib/libtelnet.a  
 LIBUSB?=        ${DESTDIR}/usr/lib/libusb.a  
 LIBUTIL?=       ${DESTDIR}/usr/lib/libutil.a  
 LIBWRAP?=       ${DESTDIR}/usr/lib/libwrap.a  
 LIBY?=          ${DESTDIR}/usr/lib/liby.a  
 LIBZ?=          ${DESTDIR}/usr/lib/libz.a  
   
   
   ##### Build and install rules
 .if defined(SHAREDSTRINGS)  .if defined(SHAREDSTRINGS)
 CLEANFILES+=strings  CLEANFILES+=strings
 .c.o:  .c.o:
         ${CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c -          ${CC} -E ${CPPFLAGS} ${CFLAGS} ${.IMPSRC} | xstr -c -
         @${CC} ${CFLAGS} -c x.c -o ${.TARGET}          @${CC} ${CPPFLAGS} ${CFLAGS} -c x.c -o ${.TARGET}
         @rm -f x.c          @rm -f x.c
   
 .cc.o:  .cc.o .cpp.o .cxx.o .C.o:
         ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -          ${CXX} -E ${CPPFLAGS} ${CXXFLAGS} ${.IMPSRC} | xstr -c -
         @mv -f x.c x.cc          @mv -f x.c x.cc
         @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}          @${CXX} ${CPPFLAGS} ${CXXFLAGS} -c x.cc -o ${.TARGET}
         @rm -f x.cc          @rm -f x.cc
   
 .C.o:  
         ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -  
         @mv -f x.c x.C  
         @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET}  
         @rm -f x.C  
 .endif  .endif
   
   .if defined(PROG)                                                       # {
 .if defined(PROG)  .if defined(PROG_CXX)
   SRCS?=          ${PROG}.cc
   .else
 SRCS?=          ${PROG}.c  SRCS?=          ${PROG}.c
   .endif
   
   PROGNAME?=      ${PROG}
   
 DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}  .if defined(RESCUEDIR)
 CLEANFILES+=    ${DPSRCS}  CPPFLAGS+=      -DRESCUEDIR=\"${RESCUEDIR}\"
 .if defined(YHEADER)  
 CLEANFILES+=    ${SRCS:M*.y:.y=.h}  
 .endif  .endif
   
   _YPSRCS=        ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
   
   DPSRCS+=        ${_YPSRCS}
   CLEANFILES+=    ${_YPSRCS}
   
 .if !empty(SRCS:N*.h:N*.sh:N*.fth)  .if !empty(SRCS:N*.h:N*.sh:N*.fth)
 OBJS+=          ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}  OBJS+=          ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
 LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .endif  .endif
   
 .if defined(OBJS) && !empty(OBJS)  .if defined(OBJS) && !empty(OBJS)                                       # {
 .NOPATH: ${OBJS}  .NOPATH: ${OBJS} ${PROG} ${_YPSRCS}
 .if defined(DESTDIR)  
   
 ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}  _PROGLDOPTS=
 .if !target(${PROG})  .if ${SHLINKDIR} != "/usr/libexec"      # XXX: change or remove if ld.so moves
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -Wl,-rpath-link,${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib -lgcc -lc -lgcc ${LIBCRTEND}  .if ${OBJECT_FMT} == "ELF"
   _PROGLDOPTS+=   -Wl,-dynamic-linker=${_SHLINKER}
   .endif
   .endif
   .if ${SHLIBDIR} != "/usr/lib"
   _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
                   -R${SHLIBDIR} \
                   -L${DESTDIR}${SHLIBDIR}
   .elif ${SHLIBINSTALLDIR} != "/usr/lib"
   _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
                   -L${DESTDIR}${SHLIBINSTALLDIR}
 .endif  .endif
   
   .if defined(PROG_CXX)
   _CCLINK=        ${CXX}
 .else  .else
   _CCLINK=        ${CC}
   .endif
   
   .if ${MKDEBUG} != "no" && ${OBJECT_FMT} == "ELF" && !commands(${PROG})
   _PROGDEBUG=     ${PROGNAME}.debug
   .endif
   
 ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}  .gdbinit:
 .if !target(${PROG})          rm -f .gdbinit
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}  .if defined(DESTDIR) && !empty(DESTDIR)
           echo "set solib-absolute-prefix ${DESTDIR}" > .gdbinit
   .else
           touch .gdbinit
 .endif  .endif
   .for __gdbinit in ${GDBINIT}
           echo "source ${__gdbinit}" >> .gdbinit
   .endfor
   
   ${OBJS} ${LOBJS}: ${DPSRCS}
   
   ${PROG}: .gdbinit ${LIBCRT0} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
   .if !commands(${PROG})
           ${_MKTARGET_LINK}
   .if defined(DESTDIR)
           ${_CCLINK} -Wl,-nostdlib \
               ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} \
               -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/  \
               ${OBJS} ${LDADD} \
               -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
   .else
           ${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${OBJS} ${LDADD}
 .endif  # defined(DESTDIR)  .endif  # defined(DESTDIR)
 .endif  # defined(OBJS) && !empty(OBJS)  .endif  # !commands(${PROG})
   .if defined(PROG_PAX.${PROG})
           ${PAXCTL} ${PROG_PAX.${PROG}} ${.TARGET}
   .endif
   
   ${PROG}.ro: ${OBJS} ${DPADD}
           ${_MKTARGET_LINK}
           ${LD} -r -dc -o ${.TARGET} ${OBJS}
   
   .if defined(_PROGDEBUG)
   ${_PROGDEBUG}: ${PROG}
           ${_MKTARGET_CREATE}
           ${OBJCOPY} --only-keep-debug ${PROG} ${_PROGDEBUG}
           ${OBJCOPY} -R .gnu_debuglink --add-gnu-debuglink=${_PROGDEBUG} ${PROG} \
               || rm -f ${_PROGDEBUG}
   .endif
   
   .endif  # defined(OBJS) && !empty(OBJS)                                 # }
   
 .if !defined(MAN)  .if !defined(MAN)
 MAN=    ${PROG}.1  MAN=    ${PROG}.1
 .endif  # !defined(MAN)  .endif  # !defined(MAN)
 .endif  # defined(PROG)  .endif  # defined(PROG)                                                 # }
   
 realall: ${PROG} ${SCRIPTS}  realall: ${PROG} ${_PROGDEBUG} ${SCRIPTS}
   
 cleanprog:  cleanprog: .PHONY cleanobjs cleanextra
         rm -f a.out [Ee]rrs mklog core *.core \          rm -f a.out [Ee]rrs mklog core *.core .gdbinit ${PROG} ${_PROGDEBUG}
             ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}  
   
 .if defined(SRCS)  cleanobjs: .PHONY
 afterdepend: .depend  .if defined(OBJS) && !empty(OBJS)
         @(TMP=/tmp/_depend$$$$; \          rm -f ${OBJS} ${LOBJS}
             sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.ln:/' \  
               < .depend > $$TMP; \  
             mv $$TMP .depend)  
 .endif  .endif
   
 .if defined(PROG) && !target(proginstall)  cleanextra: .PHONY
 PROGNAME?=${PROG}  .if defined(CLEANFILES) && !empty(CLEANFILES)
           rm -f ${CLEANFILES}
 proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}  
 .PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}  
 .if !defined(UPDATE)  
 .PHONY: ${DESTDIR}${BINDIR}/${PROGNAME}  
 .endif  .endif
   
   .if defined(PROG) && !target(proginstall)                               # {
   
   proginstall::   ${DESTDIR}${BINDIR}/${PROGNAME} ${_PROGDEBUG:D${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}}
   .PRECIOUS:      ${DESTDIR}${BINDIR}/${PROGNAME} ${_PROGDEBUG:D${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}}
   
 __proginstall: .USE  __proginstall: .USE
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${STRIPFLAG} ${INSTPRIV} \          ${_MKTARGET_INSTALL}
             -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${.ALLSRC} ${.TARGET}          ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
                   ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
   
   __progdebuginstall: .USE
           ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
                   ${.ALLSRC} ${.TARGET}
   
   .if ${MKUPDATE} == "no"
   ${DESTDIR}${BINDIR}/${PROGNAME}! ${PROG} __proginstall
 .if !defined(BUILD) && !make(all) && !make(${PROG})  .if !defined(BUILD) && !make(all) && !make(${PROG})
 ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE  ${DESTDIR}${BINDIR}/${PROGNAME}! .MADE
   .endif
   .if defined(_PROGDEBUG)
   ${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}! ${_PROGDEBUG} __progdebuginstall
   .if !defined(BUILD) && !make(all) && !make(${PROG})
   ${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}! .MADE
 .endif  .endif
   .endif  #  define(_PROGDEBUG)
   .else   # MKUPDATE != no
 ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG} __proginstall  ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG} __proginstall
   .if !defined(BUILD) && !make(all) && !make(${PROG})
   ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE
   .endif
   .if defined(_PROGDEBUG)
   ${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}: ${_PROGDEBUG} __progdebuginstall
   .if !defined(BUILD) && !make(all) && !make(${PROG})
   ${DESTDIR}${DEBUGDIR}${BINDIR}/${_PROGDEBUG}: .MADE
 .endif  .endif
   .endif  #  defined(_PROGDEBUG)
   .endif  # MKUPDATE != no
   
   .endif  # defined(PROG) && !target(proginstall)                         # }
   
 .if !target(proginstall)  .if !target(proginstall)
 proginstall::  proginstall::
 .endif  .endif
   .PHONY:         proginstall
   
 .if defined(SCRIPTS) && !target(scriptsinstall)  .if defined(SCRIPTS) && !target(scriptsinstall)                         # {
 SCRIPTSDIR?=${BINDIR}  SCRIPTSDIR?=${BINDIR}
 SCRIPTSOWN?=${BINOWN}  SCRIPTSOWN?=${BINOWN}
 SCRIPTSGRP?=${BINGRP}  SCRIPTSGRP?=${BINGRP}
Line 186  SCRIPTSMODE?=${BINMODE}
Line 308  SCRIPTSMODE?=${BINMODE}
   
 scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}  scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 .PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}  .PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 .if !defined(UPDATE)  
 .PHONY: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}  
 .endif  
   
 __scriptinstall: .USE  __scriptinstall: .USE
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \          ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} \
             -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \              -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
             -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \              -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
             -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \              -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \
             ${.ALLSRC} ${.TARGET}              ${.ALLSRC} ${.TARGET}
   
 .for S in ${SCRIPTS}  .for S in ${SCRIPTS:O:u}
   .if ${MKUPDATE} == "no"
   ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! ${S} __scriptinstall
 .if !defined(BUILD) && !make(all) && !make(${S})  .if !defined(BUILD) && !make(all) && !make(${S})
 ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE  ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! .MADE
 .endif  .endif
   .else
 ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall  ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall
 .endfor  .if !defined(BUILD) && !make(all) && !make(${S})
   ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE
   .endif
 .endif  .endif
   .endfor
   .endif                                                                  # }
   
 .if !target(scriptsinstall)  .if !target(scriptsinstall)
 scriptsinstall::  scriptsinstall::
 .endif  .endif
   .PHONY:         scriptsinstall
   
 lint: ${LOBJS}  lint: ${LOBJS}
 .if defined(LOBJS) && !empty(LOBJS)  .if defined(LOBJS) && !empty(LOBJS)
         ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}          ${LINT} ${LINTFLAGS} ${LDFLAGS:C/-L[  ]*/-L/Wg:M-L*} ${LOBJS} ${LDADD}
 .endif  .endif
   
   ##### Pull in related .mk logic
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .include <bsd.nls.mk>  .include <bsd.nls.mk>
 .include <bsd.files.mk>  .include <bsd.files.mk>
 .include <bsd.inc.mk>  .include <bsd.inc.mk>
 .include <bsd.links.mk>  .include <bsd.links.mk>
 .include <bsd.dep.mk>  
 .include <bsd.sys.mk>  .include <bsd.sys.mk>
   .include <bsd.dep.mk>
   
   ${TARGETS}:     # ensure existence
   
 # Make sure all of the standard targets are defined, even if they do nothing.  .endif  # HOSTPROG
 regress:  

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.218

CVSweb <webmaster@jp.NetBSD.org>