[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Annotation of src/etc/Makefile, Revision 1.258

1.258   ! ross        1: #      $NetBSD: Makefile,v 1.257 2003/10/24 20:12:04 jdolecek Exp $
1.66      mikel       2: #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
1.1       cgd         3:
1.96      cjs         4: # Environment variables without default values:
                      5: #   DESTDIR must be set before anything in this file will work.
                      6: #   RELEASEDIR is where the tarred up stuff for a snapshot or
                      7: #      release will be placed.
                      8: #
                      9: # Environment variables with default values:
                     10: #   LOCALTIME will set the default local time for the system you
                     11: #      build; it determines what /etc/localtime is symlink'd to.
                     12: #   KERNSRCDIR points to kernel source; it is set by default to ../sys,
                     13: #      but can be overridden.
                     14: #   KERNOBJDIR is the kernel build directory, it defaults to
1.172     jlam       15: #      ${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden.
1.96      cjs        16: #   KERNCONFDIR is where the configuration files for kernels are found;
                     17: #      default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
1.255     lukem      18: #   MKUPDATE; if not `no', don't do a 'make clean' before kernel compile
1.96      cjs        19: #   NO_SENDMAIL is normally undefined; if defined, it will not do a
                     20: #      `make distribution' in the sendmail config file source directory.
1.154     thorpej    21: #
1.96      cjs        22: # Targets:
                     23: #    distribution: makes a full NetBSD distribution in DESTDIR. If
                     24: #      INSTALL_DONE is set, it will not do a `make install.'
1.182     chs        25: #      if DISTRIBUTION_DONE is set, it will not do anything.
1.96      cjs        26: #    distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
                     27: #      Called by distribution.
                     28: #    snapshot: calls distribution, above, and then tars up the files
1.241     lukem      29: #      into a release(7) format in RELEASEDIR/${MACHINE}.
                     30: #      Any port-dependent stuff for this target is found in
                     31: #      etc.${MACHINE}/Makefile.inc.
1.106     cjs        32: #    release: a synonym for `snapshot'
1.242     lukem      33: #
1.199     tv         34:
1.155     thorpej    35: # For NO_SENDMAIL, INSTPRIV, MKCRYPTO
1.242     lukem      36: #
1.90      kim        37: .include <bsd.own.mk>
1.187     jmc        38:
1.211     lukem      39: # For KERNSRCDIR, KERNOBJDIR, ...
1.242     lukem      40: #
1.211     lukem      41: .include <bsd.kernobj.mk>
                     42:
1.252     lukem      43: # For TARGET_ENDIANNESS
                     44: #
                     45: .include <bsd.endian.mk>
                     46:
1.211     lukem      47:
1.187     jmc        48: .MAKEOVERRIDES+=       USETOOLS
1.90      kim        49:
1.23      cgd        50: TZDIR=         /usr/share/zoneinfo
1.157     kleink     51: LOCALTIME?=    UTC
1.254     lukem      52: MAKESUMS=      CKSUM=${TOOL_CKSUM:Q} ${HOST_SH} ${NETBSDSRCDIR}/distrib/sets/makesums
1.19      deraadt    53:
1.161     hubertf    54: # Flags for creating ISO CDROM image
                     55: # mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord
1.242     lukem      56: # Note: At least mkisofs 2.0 should be used.
                     57: #
1.161     hubertf    58: MKISOFS?=      mkisofs
1.233     lukem      59: DISTRIBREV!=   sh ${KERNSRCDIR}/conf/osrelease.sh -s
1.224     bjh21      60: # ISO 9660 volume ID.  Note that this can only contain [A-Z0-9_].
                     61: ISO_VOLID!=    echo NETBSD_${MACHINE}_${DISTRIBREV} | tr a-z A-Z
1.161     hubertf    62: MKISOFS_FLAGS+= -J -l \
                     63:                -r -T -v \
1.224     bjh21      64:                -V ${ISO_VOLID} \
1.161     hubertf    65:                -P "The NetBSD Project" \
1.241     lukem      66:                -m "${RELEASEDIR}/${MACHINE}/installation/cdrom"
1.1       cgd        67:
1.80      jonathan   68: # MD Makefile.inc may append MD targets to BIN[123].  Make sure all
                     69: # are empty, to preserve the old semantics of setting them below with "=".
1.242     lukem      70: #
1.200     lukem      71: BIN1=
1.80      jonathan   72: BIN2=
                     73: BIN3=
                     74:
1.241     lukem      75: # Directories to build in ${RELEASEDIR}/${MACHINE}.
                     76: # MD Makefile.inc files can add to this.
1.117     simonb     77: # NOTE: Parent directories must be listed before subdirectories.
1.242     lukem      78: #
1.217     lukem      79: INSTALLATION_DIRS=     binary binary/sets binary/kernel installation
1.117     simonb     80:
1.71      cjs        81: .if exists(etc.${MACHINE}/Makefile.inc)
                     82: .include "etc.${MACHINE}/Makefile.inc"
                     83: .endif
1.32      jtc        84:
1.21      cgd        85: # -rw-r--r--
                     86: BINOWN= root
                     87: BINGRP= wheel
1.227     perry      88: UTMPGRP= utmp
1.184     lukem      89: BIN1+= bootptab changelist csh.cshrc csh.login csh.logout daily \
1.223     fredette   90:        daily.conf dm.conf floppytab ftpchroot ftpusers \
1.131     veego      91:        gettytab group hosts hosts.lpd inetd.conf lkm.conf \
                     92:        mailer.conf man.conf monthly monthly.conf mrouted.conf \
1.151     fvdl       93:        netconfig networks newsyslog.conf nsswitch.conf ntp.conf \
1.213     perry      94:        passwd.conf phones printcap profile protocols rbootd.conf rc rc.conf \
1.159     lukem      95:        rc.lkm rc.local rc.subr rc.shutdown remote rpc \
1.142     tsarna     96:        security security.conf services shells sysctl.conf syslog.conf \
                     97:        weekly weekly.conf wscons.conf \
1.236     jdolecek   98:        etc.${MACHINE}/ttys
                     99:
1.242     lukem     100: # Use machine-specific disktab if it exists, or the MI one otherwise
1.236     jdolecek  101: .if exists(etc.${MACHINE}/disktab)
                    102: BIN1+= etc.${MACHINE}/disktab
                    103: .else
                    104: BIN1+= disktab
                    105: .endif
1.105     mycroft   106:
1.234     jdolecek  107: .if exists(etc.${MACHINE}/ld.so.conf)
                    108: BIN1+= etc.${MACHINE}/ld.so.conf
1.152     perry     109: .endif
                    110:
1.234     jdolecek  111: .if exists(etc.${MACHINE}/ttyaction)
                    112: BIN1+= etc.${MACHINE}/ttyaction
1.105     mycroft   113: .endif
1.1       cgd       114:
1.46      deraadt   115: # -rw-rw-r--
1.80      jonathan  116: BIN2+= motd
1.1       cgd       117:
1.77      mycroft   118: # -rw-------
1.80      jonathan  119: BIN3+= hosts.equiv
1.77      mycroft   120:
1.230     perry     121: ETC_PKG=-T etc_pkg
                    122: BASE_PKG=-T base_pkg
1.242     lukem     123: ETC_INSTALL_FILE=cd ${.CURDIR} && ${INSTALL_FILE} ${ETC_PKG}
                    124: ETC_INSTALL_LINK=cd ${.CURDIR} && ${INSTALL_LINK} ${ETC_PKG}
                    125: ETC_INSTALL_SYMLINK=cd ${.CURDIR} && ${INSTALL_SYMLINK} ${ETC_PKG}
1.230     perry     126:
1.144     thorpej   127: NAMEDB=        127 root.cache named.conf localhost loopback.v6
1.1       cgd       128:
1.191     tv        129: .if ${TARGET_ENDIANNESS} == "1234"
1.252     lukem     130: PWD_MKDB_ENDIAN=       -L
1.191     tv        131: .elif ${TARGET_ENDIANNESS} == "4321"
1.252     lukem     132: PWD_MKDB_ENDIAN=       -B
1.170     jdolecek  133: .else
1.252     lukem     134: PWD_MKDB_ENDIAN=
1.191     tv        135: .endif
1.149     sjg       136:
                    137:
1.242     lukem     138: # distribution --
                    139: #      Build a distribution
                    140: #
1.204     lukem     141: distribution: check_DESTDIR .WAIT distrib-dirs
1.182     chs       142: .if !defined(DISTRIBUTION_DONE)
1.87      perry     143: .if !defined(INSTALL_DONE)
1.233     lukem     144:        (cd ${NETBSDSRCDIR}; ${MAKE} _DISTRIB= includes)
                    145:        (cd ${NETBSDSRCDIR}; ${MAKE} _DISTRIB= install)
1.200     lukem     146: .endif # !INSTALL_DONE
1.243     lukem     147:        (cd ${.CURDIR}; ${MAKE} install-etc-files)
1.200     lukem     148: .endif # !DISTRIBUTION_DONE
1.193     thorpej   149:
1.257     jdolecek  150: .PHONY: MAKEDEV
                    151: MAKEDEV:
                    152:        awk -v ETCDIR="${.CURDIR}" -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
                    153:
                    154:
1.242     lukem     155:
                    156: # install-etc-files --
                    157: #      Install etc (config) files; not performed by "make build"
                    158: #
1.257     jdolecek  159: install-etc-files: check_DESTDIR MAKEDEV
1.230     perry     160:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    161:            ${BIN1} ${DESTDIR}/etc
                    162:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 664 \
                    163:            ${BIN2} ${DESTDIR}/etc
                    164:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
                    165:            ${BIN3} ${DESTDIR}/etc
                    166:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    167:            aliases ${DESTDIR}/etc/mail
                    168:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    169:            /dev/null ${DESTDIR}/etc/mail/local-host-names
                    170:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    171:            crontab ${DESTDIR}/var/cron/tabs/root
                    172:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    173:            master.passwd ${DESTDIR}/etc
1.254     lukem     174:        ${TOOL_PWD_MKDB} -p ${PWD_MKDB_ENDIAN} -d ${DESTDIR}/ \
1.230     perry     175:            ${DESTDIR}/etc/master.passwd
1.255     lukem     176: .if ${MKUNPRIVED} != "no"
1.222     lukem     177:        ( \
1.246     lukem     178:                for metaent in passwd pwd.db spwd.db; do \
                    179:                        echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
                    180:                done; \
1.239     lukem     181:        ) | ${METALOG.add}
1.255     lukem     182: .endif # MKUNPRIVED != no
1.258   ! ross      183:        ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
1.257     jdolecek  184:            MAKEDEV ${DESTDIR}/dev
                    185:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
                    186:            MAKEDEV.local ${DESTDIR}/dev
1.230     perry     187:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    188:            minfree ${DESTDIR}/var/crash
1.242     lukem     189: .for file in cshrc login profile shrc
                    190:        ${ETC_INSTALL_FILE} -o root -g wheel -m 644 \
                    191:            root/dot.${file} ${DESTDIR}/root/.${file}
                    192: .endfor
                    193:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    194:            root/dot.klogin ${DESTDIR}/root/.klogin
                    195:        rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile
                    196:        ${ETC_INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
                    197:        ${ETC_INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
                    198:        (cd ${.CURDIR}/defaults; ${MAKE} install)
                    199:        (cd ${.CURDIR}/mtree; ${MAKE} install)
                    200: .for file in ${NAMEDB}
                    201:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    202:            namedb/${file} ${DESTDIR}/etc/namedb
                    203: .endfor
1.251     thorpej   204:        (cd ${.CURDIR}/powerd; ${MAKE} install)
1.242     lukem     205:        (cd ${.CURDIR}/rc.d; ${MAKE} install)
1.230     perry     206:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
                    207:            postinstall ${DESTDIR}/etc
                    208:        ${ETC_INSTALL_SYMLINK} -o root -g wheel -m 755 \
                    209:            ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
                    210:        ${ETC_INSTALL_SYMLINK} -o root -g wheel -m 755 \
                    211:            /usr/sbin/rmt ${DESTDIR}/etc/rmt
                    212:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g operator -m 664 \
                    213:            /dev/null ${DESTDIR}/etc/dumpdates
                    214:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g operator -m 600 \
                    215:            /dev/null ${DESTDIR}/etc/skeykeys
                    216:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    217:            /dev/null ${DESTDIR}/var/at/at.deny
                    218:        ${ETC_INSTALL_FILE} -o nobody -g ${BINGRP} -m 664 \
                    219:            /dev/null ${DESTDIR}/var/db/locate.database
                    220:        ${ETC_INSTALL_FILE} -o uucp -g dialer -m 640 \
                    221:            /dev/null ${DESTDIR}/var/log/aculog
                    222:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
                    223:            /dev/null ${DESTDIR}/var/log/authlog
1.250     perry     224:        ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
                    225:            /dev/null ${DESTDIR}/var/log/cron
1.230     perry     226:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 664 \
                    227:            /dev/null ${DESTDIR}/var/log/lastlog
                    228:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 640 \
                    229:            /dev/null ${DESTDIR}/var/log/lpd-errs
                    230:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
                    231:            /dev/null ${DESTDIR}/var/log/maillog
                    232:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    233:            /dev/null ${DESTDIR}/var/log/messages
                    234:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
                    235:            /dev/null ${DESTDIR}/var/log/secure
                    236:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    237:            /dev/null ${DESTDIR}/var/log/sendmail.st
                    238:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    239:            /dev/null ${DESTDIR}/var/log/wtmp
                    240:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
                    241:            /dev/null ${DESTDIR}/var/log/wtmpx
                    242:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
                    243:            /dev/null ${DESTDIR}/var/log/xferlog
                    244:        ${ETC_INSTALL_FILE} -o daemon -g staff -m 664 \
                    245:            /dev/null ${DESTDIR}/var/msgs/bounds
                    246:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${UTMPGRP} -m 664 \
                    247:            /dev/null ${DESTDIR}/var/run/utmp
                    248:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${UTMPGRP} -m 664 \
                    249:            /dev/null ${DESTDIR}/var/run/utmpx
                    250:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
1.249     jdolecek  251:            /dev/null ${DESTDIR}/var/games/atc_score
1.230     perry     252:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    253:            /dev/null ${DESTDIR}/var/games/battlestar.log
                    254:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    255:            /dev/null ${DESTDIR}/var/games/cfscores
                    256:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    257:            /dev/null ${DESTDIR}/var/games/criblog
1.231     perry     258:        ${ETC_INSTALL_FILE} -o games -g games -m 660 \
                    259:            /dev/null ${DESTDIR}/var/games/hackdir/perm
                    260:        ${ETC_INSTALL_FILE} -o games -g games -m 660 \
                    261:            /dev/null ${DESTDIR}/var/games/hackdir/record
                    262:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    263:            /dev/null ${DESTDIR}/var/games/larn/llog12.0
                    264:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    265:            /dev/null ${DESTDIR}/var/games/larn/lscore12.0
                    266:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    267:            /dev/null ${DESTDIR}/var/games/larn/playerids
1.230     perry     268:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    269:            /dev/null ${DESTDIR}/var/games/robots_roll
                    270:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    271:            /dev/null ${DESTDIR}/var/games/rogue.scores
                    272:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    273:            /dev/null ${DESTDIR}/var/games/saillog
                    274:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    275:            /dev/null ${DESTDIR}/var/games/snakerawscores
                    276:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    277:            /dev/null ${DESTDIR}/var/games/snake.log
                    278:        ${ETC_INSTALL_FILE} -o games -g games -m 664 \
                    279:            /dev/null ${DESTDIR}/var/games/tetris.scores
1.242     lukem     280:        (cd ${.CURDIR}/skel; ${MAKE} distribution)
1.233     lukem     281:        (cd ${NETBSDSRCDIR}/usr.bin/mail; ${MAKE} distribution)
                    282:        (cd ${NETBSDSRCDIR}/gnu/usr.sbin/postfix/; ${MAKE} distribution)
1.155     thorpej   283: .if (${MKCRYPTO} != "no")
1.233     lukem     284:        (cd ${NETBSDSRCDIR}/usr.bin/ssh; ${MAKE} distribution)
1.155     thorpej   285: .endif
1.244     mrg       286: .if !defined(NO_SENDMAIL) || ${NO_SENDMAIL} == "no"
1.233     lukem     287:        (cd ${NETBSDSRCDIR}/gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1.90      kim       288: .endif
1.247     lukem     289:
                    290:
                    291: # install-obsolete-lists --
                    292: #      Install var/db/obsolete set lists; this is performed by "make build"
                    293: #
                    294: OBSOLETE.dir=          ${.OBJDIR}/obsolete.dir
                    295: OBSOLETE.files=                base comp etc games man misc text
                    296:
                    297: install-obsolete-lists:
1.246     lukem     298:        mkdir -p ${OBSOLETE.dir}
1.253     lukem     299:        (cd ${NETBSDSRCDIR}/distrib/sets && \
                    300:            MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
1.246     lukem     301: .for file in ${OBSOLETE.files}
                    302:        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
1.247     lukem     303:            ${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete
1.246     lukem     304: .endfor
1.1       cgd       305:
1.242     lukem     306:
                    307: # distrib-dirs --
                    308: #      Populate $DESTDIR with directories needed by NetBSD
                    309: #
1.255     lukem     310: .if ${MKUNPRIVED} == "no"
                    311: TOOL_MTREE.unpriv=
                    312: .else
                    313: TOOL_MTREE.unpriv=     -W
                    314: .endif
                    315:
1.204     lukem     316: distrib-dirs: check_DESTDIR
1.256     dsl       317: .if !defined(DISTRIBUTION_DONE)
1.230     perry     318:        ${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR}
1.256     dsl       319: .endif
1.254     lukem     320:        ${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
1.255     lukem     321:            -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
1.200     lukem     322:
1.242     lukem     323:
                    324: # release, snapshot --
                    325: #      Build a full distribution including kernels & install media.
                    326: #
1.204     lukem     327: release snapshot: check_DESTDIR check_RELEASEDIR .WAIT \
1.233     lukem     328:                    distribution .WAIT \
                    329:                    snap_pre .WAIT snap_kern .WAIT \
                    330:                    snap_post .WAIT snap_md_post
                    331:        (cd ${NETBSDSRCDIR}/distrib/sets; ${MAKE} sets)
1.241     lukem     332:        ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/kernel '*.gz'
1.161     hubertf   333:
1.242     lukem     334:
                    335: # iso-image --
                    336: #      Standalone target to create a CDROM image after the release
                    337: #      was composed.  Should be run after "make release" in src and xsrc.
                    338: #
1.245     lukem     339: #      Note: At least mkisofs 2.0 should be used.
1.242     lukem     340: #
                    341: CDROM.image=${RELEASEDIR}/${MACHINE}/installation/cdrom/netbsd-${MACHINE}.iso
                    342: CDROM.dir=     cdrom.dir
                    343: CDROM.pathlist=        cdrom.pathlist
                    344:
1.248     lukem     345: iso-image: check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post
                    346:        ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/installation/cdrom '*.iso'
1.161     hubertf   347:
1.248     lukem     348: iso-image-setup: check_RELEASEDIR
1.242     lukem     349:        rm -f ${CDROM.pathlist}
                    350:        echo "${MACHINE}=${RELEASEDIR}/${MACHINE}" >> ${CDROM.pathlist}
                    351:        mkdir -p ${CDROM.dir}
                    352:        mkdir -p ${RELEASEDIR}/${MACHINE}/installation/cdrom
                    353:
1.248     lukem     354: # iso-image-mi --
1.242     lukem     355: #      Create the image after the MD operations have completed.
1.248     lukem     356: #
                    357: iso-image-mi: check_DESTDIR check_RELEASEDIR .WAIT \
                    358:                iso-image-setup .WAIT iso-image-md-pre
1.242     lukem     359:        @if ! ${MKISOFS} --version; then \
                    360:                echo "install pkgsrc/sysutils/cdrecord and run 'make iso-image'." ; \
                    361:                false; \
1.161     hubertf   362:        fi
1.242     lukem     363:        ${MKISOFS} ${MKISOFS_FLAGS} -graft-points -path-list ${CDROM.pathlist} \
                    364:            -o ${CDROM.image} ${CDROM.dir}
                    365:
1.248     lukem     366: # iso-image-md-pre --
1.242     lukem     367: #      Setup ${CDROM.dir} to produce a bootable CD image.
                    368: #      Overridden by etc.$MACHINE/Makefile.inc
                    369: #
1.248     lukem     370: iso-image-md-pre: check_DESTDIR check_RELEASEDIR
1.242     lukem     371: #      (empty -- look in the machine-dependent Makefile.inc)
1.161     hubertf   372:
1.248     lukem     373: # iso-image-md-post --
1.242     lukem     374: #      Fixup the CD-image to be bootable.
                    375: #      Overridden by etc.$MACHINE/Makefile.inc
                    376: #
1.248     lukem     377: iso-image-md-post: check_DESTDIR check_RELEASEDIR .WAIT iso-image-mi
1.242     lukem     378: #      (empty -- look in the machine-dependent Makefile.inc)
1.41      cgd       379:
1.242     lukem     380:
                    381: # snap_pre --
                    382: #      Create ${RELEASEDIR} and necessary subdirectories.
                    383: #
1.204     lukem     384: snap_pre: check_DESTDIR check_RELEASEDIR
1.241     lukem     385:        ${INSTALL} -d -m 755 ${RELEASEDIR}
1.255     lukem     386: .if ${MKUPDATE} == "no"
1.168     jmc       387: # Could be a mount point, ignore the errors
1.241     lukem     388:        -/bin/rm -rf ${RELEASEDIR}/${MACHINE}
1.240     lukem     389: .endif
1.241     lukem     390:        ${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE}
1.117     simonb    391: .for dir in ${INSTALLATION_DIRS}
1.241     lukem     392:        ${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE}/${dir}
1.117     simonb    393: .endfor
1.96      cjs       394:
1.242     lukem     395: # snap_post --
                    396: #      Build the install media and notes from distrib
                    397: #
1.233     lukem     398: snap_post: check_DESTDIR check_RELEASEDIR
1.255     lukem     399: .if ${MKUPDATE} == "no"
1.233     lukem     400:        cd ${NETBSDSRCDIR}/distrib && ${MAKE} cleandir
                    401: .endif
                    402:        cd ${NETBSDSRCDIR}/distrib && ${MAKE} depend && ${MAKE} && \
                    403:            ${MAKE} release
                    404:
1.232     lukem     405: # snap_kern --
1.242     lukem     406: #      This target builds the kernels specified by each port.
                    407: #      A port may specify the following kernels:
1.196     thorpej   408: #
                    409: #      KERNEL_SETS             The list of kernels that will be
                    410: #                              packaged into sets, named
                    411: #                              kern-${kernel}.tgz.  These kernels
1.203     chs       412: #                              are also placed in the binary/kernel
1.196     thorpej   413: #                              area of the release package as
                    414: #                              netbsd-${kernel}.gz.
                    415: #
                    416: #      EXTRA_KERNELS           Additional kernels to place in the
1.203     chs       417: #                              binary/kernel area of the release
1.196     thorpej   418: #                              package as netbsd-${kernel}.gz, but
                    419: #                              which are not placed into sets. This
                    420: #                              allows a port to provide e.g. a netbootable
                    421: #                              installation kernel containing a ramdisk.
                    422: #
                    423: #      BUILD_KERNELS           Additional kernels to build which are
                    424: #                              not placed into sets nor into the
1.203     chs       425: #                              binary/kernel area of the release
1.196     thorpej   426: #                              package.  These are typically kernels
                    427: #                              that are built for inclusion only in
                    428: #                              installation disk/CD-ROM/tape images.
1.116     fair      429: #
1.242     lukem     430: #      A port may also specify KERNEL_SUFFIXES, which is an optional list
                    431: #      of filename suffixes for kernels to include in the kernel sets and
                    432: #      in the binary/kernel area of the release package (e.g. "netbsd" vs.
                    433: #      "netbsd.ecoff" and "netbsd.srec").  It is not an error if kernels
                    434: #      with these suffixes do not exist in the kernel build directory.
1.197     thorpej   435: #
1.229     lukem     436: #
                    437: # A list of all the kernels to build, which can be overridden from
                    438: # external sources (such as make(1)'s environment or command line)
                    439: #
                    440: ALL_KERNELS?=  ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
1.242     lukem     441:
1.116     fair      442: GETKERNELAWK=  awk '/^config/ {print $$2; found=1} \
                    443:                END{ if (found == 0) print "netbsd"; }'
1.242     lukem     444:
1.232     lukem     445: .if !target(snap_kern)                                         # {
                    446:
                    447: # build_kernels --
                    448: #      Configure & compile kernels listed in ${ALL_KERNELS}
                    449: #
1.201     lukem     450: .if !defined(KERNELS_DONE)                                             # {
1.232     lukem     451: .for configfile in ${ALL_KERNELS}                                      # {
                    452: _KERNELS_TO_BUILD+=kern-${configfile}
                    453: kern-${configfile}:
1.254     lukem     454:        cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \
1.232     lukem     455:            -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
1.255     lukem     456: .if ${MKUPDATE} == "no"
1.200     lukem     457:        cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean
1.96      cjs       458: .endif
1.218     sommerfe  459:        cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE}
1.232     lukem     460: .endfor        # ALL_KERNELS                                                   # }
                    461: .endif # KERNELS_DONE                                                  # }
                    462:
                    463: build_kernels: ${_KERNELS_TO_BUILD}
                    464:
                    465: # build_kernelsets --
1.241     lukem     466: #      Create kernel sets from ${KERNEL_SETS} into
                    467: #      ${RELEASEDIR}/${MACHINE}/binary/sets
1.232     lukem     468: #
                    469: .for configfile in ${KERNEL_SETS}                                      # {
                    470: _KERNELSETS_TO_BUILD+=kernset-${configfile}
                    471: kernset-${configfile}:
1.256     dsl       472:        @ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
1.197     thorpej   473:        kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
1.256     dsl       474:        kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
                    475:        kern_tgz=${RELEASEDIR}/${MACHINE}/binary/sets/kern-${configfile}.tgz; \
                    476:        pax_cmd="GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
                    477:        cd $${kerndir} && { \
                    478:                kernels=; newest=; \
1.210     lukem     479:                for kernel in $${kernlist}; do \
1.256     dsl       480:                        for s in "" $${kernsuffixes}; do \
                    481:                                ks="$${kernel}$${s}"; \
                    482:                                [ -f $${ks} ] || continue; \
                    483:                                kernels="$${kernels} $${ks}"; \
                    484:                                [ -z "$${newest}" -o $${ks} -nt "$${newest}" ] && \
                    485:                                        newest=$${ks}; \
1.197     thorpej   486:                        done; \
1.256     dsl       487:                done; \
                    488:                [ $${kern_tgz} -nt "$${newest}" ] || { \
                    489:                        echo "echo $${kernels} | $${pax_cmd}"; \
                    490:                        ( echo "/set uname=${BINOWN} gname=${BINGRP}"; \
                    491:                        echo ". type=dir optional"; \
                    492:                        for kernel in $${kernels}; do \
                    493:                                echo "./$${kernel} type=file"; \
                    494:                        done ) | eval $${pax_cmd}; \
                    495:                } \
                    496:        }
1.232     lukem     497: .endfor        # KERNEL_SETS                                                   # }
                    498:
                    499: build_kernelsets: ${_KERNELSETS_TO_BUILD}
                    500:
                    501: # build_releasekernels --
                    502: #      Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into
1.241     lukem     503: #      ${RELEASEDIR}/${MACHINE}/binary/kernel
1.232     lukem     504: #
                    505: .for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS}                     # {
                    506: _RELEASEKERNELS_TO_BUILD+=releasekern-${configfile}
                    507: releasekern-${configfile}:
1.256     dsl       508:        @ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile:C/.*\///}`; \
1.197     thorpej   509:        kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
1.256     dsl       510:        kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
                    511:        cd $${kerndir} && {     \
                    512:                for kernel in $${kernlist}; do \
                    513:                        for s in "" $${kernsuffixes}; do \
                    514:                                ks="$${kernel}$${s}"; \
                    515:                                [ ! -f $${ks} ] && continue; \
                    516:                                knl_gz="${RELEASEDIR}/${MACHINE}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \
                    517:                                [ $${knl_gz} -nt $${ks} ] && continue; \
                    518:                                echo "gzip -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \
                    519:                                gzip -c -9 < $${ks} > $${knl_gz}; \
1.197     thorpej   520:                        done; \
1.256     dsl       521:                done; \
                    522:        }
1.232     lukem     523: .endfor        # KERNEL_SETS EXTRA_KERNELS                                     # }
                    524:
                    525: build_releasekernels: ${_RELEASEKERNELS_TO_BUILD}
                    526:
                    527: # snap_kern --
                    528: #      build the kernels, then the sets & release kernels
1.242     lukem     529: #
1.232     lukem     530: snap_kern: check_DESTDIR check_RELEASEDIR .WAIT \
                    531:            build_kernels .WAIT \
                    532:            build_kernelsets build_releasekernels
                    533:
                    534: .endif # !target(snap_kern)                                    # }
                    535:
1.108     drochner  536:
1.242     lukem     537: # snap_md_post --
                    538: #      Machine dependent distribution media operations.
                    539: #      Overridden by etc.$MACHINE/Makefile.inc
                    540: #
1.204     lukem     541: snap_md_post: check_DESTDIR check_RELEASEDIR
1.242     lukem     542: #      (empty -- look in the machine-dependent Makefile.inc)
                    543:
                    544:
                    545: clean:
1.246     lukem     546:        -rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
1.7       cgd       547:
1.1       cgd       548: .include <bsd.prog.mk>

CVSweb <webmaster@jp.NetBSD.org>