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

Annotation of src/etc/Makefile, Revision 1.150

1.150   ! lukem       1: #      $NetBSD: Makefile,v 1.149 2000/05/06 07:52:19 sjg 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: #   EXTRA_KERNELS has a machine-dependent list of kernels to build added
                     24: #      to it, but you may also set this to have extra ones built.
1.119     ross       25: #   BUILD_KERNELS are a machine-dependent list of kernels that should just
                     26: #      be built in place but not made into sets or installed, e.g., an
                     27: #      INSTALL kernel used later in src/distrib/.
1.134     erh        28: #   CRYPTOPATH is automatically defined by bsd.crypto.mk to be either
                     29: #      ../crypto-us or ../crypto-intl.  It controls the building of
                     30: #      the secr set, which can be disabled by setting CRYPTOPATH to
                     31: #      "none".
1.96      cjs        32: #
                     33: # Targets:
                     34: #    distribution: makes a full NetBSD distribution in DESTDIR. If
                     35: #      INSTALL_DONE is set, it will not do a `make install.'
                     36: #    distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
                     37: #      Called by distribution.
                     38: #    snapshot: calls distribution, above, and then tars up the files
                     39: #      into a release(7) format in RELEASEDIR. Any port-dependent
                     40: #      stuff for this target is found in etc.${MACHINE}/Makefile.inc.
1.106     cjs        41: #    release: a synonym for `snapshot'
1.96      cjs        42:
1.149     sjg        43: # do this before bsd.own.mk so we get correct KERNSRCDIR
1.145     sjg        44: .include "../Makefile.inc"
                     45:
1.134     erh        46: # For NO_SENDMAIL and INSTPRIV and CRYPTOPATH
1.90      kim        47: .include <bsd.own.mk>
1.134     erh        48: SRCTOP= ..
                     49: .include <bsd.crypto.mk>
1.90      kim        50:
1.23      cgd        51: TZDIR=         /usr/share/zoneinfo
1.90      kim        52: LOCALTIME?=    US/Pacific
1.19      deraadt    53:
1.55      perry      54: # setting NOOBJ prevents "make obj" from doing anything;
                     55: # an objdir would break the installation stuff below
1.101     lukem      56: MKOBJ= no
1.1       cgd        57:
1.80      jonathan   58: # MD Makefile.inc may append MD targets to BIN[123].  Make sure all
                     59: # are empty, to preserve the old semantics of setting them below with "=".
                     60: BIN1=
                     61: BIN2=
                     62: BIN3=
                     63:
1.117     simonb     64: # Directories to build in ${RELEASEDIR}.   MD Makefile.inc files can
                     65: # add to this.
                     66: # NOTE: Parent directories must be listed before subdirectories.
                     67: INSTALLATION_DIRS= \
                     68:        binary binary/sets binary/kernel binary/security installation
                     69:
1.71      cjs        70: .if exists(etc.${MACHINE}/Makefile.inc)
                     71: .include "etc.${MACHINE}/Makefile.inc"
                     72: .endif
1.32      jtc        73:
1.96      cjs        74: # Use multiple jobs for kernel builds, if NBUILDJOBS set.
                     75: # (Taken from src/Makefile.)
                     76: .if defined(NBUILDJOBS)
                     77: _J= -j${NBUILDJOBS}
                     78: .endif
                     79:
1.21      cgd        80: # -rw-r--r--
                     81: BINOWN= root
                     82: BINGRP= wheel
1.131     veego      83: BIN1+= bootptab changelist csh.cshrc csh.login csh.logout daily \
                     84:        daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \
                     85:        gettytab group hosts hosts.lpd inetd.conf lkm.conf \
                     86:        mailer.conf man.conf monthly monthly.conf mrouted.conf \
1.150   ! lukem      87:        networks newsyslog.conf nsswitch.conf ntp.conf \
1.131     veego      88:        phones printcap profile protocols rbootd.conf rc rc.conf \
                     89:        rc.lkm rc.local rc.subr rc.shutdown rc.wscons remote rpc \
1.142     tsarna     90:        security security.conf services shells sysctl.conf syslog.conf \
                     91:        weekly weekly.conf wscons.conf \
