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

Annotation of src/share/mk/bsd.prog.mk, Revision 1.226.2.2

1.226.2.2! mjf         1: #      $NetBSD: bsd.prog.mk,v 1.226.2.1 2008/06/02 13:21:43 mjf Exp $
        !             2: #      @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
        !             3:
        !             4: .ifndef HOSTPROG
        !             5:
        !             6: .include <bsd.init.mk>
        !             7: .include <bsd.shlib.mk>
        !             8: .include <bsd.gcc.mk>
        !             9:
        !            10: #
        !            11: # Definitions and targets shared among all programs built by a single
        !            12: # Makefile.
        !            13: #
        !            14:
        !            15: ##### Basic targets
        !            16: realinstall:   proginstall scriptsinstall
        !            17: clean:         cleanprog
        !            18:
        !            19: .gdbinit:
        !            20:        rm -f .gdbinit
        !            21: .if defined(DESTDIR) && !empty(DESTDIR)
        !            22:        echo "set solib-absolute-prefix ${DESTDIR}" > .gdbinit
        !            23: .else
        !            24:        touch .gdbinit
        !            25: .endif
        !            26: .for __gdbinit in ${GDBINIT}
        !            27:        echo "source ${__gdbinit}" >> .gdbinit
        !            28: .endfor
        !            29:
        !            30: cleanextra: .PHONY
        !            31: .if defined(CLEANFILES) && !empty(CLEANFILES)
        !            32:        rm -f ${CLEANFILES}
        !            33: .endif
        !            34:
        !            35: cleanobjs: .PHONY
        !            36:
        !            37: cleanprog: .PHONY cleanobjs cleanextra
        !            38:        rm -f a.out [Ee]rrs mklog core *.core .gdbinit
        !            39:
        !            40: .if defined(SHAREDSTRINGS)
        !            41: CLEANFILES+=strings
        !            42: .c.o:
        !            43:        ${CC} -E ${CPPFLAGS} ${CFLAGS} ${.IMPSRC} | xstr -c -
        !            44:        @${CC} ${CPPFLAGS} ${CFLAGS} -c x.c -o ${.TARGET}
        !            45:        @rm -f x.c
        !            46:
        !            47: .cc.o .cpp.o .cxx.o .C.o:
        !            48:        ${CXX} -E ${CPPFLAGS} ${CXXFLAGS} ${.IMPSRC} | xstr -c -
        !            49:        @mv -f x.c x.cc
        !            50:        @${CXX} ${CPPFLAGS} ${CXXFLAGS} -c x.cc -o ${.TARGET}
        !            51:        @rm -f x.cc
        !            52: .endif
        !            53:
        !            54: ##### Default values
        !            55: CPPFLAGS+=     ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
        !            56: CXXFLAGS+=     ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
        !            57: CFLAGS+=       ${COPTS}
        !            58: OBJCFLAGS+=    ${OBJCOPTS}
        !            59: MKDEP_SUFFIXES?=       .o .ln
        !            60:
        !            61: # ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o
        !            62: .if ${OBJECT_FMT} == "ELF"
        !            63: .ifndef LIBCRTBEGIN
        !            64: LIBCRTBEGIN=   ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN}
        !            65: .MADE: ${LIBCRTBEGIN}
        !            66: .endif
        !            67: .ifndef LIBCRTEND
        !            68: LIBCRTEND=     ${_GCC_CRTEND} ${DESTDIR}/usr/lib/crtn.o
        !            69: .MADE: ${LIBCRTEND}
        !            70: .endif
        !            71: _SHLINKER=     ${SHLINKDIR}/ld.elf_so
        !            72: .else
        !            73: LIBCRTBEGIN?=
        !            74: LIBCRTEND?=
        !            75: _SHLINKER=     ${SHLINKDIR}/ld.so
        !            76: .endif
        !            77:
        !            78: .ifndef LIBCRT0
        !            79: LIBCRT0=       ${DESTDIR}/usr/lib/crt0.o
        !            80: .MADE: ${LIBCRT0}
        !            81: .endif
        !            82:
        !            83: ##### Installed system library definitions
        !            84: #
        !            85: #      E.g.
        !            86: #              LIBC?=${DESTDIR}/usr/lib/libc.a
        !            87: #              LIBX11?=${DESTDIR}/usr/X11R6/lib/libX11.a
        !            88: #      etc..
        !            89:
        !            90: .for _lib in \
        !            91:        archive asn1 bluetooth bsdmalloc bz2 c c_pic cdk com_err compat \
        !            92:        crypt crypto crypto_idea crypto_mdc2 crypto_rc5 \
        !            93:        curses dbm des edit event \
        !            94:        form fl g2c gcc gnumalloc gssapi hdb heimntlm hx509 intl ipsec \
        !            95:        kadm5clnt kadm5srv kafs krb5 kvm l lber ldap ldap_r \
        !            96:        m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \
        !            97:        puffs radius resolv rmt roken rpcsvc rt sdp skey sl ss ssh ssl termcap \
        !            98:        usbhid util wrap y z bind9 dns lwres isccfg isccc isc
        !            99: .ifndef LIB${_lib:tu}
        !           100: LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
        !           101: .MADE:         ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
        !           102: .endif
        !           103: .endfor
        !           104:
        !           105: # PAM applications, if linked statically, need more libraries
        !           106: .if (${MKPIC} == "no")
        !           107: .if (${MKCRYPTO} != "no")
        !           108: PAM_STATIC_LDADD+= -lssh
        !           109: PAM_STATIC_DPADD+= ${LIBSSH}
        !           110: .endif
        !           111: .if (${MKKERBEROS} != "no")
        !           112: PAM_STATIC_LDADD+= -lkafs -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypto
        !           113: PAM_STATIC_DPADD+= ${LIBKAFS} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} \
        !           114:        ${LIBCOM_ERR} ${LIBCRYPTO}
        !           115: .endif
        !           116: .if (${MKSKEY} != "no")
        !           117: PAM_STATIC_LDADD+= -lskey
        !           118: PAM_STATIC_DPADD+= ${LIBSKEY}
        !           119: .endif
        !           120: PAM_STATIC_LDADD+= -lradius -lcrypt -lrpcsvc -lutil
        !           121: PAM_STATIC_DPADD+= ${LIBRADIUS} ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
        !           122: .else
        !           123: PAM_STATIC_LDADD=
        !           124: PAM_STATIC_DPADD=
        !           125: .endif
        !           126:
        !           127: # These need + -> X transformations
        !           128: .ifndef LIBSTDCXX
        !           129: LIBSTDCXX=     ${DESTDIR}/usr/lib/libstdc++.a
        !           130: .MADE:         ${LIBSTDCXX}
        !           131: .endif
        !           132:
        !           133: .ifndef LIBSUPCXX
        !           134: LIBSUPCXX=     ${DESTDIR}/usr/lib/libsupc++.a
        !           135: .MADE:         ${LIBSUPCXX}
        !           136: .endif
        !           137:
        !           138: .for _lib in \
        !           139:        dps expat fntstubs fontcache fontconfig fontenc freetype FS \
        !           140:        GL GLU ICE lbxutil SM X11 Xau Xaw Xdmcp Xext Xfont Xft \
        !           141:        Xi Xinerama xkbfile Xmu Xmuu Xpm Xrandr Xrender Xss Xt \
        !           142:        XTrap Xtst Xv Xxf86dga Xxf86misc Xxf86vm
        !           143: .ifndef LIB${_lib:tu}
        !           144: LIB${_lib:tu}= ${DESTDIR}/usr/X11R6/lib/lib${_lib}.a
        !           145: .MADE:         ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
        !           146: .endif
        !           147: .endfor
        !           148:
        !           149: .if defined(RESCUEDIR)
        !           150: CPPFLAGS+=     -DRESCUEDIR=\"${RESCUEDIR}\"
        !           151: .endif
        !           152:
        !           153: _PROGLDOPTS=
        !           154: .if ${SHLINKDIR} != "/usr/libexec"     # XXX: change or remove if ld.so moves
        !           155: .if ${OBJECT_FMT} == "ELF"
        !           156: _PROGLDOPTS+=  -Wl,-dynamic-linker=${_SHLINKER}
        !           157: .endif
        !           158: .endif
        !           159: .if ${SHLIBDIR} != "/usr/lib"
        !           160: _PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
        !           161:                -R${SHLIBDIR} \
        !           162:                -L${DESTDIR}${SHLIBDIR}
        !           163: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
        !           164: _PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
        !           165:                -L${DESTDIR}${SHLIBINSTALLDIR}
        !           166: .endif
        !           167:
        !           168: __proginstall: .USE
        !           169:        ${_MKTARGET_INSTALL}
        !           170:        ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
        !           171:                ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
        !           172:
        !           173: __progdebuginstall: .USE
        !           174:        ${_MKTARGET_INSTALL}
        !           175:        ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
        !           176:                ${.ALLSRC} ${.TARGET}
        !           177:
        !           178:
        !           179:
        !           180: #
        !           181: # Backwards compatibility with Makefiles that assume that bsd.prog.mk
        !           182: # can only build a single binary.
        !           183: #
        !           184:
        !           185: _APPEND_MANS=yes
        !           186: _APPEND_SRCS=yes
        !           187:
        !           188: .if defined(PROG_CXX)
        !           189: PROG=          ${PROG_CXX}
        !           190: _CCLINK=       ${CXX} # XXX Some Makefiles rely on this being public.
        !           191: .endif
        !           192:
        !           193: .if defined(PROG)
        !           194: _CCLINK?=      ${CC} # XXX Some Makefiles rely on this being public.
        !           195: .  if defined(MAN)
        !           196: MAN.${PROG}=   ${MAN}
        !           197: _APPEND_MANS=  no
        !           198: .  endif
        !           199: .  if !defined(OBJS)
        !           200: OBJS=          ${OBJS.${PROG}}
        !           201: .  endif
        !           202: .  if defined(PROGNAME)
        !           203: PROGNAME.${PROG}=      ${PROGNAME}
        !           204: .  endif
        !           205: .  if defined(SRCS)
        !           206: SRCS.${PROG}=  ${SRCS}
        !           207: _APPEND_SRCS=  no
        !           208: .  endif
        !           209: .endif
        !           210:
        !           211: # Turn the single-program PROG and PROG_CXX variables into their multi-word
        !           212: # counterparts, PROGS and PROGS_CXX.
        !           213: .if defined(PROG_CXX) && !defined(PROGS_CXX)
        !           214: PROGS_CXX=     ${PROG_CXX}
        !           215: .elif defined(PROG) && !defined(PROGS)
        !           216: PROGS=         ${PROG}
        !           217: .endif
        !           218:
        !           219:
        !           220:
        !           221: #
        !           222: # Per-program definitions and targets.
        !           223: #
        !           224:
        !           225: # Definitions specific to C programs.
        !           226: .for _P in ${PROGS}
        !           227: SRCS.${_P}?=   ${_P}.c
        !           228: _CCLINK.${_P}= ${CC}
        !           229: .endfor
        !           230:
        !           231: # Definitions specific to C++ programs.
        !           232: .for _P in ${PROGS_CXX}
        !           233: SRCS.${_P}?=   ${_P}.cc
        !           234: _CCLINK.${_P}= ${CXX}
        !           235: .endfor
        !           236:
        !           237: # Language-independent definitions.
        !           238: .for _P in ${PROGS} ${PROGS_CXX}                                       # {
        !           239:
        !           240: BINDIR.${_P}?=         ${BINDIR}
        !           241: PROGNAME.${_P}?=       ${_P}
        !           242:
        !           243: .if ${MKDEBUG} != "no" && ${OBJECT_FMT} == "ELF" && !commands(${_P})
        !           244: _PROGDEBUG.${_P}:=     ${PROGNAME.${_P}}.debug
        !           245: .endif
        !           246:
        !           247: .if defined(PAXCTL_FLAGS)
        !           248: PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS}
        !           249: .endif
        !           250:
        !           251: ##### PROG specific flags.
        !           252: COPTS+=     ${COPTS.${_P}}
        !           253: CPPFLAGS+=  ${CPPFLAGS.${_P}}
        !           254: CXXFLAGS+=  ${CXXFLAGS.${_P}}
        !           255: OBJCOPTS+=  ${OBJCOPTS.${_P}}
        !           256: LDADD+=     ${LDADD.${_P}}
        !           257: LDFLAGS+=   ${LDFLAGS.${_P}}
        !           258: LDSTATIC+=  ${LDSTATIC.${_P}}
        !           259:
        !           260: _COPTS.${_P}=          ${COPTS}    ${COPTS.${_P}}
        !           261: _CPPFLAGS.${_P}=       ${CPPFLAGS} ${CPPFLAGS.${_P}}
        !           262: _CXXFLAGS.${_P}=       ${CXXFLAGS} ${CXXFLAGS.${_P}}
        !           263: _OBJCOPTS.${_P}=       ${OBJCOPTS} ${OBJCOPTS.${_P}}
        !           264: _LDADD.${_P}=          ${LDADD}    ${LDADD.${_P}}
        !           265: _LDFLAGS.${_P}=                ${LDFLAGS}  ${LDFLAGS.${_P}}
        !           266: _LDSTATIC.${_P}=       ${LDSTATIC} ${LDSTATIC.${_P}}
        !           267:
        !           268: ##### Build and install rules
        !           269: .if !empty(_APPEND_SRCS:M[Yy][Ee][Ss])
        !           270: SRCS+=         ${SRCS.${_P}} # For bsd.dep.mk
        !           271: .endif
        !           272:
        !           273: _YPSRCS.${_P}= ${SRCS.${_P}:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS.${_P}:M*.y:.y=.h}}
        !           274:
        !           275: DPSRCS+=               ${_YPSRCS.${_P}}
        !           276: CLEANFILES+=           ${_YPSRCS.${_P}}
        !           277:
        !           278: .if !empty(SRCS.${_P}:N*.h:N*.sh:N*.fth)
        !           279: OBJS.${_P}+=   ${SRCS.${_P}:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
        !           280: LOBJS.${_P}+=  ${LSRCS:.c=.ln} ${SRCS.${_P}:M*.c:.c=.ln}
        !           281: .endif
        !           282:
        !           283: .if defined(OBJS.${_P}) && !empty(OBJS.${_P})                  # {
        !           284: .NOPATH: ${OBJS.${_P}} ${_P} ${_YPSRCS.${_P}}
        !           285:
        !           286: ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS}
        !           287:
        !           288: ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
        !           289: .if !commands(${_P})
        !           290:        ${_MKTARGET_LINK}
        !           291: .if defined(DESTDIR)
        !           292:        ${_CCLINK.${_P}} -Wl,-nostdlib \
        !           293:            ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} ${_PROGLDOPTS} \
        !           294:            -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/  \
        !           295:            ${OBJS.${_P}} ${_LDADD.${_P}} \
        !           296:            -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
        !           297: .else
        !           298:        ${_CCLINK.${_P}} ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} ${_PROGLDOPTS} ${OBJS.${_P}} ${_LDADD.${_P}}
        !           299: .endif # defined(DESTDIR)
        !           300: .if defined(PAXCTL_FLAGS.${_P})
        !           301:        ${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}
        !           302: .endif
        !           303: .endif # !commands(${_P})
        !           304:
        !           305: ${_P}.ro: ${OBJS.${_P}} ${DPADD}
        !           306:        ${_MKTARGET_LINK}
        !           307:        ${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}}
        !           308:
        !           309: .if defined(_PROGDEBUG.${_P})
        !           310: ${_PROGDEBUG.${_P}}: ${_P}
        !           311:        ${_MKTARGET_CREATE}
        !           312:        ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}}
        !           313:        ${OBJCOPY} -R .gnu_debuglink --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \
        !           314:            || rm -f ${_PROGDEBUG.${_P}}
        !           315: .endif
        !           316:
        !           317: .endif # defined(OBJS.${_P}) && !empty(OBJS.${_P})                     # }
        !           318:
        !           319: .if !defined(MAN.${_P})
        !           320: MAN.${_P}=     ${_P}.1
        !           321: .endif # !defined(MAN.${_P})
        !           322: .if !empty(_APPEND_MANS:M[Yy][Ee][Ss])
        !           323: MAN+=          ${MAN.${_P}}
        !           324: .endif
        !           325:
        !           326: realall: ${_P} ${_PROGDEBUG.${_P}}
        !           327:
        !           328: cleanprog: cleanprog-${_P}
        !           329: cleanprog-${_P}:
        !           330:        rm -f ${_P} ${_PROGDEBUG.${_P}}
        !           331:
        !           332: .if defined(OBJS.${_P}) && !empty(OBJS.${_P})
        !           333: cleanobjs: cleanobjs-${_P}
        !           334: cleanobjs-${_P}:
        !           335:        rm -f ${OBJS.${_P}} ${LOBJS.${_P}}
        !           336: .endif
        !           337:
        !           338: _PROG_INSTALL+=        proginstall-${_P}
        !           339:
        !           340: .if !target(proginstall-${_P})                                         # {
        !           341: proginstall-${_P}::    ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}} \
        !           342:                ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}
        !           343: .PRECIOUS:     ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}} \
        !           344:                ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}
        !           345:
        !           346: .if ${MKUPDATE} == "no"
        !           347: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __proginstall
        !           348: .if !defined(BUILD) && !make(all) && !make(${_P})
        !           349: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! .MADE
        !           350: .endif
        !           351: .if defined(_PROGDEBUG.${_P})
        !           352: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}! ${_PROGDEBUG.${_P}} __progdebuginstall
        !           353: .if !defined(BUILD) && !make(all) && !make(${_P})
        !           354: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}! .MADE
        !           355: .endif
        !           356: .endif #  define(_PROGDEBUG.${_P})
        !           357: .else  # MKUPDATE != no
        !           358: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __proginstall
        !           359: .if !defined(BUILD) && !make(all) && !make(${_P})
        !           360: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: .MADE
        !           361: .endif
        !           362: .if defined(_PROGDEBUG.${_P})
        !           363: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}: ${_PROGDEBUG.${_P}} __progdebuginstall
        !           364: .if !defined(BUILD) && !make(all) && !make(${_P})
        !           365: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}: .MADE
        !           366: .endif
        !           367: .endif #  defined(_PROGDEBUG.${_P})
        !           368: .endif # MKUPDATE != no
        !           369:
        !           370: .endif # !target(proginstall-${_P})                                    # }
        !           371:
        !           372: lint: lint-${_P}
        !           373: lint-${_P}: ${LOBJS.${_P}}
        !           374: .if defined(LOBJS.${_P}) && !empty(LOBJS.${_P})
        !           375:        ${LINT} ${LINTFLAGS} ${_LDFLAGS.${_P}:C/-L[  ]*/-L/Wg:M-L*} ${LOBJS.${_P}} ${_LDADD.${_P}}
        !           376: .endif
        !           377:
        !           378: .endfor # _P in ${PROGS} ${PROGS_CXX}                                  # }
        !           379:
        !           380: .if defined(OBJS) && !empty(OBJS) && \
        !           381:     (empty(PROGS) && empty(PROGS_CXX))
        !           382: cleanobjs: cleanobjs-plain
        !           383: cleanobjs-plain:
        !           384:        rm -f ${OBJS} ${LOBJS}
        !           385: .endif
        !           386:
        !           387: .if !target(proginstall)
        !           388: proginstall:: ${_PROG_INSTALL}
        !           389: .endif
        !           390: .PHONY:                proginstall
        !           391:
        !           392:
        !           393:
        !           394: realall: ${SCRIPTS}
        !           395: .if defined(SCRIPTS) && !target(scriptsinstall)                                # {
        !           396: SCRIPTSDIR?=${BINDIR}
        !           397: SCRIPTSOWN?=${BINOWN}
        !           398: SCRIPTSGRP?=${BINGRP}
        !           399: SCRIPTSMODE?=${BINMODE}
        !           400:
        !           401: scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
        !           402: .PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
        !           403:
        !           404: __scriptinstall: .USE
        !           405:        ${_MKTARGET_INSTALL}
        !           406:        ${INSTALL_FILE} \
        !           407:            -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
        !           408:            -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
        !           409:            -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \
        !           410:            ${.ALLSRC} ${.TARGET}
        !           411:
        !           412: .for S in ${SCRIPTS:O:u}
        !           413: .if ${MKUPDATE} == "no"
        !           414: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! ${S} __scriptinstall
        !           415: .if !defined(BUILD) && !make(all) && !make(${S})
        !           416: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! .MADE
        !           417: .endif
        !           418: .else
        !           419: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall
        !           420: .if !defined(BUILD) && !make(all) && !make(${S})
        !           421: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE
        !           422: .endif
        !           423: .endif
        !           424: .endfor
        !           425: .endif                                                                 # }
        !           426:
        !           427: .if !target(scriptsinstall)
        !           428: scriptsinstall::
        !           429: .endif
        !           430: .PHONY:                scriptsinstall
        !           431:
        !           432: ##### Pull in related .mk logic
        !           433: .include <bsd.man.mk>
        !           434: .include <bsd.nls.mk>
        !           435: .include <bsd.files.mk>
        !           436: .include <bsd.inc.mk>
        !           437: .include <bsd.links.mk>
        !           438: .include <bsd.sys.mk>
        !           439: .include <bsd.dep.mk>
        !           440:
        !           441: ${TARGETS}:    # ensure existence
        !           442:
        !           443: .endif # HOSTPROG

CVSweb <webmaster@jp.NetBSD.org>