1 # $NetBSD: Makefile,v 1.70.2.3 1997/09/18 22:04:48 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 .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.equiv 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 NAMEDB= localhost.rev named.boot root.cache 31 PCS= pcs750.bin 32 33 all clean cleandir depend etc includes install lint: 34 35 .ifndef DESTDIR 36 distribution distrib-dirs snapshot: 37 @echo setenv DESTDIR before doing that! 38 @false 39 .else 40 distribution: distrib-dirs 41 (cd ..; ${MAKE} install) 42 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 43 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc 44 ${INSTALL} -c -o root -g wheel -m 600 crontab \ 45 ${DESTDIR}/var/cron/tabs/root 46 ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 47 pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd 48 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 49 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 50 ${INSTALL} -c -o root -g wheel -m 600 minfree \ 51 ${DESTDIR}/var/crash 52 (cd root; \ 53 ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ 54 ${DESTDIR}/root/.cshrc; \ 55 ${INSTALL} -c -o root -g wheel -m 600 dot.klogin \ 56 ${DESTDIR}/root/.klogin; \ 57 ${INSTALL} -c -o root -g wheel -m 644 dot.login \ 58 ${DESTDIR}/root/.login; \ 59 ${INSTALL} -c -o root -g wheel -m 644 dot.profile \ 60 ${DESTDIR}/root/.profile; \ 61 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 62 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 63 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 64 (cd mtree; \ 65 ${INSTALL} -c -o root -g wheel -m 600 special \ 66 ${DESTDIR}/etc/mtree; \ 67 ${INSTALL} -c -o root -g wheel -m 444 NetBSD.dist \ 68 ${DESTDIR}/etc/mtree) 69 (cd namedb; \ 70 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 71 ${DESTDIR}/etc/namedb) 72 /bin/rm -f ${DESTDIR}/etc/localtime 73 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 74 /bin/rm -f ${DESTDIR}/etc/rmt 75 ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt 76 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 77 ${DESTDIR}/etc/dumpdates 78 ${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \ 79 ${DESTDIR}/etc/skeykeys 80 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 81 ${DESTDIR}/var/cron/log 82 ${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 83 ${DESTDIR}/var/db/locate.database 84 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 85 ${DESTDIR}/var/log/authlog 86 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 87 ${DESTDIR}/var/log/lastlog 88 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \ 89 ${DESTDIR}/var/log/lpd-errs 90 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 91 ${DESTDIR}/var/log/maillog 92 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 93 ${DESTDIR}/var/log/messages 94 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 95 ${DESTDIR}/var/log/secure 96 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 97 ${DESTDIR}/var/log/wtmp 98 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 99 ${DESTDIR}/var/log/xferlog 100 ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \ 101 ${DESTDIR}/var/msgs/bounds 102 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 103 ${DESTDIR}/var/run/utmp 104 (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 105 fstab.* ${DESTDIR}/etc) 106 (cd ${DESTDIR}/dev; ./MAKEDEV all) 107 (cd ../usr.bin/mail; ${MAKE} distribution) 108 (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 109 110 111 distrib-dirs: 112 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR} 113 -mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u 114 cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys 115 116 snapshot: distribution snap_pre snap_tar snap_md 117 cd ${DESTDIR}/snapshot && cksum * > CKSUMS 118 119 snap_pre: 120 /bin/rm -rf ${DESTDIR}/snapshot 121 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot 122 123 snap_tar: 124 cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz 125 cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz 126 cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \ 127 gzip -9 > snapshot/etc.tar.gz 128 cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz 129 cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz 130 cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \ 131 snapshot/usr.games.tar.gz 132 cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \ 133 snapshot/usr.include.tar.gz 134 cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz 135 cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \ 136 snapshot/usr.libexec.tar.gz 137 cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \ 138 usr/obj | gzip -9 > snapshot/usr.misc.tar.gz 139 cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz 140 cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \ 141 snapshot/usr.share.tar.gz 142 cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz 143 144 snap_md: 145 # nothing here -- look in the machine-dependent Makefile.inc 146 147 .endif # DESTDIR check 148 149 .include <bsd.prog.mk> 150