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