Mon Nov 30 16:13:23 2009 UTC ()
Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org. (These sets are not included as TNF releases.)
(uebayasi)
diff -r1.89 -r1.90 src/BUILDING
diff -r1.274 -r1.275 src/Makefile
diff -r1.221 -r1.222 src/build.sh
diff -r1.70 -r1.71 src/distrib/sets/Makefile
diff -r1.34 -r1.35 src/distrib/sets/checkflist
diff -r1.14 -r1.15 src/distrib/sets/comments
diff -r1.10 -r1.11 src/distrib/sets/deps
diff -r1.15 -r1.16 src/distrib/sets/descrs
diff -r1.74 -r1.75 src/distrib/sets/makeflist
diff -r1.29 -r1.30 src/distrib/sets/makeobsolete
diff -r1.37 -r1.38 src/distrib/sets/makesrctars
diff -r1.69 -r1.70 src/distrib/sets/maketars
diff -r1.91 -r1.92 src/distrib/sets/sets.subr
diff -r1.373 -r1.374 src/etc/Makefile
diff -r1.10 -r1.11 src/etc/mtree/Makefile
diff -r1.259 -r1.260 src/share/mk/bsd.README
diff -r1.597 -r1.598 src/share/mk/bsd.own.mk
diff -r1.185 -r1.186 src/share/mk/bsd.sys.mk
--- src/BUILDING 2009/10/10 19:05:28 1.89
+++ src/BUILDING 2009/11/30 16:13:22 1.90
@@ -74,6 +74,9 @@
x11/ ``Reachover'' build structure for X11R6; the source is in
X11SRCDIR.
+ extsrc/ ``Reachover'' build structure for externally added programs
+ and libraries; the source is in EXTSRCSRCDIR.
+
Build tree layout
The NetBSD build tree is described in hier(7), and the release layout is
described in release(7).
@@ -164,6 +167,13 @@
Note: build.sh will provide a default of destdir.MACHINE (in
the top-level .OBJDIR) unless run in `expert' mode.
+ EXTSRCSRCDIR
+ Directory containing sources of externally added programs
+ and libraries. If specified, must be an absolute path.
+
+ Default: NETBSDRCDIR/../extsrc, if that exists; otherwise
+ /usr/extsrc.
+
MAKECONF The name of the make(1) configuration file. Only settable in
the process environment.
@@ -212,6 +222,11 @@
Default: ``yes''
+ MKEXTSRC Can be set to ``yes'' or ``no''. Indicates whether extsrc is
+ built from EXTSRCSRCDIR.
+
+ Default: ``no''
+
MKHTML Can be set to ``yes'' or ``no''. Indicates whether prefor-
matted HTML manual pages will be built and installed
@@ -873,6 +888,13 @@
being used.
-x Set MKX11=yes.
+
+ -Y extsrcsrc
+ Set the value of EXTSRCSRCDIR to extsrcsrc. If a relative path is
+ specified, it will be converted to an absolute path before
+ being used.
+
+ -y Set MKEXTSRC=yes.
-Z var Unset ("zap") the environment variable var. This is propagated
to the nbmake wrapper.
--- src/Makefile 2009/09/04 17:21:33 1.274
+++ src/Makefile 2009/11/30 16:13:22 1.275
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.274 2009/09/04 17:21:33 pooka Exp $
+# $NetBSD: Makefile,v 1.275 2009/11/30 16:13:22 uebayasi Exp $
#
# This is the top-level makefile for building NetBSD. For an outline of
@@ -108,6 +108,7 @@
# do-x11: builds and installs X11 if ${MKX11} != "no"; either
# X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg"
# or X11R6 from src/x11
+# do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no".
# do-obsolete: installs the obsolete sets (for the postinstall-* targets).
#
@@ -252,6 +253,9 @@
.if ${MKX11} != "no"
BUILDTARGETS+= do-x11
.endif
+.if ${MKEXTSRC} != "no"
+BUILDTARGETS+= do-extsrc
+.endif
BUILDTARGETS+= do-obsolete
#
@@ -479,6 +483,14 @@
.endif
.else
@echo "MKX11 is not enabled"
+ @false
+.endif
+
+do-extsrc: .PHONY .MAKE
+.if ${MKEXTSRC} != "no"
+ ${MAKEDIRTARGET} extsrc build
+.else
+ @echo "MKEXTSRC is not enabled"
@false
.endif
--- src/build.sh 2009/11/24 13:39:07 1.221
+++ src/build.sh 2009/11/30 16:13:22 1.222
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.221 2009/11/24 13:39:07 pooka Exp $
+# $NetBSD: build.sh,v 1.222 2009/11/30 16:13:22 uebayasi Exp $
#
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -550,7 +550,8 @@
Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-C cdextras]
[-D dest] [-j njob] [-M obj] [-m mach] [-N noisy]
[-O obj] [-R release] [-S seed] [-T tools]
- [-V var=[value]] [-w wrapper] [-X x11src] [-Z var]
+ [-V var=[value]] [-w wrapper] [-X x11src] [-Y extsrcsrc]
+ [-Z var]
operation [...]
Build operations (all imply "obj" and "tools"):
@@ -618,6 +619,9 @@
[Default: \${TOOLDIR}/bin/${toolprefix}make-\${MACHINE}]
-X x11src Set X11SRCDIR to x11src. [Default: /usr/xsrc]
-x Set MKX11=yes; build X11 from X11SRCDIR
+ -Y extsrcsrc
+ Set EXTSRCSRCDIR to extsrcsrc. [Default: /usr/extsrc]
+ -y Set MKEXTSRC=yes; build extsrc from EXTSRCSRCDIR
-Z v Unset ("zap") variable \`v'.
_usage_
@@ -626,7 +630,7 @@
parseoptions()
{
- opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:xX:Z:'
+ opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:xX:yY:Z:'
opt_a=no
if type getopts >/dev/null 2>&1; then
@@ -797,6 +801,15 @@
setmakeenv MKX11 yes
;;
+ -Y)
+ eval ${optargcmd}; resolvepath OPTARG
+ setmakeenv EXTSRCSRCDIR "${OPTARG}"
+ ;;
+
+ -y)
+ setmakeenv MKEXTSRC yes
+ ;;
+
-Z)
eval ${optargcmd}
# XXX: consider restricting which variables can be unset?
@@ -1323,7 +1336,7 @@
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.221 2009/11/24 13:39:07 pooka Exp $
+# Generated from: \$NetBSD: build.sh,v 1.222 2009/11/30 16:13:22 uebayasi Exp $
# with these arguments: ${_args}
#
--- src/distrib/sets/Makefile 2009/09/19 07:09:54 1.70
+++ src/distrib/sets/Makefile 2009/11/30 16:13:23 1.71
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.70 2009/09/19 07:09:54 snj Exp $
+# $NetBSD: Makefile,v 1.71 2009/11/30 16:13:23 uebayasi Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@@ -26,12 +26,19 @@
MAKETARS_FLAGS=
.if ${MKX11} != "no"
-MAKEFLIST_FLAGS= -b
-MAKESRCTARS_FLAGS= -x ${X11SRCDIR} -N ${NETBSDSRCDIR}/etc
-.else
-MAKEFLIST_FLAGS=
-MAKESRCTARS_FLAGS= -N ${NETBSDSRCDIR}/etc
+MAKESRCTARS_X11_FLAGS= -x ${X11SRCDIR}
.endif
+.if ${MKEXTSRC} != "no"
+MAKESRCTARS_EXTSRC_FLAGS= -y ${EXTSRCSRCDIR}
+.endif
+.if ${MKX11} != "no"
+MAKEFLIST_X11_FLAGS= ,x
+.endif
+.if ${MKEXTSRC} != "no"
+MAKEFLIST_EXTSRC_FLAGS= ,ext
+.endif
+MAKEFLIST_FLAGS= -L base${MAKEFLIST_X11_FLAGS}${MAKEFLIST_EXTSRC_FLAGS}
+MAKESRCTARS_FLAGS= -N ${NETBSDSRCDIR}/etc
.if ${MAKEVERBOSE} < 2
MAKETARS_FLAGS+= -q
@@ -122,6 +129,9 @@
checkflist-x11: .PHONY check_DESTDIR
${SETSCMD} ./checkflist -x ${CHECKFLIST_FLAGS}
+checkflist-extsrc: .PHONY check_DESTDIR
+ ${SETSCMD} ./checkflist -y ${CHECKFLIST_FLAGS}
+
.if defined(DESTDIR) && ${DESTDIR} != ""
checkflist_if_DESTDIR: checkflist
.else
@@ -185,6 +195,7 @@
${_MKMSG_CREATE} "source tar files"
mkdir -p ${SOURCETARDIR}
${SETSCMD} ./makesrctars ${MAKESRCTARS_FLAGS} \
+ ${MAKESRCTARS_X11_FLAGS} ${MAKESRCTARS_EXTSRC_FLAGS} \
${NETBSDSRCDIR} ${SOURCETARDIR}
--- src/distrib/sets/checkflist 2009/04/23 09:30:56 1.34
+++ src/distrib/sets/checkflist 2009/11/30 16:13:23 1.35
@@ -1,6 +1,6 @@
#! /bin/sh --
#
-# $NetBSD: checkflist,v 1.34 2009/04/23 09:30:56 apb Exp $
+# $NetBSD: checkflist,v 1.35 2009/11/30 16:13:23 uebayasi Exp $
#
# Verify output of makeflist against contents of ${DESTDIR} and ${metalog}.
@@ -34,15 +34,23 @@
allowmissing=false
# handle args
-while getopts xbM:em ch; do
+while getopts xybL:M:em ch; do
case ${ch} in
x)
xargs="-x"
origin="./etc/X11 ./etc/fonts ./usr/X11R6"
;;
+ y)
+ xargs="-y"
+ origin="./etc/ext ./usr/ext"
+ ;;
+ # backward compat
b)
xargs="-b"
;;
+ L)
+ xargs="-L ${OPTARG}"
+ ;;
M)
metalog="${OPTARG}"
;;
@@ -54,9 +62,11 @@
;;
*)
cat 1>&2 <<USAGE
-Usage: ${prog} [-x|-b] [-M metalog] [-e] [-m]
+Usage: ${prog} [-x|-y|-b|-L lists] [-M metalog] [-e] [-m]
-x check only x11 lists
+ -y check only extsrc lists
-b check netbsd + x11 lists
+ -L base,x,ext check specified lists
-M metalog metalog file
-e extra files are not considered an error
-m missing files are not considered an error
--- src/distrib/sets/comments 2008/11/12 12:35:50 1.14
+++ src/distrib/sets/comments 2009/11/30 16:13:23 1.15
--- src/distrib/sets/deps 2008/11/12 12:35:50 1.10
+++ src/distrib/sets/deps 2009/11/30 16:13:23 1.11
@@ -24,6 +24,7 @@
base-dhcpd-examples base-sys-share
base-efs-root base-sys-root
base-ext2fs-root base-sys-root
+base-extsrc-root base-sys-root
base-filecorefs-root base-sys-root
base-fstab-examples base-sys-share
base-games-root base-sys-root
--- src/distrib/sets/descrs 2008/11/12 12:35:50 1.15
+++ src/distrib/sets/descrs 2009/11/30 16:13:23 1.16
@@ -508,6 +508,7 @@
etc-dhclient-etc configuration files for DHCP dyanamic host configuration protocol client utilities
etc-dhclient-rc startup script for DHCP dynamic host configuration protocol client
etc-dhcpd-rc startup script for DHCP dynamic host configuration protocol daemon
+etc-extsrc-rc startup scripts for externally added programs
etc-games-etc configuration file for games
etc-games-scores empty score files for games
etc-ipf-rc startup script for IP filter
--- src/distrib/sets/makeflist 2006/01/04 13:40:23 1.74
+++ src/distrib/sets/makeflist 2009/11/30 16:13:23 1.75
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: makeflist,v 1.74 2006/01/04 13:40:23 apb Exp $
+# $NetBSD: makeflist,v 1.75 2009/11/30 16:13:23 uebayasi Exp $
#
# Print out the files in some or all lists.
# Usage: makeflist [-bxlo] [-a arch] [-m machine] [-s setsdir] [setname ...]
@@ -13,9 +13,11 @@
usage()
{
cat 1>&2 <<USAGE
-Usage: ${0##*/} [-bxlo] [-a arch] [-m machine] [-s setsdir] [setname [...]]
+Usage: ${0##*/} [-L base,x,ext] [-bxyo] [-a arch] [-m machine] [-s setsdir] [setname [...]]
+ -L base,x,ext print specified lists
-b print netbsd + x11 lists
-x print make x11 lists
+ -y print make extsrc lists
-l just list the selected set names, not the contents
-o only match obsolete files
-a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [${MACHINE_ARCH}]
@@ -27,13 +29,28 @@
}
# handle args
-while getopts bxloa:m:s: ch; do
+while getopts L:bxXloa:m:s: ch; do
case ${ch} in
+ L)
+ lists=$(
+ for _list in $( echo ${OPTARG} | tr , ' ' ); do
+ case $_list in
+ base) echo "${nlists}" ;;
+ x) echo "${xlists}" ;;
+ ext) echo "${extlists}" ;;
+ esac
+ done
+ )
+ ;;
+ # backward compat
b)
lists="${nlists} ${xlists}"
;;
x)
lists="${xlists}"
+ ;;
+ y)
+ lists="${extlists}"
;;
l)
listonly=1
--- src/distrib/sets/makeobsolete 2006/01/28 19:01:23 1.29
+++ src/distrib/sets/makeobsolete 2009/11/30 16:13:23 1.30
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: makeobsolete,v 1.29 2006/01/28 19:01:23 apb Exp $
+# $NetBSD: makeobsolete,v 1.30 2009/11/30 16:13:23 uebayasi Exp $
#
# Print out the obsolete files for a set
# Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \
@@ -17,8 +17,10 @@
{
cat 1>&2 <<USAGE
Usage: ${0##*/} [-a arch] [-m machine] [-s setsdir] [setname ...]
+ -L base,x,ext make specified lists
-b make netbsd + x11 lists
-x only make x11 lists
+ -y only make extsrc lists
-a arch set arch (e.g, m68k, mips, powerpc) [${MACHINE_ARCH}]
-m machine set machine (e.g, amiga, i386, macppc) [${MACHINE}]
-s setsdir directory to find sets [${setd}]
@@ -28,13 +30,28 @@
exit 1
}
-while getopts bxa:m:s:t: ch; do
+while getopts L:bxya:m:s:t: ch; do
case ${ch} in
+ L)
+ lists=$(
+ for _list in $( echo ${OPTARG} | tr , ' ' ); do
+ case $_list in
+ base) echo "${nlists}" ;;
+ x) echo "${xlists}" ;;
+ ext) echo "${extlists}" ;;
+ esac
+ done
+ )
+ ;;
+ # backward compat
b)
- lists="${xlists} ${nlists}"
+ lists="${nlists} ${xlists}"
;;
x)
lists="${xlists}"
+ ;;
+ y)
+ lists="${extlists}"
;;
a)
MACHINE_ARCH="${OPTARG}"
--- src/distrib/sets/makesrctars 2009/09/19 07:09:54 1.37
+++ src/distrib/sets/makesrctars 2009/11/30 16:13:23 1.38
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: makesrctars,v 1.37 2009/09/19 07:09:54 snj Exp $
+# $NetBSD: makesrctars,v 1.38 2009/11/30 16:13:23 uebayasi Exp $
#
# makesrctars srcdir setdir
# Create source tarballs in setdir from the source under srcdir.
@@ -20,11 +20,12 @@
usage()
{
cat 1>&2 <<USAGE
-Usage: ${prog} [-N password/group dir] [-q] [-x xsrcdir] srcdir setdir
+Usage: ${prog} [-N password/group dir] [-q] [-x xsrcdir] [-y extsrcsrcdir] srcdir setdir
-N dir location which contains master.passwd and group files
(defaults to \${srcdir}/etc)
-q quiet operation
-x xsrcdir build xsrc.tgz from xsrcdir
+ -y extsrcsrcdir build extsrc.tgz from extsrcsrcdir
srcdir location of sources
setdir where to write the .tgz files to
USAGE
@@ -38,7 +39,7 @@
# handle args
-while getopts N:qx: ch; do
+while getopts N:qx:y: ch; do
case ${ch} in
q)
quiet=true
@@ -46,6 +47,9 @@
x)
xsrcdir="${OPTARG}"
;;
+ y)
+ extsrcsrcdir="${OPTARG}"
+ ;;
N)
PASSWD="${OPTARG}"
;;
@@ -129,6 +133,18 @@
fi
srcprefix=usr/xsrc
makeset xsrc .
+fi
+
+
+# create extsrc sets
+#
+if [ -n "${extsrcsrcdir}" ]; then
+ if ! cd "${extsrcsrcdir}"; then
+ echo >&2 "${prog}: can't chdir to ${extsrcsrcdir}"
+ exit 1
+ fi
+ srcprefix=usr/extsrc
+ makeset extsrc .
fi
--- src/distrib/sets/maketars 2009/09/12 11:01:55 1.69
+++ src/distrib/sets/maketars 2009/11/30 16:13:23 1.70
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: maketars,v 1.69 2009/09/12 11:01:55 apb Exp $
+# $NetBSD: maketars,v 1.70 2009/11/30 16:13:23 uebayasi Exp $
#
# Make release tar files for some or all lists. Usage:
# maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
@@ -8,10 +8,11 @@
#
# The default sets are "base comp etc games man misc tests text"
# The X sets are "xbase xcomp xetc xfont xserver"
+# The extsrc sets are "extbase extcomp extetc"
#
# If '-i installdir' is given, copy the given sets to installdir
# (using pax -rw ...) instead of creating tar files.
-# In this case, remove "etc" and "xetc" from the list of default sets.
+# In this case, remove "etc", "xetc", and "extetc" from the list of default sets.
#
prog="${0##*/}"
@@ -31,11 +32,14 @@
usage()
{
cat 1>&2 <<USAGE
-Usage: ${prog} [-b] [-x] [-i idir] [-a arch] [-m machine] [-s setsdir] [-S]
+Usage: ${prog} [-L base,x,ext] [-b] [-x] [-y] [-i idir] [-a arch] [-m machine] [-s setsdir] [-S]
[-M metalog] [-N etcdir] [-d dest] [-t targetdir] [setname ...]
+ -L base,x,ext Make specified lists
-b Make both netbsd and x11 lists
-x Only make x11 lists
[Default: make netbsd lists]
+ -y Only make extsrc lists
+ [Default: make netbsd lists]
-i idir Install sets to idir instead of creating tar files
-a arch Set arch (e.g, m68k, mipseb, mipsel, powerpc) [${MACHINE_ARCH}]
-m machine Set machine (e.g, amiga, i386, macppc) [${MACHINE}]
@@ -57,14 +61,29 @@
}
# handle args
-while getopts bxi:a:m:qs:SM:N:d:t: ch; do
+while getopts L:bxyi:a:m:qs:SM:N:d:t: ch; do
case ${ch} in
+ L)
+ lists=$(
+ for _list in $( echo ${OPTARG} | tr , ' ' ); do
+ case $_list in
+ base) echo "${nlists}" ;;
+ x) echo "${xlists}" ;;
+ ext) echo "${extlists}" ;;
+ esac
+ done
+ )
+ ;;
+ # backward compat
b)
lists="${nlists} ${xlists}"
;;
x)
lists="${xlists}"
;;
+ y)
+ lists="${extlists}"
+ ;;
i)
installdir="${OPTARG}"
;;
@@ -102,8 +121,8 @@
esac
done
shift $((${OPTIND} - 1))
-if [ -n "${installdir}" ]; then # if -i, remove etc & xetc from the default list
- lists="$(echo ${lists} | ${SED} -e 's/ etc / /;s/ xetc / /')"
+if [ -n "${installdir}" ]; then # if -i, remove etc + xetc + extetc from the default list
+ lists="$(echo ${lists} | ${SED} -e 's/ etc / /;s/ xetc / /;s/ extetc / /')"
fi
if [ -n "$*" ]; then
lists="$*"
--- src/distrib/sets/sets.subr 2009/11/05 17:34:25 1.91
+++ src/distrib/sets/sets.subr 2009/11/30 16:13:23 1.92
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.91 2009/11/05 17:34:25 dyoung Exp $
+# $NetBSD: sets.subr,v 1.92 2009/11/30 16:13:23 uebayasi Exp $
#
#
@@ -6,6 +6,7 @@
# setsdir path to src/distrib/sets
# nlists list of base sets
# xlists list of x11 sets
+# extlists list of extsrc sets
# obsolete controls if obsolete files are selected instead
# module if != "no", enable MODULE sets
# shlib shared library format (a.out, elf, or "")
@@ -36,6 +37,7 @@
MKDEBUGLIB \
MKDOC \
MKDYNAMICROOT \
+ MKEXTSRC \
MKGCC \
MKGCCCMDS \
MKGDB \
@@ -225,6 +227,7 @@
nlists="base comp etc games man misc tests text"
fi
xlists="xbase xcomp xetc xfont xserver"
+extlists="extbase extcomp extetc"
OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules"
@@ -239,7 +242,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.91 2009/11/05 17:34:25 dyoung Exp $
+# # $NetBSD: sets.subr,v 1.92 2009/11/30 16:13:23 uebayasi Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -272,6 +275,7 @@
# debuglib ${MKDEBUGLIB} != no
# doc ${MKDOC} != no
# dynamicroot ${MKDYNAMICROOT} != no
+# extsrc ${MKEXTSRC} != no
# gcc ${MKGCC} != no
# gcccmds ${MKGCCCMDS} != no
# gdb ${MKGDB} != no
@@ -415,15 +419,18 @@
# For a given setname $set, the following files may be selected from
# .../list/$set:
# mi
+# mi.ext.*
# ad.${MACHINE_ARCH}
# (or) ad.${MACHINE_CPU}
# ad.${MACHINE_CPU}.shl
# md.${MACHINE}.${MACHINE_ARCH}
# (or) md.${MACHINE}
# stl.mi
-# stl.stlib
+# stl.${stlib}
# shl.mi
-# shl.shlib
+# shl.mi.ext.*
+# shl.${shlib}
+# shl.${shlib}.ext.*
# module.mi if ${module} != no
# module.${MACHINE} if ${module} != no
# module.ad.${MACHINE_ARCH} if ${module} != no
@@ -444,6 +451,11 @@
setdir=$setsdir/lists/$setname
echo $setdir/mi
+ for _extsrc_pkg in ${EXTSRCS}; do
+ if [ -f $setdir/mi.ext.${_extsrc_pkg} ]; then
+ echo $setdir/mi.ext.${_extsrc_pkg}
+ fi
+ done
if [ "${MACHINE}" != "${MACHINE_ARCH}" ]; then
# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
# since the arch-specific one will be more specific than
@@ -473,9 +485,19 @@
if [ -f $setdir/shl.mi ]; then
echo $setdir/shl.mi
fi
+ for _extsrc_pkg in ${EXTSRCS}; do
+ if [ -f $setdir/shl.mi.ext.${_extsrc_pkg} ]; then
+ echo $setdir/shl.mi.ext.${_extsrc_pkg}
+ fi
+ done
if [ -f $setdir/shl.${shlib} ]; then
echo $setdir/shl.${shlib}
fi
+ for _extsrc_pkg in ${EXTSRCS}; do
+ if [ -f $setdir/shl.${shlib}.ext.${_extsrc_pkg} ]; then
+ echo $setdir/shl.${shlib}.ext.${_extsrc_pkg}
+ fi
+ done
fi
if [ "$module" != "no" ]; then
if [ -f $setdir/module.mi ]; then
--- src/etc/Makefile 2009/09/29 23:56:27 1.373
+++ src/etc/Makefile 2009/11/30 16:13:22 1.374
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.373 2009/09/29 23:56:27 tsarna Exp $
+# $NetBSD: Makefile,v 1.374 2009/11/30 16:13:22 uebayasi Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@@ -164,6 +164,9 @@
. else
${MAKEDIRTARGET} ${NETBSDSRCDIR}/x11 distribution
. endif
+. endif
+. if ${MKEXTSRC} != "no"
+ ${MAKEDIRTARGET} ${NETBSDSRCDIR}/extsrc distribution
. endif
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets makesetfiles
.endif # !DISTRIBUTION_DONE
--- src/etc/mtree/Makefile 2009/11/19 19:57:40 1.10
+++ src/etc/mtree/Makefile 2009/11/30 16:13:22 1.11
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2009/11/19 19:57:40 drochner Exp $
+# $NetBSD: Makefile,v 1.11 2009/11/30 16:13:22 uebayasi Exp $
.include <bsd.own.mk>
@@ -8,12 +8,14 @@
. else
NETBSD_DIST_X11_FILE= ${.CURDIR}/NetBSD.dist.XFree86
. endif
-.else
-NETBSD_DIST_X11_FILE=
.endif
-NetBSD.dist: NetBSD.dist.base ${NETBSD_DIST_X11_FILE}
- ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${NETBSD_DIST_X11_FILE} > \
+.if ${MKEXTSRC} != "no"
+NETBSD_DIST_EXTSRC_FILE= ${.CURDIR}/NetBSD.dist.extsrc
+.endif
+
+NetBSD.dist: NetBSD.dist.base ${NETBSD_DIST_X11_FILE} ${NETBSD_DIST_EXTSRC_FILE}
+ ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${NETBSD_DIST_X11_FILE} ${NETBSD_DIST_EXTSRC_FILE} > \
${.TARGET}
CONFIGFILES= NetBSD.dist special
--- src/share/mk/bsd.README 2009/11/15 14:59:47 1.259
+++ src/share/mk/bsd.README 2009/11/30 16:13:23 1.260
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.259 2009/11/15 14:59:47 pgoyette Exp $
+# $NetBSD: bsd.README,v 1.260 2009/11/30 16:13:23 uebayasi Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -162,6 +162,11 @@
don't install certain libraries in /lib, and don't
install the shared linker into /libexec.
Default: yes
+
+MKEXTSRC If not "no", 'make build' also descends into either src/extsrc
+ to cross-build programs and libraries externally added by
+ users, and automatically enables creation of those sets.
+ Default: no
MKGCC If "no", don't build gcc(1) or any of the GCC-related
libraries (libgcc, libobjc, libstdc++).
--- src/share/mk/bsd.own.mk 2009/11/28 16:48:25 1.597
+++ src/share/mk/bsd.own.mk 2009/11/30 16:13:23 1.598
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.597 2009/11/28 16:48:25 mbalmer Exp $
+# $NetBSD: bsd.own.mk,v 1.598 2009/11/30 16:13:23 uebayasi Exp $
.if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1
@@ -518,7 +518,8 @@
# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
# not just shared libraries, so don't build the _pic version.
#
-.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
+.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
+ ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
MKPICLIB:= no
.endif
@@ -690,6 +691,7 @@
#
.for var in \
MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
+ MKEXTSRC \
MKLVM \
MKMANDOC MKMANZ MKOBJDIRS \
MKPCC MKPCCCMDS \
@@ -930,6 +932,25 @@
X11DRI?= no
X11LOADABLE?= yes
+
+#
+# Where extsrc sources are and where it is installed to.
+#
+.if !defined(EXTSRCSRCDIR)
+.if exists(${NETBSDSRCDIR}/../extsrc)
+EXTSRCSRCDIR!= cd ${NETBSDSRCDIR}/../extsrc && pwd
+.else
+EXTSRCSRCDIR= /usr/extsrc
+.endif
+.endif # !defined(EXTSRCSRCDIR)
+
+EXTSRCROOTDIR?= /usr/ext
+EXTSRCBINDIR?= ${EXTSRCROOTDIR}/bin
+EXTSRCETCDIR?= /etc/ext
+EXTSRCINCDIR?= ${EXTSRCROOTDIR}/include
+EXTSRCLIBDIR?= ${EXTSRCROOTDIR}/lib/ext
+EXTSRCMANDIR?= ${EXTSRCROOTDIR}/man
+EXTSRCUSRLIBDIR?= ${EXTSRCROOTDIR}/lib
#
# MAKEDIRTARGET dir target [extra make(1) params]
--- src/share/mk/bsd.sys.mk 2009/11/12 14:30:34 1.185
+++ src/share/mk/bsd.sys.mk 2009/11/30 16:13:23 1.186
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.185 2009/11/12 14:30:34 tron Exp $
+# $NetBSD: bsd.sys.mk,v 1.186 2009/11/30 16:13:23 uebayasi Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -53,7 +53,8 @@
.if (${MACHINE_ARCH} == "alpha") || \
(${MACHINE_ARCH} == "hppa") || \
(${MACHINE_ARCH} == "ia64") || \
- (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb")
+ (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \
+ (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
HAS_SSP= no
.else
HAS_SSP= yes