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