1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
.\" 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 (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 2007 Sun Microsystems, Inc."
.\" "All rights reserved"
.\" "Use is subject to license terms."
.TH bldenv 1 "21 Mar 2007"
.SH NAME
.I bldenv
\- spawn shell for interactive incremental OS-Net consolidation builds
.SH SYNOPSIS
\fBbldenv [-fdt] [-S E|H|D|O] <env_file> [command]\fP
.LP
.SH DESCRIPTION
.IX "OS-Net build tools" "bldenv" "" "\fBbldenv\fP"
.LP
.I bldenv
is a useful companion to the nightly(1) script for doing interactive
and incremental builds in a workspace already built with nightly(1).
.I bldenv
spawns a shell set up with the same environment variables taken
from an
.I env_file,
as prepared for use with nightly(1).
.LP
In addition to running a shell for interactive use,
.I 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.
.LP
.I 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.
.LP
.I bldenv
is also useful if you run into build issues with
the source product or when generating OpenSolaris deliverables. If a
source product build is flagged, the environment is set up for
building the indicated source product tree, which is assumed to have
already been created. If the OpenSolaris deliverables flag
(\fB\-O\fR) is set in NIGHTLY_OPTIONS, the environment is set up for
building just the open source. This includes using an alternate proto
area, as well as using the closed binaries in
$CODEMGR_WS/closed.skel (which is assumed to already exist).
.LP
By default, bldenv will invoke the shell specified in $SHELL.
If $SHELL isn't set or is invalid, csh will be used.
.SH OPTIONS
.TP 10
.B \-c
force the use of csh, regardless of the value of $SHELL.
.TP
.B \-f
invoke csh with the -f (fast-start) option. This option is valid
only if $SHELL is unset or if it points to csh.
.TP
.B \-d
set up environment for doing DEBUG builds (default is non-DEBUG)
.TP
.B \-t
set up environment to use the tools in usr/src/tools
.TP
.B \-S E
build the exportable source variant of the source product
.TP
.B \-S D
build the domestic source (exportable + crypt) variant of the source product
.TP
.B \-S H
build hybrid source (binaries + deleted source)
.TP
.B \-S O
simulate an OpenSolaris (open source only) build
.LP
.SH EXAMPLES
.LP
.B Example 1: Interactive use
.LP
Use
.I bldenv
to spawn a shell to perform a DEBUG build and testing
of the Makefile targets clobber and install for usr/src/cmd/true.
.LP
.PD 0
.LP
% rlogin wopr-2 -l gk
.LP
{root:wopr-2:49} bldenv -d /export0/jg/on10-se.env
.LP
Build type is DEBUG
.LP
RELEASE is 5.10
.LP
VERSION is wopr-2:on10-se:11/01/2001
.LP
RELEASE_DATE is May 2004
.LP
The top-level 'setup' target is available to build headers and tools.
.LP
Using /usr/bin/tcsh as shell.
.LP
{root:wopr-2:49}
.LP
{root:wopr-2:49} cd $SRC/cmd/true
.LP
{root:wopr-2:50} make
.LP
{root:wopr-2:51} make clobber
.LP
/usr/bin/rm -f true true.po
.LP
{root:wopr-2:52} make
.LP
/usr/bin/rm -f true
.LP
cat true.sh > true
.LP
chmod +x true
.LP
{root:wopr-2:53} make install
.LP
install -s -m 0555 -u root -g bin -f /export0/jg/on10-se/proto/root_sparc/usr/bin true
.LP
`install' is up to date.
.PD
.LP
.B Example 2: Non-interactive use
.LP
Invoke
.I bldenv
to create SUNWonbld with a single command:
.LP
.PD 0
.LP
example% bldenv onnv_06 'cd $SRC/tools && make pkg'
.PD
.LP
.SH SEE ALSO
.BR nightly (1)
|