1.109     drochner   92:        etc.${MACHINE}/ttys etc.${MACHINE}/disktab
1.105     mycroft    93:
1.121     fvdl       94: .if    (${MACHINE_ARCH} == "m68k") || \
1.105     mycroft    95:        (${MACHINE_ARCH} == "ns32k") || \
                     96:        (${MACHINE_ARCH} == "vax") || \
                     97:        (${MACHINE_ARCH} == "arm32")
1.129     christos   98: BIN1+= ld.so.conf
                     99: .elif exists(etc.${MACHINE_ARCH}/ld.so.conf)
1.132     jlam      100: BIN1+= etc.${MACHINE_ARCH}/ld.so.conf
1.105     mycroft   101: .endif
1.120     itojun    102:
                    103: # IPv6
                    104: BIN1+= rtadvd.conf
1.1       cgd       105:
1.46      deraadt   106: # -rw-rw-r--
1.80      jonathan  107: BIN2+= motd
1.1       cgd       108:
1.77      mycroft   109: # -rw-------
1.80      jonathan  110: BIN3+= hosts.equiv
1.77      mycroft   111:
1.144     thorpej   112: NAMEDB=        127 root.cache named.conf localhost loopback.v6
1.1       cgd       113: PCS=   pcs750.bin
                    114:
1.88      lukem     115: all clean cleandir depend distclean etc includes install lint:
1.1       cgd       116:
1.149     sjg       117: .include <bsd.kernobj.mk>
                    118:
                    119: obj:
                    120:        mkdir -p ${KERNOBJDIR}
                    121:
1.34      cgd       122: .ifndef DESTDIR
1.106     cjs       123: distribution distrib-dirs release snapshot:
1.36      cgd       124:        @echo setenv DESTDIR before doing that!
1.34      cgd       125:        @false
                    126: .else
1.7       cgd       127: distribution: distrib-dirs
1.87      perry     128: .if !defined(INSTALL_DONE)
1.107     scottr    129:        (cd ..; ${MAKE} _DISTRIB= includes)
                    130:        (cd ..; ${MAKE} _DISTRIB= install)
1.87      perry     131: .endif
1.124     simonb    132:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} \
                    133:            ${DESTDIR}/etc
                    134:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} \
                    135:            ${DESTDIR}/etc
                    136:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} \
                    137:            ${DESTDIR}/etc
                    138:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 aliases \
1.147     itojun    139:            ${DESTDIR}/etc/mail
1.124     simonb    140:        ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 crontab \
1.56      thorpej   141:            ${DESTDIR}/var/cron/tabs/root
1.124     simonb    142:        ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 master.passwd \
                    143:            ${DESTDIR}/etc
