Boost logo

Boost-Commit :

From: srajko_at_[hidden]
Date: 2007-05-22 12:00:28


Author: srajko
Date: 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
New Revision: 4178
URL: http://svn.boost.org/trac/boost/changeset/4178

Log:
Changing substitution templates to $template_*$ format, adding $template_start$

Added:
   sandbox/template_under_construction/$template_library$/
      - copied from r4171, /sandbox/template_under_construction/_library_/
   sandbox/template_under_construction/$template_library$/libs/$template_library$/
      - copied from r4171, /sandbox/template_under_construction/_library_/libs/_library_/
Removed:
   sandbox/template_under_construction/$template_library$/libs/_library_/
   sandbox/template_under_construction/_library_/
Text files modified:
   sandbox/template_under_construction/$template_library$/Jamfile.v2 | 9 ++++--
   sandbox/template_under_construction/$template_library$/boost-build.jam | 8 +++++
   sandbox/template_under_construction/$template_library$/boost/_library_.hpp | 16 ++++++++---
   sandbox/template_under_construction/$template_library$/boost/_library_/_library_.hpp | 28 +++++++++++++--------
   sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/Jamfile.v2 | 20 ++++++++++-----
   sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/_library_.qbk | 32 ++++++++++++++----------
   sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/dox/_library_.hpp | 6 ++++
   sandbox/template_under_construction/$template_library$/libs/$template_library$/example/Jamfile.v2 | 13 ++++++---
   sandbox/template_under_construction/$template_library$/libs/$template_library$/example/example.cpp | 20 ++++++++++-----
   sandbox/template_under_construction/$template_library$/libs/$template_library$/test/Jamfile.v2 | 12 ++++++--
   sandbox/template_under_construction/$template_library$/libs/$template_library$/test/test.cpp | 20 ++++++++++-----
   sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/_library_.sln | 40 +++++++++++++++---------------
   sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/build.vcproj | 12 ++++----
   sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/doc.vcproj | 8 +++---
   sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/example.vcproj | 6 ++--
   sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/test.vcproj | 6 ++--
   sandbox/template_under_construction/$template_library$/project-root.jam | 7 +++-
   sandbox/template_under_construction/make_template.py | 52 ++++++++++++++++++++++++++-------------
   18 files changed, 198 insertions(+), 117 deletions(-)

Modified: sandbox/template_under_construction/$template_library$/Jamfile.v2
==============================================================================
--- /sandbox/template_under_construction/_library_/Jamfile.v2 (original)
+++ sandbox/template_under_construction/$template_library$/Jamfile.v2 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,12 +1,15 @@
 # Copyright 2007 Stjepan Rajko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
+# 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 rpc
+project boost/$template_library$
    : build-dir bin.v2
    ;

Modified: sandbox/template_under_construction/$template_library$/boost-build.jam
==============================================================================
--- /sandbox/template_under_construction/_library_/boost-build.jam (original)
+++ sandbox/template_under_construction/$template_library$/boost-build.jam 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,4 +1,10 @@
-_python_copyright_
+# 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$
 
 # Set the BOOST_ROOT environment variable on your command-line or in the
 # environment to point at the root of your regular Boost installation.

Modified: sandbox/template_under_construction/$template_library$/boost/_library_.hpp
==============================================================================
--- /sandbox/template_under_construction/_library_/boost/_library_.hpp (original)
+++ sandbox/template_under_construction/$template_library$/boost/_library_.hpp 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,9 +1,15 @@
-_cpp_copyright_
+// 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)
 
-#ifndef BOOST__LIBRARY__HPP
-#define BOOST__LIBRARY__HPP
+$template_start$
+$template_cpp_copyright$
 
-#include <boost/_library_/_library_.hpp>
+#ifndef BOOST_$TEMPLATE_LIBRARY$_HPP
+#define BOOST_$TEMPLATE_LIBRARY$_HPP
 
