2003-07-18 12:26:01 +04:00
|
|
|
# $NetBSD: Makefile,v 1.255 2003/07/18 08:26:03 lukem Exp $
|
1997-02-25 10:37:19 +03:00
|
|
|
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1999-02-05 06:01:49 +03:00
|
|
|
# Environment variables without default values:
|
|
|
|
# DESTDIR must be set before anything in this file will work.
|
|
|
|
# RELEASEDIR is where the tarred up stuff for a snapshot or
|
|
|
|
# release will be placed.
|
|
|
|
#
|
|
|
|
# Environment variables with default values:
|
|
|
|
# LOCALTIME will set the default local time for the system you
|
|
|
|
# build; it determines what /etc/localtime is symlink'd to.
|
|
|
|
# KERNSRCDIR points to kernel source; it is set by default to ../sys,
|
|
|
|
# but can be overridden.
|
|
|
|
# KERNOBJDIR is the kernel build directory, it defaults to
|
2000-12-02 21:04:45 +03:00
|
|
|
# ${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden.
|
1999-02-05 06:01:49 +03:00
|
|
|
# KERNCONFDIR is where the configuration files for kernels are found;
|
|
|
|
# default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
|
2003-07-18 12:26:01 +04:00
|
|
|
# MKUPDATE; if not `no', don't do a 'make clean' before kernel compile
|
1999-02-05 06:01:49 +03:00
|
|
|
# NO_SENDMAIL is normally undefined; if defined, it will not do a
|
|
|
|
# `make distribution' in the sendmail config file source directory.
|
2000-06-20 10:00:24 +04:00
|
|
|
#
|
1999-02-05 06:01:49 +03:00
|
|
|
# Targets:
|
|
|
|
# distribution: makes a full NetBSD distribution in DESTDIR. If
|
|
|
|
# INSTALL_DONE is set, it will not do a `make install.'
|
2001-10-10 10:58:56 +04:00
|
|
|
# if DISTRIBUTION_DONE is set, it will not do anything.
|
1999-02-05 06:01:49 +03:00
|
|
|
# distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
|
|
|
|
# Called by distribution.
|
|
|
|
# snapshot: calls distribution, above, and then tars up the files
|
2003-01-03 18:34:30 +03:00
|
|
|
# into a release(7) format in RELEASEDIR/${MACHINE}.
|
|
|
|
# Any port-dependent stuff for this target is found in
|
|
|
|
# etc.${MACHINE}/Makefile.inc.
|
1999-03-08 05:37:56 +03:00
|
|
|
# release: a synonym for `snapshot'
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
2001-12-12 03:07:45 +03:00
|
|
|
|
2000-07-25 23:07:39 +04:00
|
|
|
# For NO_SENDMAIL, INSTPRIV, MKCRYPTO
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
1998-11-02 06:32:22 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2002-04-10 18:57:45 +04:00
|
|
|
# For KERNSRCDIR, KERNOBJDIR, ...
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
2002-04-10 18:57:45 +04:00
|
|
|
.include <bsd.kernobj.mk>
|
|
|
|
|
2003-05-18 12:28:05 +04:00
|
|
|
# For TARGET_ENDIANNESS
|
|
|
|
#
|
|
|
|
.include <bsd.endian.mk>
|
|
|
|
|
2002-04-10 18:57:45 +04:00
|
|
|
|
2001-10-26 10:45:33 +04:00
|
|
|
.MAKEOVERRIDES+= USETOOLS
|
|
|
|
|
1993-07-17 18:17:24 +04:00
|
|
|
TZDIR= /usr/share/zoneinfo
|
2000-08-03 17:00:02 +04:00
|
|
|
LOCALTIME?= UTC
|
2003-07-10 14:33:58 +04:00
|
|
|
MAKESUMS= CKSUM=${TOOL_CKSUM:Q} ${HOST_SH} ${NETBSDSRCDIR}/distrib/sets/makesums
|
1993-05-25 13:16:14 +04:00
|
|
|
|
2000-09-12 01:53:30 +04:00
|
|
|
# Flags for creating ISO CDROM image
|
|
|
|
# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord
|
2003-01-04 18:49:29 +03:00
|
|
|
# Note: At least mkisofs 2.0 should be used.
|
|
|
|
#
|
2000-09-12 01:53:30 +04:00
|
|
|
MKISOFS?= mkisofs
|
2002-12-02 16:18:03 +03:00
|
|
|
DISTRIBREV!= sh ${KERNSRCDIR}/conf/osrelease.sh -s
|
2002-07-28 05:21:07 +04:00
|
|
|
# ISO 9660 volume ID. Note that this can only contain [A-Z0-9_].
|
|
|
|
ISO_VOLID!= echo NETBSD_${MACHINE}_${DISTRIBREV} | tr a-z A-Z
|
2000-09-12 01:53:30 +04:00
|
|
|
MKISOFS_FLAGS+= -J -l \
|
|
|
|
-r -T -v \
|
2002-07-28 05:21:07 +04:00
|
|
|
-V ${ISO_VOLID} \
|
2000-09-12 01:53:30 +04:00
|
|
|
-P "The NetBSD Project" \
|
2003-01-03 18:34:30 +03:00
|
|
|
-m "${RELEASEDIR}/${MACHINE}/installation/cdrom"
|
2000-09-12 01:53:30 +04:00
|
|
|
|
1997-11-11 07:37:17 +03:00
|
|
|
# MD Makefile.inc may append MD targets to BIN[123]. Make sure all
|
|
|
|
# are empty, to preserve the old semantics of setting them below with "=".
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
2002-01-27 04:44:02 +03:00
|
|
|
BIN1=
|
1997-11-11 07:37:17 +03:00
|
|
|
BIN2=
|
|
|
|
BIN3=
|
|
|
|
|
2003-01-03 18:34:30 +03:00
|
|
|
# Directories to build in ${RELEASEDIR}/${MACHINE}.
|
|
|
|
# MD Makefile.inc files can add to this.
|
1999-04-27 07:08:02 +04:00
|
|
|
# NOTE: Parent directories must be listed before subdirectories.
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
2002-05-02 19:09:40 +04:00
|
|
|
INSTALLATION_DIRS= binary binary/sets binary/kernel installation
|
1999-04-27 07:08:02 +04:00
|
|
|
|
1997-06-01 01:21:13 +04:00
|
|
|
.if exists(etc.${MACHINE}/Makefile.inc)
|
|
|
|
.include "etc.${MACHINE}/Makefile.inc"
|
|
|
|
.endif
|
1994-02-05 05:01:49 +03:00
|
|
|
|
1993-05-28 13:22:20 +04:00
|
|
|
# -rw-r--r--
|
|
|
|
BINOWN= root
|
|
|
|
BINGRP= wheel
|
2002-09-16 06:35:04 +04:00
|
|
|
UTMPGRP= utmp
|
2001-10-13 18:22:11 +04:00
|
|
|
BIN1+= bootptab changelist csh.cshrc csh.login csh.logout daily \
|
2002-07-06 22:19:31 +04:00
|
|
|
daily.conf dm.conf floppytab ftpchroot ftpusers \
|
2000-02-04 12:24:08 +03:00
|
|
|
gettytab group hosts hosts.lpd inetd.conf lkm.conf \
|
|
|
|
mailer.conf man.conf monthly monthly.conf mrouted.conf \
|
2000-06-03 02:54:08 +04:00
|
|
|
netconfig networks newsyslog.conf nsswitch.conf ntp.conf \
|
2002-04-15 07:01:31 +04:00
|
|
|
passwd.conf phones printcap profile protocols rbootd.conf rc rc.conf \
|
2000-08-22 03:03:10 +04:00
|
|
|
rc.lkm rc.local rc.subr rc.shutdown remote rpc \
|
2000-04-09 03:02:53 +04:00
|
|
|
security security.conf services shells sysctl.conf syslog.conf \
|
|
|
|
weekly weekly.conf wscons.conf \
|
2002-12-19 23:03:46 +03:00
|
|
|
etc.${MACHINE}/ttys
|
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# Use machine-specific disktab if it exists, or the MI one otherwise
|
2002-12-19 23:03:46 +03:00
|
|
|
.if exists(etc.${MACHINE}/disktab)
|
|
|
|
BIN1+= etc.${MACHINE}/disktab
|
|
|
|
.else
|
|
|
|
BIN1+= disktab
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2002-12-17 18:54:59 +03:00
|
|
|
.if exists(etc.${MACHINE}/ld.so.conf)
|
|
|
|
BIN1+= etc.${MACHINE}/ld.so.conf
|
1999-03-05 10:21:44 +03:00
|
|
|
.endif
|
|
|
|
|
2002-12-17 18:54:59 +03:00
|
|
|
.if exists(etc.${MACHINE}/ttyaction)
|
|
|
|
BIN1+= etc.${MACHINE}/ttyaction
|
2000-06-04 03:53:17 +04:00
|
|
|
.endif
|
|
|
|
|
1994-06-16 22:59:14 +04:00
|
|
|
# -rw-rw-r--
|
1997-11-11 07:37:17 +03:00
|
|
|
BIN2+= motd
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-10-08 14:47:42 +04:00
|
|
|
# -rw-------
|
1997-11-11 07:37:17 +03:00
|
|
|
BIN3+= hosts.equiv
|
1997-10-08 14:47:42 +04:00
|
|
|
|
2002-10-23 23:50:30 +04:00
|
|
|
ETC_PKG=-T etc_pkg
|
|
|
|
BASE_PKG=-T base_pkg
|
2003-01-04 18:49:29 +03:00
|
|
|
ETC_INSTALL_FILE=cd ${.CURDIR} && ${INSTALL_FILE} ${ETC_PKG}
|
|
|
|
ETC_INSTALL_LINK=cd ${.CURDIR} && ${INSTALL_LINK} ${ETC_PKG}
|
|
|
|
ETC_INSTALL_SYMLINK=cd ${.CURDIR} && ${INSTALL_SYMLINK} ${ETC_PKG}
|
2002-10-23 23:50:30 +04:00
|
|
|
|
2000-05-01 09:29:34 +04:00
|
|
|
NAMEDB= 127 root.cache named.conf localhost loopback.v6
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2001-11-13 20:14:27 +03:00
|
|
|
.if ${TARGET_ENDIANNESS} == "1234"
|
2003-05-18 12:28:05 +04:00
|
|
|
PWD_MKDB_ENDIAN= -L
|
2001-11-13 20:14:27 +03:00
|
|
|
.elif ${TARGET_ENDIANNESS} == "4321"
|
2003-05-18 12:28:05 +04:00
|
|
|
PWD_MKDB_ENDIAN= -B
|
2000-11-09 23:01:54 +03:00
|
|
|
.else
|
2003-05-18 12:28:05 +04:00
|
|
|
PWD_MKDB_ENDIAN=
|
2000-11-09 23:01:54 +03:00
|
|
|
.endif
|
|
|
|
|
2000-05-06 11:52:19 +04:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# distribution --
|
|
|
|
# Build a distribution
|
|
|
|
#
|
2002-03-05 06:51:21 +03:00
|
|
|
distribution: check_DESTDIR .WAIT distrib-dirs
|
2001-10-10 10:58:56 +04:00
|
|
|
.if !defined(DISTRIBUTION_DONE)
|
1998-07-22 20:37:54 +04:00
|
|
|
.if !defined(INSTALL_DONE)
|
2002-12-02 16:18:03 +03:00
|
|
|
(cd ${NETBSDSRCDIR}; ${MAKE} _DISTRIB= includes)
|
|
|
|
(cd ${NETBSDSRCDIR}; ${MAKE} _DISTRIB= install)
|
2002-01-27 04:44:02 +03:00
|
|
|
.endif # !INSTALL_DONE
|
2003-01-06 17:47:28 +03:00
|
|
|
(cd ${.CURDIR}; ${MAKE} install-etc-files)
|
2002-01-27 04:44:02 +03:00
|
|
|
.endif # !DISTRIBUTION_DONE
|
2001-11-20 19:07:59 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# install-etc-files --
|
|
|
|
# Install etc (config) files; not performed by "make build"
|
|
|
|
#
|
2002-03-05 06:51:21 +03:00
|
|
|
install-etc-files: check_DESTDIR
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
${BIN1} ${DESTDIR}/etc
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 664 \
|
|
|
|
${BIN2} ${DESTDIR}/etc
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
|
|
|
${BIN3} ${DESTDIR}/etc
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
aliases ${DESTDIR}/etc/mail
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
/dev/null ${DESTDIR}/etc/mail/local-host-names
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
crontab ${DESTDIR}/var/cron/tabs/root
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
master.passwd ${DESTDIR}/etc
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_PWD_MKDB} -p ${PWD_MKDB_ENDIAN} -d ${DESTDIR}/ \
|
2002-10-23 23:50:30 +04:00
|
|
|
${DESTDIR}/etc/master.passwd
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUNPRIVED} != "no"
|
2002-06-11 19:50:05 +04:00
|
|
|
( \
|
2003-02-20 14:40:28 +03:00
|
|
|
for metaent in passwd pwd.db spwd.db; do \
|
|
|
|
echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
|
|
|
|
done; \
|
2002-12-23 09:52:48 +03:00
|
|
|
) | ${METALOG.add}
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # MKUNPRIVED != no
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
|
|
|
|
MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
minfree ${DESTDIR}/var/crash
|
2003-01-04 18:49:29 +03:00
|
|
|
.for file in cshrc login profile shrc
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 644 \
|
|
|
|
root/dot.${file} ${DESTDIR}/root/.${file}
|
|
|
|
.endfor
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
root/dot.klogin ${DESTDIR}/root/.klogin
|
|
|
|
rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile
|
|
|
|
${ETC_INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
|
|
|
|
${ETC_INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
|
|
|
|
(cd ${.CURDIR}/defaults; ${MAKE} install)
|
|
|
|
(cd ${.CURDIR}/mtree; ${MAKE} install)
|
|
|
|
.for file in ${NAMEDB}
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
namedb/${file} ${DESTDIR}/etc/namedb
|
|
|
|
.endfor
|
2003-04-18 09:41:47 +04:00
|
|
|
(cd ${.CURDIR}/powerd; ${MAKE} install)
|
2003-01-04 18:49:29 +03:00
|
|
|
(cd ${.CURDIR}/rc.d; ${MAKE} install)
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
|
|
postinstall ${DESTDIR}/etc
|
|
|
|
${ETC_INSTALL_SYMLINK} -o root -g wheel -m 755 \
|
|
|
|
${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
|
|
|
|
${ETC_INSTALL_SYMLINK} -o root -g wheel -m 755 \
|
|
|
|
/usr/sbin/rmt ${DESTDIR}/etc/rmt
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g operator -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/etc/dumpdates
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g operator -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/etc/skeykeys
|
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/at/at.deny
|
|
|
|
${ETC_INSTALL_FILE} -o nobody -g ${BINGRP} -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/db/locate.database
|
|
|
|
${ETC_INSTALL_FILE} -o uucp -g dialer -m 640 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/aculog
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/authlog
|
2003-04-02 18:38:26 +04:00
|
|
|
${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/cron
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/lastlog
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 640 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/lpd-errs
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/maillog
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/messages
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/secure
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/sendmail.st
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/wtmp
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/wtmpx
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/xferlog
|
|
|
|
${ETC_INSTALL_FILE} -o daemon -g staff -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/msgs/bounds
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${UTMPGRP} -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/run/utmp
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${UTMPGRP} -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/run/utmpx
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
2003-03-15 11:44:16 +03:00
|
|
|
/dev/null ${DESTDIR}/var/games/atc_score
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/battlestar.log
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/cfscores
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/criblog
|
2002-10-24 00:35:45 +04:00
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 660 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/hackdir/perm
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 660 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/hackdir/record
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/larn/llog12.0
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/larn/lscore12.0
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/larn/playerids
|
2002-10-23 23:50:30 +04:00
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/robots_roll
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/rogue.scores
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/saillog
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/snakerawscores
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/snake.log
|
|
|
|
${ETC_INSTALL_FILE} -o games -g games -m 664 \
|
|
|
|
/dev/null ${DESTDIR}/var/games/tetris.scores
|
2003-01-04 18:49:29 +03:00
|
|
|
(cd ${.CURDIR}/skel; ${MAKE} distribution)
|
2002-12-02 16:18:03 +03:00
|
|
|
(cd ${NETBSDSRCDIR}/usr.bin/mail; ${MAKE} distribution)
|
|
|
|
(cd ${NETBSDSRCDIR}/gnu/usr.sbin/postfix/; ${MAKE} distribution)
|
2000-07-25 23:07:39 +04:00
|
|
|
.if (${MKCRYPTO} != "no")
|
2002-12-02 16:18:03 +03:00
|
|
|
(cd ${NETBSDSRCDIR}/usr.bin/ssh; ${MAKE} distribution)
|
2000-07-25 23:07:39 +04:00
|
|
|
.endif
|
2003-01-09 19:57:45 +03:00
|
|
|
.if !defined(NO_SENDMAIL) || ${NO_SENDMAIL} == "no"
|
2002-12-02 16:18:03 +03:00
|
|
|
(cd ${NETBSDSRCDIR}/gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
|
1998-11-02 06:32:22 +03:00
|
|
|
.endif
|
2003-02-22 06:20:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
# install-obsolete-lists --
|
|
|
|
# Install var/db/obsolete set lists; this is performed by "make build"
|
|
|
|
#
|
|
|
|
OBSOLETE.dir= ${.OBJDIR}/obsolete.dir
|
|
|
|
OBSOLETE.files= base comp etc games man misc text
|
|
|
|
|
|
|
|
install-obsolete-lists:
|
2003-02-20 14:40:28 +03:00
|
|
|
mkdir -p ${OBSOLETE.dir}
|
2003-06-09 03:49:21 +04:00
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets && \
|
|
|
|
MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
|
2003-02-20 14:40:28 +03:00
|
|
|
.for file in ${OBSOLETE.files}
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2003-02-22 06:20:45 +03:00
|
|
|
${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete
|
2003-02-20 14:40:28 +03:00
|
|
|
.endfor
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# distrib-dirs --
|
|
|
|
# Populate $DESTDIR with directories needed by NetBSD
|
|
|
|
#
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUNPRIVED} == "no"
|
|
|
|
TOOL_MTREE.unpriv=
|
|
|
|
.else
|
|
|
|
TOOL_MTREE.unpriv= -W
|
|
|
|
.endif
|
|
|
|
|
2002-03-05 06:51:21 +03:00
|
|
|
distrib-dirs: check_DESTDIR
|
2002-10-23 23:50:30 +04:00
|
|
|
${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
|
2003-07-18 12:26:01 +04:00
|
|
|
-p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
|
2002-01-27 04:44:02 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# release, snapshot --
|
|
|
|
# Build a full distribution including kernels & install media.
|
|
|
|
#
|
2002-03-05 06:51:21 +03:00
|
|
|
release snapshot: check_DESTDIR check_RELEASEDIR .WAIT \
|
2002-12-02 16:18:03 +03:00
|
|
|
distribution .WAIT \
|
|
|
|
snap_pre .WAIT snap_kern .WAIT \
|
|
|
|
snap_post .WAIT snap_md_post
|
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets; ${MAKE} sets)
|
2003-01-03 18:34:30 +03:00
|
|
|
${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/kernel '*.gz'
|
1994-03-05 11:06:41 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# iso-image --
|
|
|
|
# Standalone target to create a CDROM image after the release
|
|
|
|
# was composed. Should be run after "make release" in src and xsrc.
|
|
|
|
#
|
2003-02-16 03:22:37 +03:00
|
|
|
# Note: At least mkisofs 2.0 should be used.
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
|
|
|
CDROM.image=${RELEASEDIR}/${MACHINE}/installation/cdrom/netbsd-${MACHINE}.iso
|
|
|
|
CDROM.dir= cdrom.dir
|
|
|
|
CDROM.pathlist= cdrom.pathlist
|
|
|
|
|
2003-03-08 03:22:29 +03:00
|
|
|
iso-image: check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post
|
|
|
|
${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/installation/cdrom '*.iso'
|
2000-09-12 01:53:30 +04:00
|
|
|
|
2003-03-08 03:22:29 +03:00
|
|
|
iso-image-setup: check_RELEASEDIR
|
2003-01-04 18:49:29 +03:00
|
|
|
rm -f ${CDROM.pathlist}
|
|
|
|
echo "${MACHINE}=${RELEASEDIR}/${MACHINE}" >> ${CDROM.pathlist}
|
|
|
|
mkdir -p ${CDROM.dir}
|
|
|
|
mkdir -p ${RELEASEDIR}/${MACHINE}/installation/cdrom
|
|
|
|
|
2003-03-08 03:22:29 +03:00
|
|
|
# iso-image-mi --
|
2003-01-04 18:49:29 +03:00
|
|
|
# Create the image after the MD operations have completed.
|
2003-03-08 03:22:29 +03:00
|
|
|
#
|
|
|
|
iso-image-mi: check_DESTDIR check_RELEASEDIR .WAIT \
|
|
|
|
iso-image-setup .WAIT iso-image-md-pre
|
2003-01-04 18:49:29 +03:00
|
|
|
@if ! ${MKISOFS} --version; then \
|
|
|
|
echo "install pkgsrc/sysutils/cdrecord and run 'make iso-image'." ; \
|
|
|
|
false; \
|
2000-09-12 01:53:30 +04:00
|
|
|
fi
|
2003-01-04 18:49:29 +03:00
|
|
|
${MKISOFS} ${MKISOFS_FLAGS} -graft-points -path-list ${CDROM.pathlist} \
|
|
|
|
-o ${CDROM.image} ${CDROM.dir}
|
2000-09-12 01:53:30 +04:00
|
|
|
|
2003-03-08 03:22:29 +03:00
|
|
|
# iso-image-md-pre --
|
2003-01-04 18:49:29 +03:00
|
|
|
# Setup ${CDROM.dir} to produce a bootable CD image.
|
|
|
|
# Overridden by etc.$MACHINE/Makefile.inc
|
|
|
|
#
|
2003-03-08 03:22:29 +03:00
|
|
|
iso-image-md-pre: check_DESTDIR check_RELEASEDIR
|
2003-01-04 18:49:29 +03:00
|
|
|
# (empty -- look in the machine-dependent Makefile.inc)
|
2000-09-12 01:53:30 +04:00
|
|
|
|
2003-03-08 03:22:29 +03:00
|
|
|
# iso-image-md-post --
|
2003-01-04 18:49:29 +03:00
|
|
|
# Fixup the CD-image to be bootable.
|
|
|
|
# Overridden by etc.$MACHINE/Makefile.inc
|
|
|
|
#
|
2003-03-08 03:22:29 +03:00
|
|
|
iso-image-md-post: check_DESTDIR check_RELEASEDIR .WAIT iso-image-mi
|
2003-01-04 18:49:29 +03:00
|
|
|
# (empty -- look in the machine-dependent Makefile.inc)
|
|
|
|
|
2000-09-12 01:53:30 +04:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# snap_pre --
|
|
|
|
# Create ${RELEASEDIR} and necessary subdirectories.
|
|
|
|
#
|
2002-03-05 06:51:21 +03:00
|
|
|
snap_pre: check_DESTDIR check_RELEASEDIR
|
2003-01-03 18:34:30 +03:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} == "no"
|
2000-10-29 08:16:53 +03:00
|
|
|
# Could be a mount point, ignore the errors
|
2003-01-03 18:34:30 +03:00
|
|
|
-/bin/rm -rf ${RELEASEDIR}/${MACHINE}
|
2003-01-03 17:27:54 +03:00
|
|
|
.endif
|
2003-01-03 18:34:30 +03:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE}
|
1999-04-27 07:08:02 +04:00
|
|
|
.for dir in ${INSTALLATION_DIRS}
|
2003-01-03 18:34:30 +03:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}/${MACHINE}/${dir}
|
1999-04-27 07:08:02 +04:00
|
|
|
.endfor
|
1999-02-05 06:01:49 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# snap_post --
|
|
|
|
# Build the install media and notes from distrib
|
|
|
|
#
|
2002-12-02 16:18:03 +03:00
|
|
|
snap_post: check_DESTDIR check_RELEASEDIR
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} == "no"
|
2002-12-02 16:18:03 +03:00
|
|
|
cd ${NETBSDSRCDIR}/distrib && ${MAKE} cleandir
|
|
|
|
.endif
|
|
|
|
cd ${NETBSDSRCDIR}/distrib && ${MAKE} depend && ${MAKE} && \
|
|
|
|
${MAKE} release
|
|
|
|
|
2002-11-18 10:09:46 +03:00
|
|
|
# snap_kern --
|
2003-01-04 18:49:29 +03:00
|
|
|
# This target builds the kernels specified by each port.
|
|
|
|
# A port may specify the following kernels:
|
2001-11-30 01:45:53 +03:00
|
|
|
#
|
|
|
|
# KERNEL_SETS The list of kernels that will be
|
|
|
|
# packaged into sets, named
|
|
|
|
# kern-${kernel}.tgz. These kernels
|
2002-03-01 09:22:09 +03:00
|
|
|
# are also placed in the binary/kernel
|
2001-11-30 01:45:53 +03:00
|
|
|
# area of the release package as
|
|
|
|
# netbsd-${kernel}.gz.
|
|
|
|
#
|
|
|
|
# EXTRA_KERNELS Additional kernels to place in the
|
2002-03-01 09:22:09 +03:00
|
|
|
# binary/kernel area of the release
|
2001-11-30 01:45:53 +03:00
|
|
|
# package as netbsd-${kernel}.gz, but
|
|
|
|
# which are not placed into sets. This
|
|
|
|
# allows a port to provide e.g. a netbootable
|
|
|
|
# installation kernel containing a ramdisk.
|
|
|
|
#
|
|
|
|
# BUILD_KERNELS Additional kernels to build which are
|
|
|
|
# not placed into sets nor into the
|
2002-03-01 09:22:09 +03:00
|
|
|
# binary/kernel area of the release
|
2001-11-30 01:45:53 +03:00
|
|
|
# package. These are typically kernels
|
|
|
|
# that are built for inclusion only in
|
|
|
|
# installation disk/CD-ROM/tape images.
|
1999-04-10 08:41:52 +04:00
|
|
|
#
|
2003-01-04 18:49:29 +03:00
|
|
|
# A port may also specify KERNEL_SUFFIXES, which is an optional list
|
|
|
|
# of filename suffixes for kernels to include in the kernel sets and
|
|
|
|
# in the binary/kernel area of the release package (e.g. "netbsd" vs.
|
|
|
|
# "netbsd.ecoff" and "netbsd.srec"). It is not an error if kernels
|
|
|
|
# with these suffixes do not exist in the kernel build directory.
|
2001-11-30 21:50:09 +03:00
|
|
|
#
|
2002-10-16 06:30:48 +04:00
|
|
|
#
|
|
|
|
# A list of all the kernels to build, which can be overridden from
|
|
|
|
# external sources (such as make(1)'s environment or command line)
|
|
|
|
#
|
|
|
|
ALL_KERNELS?= ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
|
2003-01-04 18:49:29 +03:00
|
|
|
|
1999-04-10 08:41:52 +04:00
|
|
|
GETKERNELAWK= awk '/^config/ {print $$2; found=1} \
|
|
|
|
END{ if (found == 0) print "netbsd"; }'
|
2003-01-04 18:49:29 +03:00
|
|
|
|
2002-11-18 10:09:46 +03:00
|
|
|
.if !target(snap_kern) # {
|
|
|
|
|
|
|
|
# build_kernels --
|
|
|
|
# Configure & compile kernels listed in ${ALL_KERNELS}
|
|
|
|
#
|
2002-01-27 09:49:22 +03:00
|
|
|
.if !defined(KERNELS_DONE) # {
|
2002-11-18 10:09:46 +03:00
|
|
|
.for configfile in ${ALL_KERNELS} # {
|
|
|
|
_KERNELS_TO_BUILD+=kern-${configfile}
|
|
|
|
kern-${configfile}:
|
2003-07-10 14:33:58 +04:00
|
|
|
cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \
|
2002-11-18 10:09:46 +03:00
|
|
|
-b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} == "no"
|
2002-01-27 04:44:02 +03:00
|
|
|
cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean
|
1999-02-05 06:01:49 +03:00
|
|
|
.endif
|
2002-05-03 02:13:30 +04:00
|
|
|
cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE}
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # ALL_KERNELS # }
|
|
|
|
.endif # KERNELS_DONE # }
|
|
|
|
|
|
|
|
build_kernels: ${_KERNELS_TO_BUILD}
|
|
|
|
|
|
|
|
# build_kernelsets --
|
2003-01-03 18:34:30 +03:00
|
|
|
# Create kernel sets from ${KERNEL_SETS} into
|
|
|
|
# ${RELEASEDIR}/${MACHINE}/binary/sets
|
2002-11-18 10:09:46 +03:00
|
|
|
#
|
|
|
|
.for configfile in ${KERNEL_SETS} # {
|
|
|
|
_KERNELSETS_TO_BUILD+=kernset-${configfile}
|
|
|
|
kernset-${configfile}:
|
2001-11-30 21:50:09 +03:00
|
|
|
kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
|
|
|
|
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
|
2002-04-01 21:32:19 +04:00
|
|
|
kernsuffixes="${KERNEL_SUFFIXES}"; \
|
2002-04-10 16:05:20 +04:00
|
|
|
cd $${kerndir} && ( \
|
2002-04-21 04:06:03 +04:00
|
|
|
echo "/set uname=${BINOWN} gname=${BINGRP}"; \
|
|
|
|
echo ". type=dir optional"; \
|
2002-04-10 16:05:20 +04:00
|
|
|
for kernel in $${kernlist}; do \
|
2002-04-21 04:06:03 +04:00
|
|
|
echo "./$${kernel} type=file"; \
|
2002-04-01 21:32:19 +04:00
|
|
|
for s in $${kernsuffixes}; do \
|
2001-11-30 21:50:09 +03:00
|
|
|
if [ -f $${kernel}.$${s} ]; then \
|
2002-04-21 04:06:03 +04:00
|
|
|
echo "./$${kernel}.$${s} type=file"; \
|
2001-11-30 21:50:09 +03:00
|
|
|
fi; \
|
|
|
|
done; \
|
2003-07-10 14:33:58 +04:00
|
|
|
done ) | GZIP=-9 ${TOOL_PAX} -O -zw \
|
2002-12-19 15:35:01 +03:00
|
|
|
-M -N ${NETBSDSRCDIR}/etc \
|
2003-01-03 18:34:30 +03:00
|
|
|
-f ${RELEASEDIR}/${MACHINE}/binary/sets/kern-${configfile}.tgz
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # KERNEL_SETS # }
|
|
|
|
|
|
|
|
build_kernelsets: ${_KERNELSETS_TO_BUILD}
|
|
|
|
|
|
|
|
# build_releasekernels --
|
|
|
|
# Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into
|
2003-01-03 18:34:30 +03:00
|
|
|
# ${RELEASEDIR}/${MACHINE}/binary/kernel
|
2002-11-18 10:09:46 +03:00
|
|
|
#
|
|
|
|
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # {
|
|
|
|
_RELEASEKERNELS_TO_BUILD+=releasekern-${configfile}
|
|
|
|
releasekern-${configfile}:
|
2001-11-30 21:50:09 +03:00
|
|
|
kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile:C/.*\///}`; \
|
|
|
|
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
|
2002-04-01 21:32:19 +04:00
|
|
|
kernsuffixes="${KERNEL_SUFFIXES}"; \
|
2001-11-30 21:50:09 +03:00
|
|
|
cd $${kerndir} && \
|
|
|
|
gziplist=`for kernel in $${kernlist}; do \
|
|
|
|
echo "$${kernel}"; \
|
2002-04-01 21:32:19 +04:00
|
|
|
for s in $${kernsuffixes}; do \
|
2001-11-30 21:50:09 +03:00
|
|
|
if [ -f $${kernel}.$${s} ]; then \
|
|
|
|
echo "$${kernel}.$${s}"; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
done`; \
|
|
|
|
for kernel in $${gziplist} ; do \
|
1999-04-04 13:57:11 +04:00
|
|
|
gzip -c -9 < $${kernel} > \
|
2003-01-03 18:34:30 +03:00
|
|
|
${RELEASEDIR}/${MACHINE}/binary/kernel/$${kernel}-${configfile:C/.*\///}.gz ; done
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # KERNEL_SETS EXTRA_KERNELS # }
|
|
|
|
|
|
|
|
build_releasekernels: ${_RELEASEKERNELS_TO_BUILD}
|
|
|
|
|
|
|
|
# snap_kern --
|
|
|
|
# build the kernels, then the sets & release kernels
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
2002-11-18 10:09:46 +03:00
|
|
|
snap_kern: check_DESTDIR check_RELEASEDIR .WAIT \
|
|
|
|
build_kernels .WAIT \
|
|
|
|
build_kernelsets build_releasekernels
|
|
|
|
|
|
|
|
.endif # !target(snap_kern) # }
|
|
|
|
|
1999-03-14 17:04:40 +03:00
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# snap_md_post --
|
|
|
|
# Machine dependent distribution media operations.
|
|
|
|
# Overridden by etc.$MACHINE/Makefile.inc
|
|
|
|
#
|
2002-03-05 06:51:21 +03:00
|
|
|
snap_md_post: check_DESTDIR check_RELEASEDIR
|
2003-01-04 18:49:29 +03:00
|
|
|
# (empty -- look in the machine-dependent Makefile.inc)
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2003-02-20 14:40:28 +03:00
|
|
|
-rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
|
1994-03-05 11:06:41 +03:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
.include <bsd.prog.mk>
|