2007-11-21 19:23:29 +03:00
|
|
|
# $NetBSD: Makefile,v 1.348 2007/11/21 16:23:30 njoly 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>
|
|
|
|
|
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
|
|
|
|
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
|
2007-07-14 23:53:52 +04:00
|
|
|
BIN1+= audit-packages.conf bootptab changelist csh.cshrc csh.login \
|
|
|
|
csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \
|
|
|
|
ftpusers gettytab group hosts hosts.lpd inetd.conf lkm.conf \
|
|
|
|
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 \
|
2004-06-28 18:03:02 +04:00
|
|
|
rbootd.conf rc rc.conf rc.lkm 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--
|
2006-08-05 17:07:30 +04:00
|
|
|
.if !empty(DISTRIBVER:M*.99.*)
|
|
|
|
BIN2+= motd.current
|
|
|
|
FILESNAME_motd.current= motd
|
|
|
|
.elif !empty(DISTRIBVER:M*BETA*)
|
|
|
|
BIN2+= motd.beta
|
|
|
|
FILESNAME_motd.beta= motd
|
|
|
|
.elif !empty(DISTRIBVER:M*RC*)
|
|
|
|
BIN2+= motd.rc
|
|
|
|
FILESNAME_motd.rc= motd
|
2006-08-13 18:11:36 +04:00
|
|
|
.elif !empty(DISTRIBVER:M*STABLE*)
|
|
|
|
BIN2+= motd.stable
|
|
|
|
FILESNAME_motd.stable= motd
|
2006-08-05 17:07:30 +04:00
|
|
|
.else
|
1997-11-11 07:37:17 +03:00
|
|
|
BIN2+= motd
|
2006-08-05 17:07:30 +04:00
|
|
|
.endif
|
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
|
2004-05-17 11:00:16 +04:00
|
|
|
.if ${MKX11} != "no"
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/x11 distribution
|
|
|
|
.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
|
|
|
|
2007-03-03 09:36:00 +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 \
|
2006-07-12 17:12:03 +04:00
|
|
|
DESTDIR EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
|
2004-01-04 16:29:16 +03:00
|
|
|
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 \
|
2006-07-23 15:44:55 +04:00
|
|
|
MKDEBUG MKDEBUGLIB MKDOC MKDYNAMICROOT \
|
|
|
|
MKGCC MKGCCCMDS MKGDB \
|
2005-02-22 17:39:58 +03:00
|
|
|
MKHESIOD MKHOSTOBJ MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
|
2006-03-20 07:03:10 +03:00
|
|
|
MKKERBEROS MKLINKLIB MKLINT \
|
2004-01-08 05:37:16 +03:00
|
|
|
MKMAN MKMANZ MKNLS MKOBJ MKOBJDIRS \
|
2005-02-22 17:39:58 +03:00
|
|
|
MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
|
2006-05-30 04:40:22 +04:00
|
|
|
MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
|
2007-11-19 21:27:27 +03:00
|
|
|
MKUNPRIVED MKUPDATE 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
|
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 ; \
|
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
|
|
|
|
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
|
|
|
( \
|
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
|
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
|
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 \
|
|
|
|
nobody ${BINGRP} 664 /var/db/locate.database \
|
|
|
|
${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}
|
|
|
|
${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
|
|
|
|
/dev/null ${DESTDIR}${file}
|
|
|
|
.endfor
|
2007-11-12 18:02:57 +03:00
|
|
|
.for subdir in . atf 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
|
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")
|
2004-05-16 13:53:09 +04:00
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/ssh configinstall
|
2000-07-25 23:07:39 +04:00
|
|
|
.endif
|
2005-02-23 05:10:33 +03:00
|
|
|
.if (${MKPOSTFIX} != "no")
|
|
|
|
${MAKEDIRTARGET} ${NETBSDSRCDIR}/gnu/usr.sbin/postfix 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
|
2007-11-21 19:23:29 +03:00
|
|
|
OBSOLETE.files= base comp etc games man misc tests text
|
2005-03-22 02:09:39 +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
|
|
|
|
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}
|
2005-03-22 02:09:39 +03:00
|
|
|
.if ${MKX11} != "no"
|
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets && \
|
|
|
|
MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -b -t ${OBSOLETE.dir})
|
|
|
|
.else
|
2003-06-09 03:49:21 +04:00
|
|
|
(cd ${NETBSDSRCDIR}/distrib/sets && \
|
|
|
|
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}
|
2003-02-20 14:40:28 +03:00
|
|
|
${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
|
2006-01-04 18:27:12 +03:00
|
|
|
.if !defined(DISTRIBUTION_DONE) # {
|
|
|
|
# XXX: If METALOG=${DESTDIR}/METALOG (as is normal), and if ${DESTDIR}
|
|
|
|
# does not yet exist (as often happens), then the INSTALL_DIR command
|
|
|
|
# immediately below will create ${DESTDIR} but will fail to register
|
|
|
|
# an entry for "." in the metalog. We ignore the problem, because the
|
|
|
|
# TOOL_MTREE commands a little further below will soon register an entry
|
|
|
|
# for "." in the metalog.
|
2002-10-23 23:50:30 +04:00
|
|
|
${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR}
|
2006-01-04 18:27:12 +03:00
|
|
|
# XXX: It would be nice if a single mtree invocation could both
|
|
|
|
# append to the metalog and do real work. Instead, we have to
|
|
|
|
# repeat the command twice in slightly different ways.
|
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}
|
2006-01-04 18:27:12 +03:00
|
|
|
.if ${MKUNPRIVED} != "no" # {
|
|
|
|
${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
|
|
|
|
-p ${DESTDIR}/ -C -k all | \
|
|
|
|
awk '/ optional/ {next} // {print}' | ${METALOG.add}
|
|
|
|
.endif # MKUNPRIVED # }
|
|
|
|
.endif # DISTRIBUTION_DONE # }
|
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?=
|
2007-04-12 00:46:09 +04:00
|
|
|
CDROM.image?=${RELEASEDIR}/iso/${MACHINE}cd.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'
|
2004-01-01 15:28:22 +03: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} \
|
|
|
|
-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
|
|
|
|
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}
|
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
|
|
|
|
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} # {
|
2006-02-18 01:09:33 +03:00
|
|
|
build_kernelsets: kernset-${configfile}
|
|
|
|
kernset-${configfile}: .PHONY build_kernels snap_pre
|
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/^/./}"; \
|
2004-05-12 20:56:41 +04:00
|
|
|
kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
|
2003-08-22 23:03:03 +04:00
|
|
|
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 # }
|
|
|
|
|
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} # {
|
2006-02-18 01:09:33 +03:00
|
|
|
build_releasekernels: releasekern-${configfile}
|
|
|
|
releasekern-${configfile}: .PHONY build_kernels snap_pre
|
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; \
|
2004-05-12 20:56:41 +04:00
|
|
|
knl_gz="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \
|
2003-08-22 23:03:03 +04:00
|
|
|
[ $${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 # }
|
|
|
|
|
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
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
.include <bsd.prog.mk>
|
2005-03-24 23:23:55 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
@echo ${OBSOLETE.files}
|