mirror of
https://github.com/boostorg/build.git
synced 2026-02-11 11:42:14 +00:00
Improve --help output.
[SVN r36624]
This commit is contained in:
@@ -14,7 +14,7 @@ import set ;
|
||||
import project ;
|
||||
import print ;
|
||||
import os ;
|
||||
|
||||
import version ;
|
||||
|
||||
# List of possible modules, but which really aren't.
|
||||
#
|
||||
@@ -44,7 +44,7 @@ rule process (
|
||||
local did-help = ;
|
||||
switch $(command)
|
||||
{
|
||||
case --help-all :
|
||||
case --help-internal :
|
||||
local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ;
|
||||
path-to-modules ?= . ;
|
||||
local possible-modules = [ GLOB $(path-to-modules) : *\\.jam ] ;
|
||||
@@ -79,12 +79,12 @@ rule process (
|
||||
set-output-file $(values[1]) ;
|
||||
did-help = true ;
|
||||
|
||||
case --help-options :
|
||||
case --help-doc-options :
|
||||
local doc-module-spec = [ split-symbol doc ] ;
|
||||
do-scan $(doc-module-spec[1]) : print-help-options ;
|
||||
did-help = true ;
|
||||
|
||||
case --help-usage :
|
||||
case --help-options :
|
||||
print-help-usage ;
|
||||
did-help = true ;
|
||||
|
||||
@@ -113,6 +113,8 @@ rule process (
|
||||
}
|
||||
else
|
||||
{
|
||||
version.print ;
|
||||
ECHO ;
|
||||
# First print documentation from the current Jamfile, if any.
|
||||
local project-file =
|
||||
[ project.find-jamfile . : no-error ]
|
||||
|
||||
@@ -235,26 +235,36 @@ local rule set-variable-doc (
|
||||
# Generates a general description of the documentation and help system.
|
||||
#
|
||||
local rule print-help-top ( )
|
||||
{
|
||||
print.section "Available Help"
|
||||
These are the available options for obtaining documentation.
|
||||
Some options have additional instructions on how to get more
|
||||
detailed information. Multiple options are allowed and
|
||||
sometimes required. For example, the options that configure
|
||||
the help system still require a regular help request option
|
||||
for any output to be generated.
|
||||
;
|
||||
{
|
||||
print.section "General command line usage" ;
|
||||
|
||||
print.text " bjam [options] [properties] [targets]
|
||||
|
||||
Options, properties and targets can be specified in any order.
|
||||
" ;
|
||||
|
||||
print.section "Important Options" ;
|
||||
|
||||
print.list-start ;
|
||||
print.list-item "--clean Remove target instead of building" ;
|
||||
print.list-item "-a Rebuild everything" ;
|
||||
print.list-item "-n Don't execute the command, only print them" ;
|
||||
print.list-item "-d+2 Show commands as they are executed" ;
|
||||
print.list-item "-d0 Supress all informational messages" ;
|
||||
print.list-item "-q Stop at first error" ;
|
||||
print.list-item "--debug-configuration Diagnose configuration" ;
|
||||
print.list-item "--debug-building Report which targets are built with what properties" ;
|
||||
print.list-item "--debug-generator Diagnose generator search/execution" ;
|
||||
print.list-end ;
|
||||
|
||||
print.section "Further Help"
|
||||
The following options can be used to obtain additional documentation.
|
||||
;
|
||||
|
||||
print.list-start ;
|
||||
print.list-item --help; This help message. ;
|
||||
print.list-item --help-usage; How to invoke '"bjam".' ;
|
||||
print.list-item --help-all; Brief information on available modules. ;
|
||||
print.list-item --help <module-name>; Get information about a module. ;
|
||||
print.list-item --help-options; Options for controlling the help display. ;
|
||||
print.list-item --help-output <type>; The type of output to genetare.
|
||||
'"console" is formated text echoed to the console (the default);'
|
||||
'"text" is formated text appended to the output file;'
|
||||
'"html" is HTML output to the file.' ;
|
||||
print.list-item --help-output-file <file>; The file to output the documentation. ;
|
||||
print.list-item "--help-options Print more obscure command line options." ;
|
||||
print.list-item "--help-internal Boost.Build implementation details." ;
|
||||
print.list-item "--help-doc-options Implementation details doc formatting." ;
|
||||
print.list-end ;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ rule list-item (
|
||||
{
|
||||
if $(output-type) = plain
|
||||
{
|
||||
lines [ split-at-words "*" $(item) ] : " " ;
|
||||
lines [ split-at-words "*" $(item) ] : " " " " ;
|
||||
}
|
||||
else if $(output-type) = html
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user