Source-Changes-HG archive

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

[src/trunk]: src add "-M makeobjdirprefix" to build.sh



details:   https://anonhg.NetBSD.org/src/rev/7f830fceb08e
branches:  trunk
changeset: 526867:7f830fceb08e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon May 13 01:44:34 2002 +0000

description:
add "-M makeobjdirprefix" to build.sh

diffstat:

 BUILDING      |   2 ++
 BUILDING.mdoc |   8 +++++++-
 build.sh      |  16 +++++++++++-----
 3 files changed, 20 insertions(+), 6 deletions(-)

diffs (100 lines):

diff -r 22fe321b631e -r 7f830fceb08e BUILDING
--- a/BUILDING  Mon May 13 01:39:17 2002 +0000
+++ b/BUILDING  Mon May 13 01:44:34 2002 +0000
@@ -479,6 +479,8 @@
 
      -D dest   Set the value of DESTDIR to dest.
 
+     -M obj    Set MAKEOBJDIRPREFIX to obj.
+
      -O obj    Create an appropriate transform macro for MAKEOBJDIR that will
                place the built object files under obj.  For instance, a set-
                ting of /usr/obj will place build-time files files under
diff -r 22fe321b631e -r 7f830fceb08e BUILDING.mdoc
--- a/BUILDING.mdoc     Mon May 13 01:39:17 2002 +0000
+++ b/BUILDING.mdoc     Mon May 13 01:44:34 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: BUILDING.mdoc,v 1.17 2002/05/03 08:59:14 lukem Exp $
+.\"    $NetBSD: BUILDING.mdoc,v 1.18 2002/05/13 01:44:34 lukem Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -873,6 +873,12 @@
 to
 .Em dest .
 .
+.It Sy -M Em obj
+Set
+.Sy MAKEOBJDIRPREFIX
+to
+.Em obj .
+.
 .It Sy -O Em obj
 Create an appropriate transform macro for
 .Sy MAKEOBJDIR
diff -r 22fe321b631e -r 7f830fceb08e build.sh
--- a/build.sh  Mon May 13 01:39:17 2002 +0000
+++ b/build.sh  Mon May 13 01:44:34 2002 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-#  $NetBSD: build.sh,v 1.57 2002/05/02 22:13:31 sommerfeld Exp $
+#  $NetBSD: build.sh,v 1.58 2002/05/13 01:44:34 lukem Exp $
 #
 # Top level build wrapper, for a system containing no tools.
 #
@@ -83,7 +83,7 @@
 usage () {
        echo "Usage:"
        echo "$0 [-bdorUu] [-a arch] [-B buildid] [-j njob] [-m mach] "
-       echo "   [-w wrapper] [-D dest] [-O obj] [-R release] [-T tools]"
+       echo "   [-w wrapper] [-D dest] [-M obj] [-O obj] [-R release] [-T tools]"
        echo ""
        echo "    -a: set MACHINE_ARCH to arch (otherwise deduced from MACHINE)"
        echo "    -B: set BUILDID to buildid"
@@ -91,6 +91,7 @@
        echo "    -D: set DESTDIR to dest"
        echo "    -d: build a full distribution into DESTDIR (including etc files)"
        echo "    -j: Run up to njob jobs in parallel; see make(1)"
+       echo "    -M: set obj root directory to obj (sets MAKEOBJDIRPREFIX)"
        echo "    -m: set MACHINE to mach (not required if NetBSD native)"
        echo "    -n: show commands that would be executed, but do not execute them"
        echo "    -O: set obj root directory to obj (sets a MAKEOBJDIR pattern)"
@@ -119,7 +120,7 @@
 makeenv=
 makewrapper=
 opt_a=no
-opts='a:B:bdhj:m:nortuw:D:O:R:T:U'
+opts='a:B:bdhj:m:nortuw:D:M:O:R:T:U'
 runcmd=
 
 if type getopts >/dev/null 2>&1; then
@@ -178,6 +179,11 @@
                DESTDIR="$OPTARG"; export DESTDIR
                makeenv="$makeenv DESTDIR";;
 
+       -M)     eval $optargcmd; resolvepath
+               MAKEOBJDIRPREFIX="$OPTARG"; export MAKEOBJDIRPREFIX
+               makeobjdir=$OPTARG
+               makeenv="$makeenv MAKEOBJDIRPREFIX";;
+
        -O)     eval $optargcmd; resolvepath
                MAKEOBJDIR="\${.CURDIR:C,^$cwd,$OPTARG,}"; export MAKEOBJDIR
                makeobjdir=$OPTARG
@@ -285,7 +291,7 @@
 fi
 
 #
-# If setting -O to root an obj dir make sure the base directory is made
+# If setting -M or -O to root an obj dir make sure the base directory is made
 # before continuing as bsd.own.mk will need this to pick up _SRC_TOP_OBJ_
 #
 if [ "$MKOBJDIRS" != "no" ] && [ ! -z "$makeobjdir" ]; then
@@ -367,7 +373,7 @@
 eval cat <<EOF $makewrapout
 #! /bin/sh
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.57 2002/05/02 22:13:31 sommerfeld Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.58 2002/05/13 01:44:34 lukem Exp $
 #
 
 EOF



Home | Main Index | Thread Index | Old Index