1.68      perry     144:        pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
1.124     simonb    145:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
1.1       cgd       146:             MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
1.124     simonb    147:        ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 minfree \
1.73      perry     148:            ${DESTDIR}/var/crash
1.1       cgd       149:        (cd root; \
1.124     simonb    150:                ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.cshrc \
1.1       cgd       151:                    ${DESTDIR}/root/.cshrc; \
1.124     simonb    152:                ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 dot.klogin \
1.1       cgd       153:                    ${DESTDIR}/root/.klogin; \
1.124     simonb    154:                ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.login \
1.1       cgd       155:                    ${DESTDIR}/root/.login; \
1.124     simonb    156:                ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.profile \
1.1       cgd       157:                    ${DESTDIR}/root/.profile; \
1.128     mycroft   158:                ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.shrc \
                    159:                    ${DESTDIR}/root/.shrc; \
1.1       cgd       160:                rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
                    161:                ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
                    162:                ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1.83      mrg       163:        (cd mtree; ${MAKE} install)
1.63      mikel     164:        (cd namedb; \
1.124     simonb    165:                ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
                    166:                    ${NAMEDB} ${DESTDIR}/etc/namedb)
1.140     lukem     167:        (cd rc.d; ${MAKE} install)
1.19      deraadt   168:        /bin/rm -f ${DESTDIR}/etc/localtime
                    169:        ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
1.48      deraadt   170:        /bin/rm -f ${DESTDIR}/etc/rmt
                    171:        ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
1.124     simonb    172:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 664 /dev/null \
1.32      jtc       173:                ${DESTDIR}/etc/dumpdates
1.124     simonb    174:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 600 /dev/null \
1.44      deraadt   175:                ${DESTDIR}/etc/skeykeys
1.127     perry     176:        ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
                    177:                ${DESTDIR}/var/at/at.deny
1.124     simonb    178:        ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
1.38      cgd       179:                ${DESTDIR}/var/cron/log
1.124     simonb    180:        ${INSTALL} ${INSTPRIV} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       181:                ${DESTDIR}/var/db/locate.database
1.124     simonb    182:        ${INSTALL} ${INSTPRIV} -c -o uucp -g dialer -m 640 /dev/null \
1.113     fair      183:                ${DESTDIR}/var/log/aculog
1.124     simonb    184:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1.69      perry     185:                ${DESTDIR}/var/log/authlog
1.124     simonb    186:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       187:                ${DESTDIR}/var/log/lastlog
1.124     simonb    188:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
1.32      jtc       189:                ${DESTDIR}/var/log/lpd-errs
1.124     simonb    190:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1.32      jtc       191:                ${DESTDIR}/var/log/maillog
1.124     simonb    192:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1.32      jtc       193:                ${DESTDIR}/var/log/messages
1.124     simonb    194:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1.58      lukem     195:                ${DESTDIR}/var/log/secure
1.137     mycroft   196:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
                    197:                ${DESTDIR}/var/log/sendmail.st
1.124     simonb    198:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1.32      jtc       199:                ${DESTDIR}/var/log/wtmp
1.124     simonb    200:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1.69      perry     201:                ${DESTDIR}/var/log/xferlog
1.124     simonb    202:        ${INSTALL} ${INSTPRIV} -c -o daemon -g staff -m 664 /dev/null \
1.39      cgd       203:                ${DESTDIR}/var/msgs/bounds
1.124     simonb    204:        ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1.32      jtc       205:                ${DESTDIR}/var/run/utmp
1.124     simonb    206:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       207:                ${DESTDIR}/var/games/atc_scores
1.124     simonb    208:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       209:                ${DESTDIR}/var/games/battlestar.log
1.124     simonb    210:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       211:                ${DESTDIR}/var/games/cfscores
1.124     simonb    212:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.82      perry     213:                ${DESTDIR}/var/games/criblog
1.124     simonb    214:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       215:                ${DESTDIR}/var/games/robots_roll
1.124     simonb    216:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       217:                ${DESTDIR}/var/games/rogue.scores
1.124     simonb    218:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       219:                ${DESTDIR}/var/games/saillog
1.124     simonb    220:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       221:                ${DESTDIR}/var/games/snakerawscores
1.124     simonb    222:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       223:                ${DESTDIR}/var/games/snake.log
1.124     simonb    224:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       225:                ${DESTDIR}/var/games/tetris.scores
1.124     simonb    226:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       227:                ${DESTDIR}/var/games/larn/llog12.0
1.124     simonb    228:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       229:                ${DESTDIR}/var/games/larn/lscore12.0
1.124     simonb    230:        ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
1.81      mrg       231:                ${DESTDIR}/var/games/larn/playerids
1.124     simonb    232:        (cd etc.${MACHINE}; ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} \
                    233:            -g ${BINGRP} -m 444 fstab.* ${DESTDIR}/etc)
