1 # $NetBSD: Makefile,v 1.70 1997/05/26 03:55:43 cjs Exp $ 2 # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 3 4 TZDIR= /usr/share/zoneinfo 5 LOCALTIME= US/Pacific 6 7 # setting NOOBJ prevents "make obj" from doing anything; 8 # an objdir would break the installation stuff below 9 NOOBJ= oobj 10 11 .include <bsd.own.mk> # for BUILDDIR and configs 12 13 # -rw-r--r-- 14 BINOWN= root 15 BINGRP= wheel 16 BIN1= aliases bootptab changelist csh.cshrc csh.login csh.logout daily \ 17 daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \ 18 gettytab group hosts hosts.equiv hosts.lpd inetd.conf lkm.conf \ 19 man.conf monthly monthly.conf mrouted.conf myname netstart networks \ 20 newsyslog.conf phones printcap protocols rbootd.conf rc rc.conf \ 21 rc.lkm rc.local remote rpc security security.conf services shells \ 22 syslog.conf weekly weekly.conf etc.${MACHINE}/ttys \ 23 etc.${MACHINE}/disktab 24 25 # -rw-rw-r-- 26 BIN2= motd 27 28 NAMEDB= localhost.rev named.boot root.cache 29 PCS= pcs750.bin 30 31 all clean cleandir depend etc includes install lint: 32 33 .ifndef DESTDIR 34 distribution distrib-dirs snapshot: 35 @echo setenv DESTDIR before doing that! 36 @false 37 .else 38 distribution: distrib-dirs 39 (cd ..; ${MAKE} includes) 40 (cd ..; ${MAKE} install) 41 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 42 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc 43 ${INSTALL} -c -o root -g wheel -m 600 crontab \ 44 ${DESTDIR}/var/cron/tabs/root 45 ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 46 pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd 47 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 48 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 49 (cd root; \ 50 ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ 51 ${DESTDIR}/root/.cshrc; \ 52 ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \ 53 ${DESTDIR}/root/.klogin; \ 54 ${INSTALL} -c -o root -g wheel -m 644 dot.login \ 55 ${DESTDIR}/root/.login; \ 56 ${INSTALL} -c -o root -g wheel -m 644 dot.profile \ 57 ${DESTDIR}/root/.profile; \ 58 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 59 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 60 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 61 (cd mtree; \ 62 ${INSTALL} -c -o root -g wheel -m 600 special \ 63 ${DESTDIR}/etc/mtree; \ 64 ${INSTALL} -c -o root -g wheel -m 444 NetBSD.dist \ 65 ${DESTDIR}/etc/mtree) 66 (cd namedb; \ 67 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 68 ${DESTDIR}/etc/namedb) 69 /bin/rm -f ${DESTDIR}/etc/localtime 70 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 71 /bin/rm -f ${DESTDIR}/etc/rmt 72 ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt 73 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 74 ${DESTDIR}/etc/dumpdates 75 ${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \ 76 ${DESTDIR}/etc/skeykeys 77 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 78 ${DESTDIR}/var/cron/log 79 ${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 80 ${DESTDIR}/var/db/locate.database 81 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 82 ${DESTDIR}/var/log/authlog 83 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 84 ${DESTDIR}/var/log/lastlog 85 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \ 86 ${DESTDIR}/var/log/lpd-errs 87 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 88 ${DESTDIR}/var/log/maillog 89 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 90 ${DESTDIR}/var/log/messages 91 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 92 ${DESTDIR}/var/log/secure 93 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 94 ${DESTDIR}/var/log/wtmp 95 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 96 ${DESTDIR}/var/log/xferlog 97 ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \ 98 ${DESTDIR}/var/msgs/bounds 99 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 100 ${DESTDIR}/var/run/utmp 101 (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 102 fstab.* ${DESTDIR}/etc) 103 (cd ${DESTDIR}/dev; ./MAKEDEV all) 104 (cd ../usr.bin/mail; ${MAKE} distribution) 105 (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 106 107 108 distrib-dirs: 109 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR} 110 -mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u 111 cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys 112 113 snapshot: distribution snap_pre snap_tar snap_md 114 cd ${DESTDIR}/snapshot && cksum * > CKSUMS 115 116 snap_pre: 117 /bin/rm -rf ${DESTDIR}/snapshot 118 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot 119 120 snap_tar: 121 cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz 122 cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz 123 cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \ 124 gzip -9 > snapshot/etc.tar.gz 125 cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz 126 cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz 127 cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \ 128 snapshot/usr.games.tar.gz 129 cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \ 130 snapshot/usr.include.tar.gz 131 cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz 132 cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \ 133 snapshot/usr.libexec.tar.gz 134 cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \ 135 usr/obj | gzip -9 > snapshot/usr.misc.tar.gz 136 cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz 137 cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \ 138 snapshot/usr.share.tar.gz 139 cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz 140 141 snap_md: 142 # nothing here -- look in the machine-dependent Makefile.inc 143 144 .endif # DESTDIR check 145 146 .include <bsd.prog.mk> 147