$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: steven_at_[hidden]
Date: 2008-05-31 15:12:49
Author: steven_watanabe
Date: 2008-05-31 15:12:49 EDT (Sat, 31 May 2008)
New Revision: 45983
URL: http://svn.boost.org/trac/boost/changeset/45983
Log:
Added alphabetic listing of base units
Added:
   sandbox/units/libs/units/doc/generate_base_units.jam   (contents, props changed)
Text files modified: 
   sandbox/units/libs/units/doc/Jamfile.v2 |    20 +++++++++++---------                    
   sandbox/units/libs/units/doc/units.qbk  |    11 +++++++++--                             
   2 files changed, 20 insertions(+), 11 deletions(-)
Modified: sandbox/units/libs/units/doc/Jamfile.v2
==============================================================================
--- sandbox/units/libs/units/doc/Jamfile.v2	(original)
+++ sandbox/units/libs/units/doc/Jamfile.v2	2008-05-31 15:12:49 EDT (Sat, 31 May 2008)
@@ -8,12 +8,10 @@
 # http://www.boost.org/LICENSE_1_0.txt
 
 import path ;
-
 import quickbook ;
-
 using boostbook ;
-
 using doxygen ;
+import generate_base_units ;
 
 rule run_doxygen ( target : files * : name : expand ? )
 {
@@ -76,9 +74,7 @@
 
 run_doxygen base_units_reference
   :
-    ../../../boost/units/systems/base_units.hpp
-    [ path.glob-tree ../../../boost/units/systems/other : *.hpp : detail ]
-    [ path.glob-tree ../../../boost/units/systems/base_units : *.hpp : detail ]
+    [ path.glob-tree ../../../boost/units/base_units : *.hpp : detail ]
   :
     "Base Units Reference"
   :
@@ -87,15 +83,15 @@
 
 run_doxygen dimensions_reference
   :
-    ../../../boost/units/systems/physical_dimensions.hpp
-    [ path.glob-tree ../../../boost/units/systems/physical_dimensions : *.hpp : detail ]
+    ../../../boost/units/physical_dimensions.hpp
+    [ path.glob-tree ../../../boost/units/physical_dimensions : *.hpp : detail ]
   :
     "Dimensions Reference"
   ;
 
 run_doxygen trig_reference
   :
-    ../../../boost/units/systems/trig.hpp
+    #../../../boost/units/systems/trig.hpp
     [ path.glob-tree ../../../boost/units/systems/angle : *.hpp : detail ]
   :
     "Trigonometry and Angle System Reference"
@@ -115,10 +111,16 @@
     "Abstract System Reference"
   ;
 
+generated-qbk base_units : [ path.glob-tree ../../../boost/units/base_units : *.hpp : detail conversions.hpp ] ;
+explicit base_units ;
+
+install base_units_install : base_units : <location>. ;
+
 boostbook standalone
   :
     units.qbk
   :
+    <dependency>base_units_install
     <dependency>units_reference
     <dependency>si_reference
     <dependency>cgs_reference
Added: sandbox/units/libs/units/doc/generate_base_units.jam
==============================================================================
--- (empty file)
+++ sandbox/units/libs/units/doc/generate_base_units.jam	2008-05-31 15:12:49 EDT (Sat, 31 May 2008)
@@ -0,0 +1,53 @@
+# generate_base_units.jam
+#
+# Copyright (c) 2008
+# Steven Watanabe
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt
+
+import quickbook ;
+import type ;
+import generators ;
+import print ;
+import path ;
+import regex ;
+import sequence ;
+
+rule less ( a b ) {
+    if [ path.basename $(a) ]  < [ path.basename $(b) ]  {
+        return true ;
+    }
+}
+
+rule generate_qbk ( target : sources * : properties * ) {
+    print.output $(target) ;
+    local as-path = [ sequence.transform path.make : $(sources:G=) ] ;
+    local known = ;
+    local duplicated = ;
+    for local file in $(as-path) {
+        local base = [ path.basename $(file) ] ;
+        if $(base) in $(known) {
+            if ! $(base) in $(duplicated) {
+                duplicated += $(base) ;
+            }
+        } else {
+            known += $(base) ;
+        }
+    }
+    for local file in [ sequence.insertion-sort $(as-path) : less ] {
+        local output_filename = [ regex.replace $(file) "\\.\\./" "" ] ;
+        local base_filename = [ path.basename $(file) ] ;
+        local base_unit = [ regex.replace $(base_filename) "\\.hpp" "" ] ;
+        if $(base_filename) in $(duplicated) {
+            # tack the directory name onto the end
+            local dir-name = [ path.basename [ path.parent $(file) ] ] ;
+            base_unit = "$(base_unit) ($(dir-name))" ;
+        }
+        print.text "[headerref $(output_filename) $(base_unit)]\\n" : overwrite ;
+    }
+}
+
+type.register GENERATED_QBK : : QUICKBOOK ;
+generators.register-composing generate_base_units.generate_qbk : HPP : GENERATED_QBK ;
Modified: sandbox/units/libs/units/doc/units.qbk
==============================================================================
--- sandbox/units/libs/units/doc/units.qbk	(original)
+++ sandbox/units/libs/units/doc/units.qbk	2008-05-31 15:12:49 EDT (Sat, 31 May 2008)
@@ -1003,14 +1003,21 @@
 
 [xinclude units_reference.xml]
 
+[xinclude dimensions_reference.xml]
 [xinclude si_reference.xml]
 [xinclude cgs_reference.xml]
-[xinclude base_units_reference.xml]
-[xinclude dimensions_reference.xml]
 [xinclude trig_reference.xml]
 [xinclude temperature_reference.xml]
 [xinclude abstract_reference.xml]
 
+[section Base Unit by Category]
+[xinclude base_units_reference.xml]
+[endsect]
+
+[section Alphabetical Listing of Base Units]
+[include base_units.qbk]
+[endsect]
+
 [endsect]
 
 [section:Installation Installation]