Boost logo

Boost-Commit :

From: srajko_at_[hidden]
Date: 2007-06-14 21:23:53


Author: srajko
Date: 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
New Revision: 7051
URL: http://svn.boost.org/trac/boost/changeset/7051

Log:
add FileTemplate tests, fix specific_replacement bug, rename Jamfile.v2->Jamfile,works with Python2.3

Added:
   sandbox/template_under_construction/file_template/libs/file_template/test/
   sandbox/template_under_construction/file_template/libs/file_template/test/bjam_sandbox_test.sh (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/Jamfile (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/LICENSE_1_0.txt (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost-build.jam (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test.hpp (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test/test.hpp (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/build/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/Jamfile (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/boostbook.css (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/blank.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/caution.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/draft.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/home.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/important.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/next.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/note.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/prev.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/tip.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/up.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/warning.png (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/reference.css (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/test.qbk (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/Jamfile (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/example.cpp (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/src/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/Jamfile (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing.cpp (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing_n.cpp (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/project-root.jam (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.doc (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.txt (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/xyz/
   sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/xyz/file.xyz (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.doc (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.txt (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/xyz/
   sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/xyz/file.xyz (contents, props changed)
   sandbox/template_under_construction/file_template/libs/file_template/test/test.sh (contents, props changed)
   sandbox/template_under_construction/sandbox/$template_library$/Jamfile
      - copied unchanged from r7020, /sandbox/template_under_construction/sandbox/$template_library$/Jamfile.v2
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/Jamfile.py
      - copied unchanged from r7020, /sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/Jamfile.v2.py
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/example/Jamfile
      - copied unchanged from r7020, /sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/example/Jamfile.v2
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/test/Jamfile.py
      - copied unchanged from r7020, /sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/test/Jamfile.v2.py
Removed:
   sandbox/template_under_construction/sandbox.py
   sandbox/template_under_construction/sandbox/$template_library$/Jamfile.v2
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/Jamfile.v2.py
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/html/images/Thumbs.db
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/example/Jamfile.v2
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/test/Jamfile.v2.py
Text files modified:
   sandbox/template_under_construction/file_template/boost-build.jam | 1
   sandbox/template_under_construction/make_template.py | 50 +++++++++++++++++++++++----------------
   sandbox/template_under_construction/sandbox/$template_library$/boost-build.jam | 1
   sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/build/vc8ide.py | 2 +
   sandbox/template_under_construction/sandbox/sandbox.py | 19 ++++++++------
   5 files changed, 42 insertions(+), 31 deletions(-)

Modified: sandbox/template_under_construction/file_template/boost-build.jam
==============================================================================
--- sandbox/template_under_construction/file_template/boost-build.jam (original)
+++ sandbox/template_under_construction/file_template/boost-build.jam 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -7,5 +7,4 @@
 # Set the BOOST_ROOT environment variable on your command-line or in the
 # environment to point at the root of your regular Boost installation.
 
-JAMFILE = [Jj]amfile.v2 ;
 boost-build $(BOOST_ROOT)/tools/build/v2 ;
\ No newline at end of file

Added: sandbox/template_under_construction/file_template/libs/file_template/test/bjam_sandbox_test.sh
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/bjam_sandbox_test.sh 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,14 @@
+# Copyright 2007 Stjepan Rajko.
+# 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)
+
+current=`pwd`
+cd results/sandbox_command_line/test/libs/test/doc
+bjam $*
+cd ../example
+bjam $*
+cd ../test
+bjam $*
+
+cd $current

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/Jamfile 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,13 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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)
+
+
+use-project boost
+ : $(BOOST_ROOT)
+ ;
+
+project boost/test
+ : build-dir bin.v2
+ ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/LICENSE_1_0.txt 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost-build.jam
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost-build.jam 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,10 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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)
+
+
+# Set the BOOST_ROOT environment variable on your command-line or in the
+# environment to point at the root of your regular Boost installation.
+
+boost-build $(BOOST_ROOT)/tools/build/v2 ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test.hpp
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test.hpp 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,13 @@
+// Copyright 2007 John Doe and Jane H. Dough.
+// 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)
+
+
+#ifndef BOOST_TEST_HPP
+#define BOOST_TEST_HPP
+
+#include <boost/test/test.hpp>
+
+#endif // BOOST_TEST_HPP
+

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test/test.hpp
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/boost/test/test.hpp 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,82 @@
+// Copyright 2007 John Doe and Jane H. Dough.
+// 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)
+
+
+#ifndef BOOST_TEST_TEST_HPP
+#define BOOST_TEST_TEST_HPP
+
+namespace boost {
+namespace test {
+
+/// The test class does nothing.
+/** \ingroup group_nothing
+ \param T The type on which test does nothing.
+ \warning This class does nothing.
+ \todo Make this class do something.
+ \bug This class does do something.
+
+ Since test does nothing, it is not very useful.
+*/
+template<typename T
+#ifndef DOXYGEN_DOCS_ONLY
+ , typename Enable=void // maybe documentation doesn't need to know about this.
+#endif
+>
+class test
+{
+public:
+ /// Default constructor.
+ /** This constructor actually does something. It sets the internal
+ counters to 0.
+ */
+ test() : nothing_count(0), call_count(0) {}
+
+ /// This function does nothing with the passed parameter.
+ void nothing(T t)
+ {
+ nothing_count++;
+ call_count++;
+ }
+
+ /// This function does nothing with the passed parameter a specified number of times.
+ /** \param n Number of times nothing is done.
+
+ This function is equivalent to calling nothing n times.
+ */
+ void nothing(T t, unsigned n)
+ {
+ call_count++;
+ for (unsigned i=0; i<n; i++)
+ nothing(t);
+ call_count-=n;
+ }
+
+ /// This function can be used to determine how many times nothing has been done.
+ /** \returns count of how many times nothing has been done.
+ */
+ int get_nothing_count()
+ {
+ return nothing_count;
+ }
+ /// This function can be used to determine how many calls have been made to the object.
+ /** \returns count of how many times a method of this object has been called by the user.
+ */
+ int get_call_count()
+ {
+ return call_count;
+ }
+protected:
+ /// The number of times this object did nothing.
+ int nothing_count;
+private:
+ // Number of times the member function was called.
+ int call_count;
+};
+
+} // namespace test
+} // namespace boost
+
+#endif // BOOST_TEST_TEST_HPP
+

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/Jamfile 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,45 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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)
+
+
+project boost/test/doc ;
+
+import boostbook : boostbook ;
+using quickbook ;
+
+local loc = [ path.native [ path.pwd ] ] ;
+local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
+
+xml test_xml : test.qbk ;
+doxygen test_doxygen
+ :
+ [ glob
+ ../../../boost/test/*.hpp ]
+ :
+ <doxygen:param>EXAMPLE_PATH=../example
+ <doxygen:param>STRIP_FROM_PATH=$(root)
+ <doxygen:param>STRIP_FROM_INC_PATH=$(root)
+ <doxygen:param>EXTRACT_ALL=NO
+ <doxygen:param>HIDE_UNDOC_MEMBERS=NO
+ <doxygen:param>EXTRACT_PRIVATE=NO
+ <doxygen:param>DETAILS_AT_TOP=YES
+ <doxygen:param>ENABLE_PREPROCESSING=YES
+ <doxygen:param>MACRO_EXPANSION=YES
+ <doxygen:param>SEARCH_INCLUDES=YES
+ <doxygen:param>INCLUDE_PATH=../../..
+ <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
+ ;
+
+boostbook standalone
+ :
+ test_xml
+ test_doxygen
+ :
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>chunk.section.depth=3
+ <xsl:param>toc.section.depth=3
+ <xsl:param>toc.max.depth=3
+ <xsl:param>generate.section.toc.level=3
+ ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/boostbook.css 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,538 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to 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)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 10pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 10pt;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 10pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+ .toc-main
+ {
+ width: 600;
+ text-align: center;
+ margin: 1pc 1pc 1pc 10%;
+ padding: 2pc 1pc 3pc 1pc;
+ line-height: 0.1;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 120%;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 10pt;
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p
+ {
+ margin: 0em 0em 0.5em 0em;
+ }
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 1em 0em 1em 2em;
+ font-size: 10pt;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ font-size: 8pt;
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ /* Links */
+ a
+ {
+ color: #0C7445;
+ }
+
+ a:visited
+ {
+ color: #663974;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #E8FBE9; }
+ .dk_grey_bkd { background-color: #A0DAAC; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #E3F9E4;
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ border-collapse: collapse;
+ background-color: #FAFFFB;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/reference.css
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/html/reference.css 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,5 @@
+PRE.synopsis {
+ background-color: #e0ffff;
+ border: thin solid blue;
+ padding: 1em
+}

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/test.qbk
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/doc/test.qbk 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,46 @@
+
+[library Test
+ [quickbook 1.4]
+ [version 0.01e-10]
+ [authors [Doe, John],[Dough, Jane H.]]
+ [copyright 2007 John Doe and Jane H. Dough]
+ [purpose Doing nothing.]
+ [license
+ 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])
+ ]
+]
+
+Welcome to the Test! One day, it will perhaps be called
+Boost.Test. Until then, feel free to use it to do nothing.
+
+[warning Test is not an official Boost library.]
+
+[section:introduction Introduction]
+
+User, this is Test. Test, this is the user. Be nice to each other.
+
+[section:start Getting Started]
+
+The Test is located in the test directory of the boost sandbox.
+
+
+You might also want to look at the [link test.reference reference].
+
+
+[endsect]
+
+[endsect]
+
+[xinclude test_doxygen.xml]
+
+[section:license License]
+
+Copyright 2007 John Doe and Jane H. Dough.
+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])
+
+
+[endsect]

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/Jamfile 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,14 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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)
+
+
+project
+ : requirements
+ <include>../../..
+ <library>/boost/test//boost_unit_test_framework/<link>static
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+exe example : example.cpp ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/example.cpp
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/example/example.cpp 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,36 @@
+// Copyright 2007 John Doe and Jane H. Dough.
+// 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)
+
+
+//[ test_example
+#include <boost/test/unit_test.hpp>
+using boost::unit_test::test_suite;
+
+#include <boost/test.hpp>
+
+void test_example()
+{
+ boost::test::test<int> object;
+ int x = 0;
+
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),0);
+ object.nothing(x);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),1);
+
+ BOOST_CHECK_EQUAL(object.get_call_count(),1);
+ object.nothing(x,4);
+ BOOST_CHECK_EQUAL(object.get_call_count(),2);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),5);
+
+} // end void test_example
+
+test_suite* init_unit_test_suite(int argc, char* argv[])
+{
+ test_suite* test = BOOST_TEST_SUITE( "RPC test suite" );
+ test->add(BOOST_TEST_CASE(&test_example));
+ return test;
+}
+
+//]

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/Jamfile 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,16 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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 testing ;
+
+project
+ : requirements
+ <include>../../..
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+run test_nothing.cpp ;
+run test_nothing_n.cpp ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing.cpp
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing.cpp 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,20 @@
+// Copyright 2007 John Doe and Jane H. Dough.
+// 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)
+
+
+#include <boost/test.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+int test_main(int, char* [])
+{
+ boost::test::test<int> object;
+ int x = 0;
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),0);
+ object.nothing(x);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),1);
+
+ return 0;
+};

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing_n.cpp
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/libs/test/test/test_nothing_n.cpp 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,21 @@
+// Copyright 2007 John Doe and Jane H. Dough.
+// 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)
+
+
+#include <boost/test.hpp>
+
+#include <boost/test/included/test_exec_monitor.hpp>
+
+int test_main(int, char* [])
+{
+ boost::test::test<int> object;
+ int x = 0;
+ BOOST_CHECK_EQUAL(object.get_call_count(),0);
+ object.nothing(x,4);
+ BOOST_CHECK_EQUAL(object.get_call_count(),1);
+ BOOST_CHECK_EQUAL(object.get_nothing_count(),4);
+
+ return 0;
+};

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/project-root.jam
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/sandbox_test/test/project-root.jam 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,9 @@
+# Copyright 2007 John Doe and Jane H. Dough.
+# 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 os ;
+
+path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.doc
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.doc 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get copied because the 'doc' extension is not processed: $template_text$
+$template_substitution$

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.txt
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/substituted/file.txt 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get substituted: substituted in txt file
+This will get substituted: substituted

Added: sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/xyz/file.xyz
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/expected/simple_template/xyz/file.xyz 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get substituted in xyz: substituted in xyz file
+This will get substituted: substituted

Added: sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.doc
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.doc 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get copied because the 'doc' extension is not processed: $template_text$
+$template_substitution$

Added: sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.txt
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/$template_text$/file.txt 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get substituted: $template_text$
+This will get substituted: $template_substitution$

Added: sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/xyz/file.xyz
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/simple_template/xyz/file.xyz 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,2 @@
+This will get substituted in xyz: $template_text$
+This will get substituted: $template_substitution$

Added: sandbox/template_under_construction/file_template/libs/file_template/test/test.sh
==============================================================================
--- (empty file)
+++ sandbox/template_under_construction/file_template/libs/file_template/test/test.sh 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -0,0 +1,32 @@
+# Copyright 2007 Stjepan Rajko.
+# 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)
+
+run_test ()
+{
+ result=results/$1
+ expected=expected/$2
+ input=$3
+ shift 3
+ echo ---------------- | cat >>test.results
+ echo $input \| make_template.py $* | cat >>test.results
+ echo ---------------- | cat >>test.results
+ echo $input | python2.3 ../../../../make_template.py destination=$result "$@"
+ diff -r $expected $result | cat >>test.results
+}
+
+rm test.results
+rm -r results
+
+run_test simple_type_in simple_template substituted simple_template
+run_test simple_command_line simple_template "" simple_template text=substituted
+run_test sandbox_command_line sandbox_test "" ../../../../sandbox "author=John Doe,Jane H. Dough" library=test
+
+echo
+echo
+echo
+echo --------------------------------------------------------
+echo - Final test.results diff:
+
+cat test.results

Modified: sandbox/template_under_construction/make_template.py
==============================================================================
--- sandbox/template_under_construction/make_template.py (original)
+++ sandbox/template_under_construction/make_template.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -5,7 +5,6 @@
 
 import os
 import time
-import uuid
 import shutil
 import sys
 import getopt
@@ -21,7 +20,7 @@
         self.__level__ = 0
 
     def __prefix__(self):
- return ''.join('|' for x in range(self.__level__))
+ return '|'*self.__level__
 
     def __print__(self, string):
         print self.__prefix__() + string
@@ -57,7 +56,7 @@
         
         # initialize self.options
         self.options = dict()
- self.options['ignore']=set()
+ self.options['ignore']=list()
         
         # initialize common regular expressions
         self.any = re.compile(r'.*\Z')
@@ -141,6 +140,15 @@
             if name.endswith(item):
                 return True
         return False
+
+ def replace(self, name, string):
+ if self.matches(name):
+ return string.replace(self.template, self.value)
+ return string
+
+ def __str__(self):
+ return str(self.process_extensions) + ':' + self.template + '->' + self.value
+
 
 class FileSpecificReplacements(Replacements):
     def matches(self, name):
@@ -151,7 +159,7 @@
 
 # ContentReplacements contains both templates for specific file extensions
 # and all processable file extensions.
-class ContentReplacements():
+class ContentReplacements:
     def __init__(self):
         self.general_replacements = Replacements()
         self.specific_replacements = FileSpecificReplacements()
@@ -161,7 +169,7 @@
         if not self.matches(name):
             return content
         for item in self.specific_replacements:
- content = item.replace(content)
+ content = item.replace(name, content)
         for item in self.general_replacements:
             content = item.replace(content)
         return content
@@ -214,15 +222,15 @@
 
         # only take the content from first $template_start$ on,
         # and convert all line breaks to '\n'
- discarded, sep, content = content.partition('$template_start$')
- if len(sep)==0:
- content = discarded
+ beginning = content.find('$template_start$')
+ if beginning >= 0:
+ content = content[beginning:len(content)]
         
         content_lines = content.splitlines()
- if len(sep) != 0:
+ if beginning >= 0:
             content_lines.pop(0)
- content = '\n'.join(content_lines)
-
+ content = '\n'.join(content_lines) + '\n'
+
         return self.replace_content(name, content)
 
     def name_replacement(self, key, value):
@@ -231,7 +239,7 @@
     def all_content_replacement(self, key, value):
         self.content_replacements.general_replacements.append(Replacement(key, value))
 
- def content_replacement(self, extensions, key, value):
+ def content_replacement(self, extensions, key, value):
         self.content_replacements.specific_replacements.append(
             FileSpecificReplacement(extensions, key, value))
 
@@ -245,7 +253,7 @@
     def examine(self):
         self.directory = self.options.get('template')
         self.into = self.options.get('into',None,'')
- ignore_set = self.options.get('ignore')
+ ignore_list = self.options.get('ignore')
         
         cwd = os.getcwd()
         os.chdir(self.directory)
@@ -285,7 +293,7 @@
 
             for name in dirs:
                 if name.startswith('.') or \
- os.path.normpath(os.path.join(root, name)) in ignore_set:
+ ignore_list.count(os.path.normpath(os.path.join(root, name)))>0:
                     self.ignore_subdirectory(name)
             for name in self.__dirs_clear__:
                 dirs.remove(name)
@@ -417,12 +425,10 @@
 
     def __scan__(self, my_list, directory):
         result_list = list()
- result_set = set()
         for item in my_list:
             idir, ibase = os.path.split(item.destination)
- if os.path.normpath(idir) == os.path.normpath(directory) and ibase not in result_set :
+ if os.path.normpath(idir) == os.path.normpath(directory) and result_list.count(ibase)==0:
                 result_list.append(ibase)
- result_set.add(ibase)
         return result_list
 
     def files_in(self, directory):
@@ -455,12 +461,14 @@
     templates.append(Template())
     index = 0
 
- global_options = set(['destination'])
+ global_options = ['destination']
     options = templates[0].options
     
     for arg in sys.argv[1:]:
- option, eq, val = arg.partition('=')
- if len(eq)==0:
+ split = arg.split('=')
+ option = split[0]
+ val = '='.join(split[1:len(split)])
+ if len(split)==1:
             # templates can be specified without template=
             val = option
             option = 'template'
@@ -470,7 +478,7 @@
             # done with this template, move to the next
             templates.append(Template())
             index += 1
- if option in global_options:
+ if global_options.count(option)>0:
             options.options[option] = val
         elif option == 'ignore':
             templates[index].options.options[option].add(os.path.normpath(val))

Deleted: sandbox/template_under_construction/sandbox.py
==============================================================================
--- sandbox/template_under_construction/sandbox.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
+++ (empty file)
@@ -1,56 +0,0 @@
-# template script
-
-template.log_message('Processing Boost Sandbox template.')
-
-template.template_root = 'sandbox/'
-template.template_dir = '$template_library$'
-
-library_name = template.options.get('library', template.options.alnum, None,
- 'library name (all lowercase, use underscores to separate words, e.g. "my_library"): ')
-# Copyright 2007 Stjepan Rajko.
-# 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)
-
-library_name_list = library_name.split("_")
-library_name_list_capitalized = list()
-for item in library_name_list[:]:
- library_name_list_capitalized.append(item.capitalize())
-library_name_capitalized = ' '.join(library_name_list_capitalized)
-library_name_concat_capitalized = ''.join(library_name_list_capitalized)
-
-_copyright = """_COMMENT_Copyright $template_year$ $template_author$.
-_COMMENT_Distributed under the Boost Software License, Version 1.0. (See
-_COMMENT_accompanying file LICENSE_1_0.txt or copy at
-_COMMENT_http://www.boost.org/LICENSE_1_0.txt)
-"""
-
-author_list = template.options.get('author', template.options.any, None,
- 'list of authors (comma separated, no spaces outside names, e.g., "My Name,Notmy R. Name": ')
-author_reversed = list()
-for name in author_list.rsplit(','):
- first_space_last = name.rpartition(" ")
- author_reversed.append('[' + first_space_last[2] + ', ' + first_space_last[0] + ']')
-
-authors, comma, last_author = author_list.rpartition(",")
-if len(comma) > 0:
- author_list = (authors + " and " + last_author).replace(',', ', ')
-else:
- author_list = last_author
-
-template.name_replacement('$template_library$', library_name)
-
-template.all_content_replacement('$template_library$', library_name)
-template.all_content_replacement('$template_Library$', library_name_capitalized)
-template.all_content_replacement('$template_LibraryConcat$', library_name_concat_capitalized)
-template.all_content_replacement('$template_LIBRARY$', library_name.upper())
-template.all_content_replacement('$template_Boost_Library$', 'Boost.' + library_name_capitalized)
-template.content_replacement(['.v2', '.jam'], '$template_python_copyright$', _copyright.replace('_COMMENT_','# '))
-template.content_replacement(['.hpp', '.cpp'], '$template_cpp_copyright$', _copyright.replace('_COMMENT_','// '))
-template.content_replacement(['.qbk'], '$template_qbk_copyright$',(_copyright.replace('_COMMENT_',''))
- .replace('http://www.boost.org/LICENSE_1_0.txt',
- '[@http://www.boost.org/LICENSE_1_0.txt]'))
-template.all_content_replacement('$template_author_reversed$', ','.join(author_reversed))
-template.all_content_replacement('$template_author$', author_list)
-template.all_content_replacement('$template_year$', str(time.localtime().tm_year))
-

Deleted: sandbox/template_under_construction/sandbox/$template_library$/Jamfile.v2
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/Jamfile.v2 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
+++ (empty file)
@@ -1,15 +0,0 @@
-# Copyright 2007 Stjepan Rajko.
-# 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)
-
-$template_start$
-$template_python_copyright$
-
-use-project boost
- : $(BOOST_ROOT)
- ;
-
-project boost/$template_library$
- : build-dir bin.v2
- ;

Modified: sandbox/template_under_construction/sandbox/$template_library$/boost-build.jam
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/boost-build.jam (original)
+++ sandbox/template_under_construction/sandbox/$template_library$/boost-build.jam 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -9,5 +9,4 @@
 # Set the BOOST_ROOT environment variable on your command-line or in the
 # environment to point at the root of your regular Boost installation.
 
-JAMFILE = [Jj]amfile.v2 ;
 boost-build $(BOOST_ROOT)/tools/build/v2 ;

Modified: sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/build/vc8ide.py
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/build/vc8ide.py (original)
+++ sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/build/vc8ide.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -7,6 +7,8 @@
 
 if template.options.get_boolean('vc8ide', False):
 
+ import uuid
+
     log.message('Processing MSVC 8.0 IDE template.')
 
     _msvc_build_command = """\t\t\t\tBuildCommandLine="bjam --v2 ../../$(ProjectName) $(ConfigurationName)"

Deleted: sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/Jamfile.v2.py
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/Jamfile.v2.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
+++ (empty file)
@@ -1,85 +0,0 @@
-# template file
-
-# Copyright 2007 Stjepan Rajko.
-# 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)
-
-docs = template.options.get('docs')
-doxygen = docs != 'qb'
-
-template.append_content("""$template_start$
-$template_python_copyright$
-
-project boost/$template_library$/doc ;
-
-import boostbook : boostbook ;
-using quickbook ;
-
-local loc = [ path.native [ path.pwd ] ] ;
-local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
-
-xml $template_library$_xml : $template_library$.qbk ;""")
-
-doxy_source_files = list()
-for root, dirs, files in results.walk(
- # we want the returned root to be relative to $template_library$
- template.replace_name('$template_library$'),
- # and want to walk the boost/$template_library$ directory underneath that
- template.replace_name('boost/$template_library$')):
- if os.path.basename(root) != 'detail':
- doxy_source_files.append(
- template.replace_name(os.path.join(os.path.join('../../..',
- root), '*.hpp').replace('\\','/')))
-
-if docs=='qb+doxy':
- doxy_source_files.append('dox/*.hpp')
-
-if doxygen:
- template.append_content("""
-doxygen $template_library$_doxygen
- :
- [ glob
- """ + """
- """.join(doxy_source_files) + """ ]
- :
- <doxygen:param>EXAMPLE_PATH=../example
- <doxygen:param>STRIP_FROM_PATH=$(root)
- <doxygen:param>STRIP_FROM_INC_PATH=$(root)
- <doxygen:param>EXTRACT_ALL=NO
- <doxygen:param>HIDE_UNDOC_MEMBERS=NO
- <doxygen:param>EXTRACT_PRIVATE=NO
- <doxygen:param>DETAILS_AT_TOP=YES
- <doxygen:param>ENABLE_PREPROCESSING=YES
- <doxygen:param>MACRO_EXPANSION=YES
- <doxygen:param>SEARCH_INCLUDES=YES
- <doxygen:param>INCLUDE_PATH=../../..
- <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY""")
-
- if docs=='qb+doxy':
- template.append_content("""
- <doxygen:param>GENERATE_HTML=YES
- <doxygen:param>HTML_OUTPUT=$(loc)/html/doxygen
- <doxygen:param>HTML_STYLESHEET=$(loc)/html/boostbook_doxygen.css""")
- template.append_content("""
- ;
-""")
-
-template.append_content("""
-boostbook standalone
- :
- $template_library$_xml""")
-if (doxygen):
- template.append_content("""
- $template_library$_doxygen""")
-
-template.append_content("""
- :
- <xsl:param>chunk.first.sections=1
- <xsl:param>chunk.section.depth=3
- <xsl:param>toc.section.depth=3
- <xsl:param>toc.max.depth=3
- <xsl:param>generate.section.toc.level=3
- ;
-""")
-

Deleted: sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/doc/html/images/Thumbs.db
==============================================================================
Binary file. No diff available.

Deleted: sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/example/Jamfile.v2
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/example/Jamfile.v2 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
+++ (empty file)
@@ -1,16 +0,0 @@
-# Copyright 2007 Stjepan Rajko.
-# 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)
-
-$template_start$
-$template_python_copyright$
-
-project
- : requirements
- <include>../../..
- <library>/boost/test//boost_unit_test_framework/<link>static
- <define>BOOST_ALL_NO_LIB=1
- ;
-
-exe example : example.cpp ;
\ No newline at end of file

Deleted: sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/test/Jamfile.v2.py
==============================================================================
--- sandbox/template_under_construction/sandbox/$template_library$/libs/$template_library$/test/Jamfile.v2.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
+++ (empty file)
@@ -1,23 +0,0 @@
-# template file
-
-# Copyright 2007 Stjepan Rajko.
-# 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)
-
-template.append_content("""$template_python_copyright$
-
-import testing ;
-
-project
- : requirements
- <include>../../..
- <define>BOOST_ALL_NO_LIB=1
- ;
-
-""")
-
-for item in results.files_in(template.replace_name(
- '$template_library$/libs/$template_library$/test')):
- if item.endswith('.cpp'):
- template.append_content('run ' + item + ' ;\n')

Modified: sandbox/template_under_construction/sandbox/sandbox.py
==============================================================================
--- sandbox/template_under_construction/sandbox/sandbox.py (original)
+++ sandbox/template_under_construction/sandbox/sandbox.py 2007-06-14 21:23:50 EDT (Thu, 14 Jun 2007)
@@ -25,16 +25,19 @@
 
 author_list = template.options.get('author', template.options.any, None,
     '(comma separated, no spaces outside names, e.g., "My Name,Notmy R. Name": ')
+author_list = author_list.split(',')
 author_reversed = list()
-for name in author_list.rsplit(','):
- first_space_last = name.rpartition(" ")
- author_reversed.append('[' + first_space_last[2] + ', ' + first_space_last[0] + ']')
+for name in author_list:
+ names = name.split(" ")
+ first = names[0:len(names)-1]
+ last = names[len(names)-1:len(names)]
+ author_reversed.append('[' + ' '.join(last) + ', ' + ' '.join(first) + ']')
 
-authors, comma, last_author = author_list.rpartition(",")
-if len(comma) > 0:
- author_list = (authors + " and " + last_author).replace(',', ', ')
+if len(author_list) > 1:
+ author_list = (','.join(author_list[0:len(author_list)-1]) +
+ " and " + author_list[len(author_list)-1]).replace(',', ', ')
 else:
- author_list = last_author
+ author_list = author_list[0]
 
 template.name_replacement('$template_library$', library_name)
 
@@ -43,7 +46,7 @@
 template.all_content_replacement('$template_LibraryConcat$', library_name_concat_capitalized)
 template.all_content_replacement('$template_LIBRARY$', library_name.upper())
 template.all_content_replacement('$template_Boost_Library$', 'Boost.' + library_name_capitalized)
-template.content_replacement(['.v2', '.jam'], '$template_python_copyright$', _copyright.replace('_COMMENT_','# '))
+template.content_replacement(['.v2', '.jam', 'Jamfile'], '$template_python_copyright$', _copyright.replace('_COMMENT_','# '))
 template.content_replacement(['.hpp', '.cpp'], '$template_cpp_copyright$', _copyright.replace('_COMMENT_','// '))
 template.content_replacement(['.qbk'], '$template_qbk_copyright$',(_copyright.replace('_COMMENT_',''))
                              .replace('http://www.boost.org/LICENSE_1_0.txt',


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