[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.3

1.226.2.3! mjf         1: #      $NetBSD: bsd.prog.mk,v 1.226.2.2 2008/10/05 20:11:24 mjf Exp $
1.226.2.2  mjf         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
1.226.2.3! mjf        87: #              LIBX11?=${DESTDIR}/usr/X11R7/lib/libX11.a
1.226.2.2  mjf        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 \
1.226.2.3! mjf        94:        fetch form fl g2c gcc gnumalloc gssapi hdb heimntlm hx509 intl ipsec \
1.226.2.2  mjf        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 \
1.226.2.3! mjf        97:        puffs radius resolv rmt roken rpcsvc rt rump rumpuser sdp skey sl ss \
        !            98:        ssh ssl termcap usbhid util wrap y z bind9 dns lwres isccfg isccc isc \
        !            99:        \
        !           100:        rumpfs_cd9660fs rumpfs_efs rumpfs_ext2fs rumpfs_ffs rumpfs_hfs \
        !           101:        rumpfs_lfs rumpfs_msdosfs rumpfs_nfs rumpfs_ntfs rumpfs_syspuffs \
        !           102:        rumpfs_tmpfs rumpfs_udf rumpfs_ufs
1.226.2.2  mjf       103: .ifndef LIB${_lib:tu}
                    104: LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
                    105: .MADE:         ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
                    106: .endif
                    107: .endfor
                    108:
                    109: # PAM applications, if linked statically, need more libraries
                    110: .if (${MKPIC} == "no")
                    111: .if (${MKCRYPTO} != "no")
                    112: PAM_STATIC_LDADD+= -lssh
                    113: PAM_STATIC_DPADD+= ${LIBSSH}
                    114: .endif
                    115: .if (${MKKERBEROS} != "no")
                    116: PAM_STATIC_LDADD+= -lkafs -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypto
                    117: PAM_STATIC_DPADD+= ${LIBKAFS} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} \
                    118:        ${LIBCOM_ERR} ${LIBCRYPTO}
                    119: .endif
                    120: .if (${MKSKEY} != "no")
                    121: PAM_STATIC_LDADD+= -lskey
                    122: PAM_STATIC_DPADD+= ${LIBSKEY}
                    123: .endif
                    124: PAM_STATIC_LDADD+= -lradius -lcrypt -lrpcsvc -lutil
                    125: PAM_STATIC_DPADD+= ${LIBRADIUS} ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
                    126: .else
                    127: PAM_STATIC_LDADD=
                    128: PAM_STATIC_DPADD=
                    129: .endif
                    130:
                    131: # These need + -> X transformations
                    132: .ifndef LIBSTDCXX
                    133: LIBSTDCXX=     ${DESTDIR}/usr/lib/libstdc++.a
                    134: .MADE:         ${LIBSTDCXX}
                    135: .endif
                    136:
                    137: .ifndef LIBSUPCXX
                    138: LIBSUPCXX=     ${DESTDIR}/usr/lib/libsupc++.a
                    139: .MADE:         ${LIBSUPCXX}
                    140: .endif
                    141:
                    142: .for _lib in \
                    143:        dps expat fntstubs fontcache fontconfig fontenc freetype FS \
                    144:        GL GLU ICE lbxutil SM X11 Xau Xaw Xdmcp Xext Xfont Xft \
                    145:        Xi Xinerama xkbfile Xmu Xmuu Xpm Xrandr Xrender Xss Xt \
                    146:        XTrap Xtst Xv Xxf86dga Xxf86misc Xxf86vm
                    147: .ifndef LIB${_lib:tu}
1.226.2.3! mjf       148: LIB${_lib:tu}= ${DESTDIR}${X11USRLIBDIR}/lib${_lib}.a
1.226.2.2  mjf       149: .MADE:         ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
                    150: .endif
                    151: .endfor
                    152:
                    153: .if defined(RESCUEDIR)
                    154: CPPFLAGS+=     -DRESCUEDIR=\"${RESCUEDIR}\"
                    155: .endif
                    156:
                    157: _PROGLDOPTS=
                    158: .if ${SHLINKDIR} != "/usr/libexec"     # XXX: change or remove if ld.so moves
                    159: .if ${OBJECT_FMT} == "ELF"
                    160: _PROGLDOPTS+=  -Wl,-dynamic-linker=${_SHLINKER}
                    161: .endif
                    162: .endif
                    163: .if ${SHLIBDIR} != "/usr/lib"
