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

Annotation of src/etc/Makefile, Revision 1.102

1.102   ! fair        1: #      $NetBSD: Makefile,v 1.101 1999/02/13 02:54:19 lukem 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
                     15: #      ${KERNSRCDIR}/arch/${MACHINE}/compile/KERNELNAME, but can be
                     16: #      overridden.
                     17: #   KERNCONFDIR is where the configuration files for kernels are found;
                     18: #      default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
1.97      cjs        19: #   UPDATE is normally undefined; if defined, don't do a 'make clean'
                     20: #      before kernel compile
1.96      cjs        21: #   NO_SENDMAIL is normally undefined; if defined, it will not do a
                     22: #      `make distribution' in the sendmail config file source directory.
                     23: #   USE_BIND4 is normally unset; if set, it will install a named.boot
                     24: #      instead of a named.conf in etc/namedb.
                     25: #   EXTRA_KERNELS has a machine-dependent list of kernels to build added
                     26: #      to it, but you may also set this to have extra ones built.
                     27: #
                     28: # Targets:
                     29: #    distribution: makes a full NetBSD distribution in DESTDIR. If
                     30: #      INSTALL_DONE is set, it will not do a `make install.'
                     31: #    distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
                     32: #      Called by distribution.
                     33: #    snapshot: calls distribution, above, and then tars up the files
                     34: #      into a release(7) format in RELEASEDIR. Any port-dependent
                     35: #      stuff for this target is found in etc.${MACHINE}/Makefile.inc.
                     36:
1.91      tron       37: # XXX: For NO_SENDMAIL and USE_BIND4
1.90      kim        38: .include <bsd.own.mk>
                     39:
1.23      cgd        40: TZDIR=         /usr/share/zoneinfo
1.90      kim        41: LOCALTIME?=    US/Pacific
1.19      deraadt    42:
1.55      perry      43: # setting NOOBJ prevents "make obj" from doing anything;
                     44: # an objdir would break the installation stuff below
1.101     lukem      45: MKOBJ= no
1.1       cgd        46:
1.80      jonathan   47: # MD Makefile.inc may append MD targets to BIN[123].  Make sure all
                     48: # are empty, to preserve the old semantics of setting them below with "=".
                     49: BIN1=
                     50: BIN2=
                     51: BIN3=
                     52:
1.71      cjs        53: .if exists(etc.${MACHINE}/Makefile.inc)
                     54: .include "etc.${MACHINE}/Makefile.inc"
                     55: .endif
1.32      jtc        56:
1.96      cjs        57: # Use multiple jobs for kernel builds, if NBUILDJOBS set.
                     58: # (Taken from src/Makefile.)
                     59: .if defined(NBUILDJOBS)
                     60: _J= -j${NBUILDJOBS}
                     61: .endif
                     62:
1.21      cgd        63: # -rw-r--r--
                     64: BINOWN= root
                     65: BINGRP= wheel
1.92      perry      66: BIN1+= aliases bootptab changelist csh.cshrc csh.login \
                     67:        csh.logout daily daily.conf dm.conf floppytab ftpchroot \
                     68:        ftpusers ftpwelcome gettytab group hosts hosts.lpd \
                     69:        inetd.conf ld.so.conf lkm.conf mailer.conf man.conf \
                     70:        monthly monthly.conf mrouted.conf netstart networks \
1.94      lukem      71:        newsyslog.conf nsswitch.conf phones printcap profile protocols \
1.92      perry      72:        rbootd.conf rc rc.conf rc.lkm rc.local rc.subr \
                     73:        rc.shutdown remote rpc security security.conf services \
                     74:        shells syslog.conf weekly weekly.conf etc.${MACHINE}/ttys \
                     75:        etc.${MACHINE}/disktab
1.1       cgd        76:
1.46      deraadt    77: # -rw-rw-r--
1.80      jonathan   78: BIN2+= motd
1.1       cgd        79:
1.77      mycroft    80: # -rw-------
1.80      jonathan   81: BIN3+= hosts.equiv
1.77      mycroft    82:
1.95      mycroft    83: NAMEDB=        127 root.cache
1.91      tron       84: .ifdef USE_BIND4
                     85: NAMEDB+=       named.boot
                     86: .else
1.90      kim        87: NAMEDB+=       named.conf
                     88: .endif
1.1       cgd        89: PCS=   pcs750.bin
                     90:
1.88      lukem      91: all clean cleandir depend distclean etc includes install lint:
1.1       cgd        92:
1.34      cgd        93: .ifndef DESTDIR
1.41      cgd        94: distribution distrib-dirs snapshot:
1.36      cgd        95:        @echo setenv DESTDIR before doing that!
1.34      cgd        96:        @false
                     97: .else
