bldenv.1 revision 7c478bd95313f5f23a4c958a745db2134aa03244
ident "%Z%%M% %I% %E% SMI"
" CDDL HEADER START
"
" The contents of this file are subject to the terms of the
" Common Development and Distribution License, Version 1.0 only
" (the "License"). You may not use this file except in compliance
" with the License.
"
" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
" or http://www.opensolaris.org/os/licensing.
" See the License for the specific language governing permissions
" and limitations under the License.
"
" When distributing Covered Code, include this CDDL HEADER in each
" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
" If applicable, add the following below this CDDL HEADER, with the
" fields enclosed by brackets "[]" replaced with your own identifying
" information: Portions Copyright [yyyy] [name of copyright owner]
"
" CDDL HEADER END
"
"Copyright 2005 Sun Microsystems, Inc."
"All rights reserved"
"Use is subject to license terms."
bldenv 1 "04 Jan 2005"
NAME
bldenv - spawn shell for interactive incremental OS-Net consolidation builds
SYNOPSIS
bldenv [-fdt] [-S E|C|D] <env_file> [command]

DESCRIPTION
"OS-Net build tools" "bldenv" "" "bldenv"

bldenv is a useful companion to the nightly(1) script for doing interactive and incremental builds in a workspace already built with nightly(1). bldenv spawns a shell set up with the same environment variables taken from an env_file, as prepared for use with nightly(1).

In addition to running a shell for interactive use, bldenv can optionally run a single command in the given environment, in the vein of sh -c or su -c. This is useful for scripting, when an interactive shell would not be. If the command is composed of multiple shell words or contains other shell metacharacters, it must be quoted appropriately.

bldenv is particularly useful for testing Makefile targets like clobber, install and _msg, which otherwise require digging through large build logs to figure out what is being done. By default, bldenv will invoke the shell specified in $SHELL. If $SHELL isn't set or is invalid, csh will be used.

OPTIONS

10 -c force the use of csh, regardless of the value of $SHELL.

-f invoke csh with the -f (fast-start) option. This option is valid only if $SHELL is unset or if it points to csh.

-d set up environment for doing DEBUG builds (default is non-DEBUG)

-t set up environment to use the tools in usr/src/tools

-S E build the exportable source variant of the source product

-S C build the crypt source variant of the source product

-S D build the domestic source (exportable + crypt) variant of the source product

EXAMPLES

Example 1: Interactive use

Use bldenv to spawn a shell to perform a DEBUG build and testing of the Makefile targets clobber and install for usr/src/cmd/true.

0

% rlogin wopr-2 -l gk

{root:wopr-2:49} bldenv -d /export0/jg/on10-se.env

Build type is DEBUG

RELEASE is 5.10

VERSION is wopr-2:on10-se:11/01/2001

RELEASE_DATE is May 2004

The top-level 'setup' target is available to build headers and tools.

Using /usr/bin/tcsh as shell.

{root:wopr-2:49}

{root:wopr-2:49} cd $SRC/cmd/true

{root:wopr-2:50} make

{root:wopr-2:51} make clobber

/usr/bin/rm -f true true.po

{root:wopr-2:52} make

/usr/bin/rm -f true

cat true.sh > true

chmod +x true

{root:wopr-2:53} make install

install -s -m 0555 -u root -g bin -f /export0/jg/on10-se/proto/root_sparc/usr/bin true

`install' is up to date.

Example 2: Non-interactive use

Invoke bldenv to create SUNWonbld with a single command:

0

example% bldenv onnv_06 'cd $SRC/tools && make pkg'