Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Support "extsrc", externally added programs and libraries. ...



details:   https://anonhg.NetBSD.org/src/rev/b3abae2195a4
branches:  trunk
changeset: 749476:b3abae2195a4
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Mon Nov 30 16:13:22 2009 +0000

description:
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.)

diffstat:

 BUILDING                  |  22 ++++++++++++++++++++++
 Makefile                  |  14 +++++++++++++-
 build.sh                  |  21 +++++++++++++++++----
 distrib/sets/Makefile     |  23 +++++++++++++++++------
 distrib/sets/checkflist   |  16 +++++++++++++---
 distrib/sets/comments     |   1 +
 distrib/sets/deps         |   1 +
 distrib/sets/descrs       |   1 +
 distrib/sets/makeflist    |  23 ++++++++++++++++++++---
 distrib/sets/makeobsolete |  23 ++++++++++++++++++++---
 distrib/sets/makesrctars  |  22 +++++++++++++++++++---
 distrib/sets/maketars     |  31 +++++++++++++++++++++++++------
 distrib/sets/sets.subr    |  30 ++++++++++++++++++++++++++----
 etc/Makefile              |   5 ++++-
 etc/mtree/Makefile        |  12 +++++++-----
 share/mk/bsd.README       |   7 ++++++-
 share/mk/bsd.own.mk       |  25 +++++++++++++++++++++++--
 share/mk/bsd.sys.mk       |   5 +++--
 18 files changed, 238 insertions(+), 44 deletions(-)

diffs (truncated from 790 to 300 lines):

diff -r a1cae8dad6d2 -r b3abae2195a4 BUILDING
--- a/BUILDING  Mon Nov 30 16:09:14 2009 +0000
+++ b/BUILDING  Mon Nov 30 16:13:22 2009 +0000
@@ -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
 
@@ -874,6 +889,13 @@
 
      -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.
 
diff -r a1cae8dad6d2 -r b3abae2195a4 Makefile
--- a/Makefile  Mon Nov 30 16:09:14 2009 +0000
+++ b/Makefile  Mon Nov 30 16:13:22 2009 +0000
@@ -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
 
 #
@@ -482,6 +486,14 @@
        @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
 
diff -r a1cae8dad6d2 -r b3abae2195a4 build.sh
--- a/build.sh  Mon Nov 30 16:09:14 2009 +0000
+++ b/build.sh  Mon Nov 30 16:13:22 2009 +0000
@@ -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}
 #
 
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/Makefile
--- a/distrib/sets/Makefile     Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/Makefile     Mon Nov 30 16:13:22 2009 +0000
@@ -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_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
-.endif
 
 .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}
 
 
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/checkflist
--- a/distrib/sets/checkflist   Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/checkflist   Mon Nov 30 16:13:22 2009 +0000
@@ -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
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/comments
--- a/distrib/sets/comments     Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/comments     Mon Nov 30 16:13:22 2009 +0000
@@ -257,6 +257,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 scripts for IP filter
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/deps
--- a/distrib/sets/deps Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/deps Mon Nov 30 16:13:22 2009 +0000
@@ -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
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/descrs
--- a/distrib/sets/descrs       Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/descrs       Mon Nov 30 16:13:22 2009 +0000
@@ -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
diff -r a1cae8dad6d2 -r b3abae2195a4 distrib/sets/makeflist
--- a/distrib/sets/makeflist    Mon Nov 30 16:09:14 2009 +0000
+++ b/distrib/sets/makeflist    Mon Nov 30 16:13:22 2009 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: makeflist,v 1.74 2006/01/04 13:40:23 apb Exp $



Home | Main Index | Thread Index | Old Index