Home | History | Annotate | Line # | Download | only in etc
Makefile revision 1.53
      1 #	$NetBSD: Makefile,v 1.53 1996/06/05 21:55:13 cgd 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 # disktab may be wrong -- hcx9 is a tahoe, but gets its own.
     14 # -rw-r--r--
     15 BINOWN= root
     16 BINGRP= wheel
     17 BIN1=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
     18 	dm.conf ftpusers ftpchroot gettytab group hosts hosts.equiv hosts.lpd \
     19 	inetd.conf man.conf monthly motd mrouted.conf myname netstart \
     20 	networks newsyslog.conf phones printcap protocols rbootd.conf rc \
     21 	rc.local remote rpc security services shells syslog.conf weekly \
     22 	etc.${MACHINE}/ttys etc.${MACHINE}/disktab
     23 
     24 # -rw-rw-r--
     25 BIN2=	motd
     26 
     27 NAMEDB=	localhost.rev named.boot root.cache
     28 PCS=	pcs750.bin
     29 WCS1=	wcs fppwcs poc poc1 poc2 fppoc
     30 WCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
     31 
     32 all clean cleandir depend etc includes install lint:
     33 
     34 .ifndef DESTDIR
     35 distribution distrib-dirs snapshot:
     36 	@echo setenv DESTDIR before doing that!
     37 	@false
     38 .else
     39 distribution: distrib-dirs
     40 	(cd ..; ${MAKE} includes)
     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 ${DESTDIR}/var/cron/tabs/root
     45 	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
     46 	chroot ${DESTDIR}/ pwd_mkdb -p /etc/master.passwd
     47 	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
     48 	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
     49 	(cd root; \
     50 		install -c -o root -g wheel -m 644 dot.cshrc \
     51 		    ${DESTDIR}/root/.cshrc; \
     52 		install -c -o root -g wheel -m 644 dot.klogin \
     53 		    ${DESTDIR}/root/.klogin; \
     54 		install -c -o root -g wheel -m 644 dot.login \
     55 		    ${DESTDIR}/root/.login; \
     56 		install -c -o root -g wheel -m 644 dot.profile \
     57 		    ${DESTDIR}/root/.profile; \
     58 		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
     59 		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
     60 		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
     61 	(cd mtree; \
     62 		install -c -o root -g wheel -m 600 special \
     63 		    ${DESTDIR}/etc/mtree; \
     64 		install -c -o root -g wheel -m 444 4.4BSD.dist \
     65 		    ${DESTDIR}/etc/mtree)
     66 	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
     67 	    ${DESTDIR}/etc/namedb
     68 	/bin/rm -f ${DESTDIR}/etc/localtime
     69 	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
     70 	/bin/rm -f ${DESTDIR}/etc/rmt
     71 	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
     72 	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
     73 		${DESTDIR}/etc/dumpdates
     74 	install -c -o ${BINOWN} -g operator -m 644 /dev/null \
     75 		${DESTDIR}/etc/skeykeys
     76 	install -c -o root -g wheel -m 600 /dev/null \
     77 		${DESTDIR}/var/cron/log
     78 	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
     79 		${DESTDIR}/var/db/locate.database
     80 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     81 		${DESTDIR}/var/log/lastlog
     82 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     83 		${DESTDIR}/var/log/lpd-errs
     84 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     85 		${DESTDIR}/var/log/maillog
     86 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     87 		${DESTDIR}/var/log/messages
     88 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     89 		${DESTDIR}/var/log/wtmp
     90 	install -c -o daemon -g staff -m 664 /dev/null \
     91 		${DESTDIR}/var/msgs/bounds
     92 	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
     93 		${DESTDIR}/var/run/utmp
     94 	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
     95 	    fstab.* ${DESTDIR}/etc)
     96 	(cd ${DESTDIR}/dev; ./MAKEDEV all)
     97 .if ${MACHINE} == "tahoe"
     98 	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
     99 	    ${DESTDIR}/)
    100 .endif
    101 .if ${MACHINE} == "vax"
    102 	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
    103 	    ${DESTDIR}/)
    104 .endif
    105 	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
    106 
    107 hcx9-distribution:
    108 	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
    109 	    ${DESTDIR}/)
    110 
    111 distrib-dirs:
    112 	install -d -o root -g wheel -m 755 ${DESTDIR}
    113 	-mtree -def mtree/4.4BSD.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