-#endif // BOOST__LIBRARY___HPP
+#include <boost/$template_library$/$template_library$.hpp>
+
+#endif // BOOST_$TEMPLATE_LIBRARY$_HPP
 

Modified: sandbox/template_under_construction/$template_library$/boost/_library_/_library_.hpp
==============================================================================
--- /sandbox/template_under_construction/_library_/boost/_library_/_library_.hpp (original)
+++ sandbox/template_under_construction/$template_library$/boost/_library_/_library_.hpp 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,33 +1,39 @@
-_cpp_copyright_
+// 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)_cpp_copyright_
 
-#ifndef BOOST__LIBRARY___LIBRARY__HPP
-#define BOOST__LIBRARY___LIBRARY__HPP
+$template_start$
+$template_cpp_copyright$
+
+#ifndef BOOST_$TEMPLATE_LIBRARY$_$TEMPLATE_LIBRARY$_HPP
+#define BOOST_$TEMPLATE_LIBRARY$_$TEMPLATE_LIBRARY$_HPP
 
 namespace boost {
-namespace _library_ {
+namespace $template_library$ {
 
-/// The _library_ class does nothing.
+/// The $template_library$ class does nothing.
 /** \ingroup group_nothing
- \param T The type on which _library_ does nothing.
+ \param T The type on which $template_library$ does nothing.
     \warning This class does nothing.
     \todo Make this class do something.
     \bug This class does do something.
 
- Since _library_ does nothing, it is not very useful.
+ Since $template_library$ 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 _library_
+class $template_library$
 {
 public:
     /// Default constructor.
     /** This constructor actually does something. It sets the internal
         counters to 0.
     */
- _library_() : nothing_count(0), call_count(0) {}
+ $template_library$() : nothing_count(0), call_count(0) {}
 
     /// This function does nothing with the passed parameter.
     void nothing(T t)
@@ -71,8 +77,8 @@
     int call_count;
 };
 
-} // namespace _library_
+} // namespace $template_library$
 } // namespace boost
 
