2013-02-24 07:06:13 +04:00
|
|
|
# $NetBSD: Makefile,v 1.406 2013/02/24 03:06:13 jmmv 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
|
2005-02-23 05:10:33 +03:00
|
|
|
# MKPOSTFIX; if not `no', install postfix configuration
|
2004-01-06 05:10:43 +03:00
|
|
|
# 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
|
2004-05-12 20:56:41 +04:00
|
|
|
# into a release(7) format in RELEASEDIR/${RELEASEMACHINEDIR}.
|
2003-01-03 18:34:30 +03:00
|
|
|
# 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>
|
|
|
|
|
2008-10-20 02:05:19 +04:00
|
|
|
.include <bsd.sys.mk> # for HOST_SH, TOOL_AWK, ...
|
2003-10-26 10:25:33 +03:00
|
|
|
.include <bsd.kernobj.mk> # For KERNSRCDIR, KERNOBJDIR, ...
|
|
|
|
.include <bsd.endian.mk> # For TARGET_ENDIANNESS
|
2003-05-18 12:28:05 +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}
|
2006-06-27 16:34:54 +04:00
|
|
|
MAKESUMS= MAKE=${MAKE:Q} 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
|
2006-01-29 17:03:59 +03:00
|
|
|
# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrtools
|
2003-01-04 18:49:29 +03:00
|
|
|
# Note: At least mkisofs 2.0 should be used.
|
|
|
|
#
|
2007-03-07 00:59:40 +03:00
|
|
|
.if !defined(MKISOFS)
|
|
|
|
MKISOFS!= (which mkisofs || echo true)
|
|
|
|
.endif
|
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_].
|
2005-03-08 10:39:30 +03:00
|
|
|
ISO_VOLID!= echo NETBSD_${DISTRIBREV} | tr a-z A-Z
|
|
|
|
MKISOFS_FLAGS+= -J -l -hide-joliet-trans-tbl -r -T \
|
2002-07-28 05:21:07 +04:00
|
|
|
-V ${ISO_VOLID} \
|
2006-07-03 09:37:00 +04:00
|
|
|
-publisher "The NetBSD Project" \
|
2004-05-12 20:56:41 +04:00
|
|
|
-m "${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom"
|
2005-03-08 10:39:30 +03:00
|
|
|
.if ${MKISOFS_FLAGS:N-v}
|
|
|
|
MKISOFS_FLAGS+= -quiet
|
|
|
|
.endif
|
|
|
|
|
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
|
2005-10-22 09:46:06 +04:00
|
|
|
# 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=
|
|
|
|
|
2004-05-12 20:56:41 +04:00
|
|
|
# Directories to build in ${RELEASEDIR}/${RELEASEMACHINEDIR}.
|
2003-01-03 18:34:30 +03:00
|
|
|
# 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
|
|
|
|
2004-05-12 20:56:41 +04:00
|
|
|
.if exists(etc.${RELEASEMACHINE}/Makefile.inc)
|
|
|
|
.include "etc.${RELEASEMACHINE}/Makefile.inc"
|
1997-06-01 01:21:13 +04:00
|
|
|
.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
|
2009-02-26 22:43:39 +03:00
|
|
|
BIN1+= bootptab changelist csh.cshrc csh.login \
|
2007-07-14 23:53:52 +04:00
|
|
|
csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \
|
2009-07-25 20:20:10 +04:00
|
|
|
ftpusers gettytab gpio.conf group hosts hosts.lpd inetd.conf \
|
2007-07-14 23:53:52 +04:00
|
|
|
locate.conf login.conf mailer.conf man.conf monthly monthly.conf \
|
|
|
|
mrouted.conf named.conf netconfig networks newsyslog.conf \
|
|
|
|
nsswitch.conf ntp.conf passwd.conf phones printcap profile protocols \
|
2008-11-12 15:35:50 +03:00
|
|
|
rbootd.conf rc rc.conf rc.local rc.subr rc.shutdown remote rpc \
|
2006-09-14 17:01:31 +04:00
|
|
|
security security.conf services shells shrc sysctl.conf syslog.conf \
|
2004-06-28 18:03:02 +04:00
|
|
|
weekly weekly.conf wscons.conf
|
|
|
|
|
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
|
2012-11-04 15:09:14 +04:00
|
|
|
FILESBUILD_motd= YES
|
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
|
|
|
|
2004-06-28 18:03:02 +04:00
|
|
|
SYSPKG= etc
|
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}
|
2002-10-23 23:50:30 +04: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
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
distribution: .PHONY .MAKE check_DESTDIR 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
|
2008-11-10 02:02:28 +03:00
|
|
|
. if ${MKX11} != "no"
|
|
|
|
. if ${X11FLAVOUR} == "Xorg"
|
2008-08-28 11:21:49 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/mit/xorg distribution
|
2008-11-10 02:02:28 +03:00
|
|
|
. else
|
2004-05-17 11:00:16 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/x11 distribution
|
2008-11-10 02:02:28 +03:00
|
|
|
. endif
|
2009-11-30 19:13:22 +03:00
|
|
|
. endif
|
|
|
|
. if ${MKEXTSRC} != "no"
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/extsrc distribution
|
2008-11-10 02:02:28 +03:00
|
|
|
. endif
|
2004-04-13 16:43:12 +04:00
|
|
|
${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
|
|
|
|
2012-11-04 15:09:14 +04:00
|
|
|
# motd is copied from a different ${MOTD_SOURCE} depending on DISTRIBVER
|
|
|
|
#
|
|
|
|
.if !empty(DISTRIBVER:M*.99.*)
|
|
|
|
MOTD_SOURCE= motd.current
|
|
|
|
.elif !empty(DISTRIBVER:M*BETA*)
|
|
|
|
MOTD_SOURCE= motd.beta
|
|
|
|
.elif !empty(DISTRIBVER:M*RC*)
|
|
|
|
MOTD_SOURCE= motd.rc
|
|
|
|
.elif !empty(DISTRIBVER:M*STABLE*)
|
|
|
|
MOTD_SOURCE= motd.stable
|
|
|
|
.else
|
|
|
|
MOTD_SOURCE= motd.default
|
|
|
|
.endif
|
|
|
|
CLEANFILES+= motd
|
|
|
|
motd: ${.CURDIR}/${MOTD_SOURCE} ${_NETBSD_VERSION_DEPENDS}
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
${HOST_INSTALL_FILE} ${.CURDIR}/${MOTD_SOURCE} ${.TARGET}
|
|
|
|
|
2007-03-03 09:36:00 +03:00
|
|
|
CLEANFILES+= MAKEDEV
|
2011-02-16 19:20:06 +03:00
|
|
|
MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
|
|
|
|
${.CURDIR}/etc.${MACHINE}/MAKEDEV.conf
|
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} \
|
2008-10-20 02:05:19 +04:00
|
|
|
${TOOL_AWK} -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
|
|
|
|
> ${.TARGET}
|
2003-10-25 00:12:04 +04:00
|
|
|
|
2012-12-03 17:53:28 +04:00
|
|
|
.include "${NETBSDSRCDIR}/etc/Makefile.params"
|
2004-01-06 10:25:40 +03:00
|
|
|
CLEANFILES+= etc-release
|
2006-02-11 23:56:29 +03:00
|
|
|
etc-release: .EXEC .MAKE
|
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 ; \
|
2012-12-03 17:53:28 +04:00
|
|
|
${PRINT_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
|
|
|
|
2004-06-28 18:03:02 +04:00
|
|
|
|
|
|
|
FILESDIR= /etc
|
|
|
|
CONFIGFILES=
|
|
|
|
CONFIGSYMLINKS=
|
|
|
|
|
|
|
|
.for file in ${BIN1}
|
|
|
|
CONFIGFILES+= ${file}
|
|
|
|
FILESMODE_${file:T}= 644
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${BIN2}
|
|
|
|
CONFIGFILES+= ${file}
|
|
|
|
FILESMODE_${file:T}= 664
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${BIN3}
|
|
|
|
CONFIGFILES+= ${file}
|
|
|
|
FILESMODE_${file:T}= 600
|
|
|
|
.endfor
|
|
|
|
|
2006-06-08 15:05:31 +04:00
|
|
|
.if (${MKPOSTFIX} != "no")
|
2004-06-28 18:03:02 +04:00
|
|
|
CONFIGFILES+= aliases
|
|
|
|
FILESDIR_aliases= /etc/mail
|
|
|
|
FILESMODE_aliases= 644
|
2006-06-08 15:05:31 +04:00
|
|
|
.endif
|
2004-06-28 18:03:02 +04:00
|
|
|
|
|
|
|
CONFIGFILES+= MAKEDEV.local
|
|
|
|
FILESDIR_MAKEDEV.local= /dev
|
|
|
|
FILESMODE_MAKEDEV.local=${BINMODE}
|
|
|
|
|
|
|
|
CONFIGFILES+= crontab
|
|
|
|
FILESDIR_crontab= /var/cron/tabs
|
|
|
|
FILESNAME_crontab= root
|
|
|
|
FILESMODE_crontab= 600
|
|
|
|
|
|
|
|
CONFIGFILES+= minfree
|
|
|
|
FILESDIR_minfree= /var/crash
|
|
|
|
FILESMODE_minfree= 600
|
|
|
|
|
|
|
|
CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \
|
|
|
|
/usr/sbin/rmt /etc/rmt
|
|
|
|
|
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# install-etc-files --
|
|
|
|
# Install etc (config) files; not performed by "make build"
|
|
|
|
#
|
2007-03-03 09:36:00 +03:00
|
|
|
install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV
|
2004-06-28 18:03:02 +04:00
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}/etc/master.passwd
|
2002-10-23 23:50:30 +04:00
|
|
|
${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
|
|
|
( \
|
2013-01-30 00:21:02 +04:00
|
|
|
mode=0600; \
|
|
|
|
for metaent in spwd.db passwd pwd.db; do \
|
|
|
|
echo "./etc/$${metaent} type=file mode=$${mode} uname=root gname=wheel tags=etc_pkg"; \
|
|
|
|
mode=0644; \
|
2003-02-20 14:40:28 +03:00
|
|
|
done; \
|
2002-12-23 09:52:48 +03:00
|
|
|
) | ${METALOG.add}
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # MKUNPRIVED != no
|
2004-06-28 18:03:02 +04:00
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}/etc/ttys
|
2004-06-21 01:30:26 +04:00
|
|
|
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2004-11-16 06:51:30 +03:00
|
|
|
${.CURDIR}/etc.${MACHINE}/ttys ${DESTDIR}/etc
|
2008-04-30 20:48:53 +04:00
|
|
|
.if exists(etc.${MACHINE}/boot.cfg)
|
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}/boot.cfg
|
|
|
|
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
${.CURDIR}/etc.${MACHINE}/boot.cfg ${DESTDIR}/
|
|
|
|
.endif
|
2004-06-28 18:03:02 +04:00
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}/dev/MAKEDEV
|
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
|
2004-06-28 18:03:02 +04:00
|
|
|
.for owner group mode file in \
|
|
|
|
${BINOWN} operator 664 /etc/dumpdates \
|
|
|
|
${BINOWN} operator 600 /etc/skeykeys \
|
|
|
|
root wheel 600 /var/at/at.deny \
|
2010-01-12 07:44:06 +03:00
|
|
|
root wheel 644 /var/db/locate.database \
|
2004-06-28 18:03:02 +04:00
|
|
|
${BINOWN} ${BINGRP} 600 /var/log/authlog \
|
|
|
|
root wheel 600 /var/log/cron \
|
2005-05-22 18:34:20 +04:00
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/log/lastlog \
|
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/log/lastlogx \
|
2004-06-28 18:03:02 +04:00
|
|
|
${BINOWN} ${BINGRP} 640 /var/log/lpd-errs \
|
|
|
|
${BINOWN} ${BINGRP} 600 /var/log/maillog \
|
|
|
|
${BINOWN} ${BINGRP} 644 /var/log/messages \
|
|
|
|
${BINOWN} ${BINGRP} 600 /var/log/secure \
|
2005-05-22 18:34:20 +04:00
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/log/wtmp \
|
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/log/wtmpx \
|
2004-06-28 18:03:02 +04:00
|
|
|
${BINOWN} ${BINGRP} 600 /var/log/xferlog \
|
|
|
|
daemon staff 664 /var/msgs/bounds \
|
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/run/utmp \
|
|
|
|
${BINOWN} ${UTMPGRP} 664 /var/run/utmpx \
|
|
|
|
games games 664 /var/games/atc_score \
|
|
|
|
games games 664 /var/games/battlestar.log \
|
|
|
|
games games 664 /var/games/cfscores \
|
|
|
|
games games 664 /var/games/criblog \
|
|
|
|
games games 660 /var/games/hackdir/perm \
|
|
|
|
games games 660 /var/games/hackdir/record \
|
|
|
|
games games 664 /var/games/larn/llog12.0 \
|
|
|
|
games games 664 /var/games/larn/lscore12.0 \
|
|
|
|
games games 664 /var/games/larn/playerids \
|
|
|
|
games games 664 /var/games/robots_roll \
|
|
|
|
games games 664 /var/games/rogue.scores \
|
|
|
|
games games 664 /var/games/saillog \
|
|
|
|
games games 664 /var/games/snakerawscores \
|
|
|
|
games games 664 /var/games/snake.log \
|
|
|
|
games games 664 /var/games/tetris.scores
|
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}${file}
|
2011-02-16 18:52:51 +03:00
|
|
|
if [ ! -e ${DESTDIR}${file} -o -s ${DESTDIR}${file} ]; then \
|
|
|
|
${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
|
|
|
|
/dev/null ${DESTDIR}${file}; \
|
|
|
|
else true; fi
|
2004-06-28 18:03:02 +04:00
|
|
|
.endfor
|
2009-01-19 10:08:14 +03:00
|
|
|
.for subdir in . defaults bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh
|
2004-06-28 18:03:02 +04:00
|
|
|
${MAKEDIRTARGET} ${subdir} configinstall
|
|
|
|
.endfor
|
2008-07-27 23:31:02 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/bsd/dhcpcd/sbin/dhcpcd configinstall
|
2004-05-16 13:53:09 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/mail configinstall
|
2005-02-22 17:39:58 +03:00
|
|
|
.if (${MKPF} != "no")
|
2004-11-14 23:28:28 +03:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.sbin/pf configinstall
|
2005-02-22 17:39:58 +03:00
|
|
|
.endif
|
2000-07-25 23:07:39 +04:00
|
|
|
.if (${MKCRYPTO} != "no")
|
2009-07-21 04:48:29 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/crypto/external/bsd/openssh/bin configinstall
|
2000-07-25 23:07:39 +04:00
|
|
|
.endif
|
2005-02-23 05:10:33 +03:00
|
|
|
.if (${MKPOSTFIX} != "no")
|
2009-06-23 21:58:22 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/ibm-public/postfix configinstall
|
2005-02-23 05:10:33 +03:00
|
|
|
.endif
|
2009-01-19 10:08:14 +03:00
|
|
|
.if (${MKATF} != "no")
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/bsd/atf/etc/atf configinstall
|
|
|
|
.endif
|
2013-02-24 07:06:13 +04:00
|
|
|
.if (${MKKYUA} != "no")
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/bsd/kyua-cli/etc/kyua configinstall
|
|
|
|
.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
|
2013-02-05 20:39:26 +04:00
|
|
|
OBSOLETE.files= base comp etc games man misc text
|
|
|
|
.if ${MKDEBUG} != "no"
|
|
|
|
OBSOLETE.files+= debug
|
|
|
|
.endif
|
2009-12-11 18:22:33 +03:00
|
|
|
.if ${MKKMOD} != "no"
|
|
|
|
OBSOLETE.files+= modules
|
|
|
|
.endif
|
2010-12-09 02:56:01 +03:00
|
|
|
.if ${MKATF} != "no"
|
|
|
|
OBSOLETE.files+= tests
|
|
|
|
.endif
|
2008-11-10 02:02:28 +03:00
|
|
|
.if ${MKX11} != "no"
|
2005-03-28 07:13:39 +04:00
|
|
|
OBSOLETE.files+= xbase xcomp xetc xfont xserver
|
2005-03-22 02:09:39 +03:00
|
|
|
.endif
|
2003-02-22 06:20:45 +03:00
|
|
|
|
2011-02-16 19:22:13 +03:00
|
|
|
# XXX make "makeobsolete" set wise; then generate files respectively
|
2006-02-11 23:56:29 +03:00
|
|
|
install-obsolete-lists: .PHONY .MAKE
|
2003-02-20 14:40:28 +03:00
|
|
|
mkdir -p ${OBSOLETE.dir}
|
2008-11-10 02:02:28 +03:00
|
|
|
.if ${MKX11} != "no"
|
2005-03-22 02:09:39 +03:00
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets && \
|
2009-02-25 23:38:30 +03:00
|
|
|
AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -b -t ${OBSOLETE.dir})
|
2005-03-22 02:09:39 +03:00
|
|
|
.else
|
2003-06-09 03:49:21 +04:00
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets && \
|
2009-02-25 23:38:30 +03:00
|
|
|
AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
|
2005-03-22 02:09:39 +03:00
|
|
|
.endif
|
2003-02-20 14:40:28 +03:00
|
|
|
.for file in ${OBSOLETE.files}
|
2004-06-28 18:03:02 +04:00
|
|
|
${_MKMSG_INSTALL} ${DESTDIR}/var/db/obsolete/${file}
|
2011-02-16 19:22:13 +03:00
|
|
|
if [ ! -e ${DESTDIR}/var/db/obsolete/${file} ] || \
|
|
|
|
! cmp -s ${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete/${file}; then \
|
|
|
|
${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete; \
|
|
|
|
else true; fi
|
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
|
|
|
|
#
|
2004-01-27 04:52:06 +03:00
|
|
|
distrib-dirs: .PHONY check_DESTDIR
|
2009-09-07 23:34:29 +04:00
|
|
|
cd ${NETBSDSRCDIR}/etc/mtree && ${MAKE} distrib-dirs
|
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
|
|
|
|
# release, snapshot --
|
|
|
|
# Build a full distribution including kernels & install media.
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
release snapshot: .PHONY .MAKE check_DESTDIR check_RELEASEDIR snap_md_post
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets sets
|
2005-10-07 21:22:12 +04:00
|
|
|
${MAKESUMS} -A -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets \
|
|
|
|
${KERNEL_SETS:@.SETS.@kern-${.SETS.}.tgz@}
|
2004-05-12 20:56:41 +04:00
|
|
|
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/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.
|
2007-03-07 00:59:40 +03:00
|
|
|
# The do-iso-image is to be called from etc.$MACHINE/Makefile.inc
|
2003-01-04 18:49:29 +03:00
|
|
|
#
|
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
|
|
|
#
|
2004-07-28 15:35:44 +04:00
|
|
|
CDROM_NAME_ADD?=
|
2012-01-15 21:36:55 +04:00
|
|
|
CDROM_IMAGE?=${RELEASEDIR}/iso/NetBSD-${DISTRIBVER}-${MACHINE}.iso
|
2006-01-29 00:37:11 +03:00
|
|
|
CDROM.dir= ${.OBJDIR}/cdrom.dir
|
|
|
|
CDROM.pathlist= ${.OBJDIR}/cdrom.pathlist
|
2003-01-04 18:49:29 +03:00
|
|
|
|
2007-03-07 00:59:40 +03:00
|
|
|
iso-image:
|
|
|
|
|
|
|
|
.if ${MKISOFS} != true
|
|
|
|
do-iso-image: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-post
|
2007-04-12 00:46:09 +04:00
|
|
|
${MAKESUMS} -t ${RELEASEDIR}/iso/ '*.iso'
|
2012-01-15 21:36:55 +04:00
|
|
|
@echo "iso-image created as: ${CDROM_IMAGE}"
|
2007-03-07 00:59:40 +03:00
|
|
|
.else
|
|
|
|
do-iso-image:
|
|
|
|
@echo iso-image: mkisofs not found
|
|
|
|
.endif
|
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}
|
2005-01-15 21:18:18 +03:00
|
|
|
.for extra in README SOURCE_DATE source
|
|
|
|
.if exists(${RELEASEDIR}/${extra})
|
|
|
|
echo "${extra}=${RELEASEDIR}/${extra}" >> ${CDROM.pathlist}
|
|
|
|
.endif
|
|
|
|
.endfor
|
2007-03-17 00:12:17 +03:00
|
|
|
echo "${MACHINE}/=${RELEASEDIR}/${RELEASEMACHINEDIR}/" >> ${CDROM.pathlist}
|
2003-01-04 18:49:29 +03:00
|
|
|
mkdir -p ${CDROM.dir}
|
2004-05-12 20:56:41 +04:00
|
|
|
mkdir -p ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom
|
2003-01-04 18:49:29 +03:00
|
|
|
|
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
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-pre
|
2003-01-04 18:49:29 +03:00
|
|
|
@if ! ${MKISOFS} --version; then \
|
2006-01-29 17:03:59 +03:00
|
|
|
echo "install pkgsrc/sysutils/cdrtools and run 'make iso-image'." ; \
|
2003-01-04 18:49:29 +03:00
|
|
|
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} \
|
2012-01-15 21:36:55 +04:00
|
|
|
-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
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
iso-image-md-pre: .PHONY check_DESTDIR check_RELEASEDIR iso-image-setup
|
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
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
iso-image-md-post: .PHONY check_DESTDIR check_RELEASEDIR 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
|
|
|
|
2012-01-22 07:53:29 +04:00
|
|
|
# live-image --
|
|
|
|
# Standalone target to create live images after the release was composed.
|
|
|
|
# Should be run after "make release" in src and xsrc.
|
|
|
|
# LIVEIMG_RELEASEDIR specifies where to install live images and
|
|
|
|
# it can be set in MD etc.${MACHINE}/Makefile.inc.
|
|
|
|
#
|
2012-08-17 20:59:26 +04:00
|
|
|
LIVEIMG_RELEASEDIR?= ${RELEASEDIR}/images
|
2012-01-22 07:53:29 +04:00
|
|
|
|
|
|
|
live-image: .PHONY check_DESTDIR check_RELEASEDIR
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib live_image \
|
|
|
|
LIVEIMG_RELEASEDIR=${LIVEIMG_RELEASEDIR}
|
|
|
|
${MAKESUMS} -t ${LIVEIMG_RELEASEDIR} '*.img.gz'
|
|
|
|
|
|
|
|
# install-image --
|
|
|
|
# Standalone target to create installation images
|
|
|
|
# after the release was composed.
|
|
|
|
# Should be run after "make release" in src and xsrc.
|
|
|
|
# INSTIMG_RELEASEDIR specifies where to install live images and
|
|
|
|
# it can be set in MD etc.${MACHINE}/Makefile.inc.
|
|
|
|
#
|
2012-08-17 20:59:26 +04:00
|
|
|
INSTIMG_RELEASEDIR?= ${RELEASEDIR}/images
|
2012-01-22 07:53:29 +04:00
|
|
|
|
|
|
|
install-image: .PHONY check_DESTDIR check_RELEASEDIR
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib install_image \
|
|
|
|
INSTIMG_RELEASEDIR=${INSTIMG_RELEASEDIR}
|
|
|
|
${MAKESUMS} -t ${INSTIMG_RELEASEDIR} '*.img.gz'
|
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# snap_pre --
|
|
|
|
# Create ${RELEASEDIR} and necessary subdirectories.
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
snap_pre: .PHONY check_DESTDIR check_RELEASEDIR distribution
|
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
|
2004-05-12 20:56:41 +04:00
|
|
|
-/bin/rm -rf ${RELEASEDIR}/${RELEASEMACHINEDIR}
|
2003-01-03 17:27:54 +03:00
|
|
|
.endif
|
2004-05-12 20:56:41 +04:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}
|
1999-04-27 07:08:02 +04:00
|
|
|
.for dir in ${INSTALLATION_DIRS}
|
2004-05-12 20:56:41 +04:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}/${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
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
snap_post: .PHONY .MAKE build_kernelsets build_releasekernels
|
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
|
|
|
|
|
2006-02-18 01:09:33 +03:00
|
|
|
# build kernels --
|
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}
|
2013-01-15 00:05:42 +04:00
|
|
|
.export ALL_KERNELS
|
2003-01-04 18:49:29 +03:00
|
|
|
|
2008-10-20 02:05:19 +04:00
|
|
|
GETKERNELAWK= ${TOOL_AWK} '/^config/ {print $$2; found=1} \
|
1999-04-10 08:41:52 +04:00
|
|
|
END{ if (found == 0) print "netbsd"; }'
|
2003-01-04 18:49:29 +03:00
|
|
|
|
2006-02-18 01:09:33 +03:00
|
|
|
build_kernels: .PHONY
|
2002-11-18 10:09:46 +03:00
|
|
|
# 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} # {
|
2006-02-18 01:09:33 +03:00
|
|
|
build_kernels: kern-${configfile}
|
2006-02-11 23:56:29 +03:00
|
|
|
kern-${configfile}: .PHONY .MAKE
|
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 # }
|
|
|
|
|
2006-02-18 01:09:33 +03:00
|
|
|
build_kernelsets: .PHONY
|
2003-01-03 18:34:30 +03:00
|
|
|
# Create kernel sets from ${KERNEL_SETS} into
|
2004-05-12 20:56:41 +04:00
|
|
|
# ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
|
2002-11-18 10:09:46 +03:00
|
|
|
#
|
|
|
|
.for configfile in ${KERNEL_SETS} # {
|
2013-01-15 00:05:42 +04:00
|
|
|
.for configsel in ${ALL_KERNELS}
|
|
|
|
.if ${configfile} == ${configsel}
|
2006-02-18 01:09:33 +03:00
|
|
|
build_kernelsets: kernset-${configfile}
|
|
|
|
kernset-${configfile}: .PHONY build_kernels snap_pre
|
2010-12-27 06:38:52 +03: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/^/./}"; \
|
2004-05-12 20:56:41 +04:00
|
|
|
kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
|
2011-06-30 22:15:13 +04:00
|
|
|
pax_cmd="COMPRESS_PROGRAM=${TOOL_GZIP:Q} GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
|
2003-08-22 23:03:03 +04:00
|
|
|
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}; \
|
|
|
|
} \
|
|
|
|
}
|
2013-01-15 00:05:42 +04:00
|
|
|
.endif
|
|
|
|
.endfor
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # KERNEL_SETS # }
|
|
|
|
|
2006-02-18 01:09:33 +03:00
|
|
|
build_releasekernels: .PHONY
|
2002-11-18 10:09:46 +03:00
|
|
|
# Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into
|
2004-05-12 20:56:41 +04:00
|
|
|
# ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel
|
2002-11-18 10:09:46 +03:00
|
|
|
#
|
|
|
|
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # {
|
2013-01-15 00:05:42 +04:00
|
|
|
.for configsel in ${ALL_KERNELS}
|
|
|
|
.if ${configfile} == ${configsel}
|
2006-02-18 01:09:33 +03:00
|
|
|
build_releasekernels: releasekern-${configfile}
|
|
|
|
releasekern-${configfile}: .PHONY build_kernels snap_pre
|
2010-12-27 06:38:52 +03: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; \
|
2010-10-04 17:55:39 +04:00
|
|
|
knl_gz="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}$${s}.gz"; \
|
2003-08-22 23:03:03 +04:00
|
|
|
[ $${knl_gz} -nt $${ks} ] && continue; \
|
2008-05-08 01:30:26 +04:00
|
|
|
rm -f $${knl_gz}; \
|
2011-06-30 22:15:13 +04:00
|
|
|
echo "${TOOL_GZIP} -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \
|
|
|
|
${TOOL_GZIP} -c -9 < $${ks} > $${knl_gz}; \
|
2001-11-30 21:50:09 +03:00
|
|
|
done; \
|
2003-08-22 23:03:03 +04:00
|
|
|
done; \
|
|
|
|
}
|
2013-01-15 00:05:42 +04:00
|
|
|
.endif
|
|
|
|
.endfor
|
2002-11-18 10:09:46 +03:00
|
|
|
.endfor # KERNEL_SETS EXTRA_KERNELS # }
|
|
|
|
|
2003-01-04 18:49:29 +03:00
|
|
|
# snap_md_post --
|
|
|
|
# Machine dependent distribution media operations.
|
|
|
|
# Overridden by etc.$MACHINE/Makefile.inc
|
|
|
|
#
|
2006-02-18 01:09:33 +03:00
|
|
|
snap_md_post: .PHONY check_DESTDIR check_RELEASEDIR snap_post
|
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
|
|
|
|
2011-08-22 22:54:05 +04:00
|
|
|
SUBDIR= defaults rc.d mtree
|
2008-12-05 21:52:59 +03:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
.include <bsd.prog.mk>
|
2008-12-05 21:52:59 +03:00
|
|
|
.include <bsd.subdir.mk>
|
2005-03-24 23:23:55 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
@echo ${OBSOLETE.files}
|