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