1 # $NetBSD: Makefile,v 1.62 1997/01/16 23:10:43 perry Exp $ 2 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 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 ftpusers ftpchroot gettytab group hosts \ 20 hosts.equiv hosts.lpd inetd.conf lkm.conf man.conf monthly \ 21 monthly.conf motd mrouted.conf myname netstart networks \ 22 newsyslog.conf phones printcap protocols rbootd.conf rc rc.conf \ 23 rc.lkm rc.local remote rpc security security.conf services shells \ 24 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} includes) 42 (cd ..; ${MAKE} install) 43 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 44 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc 45 ${INSTALL} -c -o root -g wheel -m 600 crontab \ 46 ${DESTDIR}/var/cron/tabs/root 47 ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 48 chroot ${DESTDIR}/ pwd_mkdb -p /etc/master.passwd 49 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 50 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 51 (cd root; \ 52 ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ 53 ${DESTDIR}/root/.cshrc; \ 54 ${INSTALL} -c -o root -g wheel -m 644 dot.klogin \ 55 ${DESTDIR}/root/.klogin; \ 56 ${INSTALL} -c -o root -g wheel -m 644 dot.login \ 57 ${DESTDIR}/root/.login; \ 58 ${INSTALL} -c -o root -g wheel -m 644 dot.profile \ 59 ${DESTDIR}/root/.profile; \ 60 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 61 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 62 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 63 (cd mtree; \ 64 ${INSTALL} -c -o root -g wheel -m 600 special \ 65 ${DESTDIR}/etc/mtree; \ 66 ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \ 67 ${DESTDIR}/etc/mtree) 68 cd namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 69 ${DESTDIR}/etc/namedb 70 /bin/rm -f ${DESTDIR}/etc/localtime 71 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 72 /bin/rm -f ${DESTDIR}/etc/rmt 73 ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt 74 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 75 ${DESTDIR}/etc/dumpdates 76 ${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \ 77 ${DESTDIR}/etc/skeykeys 78 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 79 ${DESTDIR}/var/cron/log 80 ${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 81 ${DESTDIR}/var/db/locate.database 82 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 83 ${DESTDIR}/var/log/lastlog 84 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \ 85 ${DESTDIR}/var/log/lpd-errs 86 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 87 ${DESTDIR}/var/log/maillog 88 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 89 ${DESTDIR}/var/log/messages 90 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 91 ${DESTDIR}/var/log/secure 92 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 93 ${DESTDIR}/var/log/wtmp 94 ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \ 95 ${DESTDIR}/var/msgs/bounds 96 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 97 ${DESTDIR}/var/run/utmp 98 (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 99 fstab.* ${DESTDIR}/etc) 100 (cd ${DESTDIR}/dev; ./MAKEDEV all) 101 (cd ../usr.bin/mail; ${MAKE} distribution) 102 (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 103 104 105 distrib-dirs: 106 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR} 107 -mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u 108 cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys 109 110 snapshot: distribution snap_pre snap_tar snap_md 111 cd ${DESTDIR}/snapshot && cksum * > CKSUMS 112 113 snap_pre: 114 /bin/rm -rf ${DESTDIR}/snapshot 115 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot 116 117 snap_tar: 118 cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz 119 cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz 120 cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \ 121 gzip -9 > snapshot/etc.tar.gz 122 cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz 123 cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz 124 cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \ 125 snapshot/usr.games.tar.gz 126 cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \ 127 snapshot/usr.include.tar.gz 128 cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz 129 cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \ 130 snapshot/usr.libexec.tar.gz 131 cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \ 132 usr/obj | gzip -9 > snapshot/usr.misc.tar.gz 133 cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz 134 cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \ 135 snapshot/usr.share.tar.gz 136 cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz 137 138 snap_md: 139 # nothing here -- look in the machine-dependent Makefile.inc 140 141 .endif # DESTDIR check 142 143 .include <bsd.prog.mk> 144