1.226.2.3! mjf       164: _PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}${SHLIBDIR} \
1.226.2.2  mjf       165:                -R${SHLIBDIR} \
                    166:                -L${DESTDIR}${SHLIBDIR}
                    167: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
1.226.2.3! mjf       168: _PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
1.226.2.2  mjf       169:                -L${DESTDIR}${SHLIBINSTALLDIR}
                    170: .endif
1.226.2.3! mjf       171: _PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}/usr/lib \
        !           172:                -L${DESTDIR}/usr/lib
1.226.2.2  mjf       173:
                    174: __proginstall: .USE
                    175:        ${_MKTARGET_INSTALL}
                    176:        ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
                    177:                ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
                    178:
                    179: __progdebuginstall: .USE
                    180:        ${_MKTARGET_INSTALL}
                    181:        ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
                    182:                ${.ALLSRC} ${.TARGET}
                    183:
                    184:
                    185:
                    186: #
                    187: # Backwards compatibility with Makefiles that assume that bsd.prog.mk
                    188: # can only build a single binary.
                    189: #
                    190:
                    191: _APPEND_MANS=yes
                    192: _APPEND_SRCS=yes
                    193:
1.226.2.3! mjf       194: _CCLINKFLAGS=
        !           195: .if defined(DESTDIR)
        !           196: _CCLINKFLAGS+= -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/
        !           197: .endif
        !           198:
1.226.2.2  mjf       199: .if defined(PROG_CXX)
                    200: PROG=          ${PROG_CXX}
1.226.2.3! mjf       201: _CCLINK=       ${CXX} ${_CCLINKFLAGS}
1.226.2.2  mjf       202: .endif
                    203:
                    204: .if defined(PROG)
1.226.2.3! mjf       205: _CCLINK?=      ${CC} ${_CCLINKFLAGS}
1.226.2.2  mjf       206: .  if defined(MAN)
                    207: MAN.${PROG}=   ${MAN}
                    208: _APPEND_MANS=  no
                    209: .  endif
                    210: .  if !defined(OBJS)
                    211: OBJS=          ${OBJS.${PROG}}
                    212: .  endif
                    213: .  if defined(PROGNAME)
                    214: PROGNAME.${PROG}=      ${PROGNAME}
                    215: .  endif
                    216: .  if defined(SRCS)
                    217: SRCS.${PROG}=  ${SRCS}
                    218: _APPEND_SRCS=  no
                    219: .  endif
                    220: .endif
                    221:
                    222: # Turn the single-program PROG and PROG_CXX variables into their multi-word
                    223: # counterparts, PROGS and PROGS_CXX.
                    224: .if defined(PROG_CXX) && !defined(PROGS_CXX)
                    225: PROGS_CXX=     ${PROG_CXX}
                    226: .elif defined(PROG) && !defined(PROGS)
                    227: PROGS=         ${PROG}
                    228: .endif
                    229:
                    230:
                    231:
                    232: #
                    233: # Per-program definitions and targets.
                    234: #
                    235:
                    236: # Definitions specific to C programs.
                    237: .for _P in ${PROGS}
                    238: SRCS.${_P}?=   ${_P}.c
1.226.2.3! mjf       239: _CCLINK.${_P}= ${CC} ${_CCLINKFLAGS}
1.226.2.2  mjf       240: .endfor
                    241:
                    242: # Definitions specific to C++ programs.
                    243: .for _P in ${PROGS_CXX}
                    244: SRCS.${_P}?=   ${_P}.cc
