2004-04-13 16:43:12 +04:00
|
|
|
# $NetBSD: Makefile,v 1.285 2004/04/13 12:43:12 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.
|
2004-01-06 05:10:43 +03:00
|
|
|
# MKCRYPTO; if not `no', install crypto-related configuration
|
|
|
|
# MKSENDMAIL; if not `no', install sendmail configuration
|
|
|
|
# MKUNPRIVED; if not `no', allow non-root installs.
|
2003-07-18 12:26:01 +04:00
|
|
|
# MKUPDATE; if not `no', don't do a 'make clean' before kernel compile
|
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
|
|
|
|
2004-01-06 05:10:43 +03:00
|
|
|
# For MK* vars
|
1998-11-02 06:32:22 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2003-10-26 10:25:33 +03:00
|
|
|
.include <bsd.sys.mk> # for HOST_SH
|
|
|
|
.include <bsd.kernobj.mk> # For KERNSRCDIR, KERNOBJDIR, ...
|
|
|
|
.include <bsd.endian.mk> # For TARGET_ENDIANNESS
|
2003-05-18 12:28:05 +04:00
|
|
|
|
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
|
2004-02-25 18:00:59 +03:00
|
|
|
CKSUM?= ${TOOL_CKSUM}
|
|
|
|
MAKESUMS= CKSUM=${CKSUM:Q} ${HOST_SH} ${NETBSDSRCDIR}/distrib/sets/makesums
|
2004-01-04 16:29:16 +03:00
|
|
|
DISTRIBVER!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
|
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
|
2003-10-26 10:25:33 +03:00
|
|
|
DISTRIBREV!= ${HOST_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 \
|
2004-02-06 18:36:52 +03:00
|
|
|
gettytab group hosts hosts.lpd inetd.conf lkm.conf locate.conf \
|
2000-02-04 12:24:08 +03:00
|
|
|
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}
|
2003-10-27 02:34:29 +03:00
|
|
|
ETC_INSTALL_OBJ_FILE=cd ${.OBJDIR} && ${INSTALL_FILE} ${ETC_PKG}
|
2003-01-04 18:49:29 +03:00
|
|
|
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
|
|
|
|
2004-01-11 07:21:18 +03:00
|
|
|
SSH= ssh_known_hosts
|
|
|
|
|
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
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
distribution: .PHONY 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)
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR} include _DISTRIB=
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR} install _DISTRIB=
|
2002-01-27 04:44:02 +03:00
|
|
|
.endif # !INSTALL_DONE
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . install-etc-files
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets makesetfiles
|
2002-01-27 04:44:02 +03:00
|
|
|
.endif # !DISTRIBUTION_DONE
|
2001-11-20 19:07:59 +03:00
|
|
|
|
2004-01-04 16:29:16 +03:00
|
|
|
|
2004-01-06 10:25:40 +03:00
|
|
|
CLEANFILES+= MAKEDEV
|
2004-01-27 04:52:06 +03:00
|
|
|
MAKEDEV: .EXEC
|
2003-12-15 12:46:51 +03:00
|
|
|
${_MKTARGET_CREATE}
|
2003-12-19 09:04:16 +03:00
|
|
|
MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
|
|
|
NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
|
|
|
|
awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
|
2003-10-25 00:12:04 +04:00
|
|
|
|
2004-01-04 16:29:16 +03:00
|
|
|
|
|
|
|
RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID \
|
|
|
|
DESTDIR EXTERNAL_TOOLCHAIN \
|
|
|
|
INSTALLWORLDDIR \
|
|
|
|
KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \
|
|
|
|
MACHINE MACHINE_ARCH MAKE MAKECONF MAKEFLAGS \
|
|
|
|
MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \
|
2004-01-08 05:37:16 +03:00
|
|
|
MKBFD MKCATPAGES \
|
|
|
|
MKCRYPTO MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKCVS \
|
|
|
|
MKDOC MKDYNAMICROOT MKGCC MKGCCCMDS MKGDB \
|
|
|
|
MKHESIOD MKHOSTOBJ MKHTML MKIEEEFP MKINFO \
|
|
|
|
MKKERBEROS4 MKKERBEROS MKLINKLIB MKLINT \
|
|
|
|
MKMAN MKMANZ MKNLS MKOBJ MKOBJDIRS \
|
|
|
|
MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
|
|
|
|
MKSENDMAIL MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
|
|
|
|
MKUNPRIVED MKUPDATE MKUUCP MKX11 MKYP \
|
2004-01-27 07:19:06 +03:00
|
|
|
NBUILDJOBS NETBSDSRCDIR \
|
2004-01-04 16:29:16 +03:00
|
|
|
NOCLEANDIR NODISTRIBDIRS NOINCLUDES \
|
2004-01-27 07:19:06 +03:00
|
|
|
OBJMACHINE \
|
|
|
|
RELEASEDIR TOOLCHAIN_MISSING TOOLDIR \
|
|
|
|
USETOOLS USR_OBJMACHINE \
|
|
|
|
X11SRCDIR
|
|
|
|
|
|
|
|
params: .PHONY
|
|
|
|
.for var in ${RELEASEVARS}
|
|
|
|
.if defined(${var})
|
|
|
|
@printf "%20s = '%-s'\n" ${var} ${${var}:Q}
|
|
|
|
.else
|
|
|
|
@printf "%20s = (undefined)\n" ${var}
|
|
|
|
.endif
|
|
|
|
.endfor
|
2004-01-04 16:29:16 +03:00
|
|
|
|
2004-01-06 10:25:40 +03:00
|
|
|
CLEANFILES+= etc-release
|
2004-01-27 04:52:06 +03:00
|
|
|
etc-release: .EXEC
|
2004-01-04 16:29:16 +03:00
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
@( echo "NetBSD ${DISTRIBVER}/${MACHINE}"; \
|
|
|
|
echo ; \
|
2004-01-05 07:05:06 +03:00
|
|
|
cat ${NETBSDSRCDIR}/sys/conf/copyright; \
|
2004-01-04 16:29:16 +03:00
|
|
|
echo ; \
|
|
|
|
echo "Build settings:"; \
|
2004-02-07 10:59:17 +03:00
|
|
|
printf "%20s %s\n" "Build date" "$$(date -u)"; \
|
|
|
|
printf "%20s %s\n" "Built by" "$${USER-root}@$$(hostname)"; \
|
|
|
|
echo ; \
|
2004-02-14 02:48:10 +03:00
|
|
|
(cd ${.CURDIR}; ${MAKE} ${MFLAGS} -j1 params); \
|
2004-01-27 07:19:06 +03:00
|
|
|
) >${.OBJDIR}/${.TARGET}
|
2004-01-04 16:29:16 +03:00
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
install-etc-release: .PHONY etc-release
|
2004-01-06 10:25:40 +03:00
|
|
|
${_MKMSG_INSTALL} etc/release
|
2004-01-04 16:29:16 +03:00
|
|
|
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2004-01-06 10:25:40 +03:00
|
|
|
etc-release ${DESTDIR}/etc/release
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# install-etc-files --
|
|
|
|
# Install etc (config) files; not performed by "make build"
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
install-etc-files: .PHONY check_DESTDIR MAKEDEV
|
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
|
2003-10-25 07:55:26 +04:00
|
|
|
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
|
2003-10-25 00:12:04 +04:00
|
|
|
MAKEDEV ${DESTDIR}/dev
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
|
|
|
|
MAKEDEV.local ${DESTDIR}/dev
|
2002-10-23 23:50:30 +04:00
|
|
|
${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
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} defaults install
|
|
|
|
${MAKEDIRTARGET} mtree install
|
2003-01-04 18:49:29 +03:00
|
|
|
.for file in ${NAMEDB}
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
namedb/${file} ${DESTDIR}/etc/namedb
|
2004-01-11 07:21:18 +03:00
|
|
|
.endfor
|
|
|
|
.for file in ${SSH}
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
ssh/${file} ${DESTDIR}/etc/ssh
|
2003-01-04 18:49:29 +03:00
|
|
|
.endfor
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} powerd install
|
|
|
|
${MAKEDIRTARGET} rc.d 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
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} skel distribution
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/mail distribution
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/gnu/usr.sbin/postfix distribution
|
2000-07-25 23:07:39 +04:00
|
|
|
.if (${MKCRYPTO} != "no")
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/ssh distribution
|
2000-07-25 23:07:39 +04:00
|
|
|
.endif
|
2004-01-06 05:10:43 +03:00
|
|
|
.if (${MKSENDMAIL} != "no")
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/gnu/usr.sbin/sendmail/cf/cf 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
|
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
install-obsolete-lists: .PHONY
|
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
|
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
distrib-dirs: .PHONY check_DESTDIR
|
2003-08-22 23:03:03 +04:00
|
|
|
.if !defined(DISTRIBUTION_DONE)
|
2002-10-23 23:50:30 +04:00
|
|
|
${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR}
|
2003-08-22 23:03:03 +04:00
|
|
|
.endif
|
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.
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
release snapshot: .PHONY 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
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets 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
|
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
iso-image: .PHONY check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post
|
2003-03-08 03:22:29 +03:00
|
|
|
${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/installation/cdrom '*.iso'
|
2004-01-01 15:28:22 +03:00
|
|
|
@echo "iso-image created as: ${CDROM.image}"
|
2000-09-12 01:53:30 +04:00
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
iso-image-setup: .PHONY 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
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
|
2003-03-08 03:22:29 +03:00
|
|
|
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
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
iso-image-md-pre: .PHONY 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
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
iso-image-md-post: .PHONY 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.
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
snap_pre: .PHONY 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
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
snap_post: .PHONY 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}
|
|
|
|
#
|
2004-03-08 08:46:44 +03:00
|
|
|
# The 'sync' is so that all writes during the build are pushed back
|
|
|
|
# to the disk. Not having it causes problems on some host systems
|
|
|
|
# (e.g. Linux) when building on NFS.
|
|
|
|
#
|
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}
|
2004-01-27 04:52:06 +03:00
|
|
|
kern-${configfile}: .PHONY
|
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}
|
2004-03-08 08:46:44 +03:00
|
|
|
sync
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # ALL_KERNELS # }
|
|
|
|
.endif # KERNELS_DONE # }
|
|
|
|
|
2004-01-27 04:52:06 +03:00
|
|
|
build_kernels: .PHONY ${_KERNELS_TO_BUILD}
|
2002-11-18 10:09:46 +03:00
|
|
|
|
|
|
|
# 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}
|
2004-01-27 04:52:06 +03:00
|
|
|
kernset-${configfile}: .PHONY
|
2003-08-22 23:03:03 +04:00
|
|
|
@ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
|
2001-11-30 21:50:09 +03:00
|
|
|
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
|
2003-08-22 23:03:03 +04:00
|
|
|
kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
|
|
|
|
kern_tgz=${RELEASEDIR}/${MACHINE}/binary/sets/kern-${configfile}.tgz; \
|
|
|
|
pax_cmd="GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
|
|
|
|
cd $${kerndir} && { \
|
|
|
|
kernels=; newest=; \
|
2002-04-10 16:05:20 +04:00
|
|
|
for kernel in $${kernlist}; do \
|
2003-08-22 23:03:03 +04:00
|
|
|
for s in "" $${kernsuffixes}; do \
|
|
|
|
ks="$${kernel}$${s}"; \
|
|
|
|
[ -f $${ks} ] || continue; \
|
|
|
|
kernels="$${kernels} $${ks}"; \
|
|
|
|
[ -z "$${newest}" -o $${ks} -nt "$${newest}" ] && \
|
|
|
|
newest=$${ks}; \
|
2001-11-30 21:50:09 +03:00
|
|
|
done; \
|
2003-08-22 23:03:03 +04:00
|
|
|
done; \
|
|
|
|
[ $${kern_tgz} -nt "$${newest}" ] || { \
|
|
|
|
echo "echo $${kernels} | $${pax_cmd}"; \
|
|
|
|
( echo "/set uname=${BINOWN} gname=${BINGRP}"; \
|
|
|
|
echo ". type=dir optional"; \
|
|
|
|
for kernel in $${kernels}; do \
|
|
|
|
echo "./$${kernel} type=file"; \
|
|
|
|
done ) | eval $${pax_cmd}; \
|
|
|
|
} \
|
|
|
|
}
|
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}
|
2004-01-27 04:52:06 +03:00
|
|
|
releasekern-${configfile}: .PHONY
|
2003-08-22 23:03:03 +04:00
|
|
|
@ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile:C/.*\///}`; \
|
2001-11-30 21:50:09 +03:00
|
|
|
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
|
2003-08-22 23:03:03 +04:00
|
|
|
kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
|
|
|
|
cd $${kerndir} && { \
|
|
|
|
for kernel in $${kernlist}; do \
|
|
|
|
for s in "" $${kernsuffixes}; do \
|
|
|
|
ks="$${kernel}$${s}"; \
|
|
|
|
[ ! -f $${ks} ] && continue; \
|
|
|
|
knl_gz="${RELEASEDIR}/${MACHINE}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \
|
|
|
|
[ $${knl_gz} -nt $${ks} ] && continue; \
|
|
|
|
echo "gzip -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \
|
|
|
|
gzip -c -9 < $${ks} > $${knl_gz}; \
|
2001-11-30 21:50:09 +03:00
|
|
|
done; \
|
2003-08-22 23:03:03 +04:00
|
|
|
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>
|