-#endif // BOOST__LIBRARY___LIBRARY__HPP
+#endif // BOOST_$TEMPLATE_LIBRARY$_$TEMPLATE_LIBRARY$_HPP
 

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/Jamfile.v2
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/doc/Jamfile.v2 (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/Jamfile.v2 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,6 +1,12 @@
-_python_copyright_
+# 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)
 
-project boost/_library_/doc ;
+$template_start$
+$template_python_copyright$
+
+project boost/$template_library$/doc ;
 
 import boostbook : boostbook ;
 using quickbook ;
@@ -8,9 +14,9 @@
 local loc = [ path.native [ path.pwd ] ] ;
 local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
 
-doxygen _library__doxygen
+doxygen $template_library$_doxygen
    :
- [ glob ../../../boost/_library_/*.hpp dox/*.hpp ]
+ [ glob ../../../boost/$template_library$/*.hpp dox/*.hpp ]
    :
         <doxygen:param>EXAMPLE_PATH=../example
         <doxygen:param>STRIP_FROM_PATH=$(root)
@@ -29,10 +35,10 @@
         <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
    ;
 
-xml _library__xml : _library_.qbk ;
+xml $template_library$_xml : $template_library$.qbk ;
 
 boostbook standalone
    :
- _library__xml
- _library__doxygen
+ $template_library$_xml
+ $template_library$_doxygen
    ;

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/_library_.qbk
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/doc/_library_.qbk (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/_library_.qbk 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,4 +1,10 @@
-[library _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) ]
+
+$template_start$
+[library $template_library$
     [quickbook 1.4]
     [version 0.1]
     [authors _author_reversed_]
@@ -13,29 +19,29 @@
 
 [section:overview Overview]
 
-[warning _Library_ is in very early stages of development. At this point, it is likely
+[warning $template_Library$ is in very early stages of development. At this point, it is likely
 NOT a good starting point for a boost sandbox project. The templates it generates have
 not been verified for adherence to Boost guidelines, and do some things that are
 inconsistent with current practices.]
 
 [section:introduction Introduction]
 
-_Library_ is template for Boost sandbox projects. Given some information about the project
+$template_Library$ is template for Boost sandbox projects. Given some information about the project
 (e.g., library name and author), it will generate the following:
 * a directory tree for the library
 * commonly used source, documentation and build files
 * projects for several IDEs (currently MSVC, with Xcode in the works)
 
 The content in the generated project contains this documentation, which describes how
-to use the template, and an implementation of a [classref boost::_library_::_library_
+to use the template, and an implementation of a [classref boost::$template_library$::$template_library$
 class which does nothing].
 
 [endsect]
 
 [section:start Getting Started]
-To use the project created by _library_ fully, you will need a few things.
+To use the project created by $template_library$ fully, you will need a few things.
 
-[important Some parts of _library_ will not work with versions of Boost other than CVS HEAD]
+[important Some parts of $template_library$ will not work with versions of Boost other than CVS HEAD]
 First of all, you should familiarize yourself with Boost. A good starting point for this
 is [@http://www.boost.org/more/getting_started/index.html the getting started page].
 In particular, make sure you have installed a recent version of Boost, and have a working
@@ -43,8 +49,8 @@
 
 Second, you will need to download some additional tools to build the documentation.
 Instructions for this part can be found in the [@http://www.boost.org/doc/html/boostbook.html
-Boostbook documentation]. The projects generated by _library_ rely on xsltproc,
-DocBook XSL and DTD distributions, and Doxygen. _library_ does not currently use
+Boostbook documentation]. The projects generated by $template_library$ rely on xsltproc,
+DocBook XSL and DTD distributions, and Doxygen. $template_library$ does not currently use
 Apache FOP.
 
 Finally, you will need access to the sandbox in the
@@ -76,7 +82,7 @@
 
 [section:license License]
 
-_qbk_copyright_
+$template_qbk_copyright$
 
 [endsect]
 
@@ -97,7 +103,7 @@
 
 In any case, it is probaby unwise to include both the
 [@../doxygen/index.html verbatim generated Doxygen documentation] and the
-[link _library_.reference reference], which is what happens how. _Library_
+[link $template_library$.reference reference], which is what happens how. $template_Library$
 should provide some options / alternatives.
 
 [endsect]
@@ -109,7 +115,7 @@
 and substituting the contents where specified.
 
 The following substitutions are defined on files of extensions '.hpp', '.cpp', '.v2', '.jam', '.qbk', '.vcproj', '.sln':
-[table Substitutions used by _library_
+[table Substitutions used by $template_library$
     [[substitution template][substituted text]]
     [[\_boost\_library\_][The full Boost.Library name of the library]]
     [[\_library\_][The library name specified by the user]]
@@ -146,10 +152,10 @@
 [c++]
 
 [import ../example/example.cpp]
-[_library__example]
+[$template_library$_example]
 
 [endsect]
 
 [endsect]
 
-[xinclude _library__doxygen.xml]
\ No newline at end of file
+[xinclude $template_library$_doxygen.xml]
\ No newline at end of file

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/dox/_library_.hpp
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/doc/dox/_library_.hpp (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/doc/dox/_library_.hpp 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,3 +1,9 @@
+// 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)_cpp_copyright_
+
+$template_start$
 namespace boost {
 
 /** \mainpage

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/example/Jamfile.v2
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/example/Jamfile.v2 (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/example/Jamfile.v2 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,4 +1,10 @@
-_python_copyright_
+# 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
@@ -7,7 +13,4 @@
       <define>BOOST_ALL_NO_LIB=1
     ;
 
-# ../example/example.cpp is used instead of just example.cpp because it helps
-# the MSVC IDE find the source file. It would be nice to find a way around this.
-
-exe example : ../example/example.cpp ;
\ No newline at end of file
+exe example : example.cpp ;
\ No newline at end of file

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/example/example.cpp
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/example/example.cpp (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/example/example.cpp 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,14 +1,20 @@
-_cpp_copyright_
+// 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__example
+$template_start$
+$template_cpp_copyright$
+
+//[ $template_library$_example
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
 
-#include <boost/_library_.hpp>
+#include <boost/$template_library$.hpp>
 
-void _library__example()
+void $template_library$_example()
 {
- boost::_library_::_library_<int> object;
+ boost::$template_library$::$template_library$<int> object;
     int x = 0;
 
     BOOST_CHECK_EQUAL(object.get_nothing_count(),0);
@@ -20,12 +26,12 @@
     BOOST_CHECK_EQUAL(object.get_call_count(),2);
     BOOST_CHECK_EQUAL(object.get_nothing_count(),5);
 
-} // end void _library__example
+} // end void $template_library$_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(&_library__example));
+ test->add(BOOST_TEST_CASE(&$template_library$_example));
     return test;
 }
 

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/test/Jamfile.v2
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/test/Jamfile.v2 (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/test/Jamfile.v2 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,4 +1,10 @@
-_python_copyright_
+# 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$
 
 import testing ;
 
@@ -9,6 +15,6 @@
       <define>BOOST_ALL_NO_LIB=1
     ;
     
-test-suite rpc
- : [ run ../test/test.cpp ]
+test-suite $template_library$
+ : [ run test.cpp ]
     ;

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/test/test.cpp
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/test/test.cpp (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/test/test.cpp 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,16 +1,22 @@
-_cpp_copyright_
+// 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_cpp_copyright$
 
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
 
-#include <boost/_library_.hpp>
+#include <boost/$template_library$.hpp>
 
 class test_class
 {
 public:
     void test_nothing()
     {
- boost::_library_::_library_<int> object;
+ boost::$template_library$::$template_library$<int> object;
         int x = 0;
         BOOST_CHECK_EQUAL(object.get_nothing_count(),0);
         object.nothing(x);
@@ -18,7 +24,7 @@
     }
     void test_nothing_n()
     {
- boost::_library_::_library_<int> object;
+ boost::$template_library$::$template_library$<int> object;
         int x = 0;
         BOOST_CHECK_EQUAL(object.get_call_count(),0);
         object.nothing(x,4);
@@ -27,9 +33,9 @@
     }
 };
 
-test_suite *_library__test()
+test_suite *$template_library$_test()
 {
- test_suite *suite = BOOST_TEST_SUITE("_Boost_library_ suite");
+ test_suite *suite = BOOST_TEST_SUITE("$template_library$ suite");
 
   boost::shared_ptr<test_class> instance( new test_class() );
   suite->add (BOOST_CLASS_TEST_CASE( &test_class::test_nothing, instance));
@@ -41,6 +47,6 @@
 boost::unit_test::test_suite* init_unit_test_suite(int, char* [] )
 {
   test_suite * test = BOOST_TEST_SUITE("_Boost_Library_ test");
- test->add(_library__test());
+ test->add($template_library$_test());
   return test;
 }
\ No newline at end of file

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/_library_.sln
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/vc8ide/_library_.sln (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/_library_.sln 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,12 +1,12 @@
 Microsoft Visual Studio Solution File, Format Version 9.00
 # Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build", "build.vcproj", "{_msvc_build_uuid_}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build", "build.vcproj", "{$template_msvc_build_uuid$}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc", "doc.vcproj", "{_msvc_doc_uuid_}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc", "doc.vcproj", "{$template_msvc_doc_uuid_}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{_msvc_example_uuid_}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{$template_msvc_example_uuid_}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{_msvc_test_uuid_}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{$template_msvc_test_uuid_}"
 EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -14,22 +14,22 @@
                 release|Win32 = release|Win32
         EndGlobalSection
         GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {_msvc_build_uuid_}.debug|Win32.ActiveCfg = debug|Win32
- {_msvc_build_uuid_}.debug|Win32.Build.0 = debug|Win32
- {_msvc_build_uuid_}.release|Win32.ActiveCfg = release|Win32
- {_msvc_build_uuid_}.release|Win32.Build.0 = release|Win32
- {_msvc_doc_uuid_}.debug|Win32.ActiveCfg = release|Win32
- {_msvc_doc_uuid_}.debug|Win32.Build.0 = release|Win32
- {_msvc_doc_uuid_}.release|Win32.ActiveCfg = release|Win32
- {_msvc_doc_uuid_}.release|Win32.Build.0 = release|Win32
- {_msvc_example_uuid_}.debug|Win32.ActiveCfg = debug|Win32
- {_msvc_example_uuid_}.debug|Win32.Build.0 = debug|Win32
- {_msvc_example_uuid_}.release|Win32.ActiveCfg = release|Win32
- {_msvc_example_uuid_}.release|Win32.Build.0 = release|Win32
- {_msvc_test_uuid_}.debug|Win32.ActiveCfg = debug|Win32
- {_msvc_test_uuid_}.debug|Win32.Build.0 = debug|Win32
- {_msvc_test_uuid_}.release|Win32.ActiveCfg = release|Win32
- {_msvc_test_uuid_}.release|Win32.Build.0 = release|Win32
+ {$template_msvc_build_uuid$}.debug|Win32.ActiveCfg = debug|Win32
+ {$template_msvc_build_uuid$}.debug|Win32.Build.0 = debug|Win32
+ {$template_msvc_build_uuid$}.release|Win32.ActiveCfg = release|Win32
+ {$template_msvc_build_uuid$}.release|Win32.Build.0 = release|Win32
+ {$template_msvc_doc_uuid$}.debug|Win32.ActiveCfg = release|Win32
+ {$template_msvc_doc_uuid$}.debug|Win32.Build.0 = release|Win32
+ {$template_msvc_doc_uuid$}.release|Win32.ActiveCfg = release|Win32
+ {$template_msvc_doc_uuid$}.release|Win32.Build.0 = release|Win32
+ {$template_msvc_example_uuid$}.debug|Win32.ActiveCfg = debug|Win32
+ {$template_msvc_example_uuid$}.debug|Win32.Build.0 = debug|Win32
+ {$template_msvc_example_uuid$}.release|Win32.ActiveCfg = release|Win32
+ {$template_msvc_example_uuid$}.release|Win32.Build.0 = release|Win32
+ {$template_msvc_test_uuid$}.debug|Win32.ActiveCfg = debug|Win32
+ {$template_msvc_test_uuid$}.debug|Win32.Build.0 = debug|Win32
+ {$template_msvc_test_uuid$}.release|Win32.ActiveCfg = release|Win32
+ {$template_msvc_test_uuid$}.release|Win32.Build.0 = release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/build.vcproj
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/vc8ide/build.vcproj (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/build.vcproj 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -3,7 +3,7 @@
         ProjectType="Visual C++"
         Version="8.00"
         Name="build"
- ProjectGUID="{_msvc_build_uuid_}"
+ ProjectGUID="{$template_msvc_build_uuid$}"
>
         <Platforms>
                 <Platform
@@ -21,7 +21,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output=""
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath=""
@@ -39,7 +39,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output=""
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath=""
@@ -57,15 +57,15 @@
                         Name="boost"
>
                         <Filter
- Name="_library_"
+ Name="$template_library$"
>
                                 <File
- RelativePath="..\..\..\boost\_library_\_library_.hpp"
+ RelativePath="..\..\..\boost\$template_library$\$template_library$.hpp"
>
                                 </File>
                         </Filter>
                         <File
- RelativePath="..\..\..\boost\_library_.hpp"
+ RelativePath="..\..\..\boost\$template_library$.hpp"
>
                         </File>
                 </Filter>

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/doc.vcproj
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/vc8ide/doc.vcproj (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/doc.vcproj 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -3,7 +3,7 @@
         ProjectType="Visual C++"
         Version="8.00"
         Name="doc"
- ProjectGUID="{_msvc_doc_uuid_}"
+ ProjectGUID="{$template_msvc_doc_uuid$}"
         RootNamespace="doc"
         Keyword="MakeFileProj"
>
@@ -23,7 +23,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output=""
                                 PreprocessorDefinitions="WIN32;NDEBUG"
                                 IncludeSearchPath=""
@@ -41,11 +41,11 @@
                         Name="Source Files"
>
                         <File
- RelativePath="..\doc\dox\_library_.hpp"
+ RelativePath="..\doc\dox\$template_library$.hpp"
>
                         </File>
                         <File
- RelativePath="..\doc\_library_.qbk"
+ RelativePath="..\doc\$template_library$.qbk"
>
                         </File>
                 </Filter>

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/example.vcproj
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/vc8ide/example.vcproj (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/example.vcproj 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -3,7 +3,7 @@
         ProjectType="Visual C++"
         Version="8.00"
         Name="example"
- ProjectGUID="{_msvc_example_uuid_}"
+ ProjectGUID="{$template_msvc_example_uuid$}"
         RootNamespace="example"
         Keyword="MakeFileProj"
>
@@ -23,7 +23,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output="$(OutDir)\example.exe"
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath="../example"
@@ -41,7 +41,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output="$(OutDir)\example.exe"
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath=""

Modified: sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/test.vcproj
==============================================================================
--- /sandbox/template_under_construction/_library_/libs/_library_/vc8ide/test.vcproj (original)
+++ sandbox/template_under_construction/$template_library$/libs/$template_library$/vc8ide/test.vcproj 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -3,7 +3,7 @@
         ProjectType="Visual C++"
         Version="8.00"
         Name="test"
- ProjectGUID="{_msvc_test_uuid_}"
+ ProjectGUID="{$template_msvc_test_uuid$}"
         RootNamespace="test"
         Keyword="MakeFileProj"
>
@@ -23,7 +23,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output=""
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath=""
@@ -41,7 +41,7 @@
>
                         <Tool
                                 Name="VCNMakeTool"
-_msvc_build_command_
+$template_msvc_build_command$
                                 Output=""
                                 PreprocessorDefinitions=""
                                 IncludeSearchPath=""

Modified: sandbox/template_under_construction/$template_library$/project-root.jam
==============================================================================
--- /sandbox/template_under_construction/_library_/project-root.jam (original)
+++ sandbox/template_under_construction/$template_library$/project-root.jam 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,8 +1,11 @@
 # Copyright 2007 Stjepan Rajko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
+# 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$
+
 import os ;
 
 path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;

Modified: sandbox/template_under_construction/make_template.py
==============================================================================
--- sandbox/template_under_construction/make_template.py (original)
+++ sandbox/template_under_construction/make_template.py 2007-05-22 12:00:26 EDT (Tue, 22 May 2007)
@@ -1,3 +1,8 @@
+# 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)
+
 import os
 import time
 import uuid
@@ -26,12 +31,12 @@
         return False
 
 
-library = Replacement('_library_', raw_input('library name: (e.g., something_new): '))
-Library = Replacement('_Library_', library.value.capitalize())
-LIBRARY = Replacement('_LIBRARY_', library.value.upper())
-boost_library = Replacement('_Boost_Library_', 'Boost.' + Library.value)
+library = Replacement('$template_library$', raw_input('library name: (e.g., something_new): '))
+Library = Replacement('$template_Library$', library.value.capitalize())
+LIBRARY = Replacement('$template_LIBRARY$', library.value.upper())
+boost_library = Replacement('$template_Boost_Library$', 'Boost.' + Library.value)
 
-_copyright = """_COMMENT_Copyright _year_ _author_.
+_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)
@@ -49,20 +54,24 @@
     author_reversed.append('[' + first_space_last[2] + ', ' + first_space_last[0] + ']')
 
 authors, comma, last_author = author_list.rpartition(",")
-author_list = (authors + " and " + last_author).replace(',', ', ')
+if len(comma) > 0:
+ author_list = (authors + " and " + last_author).replace(',', ', ')
+else:
+ author_list = last_author
+
 file_replacements = FileReplacements(['.hpp', '.cpp', '.v2', '.jam', '.qbk', '.vcproj', '.sln'])
 file_replacements.extend([boost_library, Library, LIBRARY, library])
-file_replacements.append(Replacement ('_python_copyright_', _copyright.replace('_COMMENT_','# ')))
-file_replacements.append(Replacement ('_cpp_copyright_', _copyright.replace('_COMMENT_','// ')))
-file_replacements.append(Replacement ('_qbk_copyright_', (_copyright.replace('_COMMENT_','')).replace('http://www.boost.org/LICENSE_1_0.txt','[@http://www.boost.org/LICENSE_1_0.txt]')))
-file_replacements.append(Replacement('_author_reversed_', ','.join(author_reversed)))
-file_replacements.append(Replacement('_author_', author_list))
-file_replacements.append(Replacement('_year_', str(time.localtime().tm_year)))
-file_replacements.append(Replacement('_msvc_build_uuid_', str(uuid.uuid4())))
-file_replacements.append(Replacement('_msvc_doc_uuid_', str(uuid.uuid4())))
-file_replacements.append(Replacement('_msvc_example_uuid_', str(uuid.uuid4())))
-file_replacements.append(Replacement('_msvc_test_uuid_', str(uuid.uuid4())))
-file_replacements.append(Replacement('_msvc_build_command_', _msvc_build_command))
+file_replacements.append(Replacement ('$template_python_copyright$', _copyright.replace('_COMMENT_','# ')))
+file_replacements.append(Replacement ('$template_cpp_copyright$', _copyright.replace('_COMMENT_','// ')))
+file_replacements.append(Replacement ('$template_qbk_copyright$', (_copyright.replace('_COMMENT_','')).replace('http://www.boost.org/LICENSE_1_0.txt','[@http://www.boost.org/LICENSE_1_0.txt]')))
+file_replacements.append(Replacement('$template_author_reversed$', ','.join(author_reversed)))
+file_replacements.append(Replacement('$template_author$', author_list))
+file_replacements.append(Replacement('$template_year$', str(time.localtime().tm_year)))
+file_replacements.append(Replacement('$template_msvc_build_uuid$', str(uuid.uuid4())))
+file_replacements.append(Replacement('$template_msvc_doc_uuid$', str(uuid.uuid4())))
+file_replacements.append(Replacement('$template_msvc_example_uuid$', str(uuid.uuid4())))
+file_replacements.append(Replacement('$template_msvc_test_uuid$', str(uuid.uuid4())))
+file_replacements.append(Replacement('$template_msvc_build_command$', _msvc_build_command))
 
 if os.path.exists(library.value):
     print 'Directory ' + library.value + ' already exists.'
@@ -91,9 +100,18 @@
             new_name = library.replace(name)
             if (file_replacements.process(name)):
                 fin = open(os.path.join(root, name), "r")
+
                 contents = fin.read()
                 fin.close()
 
+ # only take the content from last $template_start$ on,
+ # and convert all line breaks to '\n'
+ discarded, sep, contents = contents.rpartition('$template_start$')
+ content_lines = contents.splitlines()
+ if len(sep) != 0:
+ content_lines.pop(0)
+ contents = '\n'.join(content_lines)
+
                 contents = file_replacements.replace(contents)
 
                 fout = open(os.path.join(new_root, new_name), "w")


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