diff options
| author | uebayasi <uebayasi@NetBSD.org> | 2009-11-30 16:13:22 +0000 |
|---|---|---|
| committer | uebayasi <uebayasi@NetBSD.org> | 2009-11-30 16:13:22 +0000 |
| commit | d166c4bf28e48254fb78661eb0699178d4fb54be (patch) | |
| tree | d436b88e32197e9587a14adc1708e5214c7d7f49 | |
| parent | 4e1270dfabb27eaffee9f569599d6a992951da47 (diff) | |
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.)
| -rw-r--r-- | BUILDING | 22 | ||||
| -rw-r--r-- | Makefile | 14 | ||||
| -rwxr-xr-x | build.sh | 21 | ||||
| -rw-r--r-- | distrib/sets/Makefile | 23 | ||||
| -rwxr-xr-x | distrib/sets/checkflist | 16 | ||||
| -rw-r--r-- | distrib/sets/comments | 1 | ||||
| -rw-r--r-- | distrib/sets/deps | 1 | ||||
| -rw-r--r-- | distrib/sets/descrs | 1 | ||||
| -rwxr-xr-x | distrib/sets/makeflist | 23 | ||||
| -rwxr-xr-x | distrib/sets/makeobsolete | 23 | ||||
| -rwxr-xr-x | distrib/sets/makesrctars | 22 | ||||
| -rwxr-xr-x | distrib/sets/maketars | 31 | ||||
| -rw-r--r-- | distrib/sets/sets.subr | 30 | ||||
| -rw-r--r-- | etc/Makefile | 5 | ||||
| -rw-r--r-- | etc/mtree/Makefile | 12 | ||||
| -rw-r--r-- | share/mk/bsd.README | 7 | ||||
| -rw-r--r-- | share/mk/bsd.own.mk | 25 | ||||
| -rw-r--r-- | share/mk/bsd.sys.mk | 5 |
18 files changed, 238 insertions, 44 deletions
@@ -74,6 +74,9 @@ FILES 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 @@ CONFIGURATION 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 @@ CONFIGURATION 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 @@ -874,6 +889,13 @@ BUILDING -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. @@ -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 @@ BUILDTARGETS+= do-build .if ${MKX11} != "no" BUILDTARGETS+= do-x11 .endif +.if ${MKEXTSRC} != "no" +BUILDTARGETS+= do-extsrc +.endif BUILDTARGETS+= do-obsolete # @@ -482,6 +486,14 @@ do-x11: .PHONY .MAKE @false .endif +do-extsrc: .PHONY .MAKE +.if ${MKEXTSRC} != "no" + ${MAKEDIRTARGET} extsrc build +.else + @echo "MKEXTSRC is not enabled" + @false +.endif + do-obsolete: .PHONY .MAKE ${MAKEDIRTARGET} etc install-obsolete-lists @@ -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() 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 @@ Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-C cdextras] [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 @@ _usage_ 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 @@ parseoptions() 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 @@ createmakewrapper() 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} # diff --git a/distrib/sets/Makefile b/distrib/sets/Makefile index f47754c58b0..988c7fca51c 100644 --- a/distrib/sets/Makefile +++ b/distrib/sets/Makefile @@ -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 @@ SETSCMD= cd ${.CURDIR} && \ 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: .PRECIOUS .PHONY check_DESTDIR sanitise_METALOG 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 @@ makesrctars: .PRECIOUS .PHONY check_RELEASEDIR ${_MKMSG_CREATE} "source tar files" mkdir -p ${SOURCETARDIR} ${SETSCMD} ./makesrctars ${MAKESRCTARS_FLAGS} \ + ${MAKESRCTARS_X11_FLAGS} ${MAKESRCTARS_EXTSRC_FLAGS} \ ${NETBSDSRCDIR} ${SOURCETARDIR} diff --git a/distrib/sets/checkflist b/distrib/sets/checkflist index 6185f7e54a9..ac853af634e 100755 --- a/distrib/sets/checkflist +++ b/distrib/sets/checkflist @@ -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 @@ allowextra=false 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 @@ while getopts xbM:em ch; do ;; *) 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 diff --git a/distrib/sets/comments b/distrib/sets/comments index 0fc21cb47c9..f236bfa5eb8 100644 --- a/distrib/sets/comments +++ b/distrib/sets/comments @@ -257,6 +257,7 @@ etc-cron-root root file system support for cron(8) command scheduler 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 scripts for IP filter diff --git a/distrib/sets/deps b/distrib/sets/deps index 2573e22e697..2a85c2bc1ae 100644 --- a/distrib/sets/deps +++ b/distrib/sets/deps @@ -24,6 +24,7 @@ base-dhcpd-bin base-sys-usr 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 diff --git a/distrib/sets/descrs b/distrib/sets/descrs index 62efc990fa7..727bba2dac7 100644 --- a/distrib/sets/descrs +++ b/distrib/sets/descrs @@ -508,6 +508,7 @@ etc-cron-root root file system support for cron(8) command scheduler 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 diff --git a/distrib/sets/makeflist b/distrib/sets/makeflist index e81ecfb6cd1..b13c1dd441e 100755 --- a/distrib/sets/makeflist +++ b/distrib/sets/makeflist @@ -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 @@ lists="${nlists}" 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,14 +29,29 @@ USAGE } # 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 ;; diff --git a/distrib/sets/makeobsolete b/distrib/sets/makeobsolete index a07074ea76c..60d0cabc0de 100755 --- a/distrib/sets/makeobsolete +++ b/distrib/sets/makeobsolete @@ -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 @@ usage() { 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,14 +30,29 @@ USAGE 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}" MACHINE_CPU="$(arch_to_cpu "${OPTARG}")" diff --git a/distrib/sets/makesrctars b/distrib/sets/makesrctars index fba84e096d8..bacbe2af15d 100755 --- a/distrib/sets/makesrctars +++ b/distrib/sets/makesrctars @@ -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 @@ export GZIP 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 @@ msg() # 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 @@ while getopts N:qx: ch; do x) xsrcdir="${OPTARG}" ;; + y) + extsrcsrcdir="${OPTARG}" + ;; N) PASSWD="${OPTARG}" ;; @@ -132,6 +136,18 @@ if [ -n "${xsrcdir}" ]; then 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 + + msg "Creating checksum files" (cd "${setdir}" ${CKSUM} -a md5 *.tgz > MD5 diff --git a/distrib/sets/maketars b/distrib/sets/maketars index 9bab153d2e0..9be2d10a78f 100755 --- a/distrib/sets/maketars +++ b/distrib/sets/maketars @@ -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 @@ quiet=false 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 @@ msg() } # 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 @@ while getopts bxi:a:m:qs:SM:N:d:t: ch; do 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="$*" diff --git a/distrib/sets/sets.subr b/distrib/sets/sets.subr index a1a89b2ec04..0ff64418b8d 100644 --- a/distrib/sets/sets.subr +++ b/distrib/sets/sets.subr @@ -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 @@ MKVARS="\ MKDEBUGLIB \ MKDOC \ MKDYNAMICROOT \ + MKEXTSRC \ MKGCC \ MKGCCCMDS \ MKGDB \ @@ -225,6 +227,7 @@ else 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 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g" # 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 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g" # 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 @@ list_set_files() # 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 @@ list_set_lists() 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 @@ list_set_lists() 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 diff --git a/etc/Makefile b/etc/Makefile index 35e6d0febad..2dc53b18497 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -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: @@ -165,6 +165,9 @@ distribution: .PHONY .MAKE check_DESTDIR distrib-dirs ${MAKEDIRTARGET} ${NETBSDSRCDIR}/x11 distribution . endif . endif +. if ${MKEXTSRC} != "no" + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/extsrc distribution +. endif ${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets makesetfiles .endif # !DISTRIBUTION_DONE diff --git a/etc/mtree/Makefile b/etc/mtree/Makefile index a1269d7304c..b95bda9d5ac 100644 --- a/etc/mtree/Makefile +++ b/etc/mtree/Makefile @@ -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 @@ NETBSD_DIST_X11_FILE= ${.CURDIR}/NetBSD.dist.Xorg . 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 diff --git a/share/mk/bsd.README b/share/mk/bsd.README index dc3ccfaa4a2..9d9df4e4a1b 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -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 @@ -163,6 +163,11 @@ MKDYNAMICROOT If "no", build programs in /bin and /sbin statically, 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++). Default: yes diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 1b1f917e1f3..14232e6671d 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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 @@ MKGDB= no # 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 @@ ${var}?= yes # .for var in \ MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ + MKEXTSRC \ MKLVM \ MKMANDOC MKMANZ MKOBJDIRS \ MKPCC MKPCCCMDS \ @@ -932,6 +934,25 @@ 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] # run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message # diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 41dde804fb2..ad452480f8a 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -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 @@ LINTFLAGS+= ${DESTDIR:D-d ${DESTDIR}/usr/include} .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 |
