Print this page
4526 nightly contains a great deal of effectively dead code


 129 .TP 10
 130 .B \-D
 131 Do a build with DEBUG on (non-DEBUG is built by default)
 132 .TP
 133 .B \-F
 134 Do _not_ do a non-DEBUG build (use with -D to get just a DEBUG build)
 135 .TP
 136 .B \-M
 137 Do not run pmodes (safe file permission checker)
 138 .TP
 139 .B \-i
 140 Do an incremental build, suppressing the "make clobber" that by
 141 default removes all existing binaries and derived files.  From the
 142 command line, -i also suppresses the lint pass and the cstyle/hdrchk
 143 pass
 144 .TP
 145 .B \-n
 146 Suppress the bringover so that the build will start immediately with
 147 current source code
 148 .TP
 149 .B \-o
 150 Do an "old style" (pre-S10) build using root privileges to set OWNER
 151 and GROUP from the Makefiles.
 152 .TP
 153 .B \-p
 154 Create packages for regular install
 155 .TP
 156 .B \-U
 157 Update proto area in the parent workspace
 158 .TP
 159 .B \-u
 160 Update the parent workspace with files generated by the build, as follows.
 161 .RS
 162 .TP
 163 \(bu
 164 Copy proto_list_${MACH} and friends to usr/src in the parent.
 165 .TP
 166 \(bu
 167 When used with -f, build a usr/src/unrefmaster.out in
 168 the parent by merging all the usr/src/unref-${MACH}.out files in the
 169 parent.
 170 .TP
 171 \(bu
 172 When used with -A or -r, copy the contents of the resulting


 192 addition, deletion or change of interface in the .so files.
 193 .TP
 194 .B \-C
 195 Check for cstyle/hdrchk errors
 196 .TP
 197 .B \-f
 198 Check for unreferenced files.  Since the full workspace must be built
 199 in order to accurately identify unreferenced files, -f is ignored for
 200 incremental (-i) builds, or builds that do not include -l, and -p.
 201 .TP
 202 .B \-r
 203 Check the ELF runtime attributes of all dynamic objects
 204 .TP
 205 .B \-l
 206 Do "make lint" in $LINTDIRS (default: $SRC n)
 207 .TP
 208 .B \-N
 209 Do not run protocmp or checkpaths (note: this option is not
 210 recommended, especially in conjunction with the \-p option)
 211 .TP
 212 .B \-W
 213 Do not report warnings (for freeware gate ONLY)
 214 .TP
 215 .B \-w
 216 Report which proto area objects differ between this and the last build.
 217 See wsdiff(1) for details. Note that the proto areas used for comparison
 218 are the last ones constructed as part of the build. As an example, if both
 219 a non-debug and debug build are performed (in that order), then the debug
 220 proto area will be used for comparison (which might not be what you want).
 221 .LP
 222 .B Groups of options
 223 .TP 10
 224 .B \-G
 225 Gate keeper default group of options (-u)
 226 .TP
 227 .B \-I
 228 Integration engineer default group of options (-mpu)
 229 .TP
 230 .B \-R
 231 Default group of options for building a release (-mp)
 232 
 233 .LP
 234 .B Miscellaneous options
 235 .TP 10
 236 .B \-V VERS
 237 set the build version string to VERS, overriding VERSION
 238 .TP
 239 .B \-X
 240 Copies the proto area and packages from the IHV and IHV-bin gates into the
 241 nightly proto and package areas.  This is only available on i386.  See
 242 .B REALMODE ENVIRONMENT VARIABLES
 243 and
 244 .B BUILDING THE IHV WORKSPACE
 245 below.
 246 
 247 .LP
 248 .SH ENVIRONMENT VARIABLES
 249 .LP
 250 Here is a list of prominent environment variables that 
 251 .I nightly
 252 references and the meaning of each variable.
 253 .LP
 254 .RE
 255 .B CODEMGR_WS
 256 .RS 5
 257 The root of your workspace, including whatever metadata is kept by
 258 the source code management system.  This is the workspace in which the
 259 build will be done. 
 260 .RE
 261 .LP
 262 .B PARENT_WS
 263 .RS 5
 264 The root of the workspace that is the parent of the
 265 one being built.  This is particularly relevant for configurations
 266 with a main
 267 workspace and build workspaces underneath it; see the 
 268 \-u and \-U
 269 options as well as the PKGARCHIVE environment variable, for more
 270 information.
 271 .RE
 272 .LP
 273 .B BRINGOVER_WS
 274 .RS 5
 275 This is the workspace from which
 276 .I nightly
 277 will fetch sources to either populate or update your workspace;
 278 it defaults to $CLONE_WS.
 279 .RE
 280 .LP
 281 .B CLOSED_BRINGOVER_WS
 282 .RS 5
 283 A full Mercurial workspace has two repositories: one for open source
 284 and one for closed source.  If this variable is non-null, 
 285 .I nightly
 286 will pull from the repository that it names to get the closed source.
 287 It defaults to $CLOSED_CLONE_WS.
 288 .LP
 289 If $CODEMGR_WS already exists and contains only the open repository,
 290 .I nightly
 291 will ignore this variable; you'll need to pull the closed repository
 292 by hand if you want it.
 293 .RE
 294 .LP
 295 .B CLONE_WS
 296 .RS 5
 297 This is the workspace from which
 298 .I nightly
 299 will fetch sources by default.  This is
 300 often distinct from the parent, particularly if the parent is a gate.
 301 .RE
 302 .LP
 303 .B CLOSED_CLONE_WS
 304 .RS 5
 305 This is the default closed-source Mercurial repository that 
 306 .I nightly
 307 might pull from (see
 308 .B CLOSED_BRINGOVER_WS
 309 for details).
 310 .RE
 311 .LP
 312 .B SRC
 313 .RS 5
 314 Root of OS-Net source code, referenced by the Makefiles.  It is
 315 the starting point of build activity.  It should be expressed
 316 in terms of $CODEMGR_WS.
 317 .RE
 318 .LP
 319 .B ROOT
 320 .RS 5
 321 Root of the proto area for the build.  The makefiles direct
 322 installation of build products to this area and
 323 direct references to these files by builds of commands and other
 324 targets.  It should be expressed in terms of $CODEMGR_WS.
 325 .LP
 326 If $MULTI_PROTO is "no", $ROOT may contain a DEBUG or non-DEBUG
 327 build.  If $MULTI_PROTO is "yes", $ROOT contains the DEBUG build and
 328 $ROOT-nd contains the non-DEBUG build.
 329 .RE
 330 .LP
 331 .B TOOLS_ROOT


 487 .RE
 488 .LP
 489 .B TEAMWARE
 490 .RS 5
 491 The gate-defined default location for the Teamware tools; e.g.,
 492 /ws/onnv-tools/SUNWspro.  By default, it is derived from
 493 .BR OPTHOME .
 494 This is used by nightly, but not the makefiles.  There is no
 495 corresponding variable for Mercurial or Subversion, which are assumed
 496 to be installed in the default path.
 497 .RE
 498 .LP
 499 .B ON_CLOSED_BINS
 500 .RS 5
 501 OpenSolaris builds do not contain the closed source tree.  Instead,
 502 the developer downloads a closed binaries tree and unpacks it.  
 503 .B ON_CLOSED_BINS
 504 tells nightly
 505 where to find these closed binaries, so that it can add them into the
 506 build.
 507 .LP
 508 .RE
 509 .B ON_CRYPTO_BINS
 510 .RS 5
 511 This is the path to a compressed tarball that contains debug
 512 cryptographic binaries that have been signed to allow execution
 513 outside of Sun, e.g., $PARENT_WS/packages/$MACH/on-crypto.$MACH.bz2.
 514 .I nightly
 515 will automatically adjust the path for non-debug builds.  This tarball
 516 is needed if the closed-source tree is not present.  Also, it is
 517 usually needed when generating OpenSolaris deliverables from a project
 518 workspace.  This is because most projects do not have access to the
 519 necessary key and certificate that would let them sign their own
 520 cryptographic binaries.
 521 .LP
 522 .RE
 523 .B CHECK_PATHS
 524 .RS 5
 525 Normally, nightly runs the 'checkpaths' script to check for
 526 discrepancies among the files that list paths to other files, such as
 527 exception lists and req.flg.  Set this flag to 'n' to disable this
 528 check, which appears in the nightly output as "Check lists of files."
 529 .RE
 530 .LP
 531 .B CHECK_DMAKE
 532 .RS 5
 533 Nightly validates that the version of dmake encountered is known to be
 534 safe to use.  Set this flag to 'n' to disable this test, allowing any
 535 version of dmake to be used.
 536 .RE
 537 .LP
 538 .B MULTI_PROTO
 539 .RS 5
 540 If "no" (the default), 
 541 .I nightly
 542 will reuse $ROOT for both the DEBUG and non-DEBUG builds.  If "yes",


 570 .RE
 571 .LP
 572 .B POST_BRINGOVER
 573 .RS 5
 574 Run just after bringover completes; not run if no bringover is done.
 575 .RE
 576 .LP
 577 .B POST_NIGHTLY
 578 .RS 5
 579 Run after the build completes, with the return status of nightly - one
 580 of "Completed", "Interrupted", or "Failed" - available in the
 581 environment variable NIGHTLY_STATUS.
 582 .RE
 583 .LP
 584 .B SYS_POST_NIGHTLY
 585 .RS 5
 586 This is reserved for per-build-machine customizations, and runs
 587 immedately after POST_NIGHTLY.
 588 .RE
 589 .LP
 590 .SH REALMODE ENVIRONMENT VARIABLES
 591 .LP
 592 The following environment variables referenced by
 593 .I nightly
 594 are only required when the -X option is used.
 595 .LP
 596 .RE
 597 .B IA32_IHV_WS
 598 .RS 5
 599 Reference to the IHV workspace containing IHV driver binaries.
 600 The IHV workspace must be fully built before starting the ON realmode build.
 601 .LP
 602 .RE
 603 .B IA32_IHV_ROOT
 604 .RS 5
 605 Reference to the IHV workspace proto area.
 606 The IHV workspace must be fully built before starting the ON realmode build.
 607 .LP
 608 .RE
 609 .B IA32_IHV_PKGS
 610 .RS 5
 611 Reference to the IHV workspace packages.  If this is empty or the directory
 612 is non-existent, then nightly will skip copying the packages.
 613 .LP
 614 .RE
 615 .B IA32_IHV_BINARY_PKGS
 616 .RS 5
 617 Reference to binary-only IHV packages.  If this is empty or the directory
 618 is non-existent, then nightly will skip copying the packages.
 619 .LP
 620 .RE
 621 .B SPARC_RM_PKGARCHIVE
 622 .RS 5
 623 Destination for sparc realmode package SUNWrmodu.
 624 Yes, this sparc package really is built on x86.
 625 .SH FILES
 626 .LP
 627 .RS 5
 628 /etc/nightly.conf
 629 .RE
 630 .LP
 631 If present, nightly executes this file just prior to executing the
 632 .I env
 633 file.  
 634 .SH BUILDING THE IHV WORKSPACE
 635 .LP
 636 The IHV workspace can be built with
 637 .I nightly.
 638 The recommended options are:
 639 .LP
 640 .RS 5
 641 NIGHTLY_OPTIONS="-pmWN"
 642 .RE
 643 .LP
 644 None of the realmode environment variables needed for ON realmode builds
 645 are required to build the IHV workspace.
 646 .SH EXAMPLES
 647 .LP
 648 Start with the example file in usr/src/tools/env/developer.sh
 649 (or gatekeeper.sh), copy to myenv and make your changes.
 650 .LP
 651 .PD 0
 652 # grep NIGHTLY_OPTIONS myenv
 653 .LP
 654 NIGHTLY_OPTIONS="-ACrlapDm"
 655 .LP
 656 export NIGHTLY_OPTIONS
 657 .LP
 658 # /opt/onbld/bin/nightly -i myenv
 659 .PD
 660 .LP
 661 .SH SEE ALSO
 662 .BR bldenv (1)


 129 .TP 10
 130 .B \-D
 131 Do a build with DEBUG on (non-DEBUG is built by default)
 132 .TP
 133 .B \-F
 134 Do _not_ do a non-DEBUG build (use with -D to get just a DEBUG build)
 135 .TP
 136 .B \-M
 137 Do not run pmodes (safe file permission checker)
 138 .TP
 139 .B \-i
 140 Do an incremental build, suppressing the "make clobber" that by
 141 default removes all existing binaries and derived files.  From the
 142 command line, -i also suppresses the lint pass and the cstyle/hdrchk
 143 pass
 144 .TP
 145 .B \-n
 146 Suppress the bringover so that the build will start immediately with
 147 current source code
 148 .TP




 149 .B \-p
 150 Create packages for regular install
 151 .TP
 152 .B \-U
 153 Update proto area in the parent workspace
 154 .TP
 155 .B \-u
 156 Update the parent workspace with files generated by the build, as follows.
 157 .RS
 158 .TP
 159 \(bu
 160 Copy proto_list_${MACH} and friends to usr/src in the parent.
 161 .TP
 162 \(bu
 163 When used with -f, build a usr/src/unrefmaster.out in
 164 the parent by merging all the usr/src/unref-${MACH}.out files in the
 165 parent.
 166 .TP
 167 \(bu
 168 When used with -A or -r, copy the contents of the resulting


 188 addition, deletion or change of interface in the .so files.
 189 .TP
 190 .B \-C
 191 Check for cstyle/hdrchk errors
 192 .TP
 193 .B \-f
 194 Check for unreferenced files.  Since the full workspace must be built
 195 in order to accurately identify unreferenced files, -f is ignored for
 196 incremental (-i) builds, or builds that do not include -l, and -p.
 197 .TP
 198 .B \-r
 199 Check the ELF runtime attributes of all dynamic objects
 200 .TP
 201 .B \-l
 202 Do "make lint" in $LINTDIRS (default: $SRC n)
 203 .TP
 204 .B \-N
 205 Do not run protocmp or checkpaths (note: this option is not
 206 recommended, especially in conjunction with the \-p option)
 207 .TP



 208 .B \-w
 209 Report which proto area objects differ between this and the last build.
 210 See wsdiff(1) for details. Note that the proto areas used for comparison
 211 are the last ones constructed as part of the build. As an example, if both
 212 a non-debug and debug build are performed (in that order), then the debug
 213 proto area will be used for comparison (which might not be what you want).
 214 .LP
 215 .B Groups of options
 216 .TP 10
 217 .B \-G
 218 Gate keeper default group of options (-u)
 219 .TP
 220 .B \-I
 221 Integration engineer default group of options (-mpu)
 222 .TP
 223 .B \-R
 224 Default group of options for building a release (-mp)
 225 
 226 .LP
 227 .B Miscellaneous options
 228 .TP 10
 229 .B \-V VERS
 230 set the build version string to VERS, overriding VERSION








 231 
 232 .LP
 233 .SH ENVIRONMENT VARIABLES
 234 .LP
 235 Here is a list of prominent environment variables that 
 236 .I nightly
 237 references and the meaning of each variable.
 238 .LP
 239 .RE
 240 .B CODEMGR_WS
 241 .RS 5
 242 The root of your workspace, including whatever metadata is kept by
 243 the source code management system.  This is the workspace in which the
 244 build will be done. 
 245 .RE
 246 .LP
 247 .B PARENT_WS
 248 .RS 5
 249 The root of the workspace that is the parent of the
 250 one being built.  This is particularly relevant for configurations
 251 with a main
 252 workspace and build workspaces underneath it; see the 
 253 \-u and \-U
 254 options as well as the PKGARCHIVE environment variable, for more
 255 information.
 256 .RE
 257 .LP
 258 .B BRINGOVER_WS
 259 .RS 5
 260 This is the workspace from which
 261 .I nightly
 262 will fetch sources to either populate or update your workspace;
 263 it defaults to $CLONE_WS.
 264 .RE
 265 .LP














 266 .B CLONE_WS
 267 .RS 5
 268 This is the workspace from which
 269 .I nightly
 270 will fetch sources by default.  This is
 271 often distinct from the parent, particularly if the parent is a gate.
 272 .RE
 273 .LP









 274 .B SRC
 275 .RS 5
 276 Root of OS-Net source code, referenced by the Makefiles.  It is
 277 the starting point of build activity.  It should be expressed
 278 in terms of $CODEMGR_WS.
 279 .RE
 280 .LP
 281 .B ROOT
 282 .RS 5
 283 Root of the proto area for the build.  The makefiles direct
 284 installation of build products to this area and
 285 direct references to these files by builds of commands and other
 286 targets.  It should be expressed in terms of $CODEMGR_WS.
 287 .LP
 288 If $MULTI_PROTO is "no", $ROOT may contain a DEBUG or non-DEBUG
 289 build.  If $MULTI_PROTO is "yes", $ROOT contains the DEBUG build and
 290 $ROOT-nd contains the non-DEBUG build.
 291 .RE
 292 .LP
 293 .B TOOLS_ROOT


 449 .RE
 450 .LP
 451 .B TEAMWARE
 452 .RS 5
 453 The gate-defined default location for the Teamware tools; e.g.,
 454 /ws/onnv-tools/SUNWspro.  By default, it is derived from
 455 .BR OPTHOME .
 456 This is used by nightly, but not the makefiles.  There is no
 457 corresponding variable for Mercurial or Subversion, which are assumed
 458 to be installed in the default path.
 459 .RE
 460 .LP
 461 .B ON_CLOSED_BINS
 462 .RS 5
 463 OpenSolaris builds do not contain the closed source tree.  Instead,
 464 the developer downloads a closed binaries tree and unpacks it.  
 465 .B ON_CLOSED_BINS
 466 tells nightly
 467 where to find these closed binaries, so that it can add them into the
 468 build.

 469 .RE












 470 .LP

 471 .B CHECK_PATHS
 472 .RS 5
 473 Normally, nightly runs the 'checkpaths' script to check for
 474 discrepancies among the files that list paths to other files, such as
 475 exception lists and req.flg.  Set this flag to 'n' to disable this
 476 check, which appears in the nightly output as "Check lists of files."
 477 .RE
 478 .LP
 479 .B CHECK_DMAKE
 480 .RS 5
 481 Nightly validates that the version of dmake encountered is known to be
 482 safe to use.  Set this flag to 'n' to disable this test, allowing any
 483 version of dmake to be used.
 484 .RE
 485 .LP
 486 .B MULTI_PROTO
 487 .RS 5
 488 If "no" (the default), 
 489 .I nightly
 490 will reuse $ROOT for both the DEBUG and non-DEBUG builds.  If "yes",


 518 .RE
 519 .LP
 520 .B POST_BRINGOVER
 521 .RS 5
 522 Run just after bringover completes; not run if no bringover is done.
 523 .RE
 524 .LP
 525 .B POST_NIGHTLY
 526 .RS 5
 527 Run after the build completes, with the return status of nightly - one
 528 of "Completed", "Interrupted", or "Failed" - available in the
 529 environment variable NIGHTLY_STATUS.
 530 .RE
 531 .LP
 532 .B SYS_POST_NIGHTLY
 533 .RS 5
 534 This is reserved for per-build-machine customizations, and runs
 535 immedately after POST_NIGHTLY.
 536 .RE
 537 .LP



































 538 .SH FILES
 539 .LP
 540 .RS 5
 541 /etc/nightly.conf
 542 .RE
 543 .LP
 544 If present, nightly executes this file just prior to executing the
 545 .I env
 546 file.  












 547 .SH EXAMPLES
 548 .LP
 549 Start with the example file in usr/src/tools/env/developer.sh
 550 (or gatekeeper.sh), copy to myenv and make your changes.
 551 .LP
 552 .PD 0
 553 # grep NIGHTLY_OPTIONS myenv
 554 .LP
 555 NIGHTLY_OPTIONS="-ACrlapDm"
 556 .LP
 557 export NIGHTLY_OPTIONS
 558 .LP
 559 # /opt/onbld/bin/nightly -i myenv
 560 .PD
 561 .LP
 562 .SH SEE ALSO
 563 .BR bldenv (1)