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