Home | History | Annotate | Line # | Download | only in etc
Makefile revision 1.80
      1 #	$NetBSD: Makefile,v 1.80 1997/11/11 04:37:17 jonathan 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 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 	(cd namedb; \
     83 		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
     84 		    ${DESTDIR}/etc/namedb)
     85 	/bin/rm -f ${DESTDIR}/etc/localtime
     86 	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
     87 	/bin/rm -f ${DESTDIR}/etc/rmt
     88 	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
     89 	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
     90 		${DESTDIR}/etc/dumpdates
     91 	${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \
     92 		${DESTDIR}/etc/skeykeys
     93 	${INSTALL} -c -o root -g wheel -m 600 /dev/null \
     94 		${DESTDIR}/var/cron/log
     95 	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
     96 		${DESTDIR}/var/db/locate.database
     97 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
     98 		${DESTDIR}/var/log/authlog
     99 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
    100 		${DESTDIR}/var/log/lastlog
    101 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
    102 		${DESTDIR}/var/log/lpd-errs
    103 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
    104 		${DESTDIR}/var/log/maillog
    105 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
    106 		${DESTDIR}/var/log/messages
    107 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
    108 		${DESTDIR}/var/log/secure
    109 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
    110 		${DESTDIR}/var/log/wtmp
    111 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
    112 		${DESTDIR}/var/log/xferlog
    113 	${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
    114 		${DESTDIR}/var/msgs/bounds
    115 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
    116 		${DESTDIR}/var/run/utmp
    117 	(cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
    118 	    fstab.* ${DESTDIR}/etc)
    119 	(cd ${DESTDIR}/dev; ./MAKEDEV all)
    120 	(cd ../usr.bin/mail; ${MAKE} distribution)
    121 	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
    122 
    123 
    124 distrib-dirs:
    125 	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
    126 	-mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
    127 	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
    128 
    129 snapshot: distribution snap_pre snap_tar snap_md
    130 	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
    131 
    132 snap_pre:
    133 	/bin/rm -rf ${DESTDIR}/snapshot
    134 	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
    135 
    136 snap_tar:
    137 	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
    138 	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
    139 	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
    140 	    gzip -9 > snapshot/etc.tar.gz
    141 	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
    142 	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
    143 	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
    144 	    snapshot/usr.games.tar.gz
    145 	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
    146 	    snapshot/usr.include.tar.gz
    147 	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
    148 	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
    149 	    snapshot/usr.libexec.tar.gz
    150 	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
    151 	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
    152 	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
    153 	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
    154 	    snapshot/usr.share.tar.gz
    155 	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
    156 
    157 snap_md:
    158 # nothing here -- look in the machine-dependent Makefile.inc
    159 
    160 .endif	# DESTDIR check
    161 
    162 .include <bsd.prog.mk>
    163