1.226.2.3! mjf       245: _CCLINK.${_P}= ${CXX} ${_CCLINKFLAGS}
1.226.2.2  mjf       246: .endfor
                    247:
                    248: # Language-independent definitions.
                    249: .for _P in ${PROGS} ${PROGS_CXX}                                       # {
                    250:
                    251: BINDIR.${_P}?=         ${BINDIR}
                    252: PROGNAME.${_P}?=       ${_P}
                    253:
                    254: .if ${MKDEBUG} != "no" && ${OBJECT_FMT} == "ELF" && !commands(${_P})
                    255: _PROGDEBUG.${_P}:=     ${PROGNAME.${_P}}.debug
                    256: .endif
                    257:
                    258: .if defined(PAXCTL_FLAGS)
                    259: PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS}
                    260: .endif
                    261:
                    262: ##### PROG specific flags.
                    263: COPTS+=     ${COPTS.${_P}}
                    264: CPPFLAGS+=  ${CPPFLAGS.${_P}}
                    265: CXXFLAGS+=  ${CXXFLAGS.${_P}}
                    266: OBJCOPTS+=  ${OBJCOPTS.${_P}}
                    267: LDADD+=     ${LDADD.${_P}}
                    268: LDFLAGS+=   ${LDFLAGS.${_P}}
                    269: LDSTATIC+=  ${LDSTATIC.${_P}}
                    270:
                    271: _COPTS.${_P}=          ${COPTS}    ${COPTS.${_P}}
                    272: _CPPFLAGS.${_P}=       ${CPPFLAGS} ${CPPFLAGS.${_P}}
                    273: _CXXFLAGS.${_P}=       ${CXXFLAGS} ${CXXFLAGS.${_P}}
                    274: _OBJCOPTS.${_P}=       ${OBJCOPTS} ${OBJCOPTS.${_P}}
                    275: _LDADD.${_P}=          ${LDADD}    ${LDADD.${_P}}
                    276: _LDFLAGS.${_P}=                ${LDFLAGS}  ${LDFLAGS.${_P}}
                    277: _LDSTATIC.${_P}=       ${LDSTATIC} ${LDSTATIC.${_P}}
                    278:
                    279: ##### Build and install rules
                    280: .if !empty(_APPEND_SRCS:M[Yy][Ee][Ss])
                    281: SRCS+=         ${SRCS.${_P}} # For bsd.dep.mk
                    282: .endif
                    283:
                    284: _YPSRCS.${_P}= ${SRCS.${_P}:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS.${_P}:M*.y:.y=.h}}
                    285:
                    286: DPSRCS+=               ${_YPSRCS.${_P}}
                    287: CLEANFILES+=           ${_YPSRCS.${_P}}
                    288:
                    289: .if !empty(SRCS.${_P}:N*.h:N*.sh:N*.fth)
                    290: OBJS.${_P}+=   ${SRCS.${_P}:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
                    291: LOBJS.${_P}+=  ${LSRCS:.c=.ln} ${SRCS.${_P}:M*.c:.c=.ln}
                    292: .endif
                    293:
                    294: .if defined(OBJS.${_P}) && !empty(OBJS.${_P})                  # {
                    295: .NOPATH: ${OBJS.${_P}} ${_P} ${_YPSRCS.${_P}}
                    296:
                    297: ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS}
                    298:
                    299: ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
                    300: .if !commands(${_P})
                    301:        ${_MKTARGET_LINK}
1.226.2.3! mjf       302:        ${_CCLINK.${_P}} \
        !           303:            ${DESTDIR:D-Wl,-nostdlib} \
        !           304:            ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} \
1.226.2.2  mjf       305:            ${OBJS.${_P}} ${_LDADD.${_P}} \
1.226.2.3! mjf       306:            ${DESTDIR:D-L${_GCC_LIBGCCDIR}} \
        !           307:            ${_PROGLDOPTS}
1.226.2.2  mjf       308: .if defined(PAXCTL_FLAGS.${_P})
                    309:        ${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}
                    310: .endif
1.226.2.3! mjf       311: .if ${MKSTRIPIDENT} != "no"
        !           312:        ${OBJCOPY} -R .ident ${.TARGET}
        !           313: .endif