1.49      tls       234:        (cd ${DESTDIR}/dev; ./MAKEDEV all)
1.62      perry     235:        (cd ../usr.bin/mail; ${MAKE} distribution)
1.143     perry     236:        (cd ../gnu/usr.sbin/postfix/; ${MAKE} distribution)
1.90      kim       237: .ifndef NO_SENDMAIL
1.133     tron      238:        (cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1.148     itojun    239:        ${DESTDIR}/usr/libexec/sendmail/sendmail -C ${DESTDIR}/etc/mail/sendmail.cf -O AliasFile=${DESTDIR}/etc/mail/aliases -O DontBlameSendmail=groupwritabledirpathsafe -bi
1.90      kim       240: .endif
1.1       cgd       241:
1.7       cgd       242: distrib-dirs:
1.124     simonb    243:        ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${DESTDIR}
1.67      perry     244:        -mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
1.28      jtc       245:        cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1.99      cjs       246:
1.96      cjs       247: .if !defined(RELEASEDIR)
1.117     simonb    248: release snapshot snap_pre snap_md_pre snap_md_post:
1.96      cjs       249:        @echo setenv RELEASEDIR before doing that!
                    250:        @false
                    251: .else
1.117     simonb    252: release snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post
1.141     thorpej   253:        (cd ../distrib/sets; ${MAKE} sets)
1.123     is        254:        sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
1.141     thorpej   255:
                    256: cryptoset: distribution snap_pre snap_md_pre snap_kern snap_md_post
                    257:        (cd ../distrib/sets; ${MAKE} cryptoset)
1.41      cgd       258:
                    259: snap_pre:
1.96      cjs       260:        /bin/rm -rf ${RELEASEDIR}
1.124     simonb    261:        ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}
1.117     simonb    262: .for dir in ${INSTALLATION_DIRS}
1.124     simonb    263:        ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
1.117     simonb    264: .endfor
1.96      cjs       265:
                    266:
                    267: # This target builds the GENERIC kernel (which must exist for all
                    268: # ports) and puts it in binary/sets/kern.tgz, and also builds any
1.114     fair      269: # kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
                    270: # system can create more than one kernel from a single configuration
                    271: # we figure out how many there are, what they're named, and move them
                    272: # to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
1.116     fair      273: # simply be "netbsd". If we don't find the "config" line, assume the
                    274: # kernel will be "netbsd" (some config files are simple additions on
                    275: # GENERIC, and just include it).
                    276: #
                    277: GETKERNELAWK=  awk '/^config/ {print $$2; found=1} \
                    278:                END{ if (found == 0) print "netbsd"; }'
1.96      cjs       279: #
1.118     gwr       280: .if !target(snap_kern)
1.96      cjs       281: snap_kern:
1.145     sjg       282: .ifndef KERNELS_DONE
1.135     mycroft   283: .for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
1.125     sommerfe  284:        cd ${KERNCONFDIR} && ${CONFIG} \
1.135     mycroft   285:                -b ${KERNOBJDIR}/${configfile} -s ${KERNSRCDIR} ${configfile}
1.97      cjs       286: .ifndef UPDATE
1.135     mycroft   287:        cd ${KERNOBJDIR}/${configfile} && ${MAKE} clean
1.96      cjs       288: .endif
1.135     mycroft   289:        cd ${KERNOBJDIR}/${configfile} && ${MAKE} depend && ${MAKE} ${_J}
                    290: .endfor # kernels
1.96      cjs       291:        cd ${KERNOBJDIR}/GENERIC &&     \
1.116     fair      292:                tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
1.96      cjs       293:                gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
1.135     mycroft   294: .for configfile in GENERIC ${EXTRA_KERNELS}
1.114     fair      295:        cd ${KERNOBJDIR}/${configfile} &&       \
1.116     fair      296:                for kernel in `${GETKERNELAWK} \
1.114     fair      297:                        ${KERNCONFDIR}/${configfile}` ; {   \
                    298:                gzip -c -9 < $${kernel} > \
                    299:                        ${RELEASEDIR}/binary/kernel/$${kernel}.${configfile}.gz ; }
1.96      cjs       300: .endfor # EXTRA_KERNELS
1.145     sjg       301: .endif # KERNELS_DONE
1.118     gwr       302: .endif # no target(snap_kern)
1.108     drochner  303:
1.96      cjs       304: .endif # RELEASEDIR check
1.41      cgd       305:
1.117     simonb    306: snap_md_pre:
                    307: # nothing here -- look in the machine-dependent Makefile.inc
                    308:
                    309: snap_md_post:
1.41      cgd       310: # nothing here -- look in the machine-dependent Makefile.inc
                    311:
1.34      cgd       312: .endif # DESTDIR check
1.7       cgd       313:
1.1       cgd       314: .include <bsd.prog.mk>

CVSweb <webmaster@jp.NetBSD.org>