1.7       cgd        98: distribution: distrib-dirs
1.87      perry      99: .if !defined(INSTALL_DONE)
1.53      cgd       100:        (cd ..; ${MAKE} includes)
1.32      jtc       101:        (cd ..; ${MAKE} install)
1.87      perry     102: .endif
1.56      thorpej   103:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
                    104:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
1.77      mycroft   105:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} ${DESTDIR}/etc
1.56      thorpej   106:        ${INSTALL} -c -o root -g wheel -m 600 crontab \
                    107:            ${DESTDIR}/var/cron/tabs/root
                    108:        ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
1.68      perry     109:        pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
1.56      thorpej   110:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
1.1       cgd       111:             MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
1.73      perry     112:        ${INSTALL} -c -o root -g wheel -m 600 minfree \
                    113:            ${DESTDIR}/var/crash
1.1       cgd       114:        (cd root; \
1.56      thorpej   115:                ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
1.1       cgd       116:                    ${DESTDIR}/root/.cshrc; \
1.65      mikel     117:                ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
1.1       cgd       118:                    ${DESTDIR}/root/.klogin; \
1.56      thorpej   119:                ${INSTALL} -c -o root -g wheel -m 644 dot.login \
1.1       cgd       120:                    ${DESTDIR}/root/.login; \
1.56      thorpej   121:                ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
1.1       cgd       122:                    ${DESTDIR}/root/.profile; \
                    123:                rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
                    124:                ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
                    125:                ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1.83      mrg       126:        (cd mtree; ${MAKE} install)
1.63      mikel     127:        (cd namedb; \
                    128:                ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
1.64      pk        129:                    ${DESTDIR}/etc/namedb)
1.19      deraadt   130:        /bin/rm -f ${DESTDIR}/etc/localtime
                    131:        ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
1.48      deraadt   132:        /bin/rm -f ${DESTDIR}/etc/rmt
                    133:        ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
1.56      thorpej   134:        ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
1.32      jtc       135:                ${DESTDIR}/etc/dumpdates
1.93      abs       136:        ${INSTALL} -c -o ${BINOWN} -g operator -m 600 /dev/null \
1.44      deraadt   137:                ${DESTDIR}/etc/skeykeys
1.56      thorpej   138:        ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
1.38      cgd       139:                ${DESTDIR}/var/cron/log
1.56      thorpej   140:        ${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       141:                ${DESTDIR}/var/db/locate.database
1.69      perry     142:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
                    143:                ${DESTDIR}/var/log/authlog
1.56      thorpej   144:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       145:                ${DESTDIR}/var/log/lastlog
1.58      lukem     146:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
1.32      jtc       147:                ${DESTDIR}/var/log/lpd-errs
1.58      lukem     148:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1.32      jtc       149:                ${DESTDIR}/var/log/maillog
1.58      lukem     150:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1.32      jtc       151:                ${DESTDIR}/var/log/messages
1.58      lukem     152:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
                    153:                ${DESTDIR}/var/log/secure
                    154:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1.32      jtc       155:                ${DESTDIR}/var/log/wtmp
1.69      perry     156:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
                    157:                ${DESTDIR}/var/log/xferlog
1.56      thorpej   158:        ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
1.39      cgd       159:                ${DESTDIR}/var/msgs/bounds
1.56      thorpej   160:        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       161:                ${DESTDIR}/var/run/utmp
1.81      mrg       162:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    163:                ${DESTDIR}/var/games/atc_scores
                    164:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    165:                ${DESTDIR}/var/games/battlestar.log
                    166:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    167:                ${DESTDIR}/var/games/cfscores
                    168:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
1.82      perry     169:                ${DESTDIR}/var/games/criblog
1.81      mrg       170:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    171:                ${DESTDIR}/var/games/robots_roll
                    172:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    173:                ${DESTDIR}/var/games/rogue.scores
                    174:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    175:                ${DESTDIR}/var/games/saillog
                    176:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    177:                ${DESTDIR}/var/games/snakerawscores
                    178:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    179:                ${DESTDIR}/var/games/snake.log
                    180:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    181:                ${DESTDIR}/var/games/tetris.scores
                    182:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    183:                ${DESTDIR}/var/games/larn/llog12.0
                    184:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    185:                ${DESTDIR}/var/games/larn/lscore12.0
                    186:        ${INSTALL} -c -o games -g games -m 664 /dev/null \
                    187:                ${DESTDIR}/var/games/larn/playerids
1.56      thorpej   188:        (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1.6       cgd       189:            fstab.* ${DESTDIR}/etc)
1.49      tls       190:        (cd ${DESTDIR}/dev; ./MAKEDEV all)
1.62      perry     191:        (cd ../usr.bin/mail; ${MAKE} distribution)
1.90      kim       192: .ifndef NO_SENDMAIL
1.35      cgd       193:        (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1.90      kim       194: .endif
1.1       cgd       195:
                    196:
1.7       cgd       197: distrib-dirs:
1.56      thorpej   198:        ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
1.67      perry     199:        -mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
1.28      jtc       200:        cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1.99      cjs       201:
1.96      cjs       202: .if !defined(RELEASEDIR)
                    203: snapshot snap_pre:
                    204:        @echo setenv RELEASEDIR before doing that!
                    205:        @false
                    206: .else
1.100     cjs       207: release snapshot: distribution snap_pre snap_md snap_kern
1.96      cjs       208:        sh ../distrib/sets/maketars -s ../distrib/sets \
                    209:                -d ${DESTDIR} -t ${RELEASEDIR}/binary/sets
                    210:        (cd ${RELEASEDIR}/binary/sets && \
                    211:                cksum -o 1 *.tgz >BSDSUM && \
                    212:                cksum *.tgz >CKSUM && \
                    213:                cksum -m *.tgz >MD5 && \
                    214:                cksum -o 2 *.tgz >SYSVSUM )
                    215:        (cd ${RELEASEDIR}/binary/kernel && if [ -r *.gz ]; then \
                    216:                cksum -o 1 *.gz >BSDSUM && \
                    217:                cksum *.gz >CKSUM && \
                    218:                cksum -m *.gz >MD5 && \
                    219:                cksum -o 2 *.gz >SYSVSUM \
                    220:                ; fi )
1.41      cgd       221:
                    222: snap_pre:
1.96      cjs       223:        /bin/rm -rf ${RELEASEDIR}
                    224:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}
                    225:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}/binary
                    226:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}/binary/sets
                    227:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}/binary/kernel
                    228:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}/binary/security
                    229:        ${INSTALL} -d -o root -g wheel -m 755 ${RELEASEDIR}/installation
                    230:
                    231: # the regular expression does a basename(1) on .CURDIR so that we don't
                    232: # have to keep looking up .. at compile time.
                    233: KERNSRCDIR?=   ${.CURDIR:C/[^\/]+$//}sys
                    234: KERNOBJDIR?=   ${KERNSRCDIR}/arch/${MACHINE}/compile
                    235: KERNCONFDIR?=  ${KERNSRCDIR}/arch/${MACHINE}/conf
                    236:
                    237: # This target builds the GENERIC kernel (which must exist for all
                    238: # ports) and puts it in binary/sets/kern.tgz, and also builds any
                    239: # kernels specified in EXTRA_KERNELS and puts them in
                    240: # binary/kernel/netbsd.${KERN}.gz
                    241: #
                    242: snap_kern:
                    243:        cd ${KERNCONFDIR} && config \
                    244:                -b ${KERNOBJDIR}/GENERIC -s ${KERNSRCDIR} GENERIC
1.97      cjs       245: .ifndef UPDATE
1.96      cjs       246:        cd ${KERNOBJDIR}/GENERIC && ${MAKE} clean
                    247: .endif
                    248:        cd ${KERNOBJDIR}/GENERIC &&     \
                    249:                ${MAKE} depend && ${MAKE} ${_J} &&      \
                    250:                tar cf - netbsd |\
                    251:                gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
                    252: .for kernel in ${EXTRA_KERNELS}
                    253:        cd ${KERNCONFDIR} && config \
                    254:                -b ${KERNOBJDIR}/${kernel} -s ${KERNSRCDIR} ${kernel}
1.98      cjs       255: .ifndef UPDATE
1.96      cjs       256:        cd ${KERNOBJDIR}/${kernel} && ${MAKE} clean
                    257: .endif
                    258:        cd ${KERNOBJDIR}/${kernel} &&   \
                    259:                ${MAKE} depend && ${MAKE} ${_J} &&      \
1.102   ! fair      260:                gzip -c -9 < netbsd > \
        !           261:                        ${RELEASEDIR}/binary/kernel/netbsd.${kernel}.gz
1.96      cjs       262: .endfor # EXTRA_KERNELS
                    263:
                    264: .endif # RELEASEDIR check
1.41      cgd       265:
                    266: snap_md:
                    267: # nothing here -- look in the machine-dependent Makefile.inc
                    268:
1.34      cgd       269: .endif # DESTDIR check
1.7       cgd       270:
1.1       cgd       271: .include <bsd.prog.mk>

CVSweb <webmaster@jp.NetBSD.org>