1.226.2.2  mjf       314: .endif # !commands(${_P})
                    315:
                    316: ${_P}.ro: ${OBJS.${_P}} ${DPADD}
                    317:        ${_MKTARGET_LINK}
                    318:        ${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}}
                    319:
                    320: .if defined(_PROGDEBUG.${_P})
                    321: ${_PROGDEBUG.${_P}}: ${_P}
                    322:        ${_MKTARGET_CREATE}
                    323:        ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}}
                    324:        ${OBJCOPY} -R .gnu_debuglink --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \
                    325:            || rm -f ${_PROGDEBUG.${_P}}
                    326: .endif
                    327:
                    328: .endif # defined(OBJS.${_P}) && !empty(OBJS.${_P})                     # }
                    329:
                    330: .if !defined(MAN.${_P})
                    331: MAN.${_P}=     ${_P}.1
                    332: .endif # !defined(MAN.${_P})
                    333: .if !empty(_APPEND_MANS:M[Yy][Ee][Ss])
                    334: MAN+=          ${MAN.${_P}}
                    335: .endif
                    336:
                    337: realall: ${_P} ${_PROGDEBUG.${_P}}
                    338:
                    339: cleanprog: cleanprog-${_P}
                    340: cleanprog-${_P}:
                    341:        rm -f ${_P} ${_PROGDEBUG.${_P}}
                    342:
                    343: .if defined(OBJS.${_P}) && !empty(OBJS.${_P})
                    344: cleanobjs: cleanobjs-${_P}
                    345: cleanobjs-${_P}:
                    346:        rm -f ${OBJS.${_P}} ${LOBJS.${_P}}
                    347: .endif
                    348:
                    349: _PROG_INSTALL+=        proginstall-${_P}
                    350:
                    351: .if !target(proginstall-${_P})                                         # {
                    352: proginstall-${_P}::    ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}} \
                    353:                ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}
                    354: .PRECIOUS:     ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}} \
                    355:                ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}
                    356:
                    357: .if ${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 #  define(_PROGDEBUG.${_P})
                    368: .else  # MKUPDATE != no
                    369: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __proginstall
                    370: .if !defined(BUILD) && !make(all) && !make(${_P})
                    371: ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: .MADE
                    372: .endif
                    373: .if defined(_PROGDEBUG.${_P})
                    374: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}: ${_PROGDEBUG.${_P}} __progdebuginstall
                    375: .if !defined(BUILD) && !make(all) && !make(${_P})
                    376: ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}: .MADE
                    377: .endif
                    378: .endif #  defined(_PROGDEBUG.${_P})
                    379: .endif # MKUPDATE != no
                    380:
                    381: .endif # !target(proginstall-${_P})                                    # }
                    382:
                    383: lint: lint-${_P}
                    384: lint-${_P}: ${LOBJS.${_P}}
                    385: .if defined(LOBJS.${_P}) && !empty(LOBJS.${_P})
                    386:        ${LINT} ${LINTFLAGS} ${_LDFLAGS.${_P}:C/-L[  ]*/-L/Wg:M-L*} ${LOBJS.${_P}} ${_LDADD.${_P}}
                    387: .endif
                    388:
                    389: .endfor # _P in ${PROGS} ${PROGS_CXX}                                  # }
                    390:
                    391: .if defined(OBJS) && !empty(OBJS) && \
                    392:     (empty(PROGS) && empty(PROGS_CXX))
                    393: cleanobjs: cleanobjs-plain
                    394: cleanobjs-plain:
                    395:        rm -f ${OBJS} ${LOBJS}
                    396: .endif
                    397:
                    398: .if !target(proginstall)
                    399: proginstall:: ${_PROG_INSTALL}
                    400: .endif
                    401: .PHONY:                proginstall
                    402:
                    403:
                    404:
                    405: realall: ${SCRIPTS}
                    406: .if defined(SCRIPTS) && !target(scriptsinstall)                                # {
                    407: SCRIPTSDIR?=${BINDIR}
                    408: SCRIPTSOWN?=${BINOWN}
                    409: SCRIPTSGRP?=${BINGRP}
                    410: SCRIPTSMODE?=${BINMODE}
                    411:
                    412: scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
                    413: .PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
                    414:
                    415: __scriptinstall: .USE
                    416:        ${_MKTARGET_INSTALL}
                    417:        ${INSTALL_FILE} \
                    418:            -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
                    419:            -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
                    420:            -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \
                    421:            ${.ALLSRC} ${.TARGET}
                    422:
                    423: .for S in ${SCRIPTS:O:u}
                    424: .if ${MKUPDATE} == "no"
                    425: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! ${S} __scriptinstall
                    426: .if !defined(BUILD) && !make(all) && !make(${S})
                    427: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! .MADE
                    428: .endif
                    429: .else
                    430: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall
                    431: .if !defined(BUILD) && !make(all) && !make(${S})
                    432: ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE
                    433: .endif
                    434: .endif
                    435: .endfor
                    436: .endif                                                                 # }
                    437:
                    438: .if !target(scriptsinstall)
                    439: scriptsinstall::
                    440: .endif
                    441: .PHONY:                scriptsinstall
                    442:
                    443: ##### Pull in related .mk logic
                    444: .include <bsd.man.mk>
                    445: .include <bsd.nls.mk>
                    446: .include <bsd.files.mk>
                    447: .include <bsd.inc.mk>
                    448: .include <bsd.links.mk>
                    449: .include <bsd.sys.mk>
                    450: .include <bsd.dep.mk>
                    451:
                    452: ${TARGETS}:    # ensure existence
                    453:
                    454: .endif # HOSTPROG

CVSweb <webmaster@jp.NetBSD.org>