$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: steven_at_[hidden]
Date: 2008-06-30 23:25:12
Author: steven_watanabe
Date: 2008-06-30 23:25:11 EDT (Mon, 30 Jun 2008)
New Revision: 46936
URL: http://svn.boost.org/trac/boost/changeset/46936
Log:
Cleaned up Jamfiles
Removed:
   trunk/libs/units/doc/generate_base_units.jam
   trunk/libs/units/test_headers/generate_header.jam
Text files modified: 
   trunk/libs/units/doc/Jamfile.v2          |    47 ++++++++++++++++++++++++++++++++++++--- 
   trunk/libs/units/test_headers/Jamfile.v2 |    31 ++++++++++++++++++-------               
   2 files changed, 65 insertions(+), 13 deletions(-)
Modified: trunk/libs/units/doc/Jamfile.v2
==============================================================================
--- trunk/libs/units/doc/Jamfile.v2	(original)
+++ trunk/libs/units/doc/Jamfile.v2	2008-06-30 23:25:11 EDT (Mon, 30 Jun 2008)
@@ -11,7 +11,9 @@
 import quickbook ;
 using boostbook ;
 using doxygen ;
-import generate_base_units ;
+import print ;
+import regex ;
+import sequence ;
 
 path-constant here : . ;
 
@@ -32,7 +34,7 @@
                                    \"BOOST_UNITS_TYPEOF(a)=typeof(a)\" \\
                                    \"BOOST_PREVENT_MACRO_SUBSTITUTION=\" \\
                                    \"BOOST_UNITS_HAS_TYPEOF=1\" \\
-                                   \"BOOST_UNITS_NON_SI_UNIT(namespace_, name_, symbol_, factor, other_unit, id)= \\
+                                   \"BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string, symbol_, factor, other_unit, id)= \\
                                    namespace boost { namespace units { namespace namespace_ { \\
                                      struct name_ ## _base_unit : boost::units::base_unit<name_ ## _base_unit, other_unit::dimension_type, id> { \\
                                        static const char* name(); \\
@@ -125,10 +127,47 @@
     "Abstract System Reference"
   ;
 
-generated-qbk base_units : [ path.glob-tree $(here)/../../../boost/units/base_units : *.hpp : detail conversions.hpp ] ;
+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 = [ path.relative-to [ path.make $(here)/../../.. ] $(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))" ;
+        }
+# this looks better, but it won't work until my boostbook patch for
+# annotation.xsl gets applied.
+#        print.text "[headerref $(output_filename) $(base_unit)]\\n" : overwrite ;
+        print.text "[headerref $(output_filename)]\\n" : overwrite ;
+    }
+}
+
+make base_units.qbk : [ path.glob-tree $(here)/../../../boost/units/base_units : *.hpp : detail conversions.hpp ] : @generate-qbk ;
 explicit base_units ;
 
-install base_units_install : base_units : <location>. ;
+install base_units_install : base_units.qbk : <location>. ;
 
 xml units
   :
Deleted: trunk/libs/units/doc/generate_base_units.jam
==============================================================================
--- trunk/libs/units/doc/generate_base_units.jam	2008-06-30 23:25:11 EDT (Mon, 30 Jun 2008)
+++ (empty file)
@@ -1,56 +0,0 @@
-# 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))" ;
-        }
-# this looks better, but it won't work until my boostbook patch for
-# annotation.xsl gets applied.
-#        print.text "[headerref $(output_filename) $(base_unit)]\\n" : overwrite ;
-        print.text "[headerref $(output_filename)]\\n" : overwrite ;
-    }
-}
-
-type.register GENERATED_QBK : : QUICKBOOK ;
-generators.register-composing generate_base_units.generate_qbk : HPP : GENERATED_QBK ;
Modified: trunk/libs/units/test_headers/Jamfile.v2
==============================================================================
--- trunk/libs/units/test_headers/Jamfile.v2	(original)
+++ trunk/libs/units/test_headers/Jamfile.v2	2008-06-30 23:25:11 EDT (Mon, 30 Jun 2008)
@@ -1,6 +1,6 @@
 # Jamfile.v2
 #
-# Copyright (c) 2007
+# Copyright (c) 2007-2008
 # Steven Watanabe
 #
 # Distributed under the Boost Software License, Version 1.0. (See
@@ -11,19 +11,21 @@
 import path ;
 import regex ;
 import print ;
-import generate_header ;
 
 project test_headers :
     requirements <include>$(BOOST_ROOT) <include>../../..
 ;
 
-headers = ;
+headers = [ path.glob-tree ../../../boost/units : *.hpp : detail ] ;
 
 rule setup ( ) {
-  for local file in [ path.glob-tree ../../../boost/units : *.hpp : cmath_*_impl*.hpp ] {
+  for local file in $(headers) {
 
-    headers += $(file) ;
-    result += [ compile test.cpp : <define>BOOST_UNITS_HEADER_NAME=$(file) <dependency>$(file) : [ regex.replace [ path.relative-to ../../.. $(file) ] "/" "_" ] ] ;
+    result += [ compile test.cpp :
+                 <define>BOOST_UNITS_HEADER_NAME=$(file)
+                 <dependency>$(file)
+               : 
+                 [ regex.replace [ path.relative-to ../../.. $(file) ] "/" "_" ] ] ;
 
   }
   return $(result) ;
@@ -31,13 +33,24 @@
 
 tests = [ setup ] ;
 
-generate-include-all-cpp include_all1 : $(headers) ;
-generate-include-all-cpp include_all2 : $(headers) ;
+rule generate-include-all ( target : sources * : properties * ) {
+
+    print.output $(target) ;
+
+    for local file in $(sources) {
+        print.text "#include <$(file:G=)>
+" : overwrite ;
+    }
+
+}
+
+make include_all1.cpp : $(headers) : @generate-include-all ;
+make include_all2.cpp : $(headers) : @generate-include-all ;
 
 import testing ;
 
 test-suite units_headers :
   $(tests)
 # this ought to catch non-inlined functions and other duplicate definitions
-  [ link include_all1 include_all2 main.cpp : <include>. : include_all_headers ]
+  [ link include_all1.cpp include_all2.cpp main.cpp : <include>. : include_all_headers ]
   ;
Deleted: trunk/libs/units/test_headers/generate_header.jam
==============================================================================
--- trunk/libs/units/test_headers/generate_header.jam	2008-06-30 23:25:11 EDT (Mon, 30 Jun 2008)
+++ (empty file)
@@ -1,28 +0,0 @@
-# generate_header.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 type ;
-import generators ;
-import print ;
-import path ;
-
-rule generate_include_all ( target : sources * : properties * ) {
-
-    print.output $(target) ;
-
-    for local file in $(sources) {
-        print.text "#include <$(file:G=)>
-" : overwrite ;
-    }
-
-}
-
-type.register GENERATE_INCLUDE_ALL_CPP : : CPP ;
-
-generators.register-composing generate_header.generate_include_all : HPP : GENERATE_INCLUDE_ALL_CPP ;