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