|
Boost-Commit : |
From: jurko.gospodnetic_at_[hidden]
Date: 2008-08-30 12:24:00
Author: jurko
Date: 2008-08-30 12:23:59 EDT (Sat, 30 Aug 2008)
New Revision: 48476
URL: http://svn.boost.org/trac/boost/changeset/48476
Log:
Minor stylistic changes made to the Boost Build util/option.jam module.
Text files modified:
trunk/tools/build/v2/util/option.jam | 42 +++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 22 deletions(-)
Modified: trunk/tools/build/v2/util/option.jam
==============================================================================
--- trunk/tools/build/v2/util/option.jam (original)
+++ trunk/tools/build/v2/util/option.jam 2008-08-30 12:23:59 EDT (Sat, 30 Aug 2008)
@@ -6,6 +6,7 @@
import modules ;
+
rule get ( name : default-value ? )
{
local m = [ MATCH --$(name)=(.*) : [ modules.peek : ARGV ] ] ;
@@ -16,23 +17,22 @@
else
{
return $(default-value) ;
- }
+ }
}
+# Check command-line args as soon as possible. For each option try to load
+# module named after option. Is that succeeds, invoke 'process' rule in the
+# module. The rule may return "true" to indicate that the regular build process
+# should not be attempted.
+#
+# Options take the general form of: --<name>[=<value>] [<value>]
+#
rule process ( )
-{
- # Check command-line args as soon as possible. For each option try
- # to load module named after option. Is that succeeds, invoke 'process'
- # rule in the module. The rule may return "true" to indicate that the
- # regular build process should not be attempted.
- #
- # Options take the general form of: --<name>[=<value>] [<value>]
- #
-
+{
local ARGV = [ modules.peek : ARGV ] ;
local BOOST_BUILD_PATH = [ modules.peek : BOOST_BUILD_PATH ] ;
-
+
local dont-build ;
local args = $(ARGV) ;
while $(args)
@@ -62,27 +62,26 @@
args = $(args[2-]) ;
}
- # look in options subdirectories of BOOST_BUILD_PATH for modules
+ # Jook in options subdirectories of BOOST_BUILD_PATH for modules
# matching the full option name and then its prefix.
local plugin-dir = options ;
- local option-files = [
- GLOB $(plugin-dir:D=$(BOOST_BUILD_PATH)) : $(full-name).jam $(prefix).jam
- ] ;
+ local option-files = [ GLOB $(plugin-dir:D=$(BOOST_BUILD_PATH)) :
+ $(full-name).jam $(prefix).jam ] ;
if $(option-files)
{
- # load the file into a module named for the option
+ # Load the file into a module named for the option.
local f = $(option-files[1]) ;
local module-name = --$(f:D=:S=) ;
modules.load $(module-name) : $(f:D=) : $(f:D) ;
- # if there's a process rule, call it with the full option name
- # and its value (if any). If there was no "=" in the option,
- # the value will be empty.
+ # If there is a process rule, call it with the full option name
+ # and its value (if any). If there was no "=" in the option, the
+ # value will be empty.
if process in [ RULENAMES $(module-name) ]
{
- dont-build +=
- [ modules.call-in $(module-name) : process --$(full-name) : $(values) ] ;
+ dont-build += [ modules.call-in $(module-name) : process
+ --$(full-name) : $(values) ] ;
}
}
}
@@ -90,4 +89,3 @@
return $(dont-build) ;
}
-
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk