summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-08-05 19:32:57 +0000
committer <>2014-10-07 10:01:33 +0000
commit1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304 (patch)
tree03de66686a262696ec2ac408e62250dc1f0c01aa /tools
parent8c4528713d907ee2cfd3bfcbbad272c749867f84 (diff)
downloadboost-tarball-1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_56_0.tar.bz2.boost_1_56_0
Diffstat (limited to 'tools')
-rw-r--r--tools/Jamfile.v23
-rw-r--r--tools/auto_index/src/auto_index.cpp2
-rw-r--r--tools/bcp/add_dependent_lib.cpp6
-rw-r--r--tools/boostbook/doc/boostbook.xml6
-rw-r--r--tools/boostbook/doc/documenting.xml6
-rw-r--r--tools/boostbook/doc/reference.xml128
-rw-r--r--tools/boostbook/doc/together.xml2
-rw-r--r--tools/boostbook/dtd/1.1/boostbook.dtd4
-rw-r--r--tools/boostbook/dtd/boostbook.dtd4
-rw-r--r--tools/boostbook/setup_boostbook.py6
-rwxr-xr-x[-rw-r--r--]tools/boostbook/setup_boostbook.sh6
-rw-r--r--tools/boostbook/test/doxygen/autodoc.gold80
-rw-r--r--tools/boostbook/test/doxygen/boost/example.hpp51
-rw-r--r--tools/boostbook/test/more/tests/syntax-highlight/language-attribute.gold13
-rw-r--r--tools/boostbook/test/more/tests/syntax-highlight/language-attribute.xml25
-rw-r--r--tools/boostbook/xsl/annotation.xsl8
-rw-r--r--tools/boostbook/xsl/docbook-layout.xsl51
-rw-r--r--tools/boostbook/xsl/docbook.xsl8
-rw-r--r--tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl290
-rw-r--r--tools/boostbook/xsl/fo.xsl127
-rw-r--r--tools/boostbook/xsl/html-base.xsl46
-rw-r--r--tools/boostbook/xsl/html-help.xsl98
-rw-r--r--tools/boostbook/xsl/html-single.xsl16
-rw-r--r--tools/boostbook/xsl/source-highlight.xsl2
-rw-r--r--tools/boostdep/README.md4
-rw-r--r--tools/boostdep/examples/report.bat26
-rw-r--r--tools/boostdep/src/Jamfile.v217
-rw-r--r--tools/boostdep/src/boostdep.cpp1349
-rw-r--r--tools/build/Jamroot.jam (renamed from tools/build/v2/Jamroot.jam)12
-rw-r--r--tools/build/boost-build.jam (renamed from tools/build/v2/boost-build.jam)2
-rw-r--r--tools/build/boost.css65
-rw-r--r--tools/build/bootstrap.bat (renamed from tools/build/v2/bootstrap.bat)22
-rwxr-xr-xtools/build/bootstrap.sh (renamed from tools/build/v2/bootstrap.sh)10
-rw-r--r--tools/build/debian/boost-build.docs (renamed from tools/build/v2/debian/boost-build.docs)0
-rw-r--r--tools/build/debian/boost-build.examples (renamed from tools/build/v2/debian/boost-build.examples)0
-rw-r--r--tools/build/debian/changelog (renamed from tools/build/v2/debian/changelog)0
-rw-r--r--tools/build/debian/conffiles (renamed from tools/build/v2/debian/conffiles)0
-rw-r--r--tools/build/debian/control (renamed from tools/build/v2/debian/control)0
-rw-r--r--tools/build/debian/copyright (renamed from tools/build/v2/debian/copyright)0
-rw-r--r--tools/build/debian/excludes (renamed from tools/build/v2/debian/excludes)0
-rwxr-xr-xtools/build/debian/rules (renamed from tools/build/v2/debian/rules)0
-rw-r--r--tools/build/doc/bjam.qbk (renamed from tools/build/v2/doc/bjam.qbk)0
-rw-r--r--tools/build/doc/development_plan.html (renamed from tools/build/v2/doc/development_plan.html)0
-rw-r--r--tools/build/doc/history.qbk (renamed from tools/build/v2/doc/history.qbk)0
-rw-r--r--tools/build/doc/jamfile.jam (renamed from tools/build/v2/doc/jamfile.jam)2
-rw-r--r--tools/build/doc/src/abstract-target.xml (renamed from tools/build/v2/doc/src/abstract-target.xml)0
-rw-r--r--tools/build/doc/src/architecture.xml (renamed from tools/build/v2/doc/src/architecture.xml)40
-rw-r--r--tools/build/doc/src/basic-target.xml (renamed from tools/build/v2/doc/src/basic-target.xml)0
-rw-r--r--tools/build/doc/src/extending.xml (renamed from tools/build/v2/doc/src/extending.xml)15
-rw-r--r--tools/build/doc/src/faq.xml (renamed from tools/build/v2/doc/src/faq.xml)31
-rw-r--r--tools/build/doc/src/fragments.xml (renamed from tools/build/v2/doc/src/fragments.xml)0
-rw-r--r--tools/build/doc/src/howto.xml (renamed from tools/build/v2/doc/src/howto.xml)0
-rw-r--r--tools/build/doc/src/install.xml (renamed from tools/build/v2/doc/src/install.xml)4
-rw-r--r--tools/build/doc/src/main-target.xml (renamed from tools/build/v2/doc/src/main-target.xml)0
-rw-r--r--tools/build/doc/src/overview.xml (renamed from tools/build/v2/doc/src/overview.xml)9
-rw-r--r--tools/build/doc/src/path.xml (renamed from tools/build/v2/doc/src/path.xml)0
-rw-r--r--tools/build/doc/src/project-target.xml (renamed from tools/build/v2/doc/src/project-target.xml)0
-rw-r--r--tools/build/doc/src/property-set.xml (renamed from tools/build/v2/doc/src/property-set.xml)0
-rw-r--r--tools/build/doc/src/recipes.xml (renamed from tools/build/v2/doc/src/recipes.xml)2
-rw-r--r--tools/build/doc/src/reference.xml (renamed from tools/build/v2/doc/src/reference.xml)51
-rw-r--r--tools/build/doc/src/regex.xml170
-rw-r--r--tools/build/doc/src/sequence.xml135
-rw-r--r--tools/build/doc/src/standalone.xml (renamed from tools/build/v2/doc/src/standalone.xml)3
-rw-r--r--tools/build/doc/src/tasks.xml (renamed from tools/build/v2/doc/src/tasks.xml)96
-rw-r--r--tools/build/doc/src/tutorial.xml (renamed from tools/build/v2/doc/src/tutorial.xml)0
-rw-r--r--tools/build/doc/src/type.xml (renamed from tools/build/v2/doc/src/type.xml)0
-rw-r--r--tools/build/doc/src/typed-target.xml (renamed from tools/build/v2/doc/src/typed-target.xml)0
-rw-r--r--tools/build/doc/src/userman.xml (renamed from tools/build/v2/doc/src/userman.xml)3
-rw-r--r--tools/build/doc/tools.html (renamed from tools/build/v2/doc/tools.html)0
-rw-r--r--tools/build/example/boost-build.jam (renamed from tools/build/v2/example/boost-build.jam)2
-rw-r--r--tools/build/example/built_tool/Jamroot.jam (renamed from tools/build/v2/example/built_tool/Jamroot.jam)0
-rw-r--r--tools/build/example/built_tool/core/Jamfile.jam (renamed from tools/build/v2/example/built_tool/core/Jamfile.jam)0
-rw-r--r--tools/build/example/built_tool/core/a.td (renamed from tools/build/v2/example/built_tool/core/a.td)0
-rw-r--r--tools/build/example/built_tool/core/core.cpp (renamed from tools/build/v2/example/built_tool/core/core.cpp)0
-rw-r--r--tools/build/example/built_tool/readme.txt (renamed from tools/build/v2/example/built_tool/readme.txt)0
-rw-r--r--tools/build/example/built_tool/tblgen/Jamfile.jam (renamed from tools/build/v2/example/built_tool/tblgen/Jamfile.jam)0
-rw-r--r--tools/build/example/built_tool/tblgen/tblgen.cpp (renamed from tools/build/v2/example/built_tool/tblgen/tblgen.cpp)0
-rw-r--r--tools/build/example/customization/class.verbatim (renamed from tools/build/v2/example/customization/class.verbatim)0
-rw-r--r--tools/build/example/customization/codegen.cpp (renamed from tools/build/v2/example/customization/codegen.cpp)0
-rw-r--r--[-rwxr-xr-x]tools/build/example/customization/inline_file.py (renamed from tools/build/v2/example/customization/inline_file.py)0
-rw-r--r--tools/build/example/customization/jamroot.jam (renamed from tools/build/v2/example/customization/jamroot.jam)0
-rw-r--r--tools/build/example/customization/readme.txt (renamed from tools/build/v2/example/customization/readme.txt)0
-rw-r--r--tools/build/example/customization/t1.verbatim (renamed from tools/build/v2/example/customization/t1.verbatim)0
-rw-r--r--tools/build/example/customization/t2.verbatim (renamed from tools/build/v2/example/customization/t2.verbatim)0
-rw-r--r--tools/build/example/customization/usage.verbatim (renamed from tools/build/v2/example/customization/usage.verbatim)0
-rw-r--r--tools/build/example/customization/verbatim.jam (renamed from tools/build/v2/example/customization/verbatim.jam)0
-rw-r--r--tools/build/example/customization/verbatim.py (renamed from tools/build/v2/example/customization/verbatim.py)0
-rw-r--r--tools/build/example/generate/REAME.txt (renamed from tools/build/v2/example/generate/REAME.txt)0
-rw-r--r--tools/build/example/generate/a.cpp (renamed from tools/build/v2/example/generate/a.cpp)0
-rw-r--r--tools/build/example/generate/gen.jam (renamed from tools/build/v2/example/generate/gen.jam)0
-rw-r--r--tools/build/example/generate/gen.py (renamed from tools/build/v2/example/generate/gen.py)0
-rw-r--r--tools/build/example/generate/jamroot.jam (renamed from tools/build/v2/example/generate/jamroot.jam)0
-rw-r--r--tools/build/example/generator/README.txt (renamed from tools/build/v2/example/generator/README.txt)0
-rw-r--r--tools/build/example/generator/foo.gci (renamed from tools/build/v2/example/generator/foo.gci)0
-rw-r--r--tools/build/example/generator/jamroot.jam (renamed from tools/build/v2/example/generator/jamroot.jam)0
-rw-r--r--tools/build/example/generator/soap.jam (renamed from tools/build/v2/example/generator/soap.jam)0
-rw-r--r--tools/build/example/gettext/jamfile.jam (renamed from tools/build/v2/example/gettext/jamfile.jam)0
-rw-r--r--tools/build/example/gettext/jamroot.jam (renamed from tools/build/v2/example/gettext/jamroot.jam)0
-rw-r--r--tools/build/example/gettext/main.cpp (renamed from tools/build/v2/example/gettext/main.cpp)0
-rw-r--r--tools/build/example/gettext/readme.txt (renamed from tools/build/v2/example/gettext/readme.txt)0
-rw-r--r--tools/build/example/gettext/russian.po (renamed from tools/build/v2/example/gettext/russian.po)0
-rw-r--r--tools/build/example/hello/hello.cpp (renamed from tools/build/v2/example/hello/hello.cpp)0
-rw-r--r--tools/build/example/hello/jamroot.jam (renamed from tools/build/v2/example/hello/jamroot.jam)0
-rw-r--r--tools/build/example/hello/readme.txt (renamed from tools/build/v2/example/hello/readme.txt)0
-rw-r--r--tools/build/example/libraries/app/app.cpp (renamed from tools/build/v2/example/libraries/app/app.cpp)0
-rw-r--r--tools/build/example/libraries/app/jamfile.jam (renamed from tools/build/v2/example/libraries/app/jamfile.jam)0
-rw-r--r--tools/build/example/libraries/jamroot.jam (renamed from tools/build/v2/example/libraries/jamroot.jam)0
-rw-r--r--tools/build/example/libraries/util/foo/bar.cpp (renamed from tools/build/v2/example/libraries/util/foo/bar.cpp)0
-rw-r--r--tools/build/example/libraries/util/foo/include/lib1.h (renamed from tools/build/v2/example/libraries/util/foo/include/lib1.h)0
-rw-r--r--tools/build/example/libraries/util/foo/jamfile.jam (renamed from tools/build/v2/example/libraries/util/foo/jamfile.jam)0
-rw-r--r--tools/build/example/make/foo.py (renamed from tools/build/v2/example/make/foo.py)0
-rw-r--r--tools/build/example/make/jamroot.jam (renamed from tools/build/v2/example/make/jamroot.jam)0
-rw-r--r--tools/build/example/make/main_cpp.pro (renamed from tools/build/v2/example/make/main_cpp.pro)0
-rw-r--r--tools/build/example/make/readme.txt (renamed from tools/build/v2/example/make/readme.txt)0
-rw-r--r--tools/build/example/pch/include/pch.hpp (renamed from tools/build/v2/example/pch/include/pch.hpp)0
-rw-r--r--tools/build/example/pch/jamroot.jam (renamed from tools/build/v2/example/pch/jamroot.jam)0
-rw-r--r--tools/build/example/pch/source/hello_world.cpp (renamed from tools/build/v2/example/pch/source/hello_world.cpp)0
-rw-r--r--tools/build/example/python_modules/jamroot.jam (renamed from tools/build/v2/example/python_modules/jamroot.jam)0
-rw-r--r--tools/build/example/python_modules/python_helpers.jam (renamed from tools/build/v2/example/python_modules/python_helpers.jam)0
-rw-r--r--tools/build/example/python_modules/python_helpers.py (renamed from tools/build/v2/example/python_modules/python_helpers.py)0
-rw-r--r--tools/build/example/python_modules/readme.txt (renamed from tools/build/v2/example/python_modules/readme.txt)0
-rw-r--r--tools/build/example/qt/README.txt (renamed from tools/build/v2/example/qt/README.txt)0
-rw-r--r--tools/build/example/qt/qt3/hello/canvas.cpp (renamed from tools/build/v2/example/qt/qt3/hello/canvas.cpp)0
-rw-r--r--tools/build/example/qt/qt3/hello/canvas.h (renamed from tools/build/v2/example/qt/qt3/hello/canvas.h)0
-rw-r--r--tools/build/example/qt/qt3/hello/jamroot.jam (renamed from tools/build/v2/example/qt/qt3/hello/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt3/hello/main.cpp (renamed from tools/build/v2/example/qt/qt3/hello/main.cpp)0
-rw-r--r--tools/build/example/qt/qt3/moccable-cpp/jamroot.jam (renamed from tools/build/v2/example/qt/qt3/moccable-cpp/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt3/moccable-cpp/main.cpp (renamed from tools/build/v2/example/qt/qt3/moccable-cpp/main.cpp)0
-rw-r--r--tools/build/example/qt/qt3/uic/hello_world_widget.ui (renamed from tools/build/v2/example/qt/qt3/uic/hello_world_widget.ui)0
-rw-r--r--tools/build/example/qt/qt3/uic/jamroot.jam (renamed from tools/build/v2/example/qt/qt3/uic/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt3/uic/main.cpp (renamed from tools/build/v2/example/qt/qt3/uic/main.cpp)0
-rw-r--r--tools/build/example/qt/qt4/hello/arrow.cpp (renamed from tools/build/v2/example/qt/qt4/hello/arrow.cpp)0
-rw-r--r--tools/build/example/qt/qt4/hello/arrow.h (renamed from tools/build/v2/example/qt/qt4/hello/arrow.h)0
-rw-r--r--tools/build/example/qt/qt4/hello/jamroot.jam (renamed from tools/build/v2/example/qt/qt4/hello/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt4/hello/main.cpp (renamed from tools/build/v2/example/qt/qt4/hello/main.cpp)0
-rw-r--r--tools/build/example/qt/qt4/moccable-cpp/jamroot.jam (renamed from tools/build/v2/example/qt/qt4/moccable-cpp/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt4/moccable-cpp/main.cpp (renamed from tools/build/v2/example/qt/qt4/moccable-cpp/main.cpp)0
-rw-r--r--tools/build/example/qt/qt4/uic/hello_world_widget.ui (renamed from tools/build/v2/example/qt/qt4/uic/hello_world_widget.ui)0
-rw-r--r--tools/build/example/qt/qt4/uic/jamroot.jam (renamed from tools/build/v2/example/qt/qt4/uic/jamroot.jam)0
-rw-r--r--tools/build/example/qt/qt4/uic/main.cpp (renamed from tools/build/v2/example/qt/qt4/uic/main.cpp)0
-rw-r--r--tools/build/example/site-config.jam (renamed from tools/build/v2/site-config.jam)0
-rw-r--r--tools/build/example/testing/compile-fail.cpp16
-rw-r--r--tools/build/example/testing/fail.cpp16
-rw-r--r--tools/build/example/testing/jamroot.jam10
-rw-r--r--tools/build/example/testing/success.cpp16
-rw-r--r--tools/build/example/user-config.jam (renamed from tools/build/v2/user-config.jam)0
-rw-r--r--tools/build/example/variant/a.cpp (renamed from tools/build/v2/example/variant/a.cpp)0
-rw-r--r--tools/build/example/variant/jamfile.jam (renamed from tools/build/v2/example/variant/jamfile.jam)0
-rw-r--r--tools/build/example/variant/jamroot.jam (renamed from tools/build/v2/example/variant/jamroot.jam)0
-rw-r--r--tools/build/example/variant/libs/jamfile.jam (renamed from tools/build/v2/example/variant/libs/jamfile.jam)0
-rw-r--r--tools/build/example/variant/libs/l.cpp (renamed from tools/build/v2/example/variant/libs/l.cpp)0
-rw-r--r--tools/build/example/variant/readme.txt (renamed from tools/build/v2/example/variant/readme.txt)0
-rw-r--r--tools/build/index.html21
-rw-r--r--tools/build/notes/README.txt (renamed from tools/build/v2/notes/README.txt)0
-rw-r--r--tools/build/notes/build_dir_option.txt (renamed from tools/build/v2/notes/build_dir_option.txt)0
-rw-r--r--tools/build/notes/changes.txt (renamed from tools/build/v2/changes.txt)0
-rw-r--r--tools/build/notes/hacking.txt (renamed from tools/build/v2/hacking.txt)0
-rw-r--r--tools/build/notes/relative_source_paths.txt (renamed from tools/build/v2/notes/relative_source_paths.txt)0
-rw-r--r--tools/build/notes/release_procedure.txt (renamed from tools/build/v2/release_procedure.txt)0
-rwxr-xr-xtools/build/scripts/nightly.sh (renamed from tools/build/v2/nightly.sh)0
-rwxr-xr-xtools/build/scripts/roll.sh (renamed from tools/build/v2/roll.sh)0
-rwxr-xr-xtools/build/scripts/to_merge.sh (renamed from tools/build/v2/to_merge.sh)0
-rw-r--r--tools/build/src/bootstrap.jam (renamed from tools/build/v2/bootstrap.jam)0
-rw-r--r--tools/build/src/build-system.jam (renamed from tools/build/v2/build-system.jam)0
-rw-r--r--tools/build/src/build/__init__.py (renamed from tools/build/v2/build/__init__.py)0
-rw-r--r--tools/build/src/build/ac.jam (renamed from tools/build/v2/build/ac.jam)0
-rw-r--r--tools/build/src/build/alias.jam (renamed from tools/build/v2/build/alias.jam)0
-rwxr-xr-xtools/build/src/build/alias.py (renamed from tools/build/v2/build/alias.py)0
-rw-r--r--tools/build/src/build/build-request.jam (renamed from tools/build/v2/build/build-request.jam)0
-rw-r--r--tools/build/src/build/build_request.py (renamed from tools/build/v2/build/build_request.py)0
-rw-r--r--tools/build/src/build/config-cache.jam (renamed from tools/build/v2/build/config-cache.jam)5
-rw-r--r--tools/build/src/build/configure.jam (renamed from tools/build/v2/build/configure.jam)123
-rw-r--r--tools/build/src/build/configure.py (renamed from tools/build/v2/build/configure.py)0
-rw-r--r--tools/build/src/build/engine.py (renamed from tools/build/v2/build/engine.py)0
-rw-r--r--tools/build/src/build/errors.py (renamed from tools/build/v2/build/errors.py)0
-rw-r--r--tools/build/src/build/feature.jam (renamed from tools/build/v2/build/feature.jam)0
-rw-r--r--tools/build/src/build/feature.py (renamed from tools/build/v2/build/feature.py)6
-rw-r--r--tools/build/src/build/generators.jam (renamed from tools/build/v2/build/generators.jam)2
-rw-r--r--tools/build/src/build/generators.py (renamed from tools/build/v2/build/generators.py)6
-rw-r--r--tools/build/src/build/project.ann.py (renamed from tools/build/v2/build/project.ann.py)0
-rw-r--r--tools/build/src/build/project.jam (renamed from tools/build/v2/build/project.jam)0
-rw-r--r--tools/build/src/build/project.py (renamed from tools/build/v2/build/project.py)3
-rw-r--r--tools/build/src/build/property-set.jam (renamed from tools/build/v2/build/property-set.jam)0
-rw-r--r--tools/build/src/build/property.jam (renamed from tools/build/v2/build/property.jam)2
-rw-r--r--tools/build/src/build/property.py (renamed from tools/build/v2/build/property.py)22
-rw-r--r--tools/build/src/build/property_set.py (renamed from tools/build/v2/build/property_set.py)13
-rw-r--r--tools/build/src/build/readme.txt (renamed from tools/build/v2/build/readme.txt)0
-rw-r--r--tools/build/src/build/scanner.jam (renamed from tools/build/v2/build/scanner.jam)0
-rw-r--r--tools/build/src/build/scanner.py (renamed from tools/build/v2/build/scanner.py)0
-rw-r--r--tools/build/src/build/targets.jam (renamed from tools/build/v2/build/targets.jam)0
-rw-r--r--tools/build/src/build/targets.py (renamed from tools/build/v2/build/targets.py)13
-rw-r--r--tools/build/src/build/toolset.jam (renamed from tools/build/v2/build/toolset.jam)29
-rw-r--r--tools/build/src/build/toolset.py (renamed from tools/build/v2/build/toolset.py)0
-rw-r--r--tools/build/src/build/type.jam (renamed from tools/build/v2/build/type.jam)0
-rw-r--r--tools/build/src/build/type.py (renamed from tools/build/v2/build/type.py)0
-rw-r--r--tools/build/src/build/version.jam (renamed from tools/build/v2/build/version.jam)4
-rw-r--r--tools/build/src/build/virtual-target.jam (renamed from tools/build/v2/build/virtual-target.jam)3
-rw-r--r--tools/build/src/build/virtual_target.py (renamed from tools/build/v2/build/virtual_target.py)4
-rw-r--r--tools/build/src/build_system.py (renamed from tools/build/v2/build_system.py)0
-rw-r--r--tools/build/src/contrib/boost.jam (renamed from tools/build/v2/contrib/boost.jam)0
-rw-r--r--tools/build/src/contrib/boost.py279
-rw-r--r--tools/build/src/contrib/tntnet.jam (renamed from tools/build/v2/contrib/tntnet.jam)0
-rw-r--r--tools/build/src/contrib/wxFormBuilder.jam (renamed from tools/build/v2/contrib/wxFormBuilder.jam)0
-rw-r--r--tools/build/src/engine/Jambase (renamed from tools/build/v2/engine/Jambase)0
-rw-r--r--tools/build/src/engine/boehm_gc/AmigaOS.c (renamed from tools/build/v2/engine/boehm_gc/AmigaOS.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/BCC_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/BCC_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/ChangeLog (renamed from tools/build/v2/engine/boehm_gc/ChangeLog)0
-rw-r--r--tools/build/src/engine/boehm_gc/EMX_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/EMX_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/MacOS.c (renamed from tools/build/v2/engine/boehm_gc/MacOS.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/MacProjects.sit.hqx (renamed from tools/build/v2/engine/boehm_gc/MacProjects.sit.hqx)0
-rw-r--r--tools/build/src/engine/boehm_gc/Mac_files/MacOS_Test_config.h (renamed from tools/build/v2/engine/boehm_gc/Mac_files/MacOS_Test_config.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/Mac_files/MacOS_config.h (renamed from tools/build/v2/engine/boehm_gc/Mac_files/MacOS_config.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/Mac_files/dataend.c (renamed from tools/build/v2/engine/boehm_gc/Mac_files/dataend.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/Mac_files/datastart.c (renamed from tools/build/v2/engine/boehm_gc/Mac_files/datastart.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/Makefile.DLLs (renamed from tools/build/v2/engine/boehm_gc/Makefile.DLLs)0
-rw-r--r--tools/build/src/engine/boehm_gc/Makefile.am (renamed from tools/build/v2/engine/boehm_gc/Makefile.am)0
-rw-r--r--tools/build/src/engine/boehm_gc/Makefile.direct (renamed from tools/build/v2/engine/boehm_gc/Makefile.direct)0
-rw-r--r--tools/build/src/engine/boehm_gc/Makefile.dj (renamed from tools/build/v2/engine/boehm_gc/Makefile.dj)0
-rw-r--r--tools/build/src/engine/boehm_gc/Makefile.in (renamed from tools/build/v2/engine/boehm_gc/Makefile.in)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/NT_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/NT_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/NT_THREADS_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/NT_THREADS_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/OS2_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/OS2_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/PCR-Makefile (renamed from tools/build/v2/engine/boehm_gc/PCR-Makefile)0
-rw-r--r--tools/build/src/engine/boehm_gc/README.QUICK (renamed from tools/build/v2/engine/boehm_gc/README.QUICK)0
-rw-r--r--tools/build/src/engine/boehm_gc/SMakefile.amiga (renamed from tools/build/v2/engine/boehm_gc/SMakefile.amiga)0
-rw-r--r--tools/build/src/engine/boehm_gc/WCC_MAKEFILE (renamed from tools/build/v2/engine/boehm_gc/WCC_MAKEFILE)0
-rw-r--r--tools/build/src/engine/boehm_gc/acinclude.m4 (renamed from tools/build/v2/engine/boehm_gc/acinclude.m4)0
-rw-r--r--tools/build/src/engine/boehm_gc/aclocal.m4 (renamed from tools/build/v2/engine/boehm_gc/aclocal.m4)0
-rw-r--r--tools/build/src/engine/boehm_gc/add_gc_prefix.c (renamed from tools/build/v2/engine/boehm_gc/add_gc_prefix.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/allchblk.c (renamed from tools/build/v2/engine/boehm_gc/allchblk.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/alloc.c (renamed from tools/build/v2/engine/boehm_gc/alloc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/alpha_mach_dep.S (renamed from tools/build/v2/engine/boehm_gc/alpha_mach_dep.S)0
-rw-r--r--tools/build/src/engine/boehm_gc/backgraph.c (renamed from tools/build/v2/engine/boehm_gc/backgraph.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/bdw-gc.pc (renamed from tools/build/v2/engine/boehm_gc/bdw-gc.pc)0
-rw-r--r--tools/build/src/engine/boehm_gc/bdw-gc.pc.in (renamed from tools/build/v2/engine/boehm_gc/bdw-gc.pc.in)0
-rw-r--r--tools/build/src/engine/boehm_gc/blacklst.c (renamed from tools/build/v2/engine/boehm_gc/blacklst.c)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/callprocs (renamed from tools/build/v2/engine/boehm_gc/callprocs)0
-rw-r--r--tools/build/src/engine/boehm_gc/checksums.c (renamed from tools/build/v2/engine/boehm_gc/checksums.c)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/compile (renamed from tools/build/v2/engine/boehm_gc/compile)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/config.guess (renamed from tools/build/v2/engine/boehm_gc/config.guess)0
-rw-r--r--tools/build/src/engine/boehm_gc/config.sub (renamed from tools/build/v2/engine/boehm_gc/config.sub)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/configure (renamed from tools/build/v2/engine/boehm_gc/configure)0
-rw-r--r--tools/build/src/engine/boehm_gc/configure.ac (renamed from tools/build/v2/engine/boehm_gc/configure.ac)0
-rw-r--r--tools/build/src/engine/boehm_gc/configure.host (renamed from tools/build/v2/engine/boehm_gc/configure.host)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/configure_atomic_ops.sh (renamed from tools/build/v2/engine/boehm_gc/configure_atomic_ops.sh)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/cord.am (renamed from tools/build/v2/engine/boehm_gc/cord/cord.am)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/cordbscs.c (renamed from tools/build/v2/engine/boehm_gc/cord/cordbscs.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/cordprnt.c (renamed from tools/build/v2/engine/boehm_gc/cord/cordprnt.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/cordtest.c (renamed from tools/build/v2/engine/boehm_gc/cord/cordtest.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/cordxtra.c (renamed from tools/build/v2/engine/boehm_gc/cord/cordxtra.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de.c (renamed from tools/build/v2/engine/boehm_gc/cord/de.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de_cmds.h (renamed from tools/build/v2/engine/boehm_gc/cord/de_cmds.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de_win.ICO (renamed from tools/build/v2/engine/boehm_gc/cord/de_win.ICO)bin766 -> 766 bytes
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de_win.RC (renamed from tools/build/v2/engine/boehm_gc/cord/de_win.RC)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de_win.c (renamed from tools/build/v2/engine/boehm_gc/cord/de_win.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/cord/de_win.h (renamed from tools/build/v2/engine/boehm_gc/cord/de_win.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/darwin_stop_world.c (renamed from tools/build/v2/engine/boehm_gc/darwin_stop_world.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/dbg_mlc.c (renamed from tools/build/v2/engine/boehm_gc/dbg_mlc.c)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/depcomp (renamed from tools/build/v2/engine/boehm_gc/depcomp)0
-rw-r--r--tools/build/src/engine/boehm_gc/digimars.mak (renamed from tools/build/v2/engine/boehm_gc/digimars.mak)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README (renamed from tools/build/v2/engine/boehm_gc/doc/README)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.DGUX386 (renamed from tools/build/v2/engine/boehm_gc/doc/README.DGUX386)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.Mac (renamed from tools/build/v2/engine/boehm_gc/doc/README.Mac)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.MacOSX (renamed from tools/build/v2/engine/boehm_gc/doc/README.MacOSX)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.OS2 (renamed from tools/build/v2/engine/boehm_gc/doc/README.OS2)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.amiga (renamed from tools/build/v2/engine/boehm_gc/doc/README.amiga)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.arm.cross (renamed from tools/build/v2/engine/boehm_gc/doc/README.arm.cross)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.autoconf (renamed from tools/build/v2/engine/boehm_gc/doc/README.autoconf)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.changes (renamed from tools/build/v2/engine/boehm_gc/doc/README.changes)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.contributors (renamed from tools/build/v2/engine/boehm_gc/doc/README.contributors)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.cords (renamed from tools/build/v2/engine/boehm_gc/doc/README.cords)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.darwin (renamed from tools/build/v2/engine/boehm_gc/doc/README.darwin)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.dj (renamed from tools/build/v2/engine/boehm_gc/doc/README.dj)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.environment (renamed from tools/build/v2/engine/boehm_gc/doc/README.environment)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.ews4800 (renamed from tools/build/v2/engine/boehm_gc/doc/README.ews4800)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.hp (renamed from tools/build/v2/engine/boehm_gc/doc/README.hp)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.linux (renamed from tools/build/v2/engine/boehm_gc/doc/README.linux)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.macros (renamed from tools/build/v2/engine/boehm_gc/doc/README.macros)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.rs6000 (renamed from tools/build/v2/engine/boehm_gc/doc/README.rs6000)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.sgi (renamed from tools/build/v2/engine/boehm_gc/doc/README.sgi)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.solaris2 (renamed from tools/build/v2/engine/boehm_gc/doc/README.solaris2)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.uts (renamed from tools/build/v2/engine/boehm_gc/doc/README.uts)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.win32 (renamed from tools/build/v2/engine/boehm_gc/doc/README.win32)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/README.win64 (renamed from tools/build/v2/engine/boehm_gc/doc/README.win64)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/barrett_diagram (renamed from tools/build/v2/engine/boehm_gc/doc/barrett_diagram)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/debugging.html (renamed from tools/build/v2/engine/boehm_gc/doc/debugging.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/doc.am (renamed from tools/build/v2/engine/boehm_gc/doc/doc.am)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/gc.man (renamed from tools/build/v2/engine/boehm_gc/doc/gc.man)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/gcdescr.html (renamed from tools/build/v2/engine/boehm_gc/doc/gcdescr.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/gcinterface.html (renamed from tools/build/v2/engine/boehm_gc/doc/gcinterface.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/leak.html (renamed from tools/build/v2/engine/boehm_gc/doc/leak.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/overview.html (renamed from tools/build/v2/engine/boehm_gc/doc/overview.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/porting.html (renamed from tools/build/v2/engine/boehm_gc/doc/porting.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/scale.html (renamed from tools/build/v2/engine/boehm_gc/doc/scale.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/simple_example.html (renamed from tools/build/v2/engine/boehm_gc/doc/simple_example.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/doc/tree.html (renamed from tools/build/v2/engine/boehm_gc/doc/tree.html)0
-rw-r--r--tools/build/src/engine/boehm_gc/dyn_load.c (renamed from tools/build/v2/engine/boehm_gc/dyn_load.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/finalize.c (renamed from tools/build/v2/engine/boehm_gc/finalize.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/gc.mak (renamed from tools/build/v2/engine/boehm_gc/gc.mak)0
-rw-r--r--tools/build/src/engine/boehm_gc/gc_cpp.cc (renamed from tools/build/v2/engine/boehm_gc/gc_cpp.cc)0
-rw-r--r--tools/build/src/engine/boehm_gc/gc_cpp.cpp (renamed from tools/build/v2/engine/boehm_gc/gc_cpp.cpp)0
-rw-r--r--tools/build/src/engine/boehm_gc/gc_dlopen.c (renamed from tools/build/v2/engine/boehm_gc/gc_dlopen.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/gcj_mlc.c (renamed from tools/build/v2/engine/boehm_gc/gcj_mlc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/gcname.c (renamed from tools/build/v2/engine/boehm_gc/gcname.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/headers.c (renamed from tools/build/v2/engine/boehm_gc/headers.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/hpux_test_and_clear.s (renamed from tools/build/v2/engine/boehm_gc/hpux_test_and_clear.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/ia64_save_regs_in_stack.s (renamed from tools/build/v2/engine/boehm_gc/ia64_save_regs_in_stack.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/if_mach.c (renamed from tools/build/v2/engine/boehm_gc/if_mach.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/if_not_there.c (renamed from tools/build/v2/engine/boehm_gc/if_not_there.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/cord.h (renamed from tools/build/v2/engine/boehm_gc/include/cord.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/ec.h (renamed from tools/build/v2/engine/boehm_gc/include/ec.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc.h (renamed from tools/build/v2/engine/boehm_gc/include/gc.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_allocator.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_allocator.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_amiga_redirects.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_amiga_redirects.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_backptr.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_backptr.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_config_macros.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_config_macros.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_cpp.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_cpp.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_gcj.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_gcj.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_inline.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_inline.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_mark.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_mark.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_pthread_redirects.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_pthread_redirects.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_tiny_fl.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_tiny_fl.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/gc_typed.h (renamed from tools/build/v2/engine/boehm_gc/include/gc_typed.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/include.am (renamed from tools/build/v2/engine/boehm_gc/include/include.am)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/javaxfc.h (renamed from tools/build/v2/engine/boehm_gc/include/javaxfc.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/leak_detector.h (renamed from tools/build/v2/engine/boehm_gc/include/leak_detector.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/new_gc_alloc.h (renamed from tools/build/v2/engine/boehm_gc/include/new_gc_alloc.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/cord_pos.h (renamed from tools/build/v2/engine/boehm_gc/include/private/cord_pos.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/darwin_semaphore.h (renamed from tools/build/v2/engine/boehm_gc/include/private/darwin_semaphore.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/darwin_stop_world.h (renamed from tools/build/v2/engine/boehm_gc/include/private/darwin_stop_world.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/dbg_mlc.h (renamed from tools/build/v2/engine/boehm_gc/include/private/dbg_mlc.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/gc_hdrs.h (renamed from tools/build/v2/engine/boehm_gc/include/private/gc_hdrs.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/gc_locks.h (renamed from tools/build/v2/engine/boehm_gc/include/private/gc_locks.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/gc_pmark.h (renamed from tools/build/v2/engine/boehm_gc/include/private/gc_pmark.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/gc_priv.h (renamed from tools/build/v2/engine/boehm_gc/include/private/gc_priv.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/gcconfig.h (renamed from tools/build/v2/engine/boehm_gc/include/private/gcconfig.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/msvc_dbg.h (renamed from tools/build/v2/engine/boehm_gc/include/private/msvc_dbg.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/pthread_stop_world.h (renamed from tools/build/v2/engine/boehm_gc/include/private/pthread_stop_world.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/pthread_support.h (renamed from tools/build/v2/engine/boehm_gc/include/private/pthread_support.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/specific.h (renamed from tools/build/v2/engine/boehm_gc/include/private/specific.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/private/thread_local_alloc.h (renamed from tools/build/v2/engine/boehm_gc/include/private/thread_local_alloc.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/include/weakpointer.h (renamed from tools/build/v2/engine/boehm_gc/include/weakpointer.h)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/install-sh (renamed from tools/build/v2/engine/boehm_gc/install-sh)0
-rw-r--r--tools/build/src/engine/boehm_gc/libtool.m4 (renamed from tools/build/v2/engine/boehm_gc/libtool.m4)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/ltmain.sh (renamed from tools/build/v2/engine/boehm_gc/ltmain.sh)0
-rw-r--r--tools/build/src/engine/boehm_gc/mach_dep.c (renamed from tools/build/v2/engine/boehm_gc/mach_dep.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/malloc.c (renamed from tools/build/v2/engine/boehm_gc/malloc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/mallocx.c (renamed from tools/build/v2/engine/boehm_gc/mallocx.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/mark.c (renamed from tools/build/v2/engine/boehm_gc/mark.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/mark_rts.c (renamed from tools/build/v2/engine/boehm_gc/mark_rts.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/mips_sgi_mach_dep.s (renamed from tools/build/v2/engine/boehm_gc/mips_sgi_mach_dep.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/mips_ultrix_mach_dep.s (renamed from tools/build/v2/engine/boehm_gc/mips_ultrix_mach_dep.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/misc.c (renamed from tools/build/v2/engine/boehm_gc/misc.c)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/missing (renamed from tools/build/v2/engine/boehm_gc/missing)0
-rwxr-xr-xtools/build/src/engine/boehm_gc/mkinstalldirs (renamed from tools/build/v2/engine/boehm_gc/mkinstalldirs)0
-rw-r--r--tools/build/src/engine/boehm_gc/msvc_dbg.c (renamed from tools/build/v2/engine/boehm_gc/msvc_dbg.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/new_hblk.c (renamed from tools/build/v2/engine/boehm_gc/new_hblk.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/obj_map.c (renamed from tools/build/v2/engine/boehm_gc/obj_map.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/os_dep.c (renamed from tools/build/v2/engine/boehm_gc/os_dep.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/pcr_interface.c (renamed from tools/build/v2/engine/boehm_gc/pcr_interface.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/pthread_stop_world.c (renamed from tools/build/v2/engine/boehm_gc/pthread_stop_world.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/pthread_support.c (renamed from tools/build/v2/engine/boehm_gc/pthread_support.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/ptr_chck.c (renamed from tools/build/v2/engine/boehm_gc/ptr_chck.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/real_malloc.c (renamed from tools/build/v2/engine/boehm_gc/real_malloc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/reclaim.c (renamed from tools/build/v2/engine/boehm_gc/reclaim.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/rs6000_mach_dep.s (renamed from tools/build/v2/engine/boehm_gc/rs6000_mach_dep.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/setjmp_t.c (renamed from tools/build/v2/engine/boehm_gc/setjmp_t.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/sparc_mach_dep.S (renamed from tools/build/v2/engine/boehm_gc/sparc_mach_dep.S)0
-rw-r--r--tools/build/src/engine/boehm_gc/sparc_netbsd_mach_dep.s (renamed from tools/build/v2/engine/boehm_gc/sparc_netbsd_mach_dep.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/sparc_sunos4_mach_dep.s (renamed from tools/build/v2/engine/boehm_gc/sparc_sunos4_mach_dep.s)0
-rw-r--r--tools/build/src/engine/boehm_gc/specific.c (renamed from tools/build/v2/engine/boehm_gc/specific.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/stubborn.c (renamed from tools/build/v2/engine/boehm_gc/stubborn.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/leak_test.c (renamed from tools/build/v2/engine/boehm_gc/tests/leak_test.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/middle.c (renamed from tools/build/v2/engine/boehm_gc/tests/middle.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/test.c (renamed from tools/build/v2/engine/boehm_gc/tests/test.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/test_cpp.cc (renamed from tools/build/v2/engine/boehm_gc/tests/test_cpp.cc)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/tests.am (renamed from tools/build/v2/engine/boehm_gc/tests/tests.am)0
-rw-r--r--tools/build/src/engine/boehm_gc/tests/thread_leak_test.c (renamed from tools/build/v2/engine/boehm_gc/tests/thread_leak_test.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/thread_local_alloc.c (renamed from tools/build/v2/engine/boehm_gc/thread_local_alloc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/threadlibs.c (renamed from tools/build/v2/engine/boehm_gc/threadlibs.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/typd_mlc.c (renamed from tools/build/v2/engine/boehm_gc/typd_mlc.c)0
-rw-r--r--tools/build/src/engine/boehm_gc/version.h (renamed from tools/build/v2/engine/boehm_gc/version.h)0
-rw-r--r--tools/build/src/engine/boehm_gc/win32_threads.c (renamed from tools/build/v2/engine/boehm_gc/win32_threads.c)0
-rw-r--r--tools/build/src/engine/boost-jam.spec (renamed from tools/build/v2/engine/boost-jam.spec)0
-rw-r--r--tools/build/src/engine/boost-no-inspect (renamed from tools/build/v2/engine/boost-no-inspect)0
-rw-r--r--tools/build/src/engine/build.bat (renamed from tools/build/v2/engine/build.bat)60
-rw-r--r--tools/build/src/engine/build.jam (renamed from tools/build/v2/engine/build.jam)18
-rwxr-xr-xtools/build/src/engine/build.sh (renamed from tools/build/v2/engine/build.sh)6
-rw-r--r--tools/build/src/engine/builtins.c (renamed from tools/build/v2/engine/builtins.c)125
-rw-r--r--tools/build/src/engine/builtins.h (renamed from tools/build/v2/engine/builtins.h)1
-rw-r--r--tools/build/src/engine/bump_version.py (renamed from tools/build/v2/engine/bump_version.py)0
-rw-r--r--tools/build/src/engine/class.c (renamed from tools/build/v2/engine/class.c)0
-rw-r--r--tools/build/src/engine/class.h (renamed from tools/build/v2/engine/class.h)0
-rw-r--r--tools/build/src/engine/command.c (renamed from tools/build/v2/engine/command.c)37
-rw-r--r--tools/build/src/engine/command.h (renamed from tools/build/v2/engine/command.h)29
-rw-r--r--tools/build/src/engine/compile.c (renamed from tools/build/v2/engine/compile.c)49
-rw-r--r--tools/build/src/engine/compile.h (renamed from tools/build/v2/engine/compile.h)0
-rw-r--r--tools/build/src/engine/constants.c (renamed from tools/build/v2/engine/constants.c)0
-rw-r--r--tools/build/src/engine/constants.h (renamed from tools/build/v2/engine/constants.h)0
-rw-r--r--tools/build/src/engine/cwd.c (renamed from tools/build/v2/engine/cwd.c)0
-rw-r--r--tools/build/src/engine/cwd.h (renamed from tools/build/v2/engine/cwd.h)0
-rw-r--r--tools/build/src/engine/debian/changelog (renamed from tools/build/v2/engine/debian/changelog)0
-rw-r--r--tools/build/src/engine/debian/control (renamed from tools/build/v2/engine/debian/control)0
-rw-r--r--tools/build/src/engine/debian/copyright (renamed from tools/build/v2/engine/debian/copyright)0
-rw-r--r--tools/build/src/engine/debian/jam.man.sgml (renamed from tools/build/v2/engine/debian/jam.man.sgml)0
-rwxr-xr-xtools/build/src/engine/debian/rules (renamed from tools/build/v2/engine/debian/rules)0
-rw-r--r--tools/build/src/engine/debug.c (renamed from tools/build/v2/engine/debug.c)0
-rw-r--r--tools/build/src/engine/debug.h (renamed from tools/build/v2/engine/debug.h)0
-rw-r--r--tools/build/src/engine/execcmd.c (renamed from tools/build/v2/engine/execcmd.c)0
-rw-r--r--tools/build/src/engine/execcmd.h (renamed from tools/build/v2/engine/execcmd.h)0
-rw-r--r--tools/build/src/engine/execnt.c (renamed from tools/build/v2/engine/execnt.c)68
-rw-r--r--tools/build/src/engine/execunix.c (renamed from tools/build/v2/engine/execunix.c)0
-rw-r--r--tools/build/src/engine/filent.c (renamed from tools/build/v2/engine/filent.c)13
-rw-r--r--tools/build/src/engine/filesys.c (renamed from tools/build/v2/engine/filesys.c)0
-rw-r--r--tools/build/src/engine/filesys.h (renamed from tools/build/v2/engine/filesys.h)0
-rw-r--r--tools/build/src/engine/fileunix.c (renamed from tools/build/v2/engine/fileunix.c)0
-rw-r--r--tools/build/src/engine/frames.c (renamed from tools/build/v2/engine/frames.c)0
-rw-r--r--tools/build/src/engine/frames.h (renamed from tools/build/v2/engine/frames.h)0
-rw-r--r--tools/build/src/engine/function.c (renamed from tools/build/v2/engine/function.c)0
-rw-r--r--tools/build/src/engine/function.h (renamed from tools/build/v2/engine/function.h)0
-rw-r--r--tools/build/src/engine/glob.c (renamed from tools/build/v2/engine/glob.c)0
-rw-r--r--tools/build/src/engine/hash.c (renamed from tools/build/v2/engine/hash.c)0
-rw-r--r--tools/build/src/engine/hash.h (renamed from tools/build/v2/engine/hash.h)0
-rw-r--r--tools/build/src/engine/hcache.c (renamed from tools/build/v2/engine/hcache.c)0
-rw-r--r--tools/build/src/engine/hcache.h (renamed from tools/build/v2/engine/hcache.h)0
-rw-r--r--tools/build/src/engine/hdrmacro.c (renamed from tools/build/v2/engine/hdrmacro.c)0
-rw-r--r--tools/build/src/engine/hdrmacro.h (renamed from tools/build/v2/engine/hdrmacro.h)0
-rw-r--r--tools/build/src/engine/headers.c (renamed from tools/build/v2/engine/headers.c)0
-rw-r--r--tools/build/src/engine/headers.h (renamed from tools/build/v2/engine/headers.h)0
-rw-r--r--tools/build/src/engine/jam.c (renamed from tools/build/v2/engine/jam.c)0
-rw-r--r--tools/build/src/engine/jam.h (renamed from tools/build/v2/engine/jam.h)2
-rw-r--r--tools/build/src/engine/jambase.c (renamed from tools/build/v2/engine/jambase.c)0
-rw-r--r--tools/build/src/engine/jambase.h (renamed from tools/build/v2/engine/jambase.h)0
-rw-r--r--tools/build/src/engine/jamgram.c (renamed from tools/build/v2/engine/jamgram.c)0
-rw-r--r--tools/build/src/engine/jamgram.h (renamed from tools/build/v2/engine/jamgram.h)0
-rw-r--r--tools/build/src/engine/jamgram.y (renamed from tools/build/v2/engine/jamgram.y)0
-rw-r--r--tools/build/src/engine/jamgram.yy (renamed from tools/build/v2/engine/jamgram.yy)0
-rw-r--r--tools/build/src/engine/jamgramtab.h (renamed from tools/build/v2/engine/jamgramtab.h)0
-rw-r--r--tools/build/src/engine/lists.c (renamed from tools/build/v2/engine/lists.c)0
-rw-r--r--tools/build/src/engine/lists.h (renamed from tools/build/v2/engine/lists.h)0
-rw-r--r--tools/build/src/engine/make.c (renamed from tools/build/v2/engine/make.c)29
-rw-r--r--tools/build/src/engine/make.h (renamed from tools/build/v2/engine/make.h)0
-rw-r--r--tools/build/src/engine/make1.c (renamed from tools/build/v2/engine/make1.c)353
-rw-r--r--tools/build/src/engine/md5.c (renamed from tools/build/v2/engine/md5.c)0
-rw-r--r--tools/build/src/engine/md5.h (renamed from tools/build/v2/engine/md5.h)0
-rw-r--r--tools/build/src/engine/mem.c (renamed from tools/build/v2/engine/mem.c)0
-rw-r--r--tools/build/src/engine/mem.h (renamed from tools/build/v2/engine/mem.h)0
-rw-r--r--tools/build/src/engine/mkjambase.c (renamed from tools/build/v2/engine/mkjambase.c)0
-rw-r--r--tools/build/src/engine/modules.c (renamed from tools/build/v2/engine/modules.c)0
-rw-r--r--tools/build/src/engine/modules.h (renamed from tools/build/v2/engine/modules.h)0
-rw-r--r--tools/build/src/engine/modules/order.c (renamed from tools/build/v2/engine/modules/order.c)0
-rw-r--r--tools/build/src/engine/modules/path.c (renamed from tools/build/v2/engine/modules/path.c)0
-rw-r--r--tools/build/src/engine/modules/property-set.c (renamed from tools/build/v2/engine/modules/property-set.c)0
-rw-r--r--tools/build/src/engine/modules/readme.txt (renamed from tools/build/v2/engine/modules/readme.txt)0
-rw-r--r--tools/build/src/engine/modules/regex.c (renamed from tools/build/v2/engine/modules/regex.c)0
-rw-r--r--tools/build/src/engine/modules/sequence.c (renamed from tools/build/v2/engine/modules/sequence.c)0
-rw-r--r--tools/build/src/engine/modules/set.c (renamed from tools/build/v2/engine/modules/set.c)0
-rw-r--r--tools/build/src/engine/native.c (renamed from tools/build/v2/engine/native.c)0
-rw-r--r--tools/build/src/engine/native.h (renamed from tools/build/v2/engine/native.h)0
-rw-r--r--tools/build/src/engine/object.c (renamed from tools/build/v2/engine/object.c)0
-rw-r--r--tools/build/src/engine/object.h (renamed from tools/build/v2/engine/object.h)0
-rw-r--r--tools/build/src/engine/option.c (renamed from tools/build/v2/engine/option.c)0
-rw-r--r--tools/build/src/engine/option.h (renamed from tools/build/v2/engine/option.h)0
-rw-r--r--tools/build/src/engine/output.c (renamed from tools/build/v2/engine/output.c)0
-rw-r--r--tools/build/src/engine/output.h (renamed from tools/build/v2/engine/output.h)0
-rw-r--r--tools/build/src/engine/parse.c (renamed from tools/build/v2/engine/parse.c)0
-rw-r--r--tools/build/src/engine/parse.h (renamed from tools/build/v2/engine/parse.h)0
-rw-r--r--tools/build/src/engine/patchlevel.h (renamed from tools/build/v2/engine/patchlevel.h)16
-rw-r--r--tools/build/src/engine/pathnt.c (renamed from tools/build/v2/engine/pathnt.c)7
-rw-r--r--tools/build/src/engine/pathsys.c (renamed from tools/build/v2/engine/pathsys.c)0
-rw-r--r--tools/build/src/engine/pathsys.h (renamed from tools/build/v2/engine/pathsys.h)0
-rw-r--r--tools/build/src/engine/pathunix.c (renamed from tools/build/v2/engine/pathunix.c)0
-rw-r--r--tools/build/src/engine/regexp.c (renamed from tools/build/v2/engine/regexp.c)0
-rw-r--r--tools/build/src/engine/regexp.h (renamed from tools/build/v2/engine/regexp.h)0
-rw-r--r--tools/build/src/engine/rules.c (renamed from tools/build/v2/engine/rules.c)0
-rw-r--r--tools/build/src/engine/rules.h (renamed from tools/build/v2/engine/rules.h)7
-rw-r--r--tools/build/src/engine/scan.c (renamed from tools/build/v2/engine/scan.c)0
-rw-r--r--tools/build/src/engine/scan.h (renamed from tools/build/v2/engine/scan.h)0
-rw-r--r--tools/build/src/engine/search.c (renamed from tools/build/v2/engine/search.c)0
-rw-r--r--tools/build/src/engine/search.h (renamed from tools/build/v2/engine/search.h)0
-rw-r--r--tools/build/src/engine/strings.c (renamed from tools/build/v2/engine/strings.c)0
-rw-r--r--tools/build/src/engine/strings.h (renamed from tools/build/v2/engine/strings.h)0
-rw-r--r--tools/build/src/engine/subst.c (renamed from tools/build/v2/engine/subst.c)0
-rw-r--r--tools/build/src/engine/subst.h (renamed from tools/build/v2/engine/subst.h)0
-rw-r--r--tools/build/src/engine/timestamp.c (renamed from tools/build/v2/engine/timestamp.c)0
-rw-r--r--tools/build/src/engine/timestamp.h (renamed from tools/build/v2/engine/timestamp.h)1
-rw-r--r--tools/build/src/engine/variable.c (renamed from tools/build/v2/engine/variable.c)0
-rw-r--r--tools/build/src/engine/variable.h (renamed from tools/build/v2/engine/variable.h)0
-rw-r--r--tools/build/src/engine/w32_getreg.c (renamed from tools/build/v2/engine/w32_getreg.c)0
-rw-r--r--tools/build/src/engine/yyacc.c (renamed from tools/build/v2/engine/yyacc.c)0
-rw-r--r--tools/build/src/exceptions.py (renamed from tools/build/v2/exceptions.py)0
-rwxr-xr-x[-rw-r--r--]tools/build/src/kernel/boost-build.jam (renamed from tools/build/v2/kernel/boost-build.jam)0
-rw-r--r--tools/build/src/kernel/bootstrap.jam (renamed from tools/build/v2/kernel/bootstrap.jam)0
-rw-r--r--tools/build/src/kernel/bootstrap.py (renamed from tools/build/v2/kernel/bootstrap.py)0
-rw-r--r--tools/build/src/kernel/class.jam (renamed from tools/build/v2/kernel/class.jam)0
-rw-r--r--tools/build/src/kernel/errors.jam (renamed from tools/build/v2/kernel/errors.jam)0
-rw-r--r--tools/build/src/kernel/modules.jam (renamed from tools/build/v2/kernel/modules.jam)0
-rw-r--r--tools/build/src/manager.py (renamed from tools/build/v2/manager.py)0
-rwxr-xr-x[-rw-r--r--]tools/build/src/options/help.jam (renamed from tools/build/v2/options/help.jam)0
-rw-r--r--tools/build/src/tools/__init__.py (renamed from tools/build/v2/tools/__init__.py)0
-rw-r--r--tools/build/src/tools/acc.jam (renamed from tools/build/v2/tools/acc.jam)0
-rw-r--r--tools/build/src/tools/auto-index.jam (renamed from tools/build/v2/tools/auto-index.jam)0
-rw-r--r--tools/build/src/tools/bison.jam (renamed from tools/build/v2/tools/bison.jam)0
-rw-r--r--tools/build/src/tools/boostbook-config.jam (renamed from tools/build/v2/tools/boostbook-config.jam)0
-rw-r--r--tools/build/src/tools/boostbook.jam (renamed from tools/build/v2/tools/boostbook.jam)4
-rw-r--r--tools/build/src/tools/borland.jam (renamed from tools/build/v2/tools/borland.jam)3
-rw-r--r--tools/build/src/tools/builtin.jam (renamed from tools/build/v2/tools/builtin.jam)2
-rw-r--r--tools/build/src/tools/builtin.py (renamed from tools/build/v2/tools/builtin.py)24
-rw-r--r--tools/build/src/tools/cast.jam (renamed from tools/build/v2/tools/cast.jam)0
-rw-r--r--tools/build/src/tools/cast.py (renamed from tools/build/v2/tools/cast.py)0
-rw-r--r--tools/build/src/tools/clang-darwin.jam (renamed from tools/build/v2/tools/clang-darwin.jam)6
-rw-r--r--tools/build/src/tools/clang-linux.jam (renamed from tools/build/v2/tools/clang-linux.jam)4
-rw-r--r--tools/build/src/tools/clang.jam (renamed from tools/build/v2/tools/clang.jam)0
-rw-r--r--tools/build/src/tools/common.jam (renamed from tools/build/v2/tools/common.jam)0
-rw-r--r--tools/build/src/tools/common.py (renamed from tools/build/v2/tools/common.py)25
-rw-r--r--tools/build/src/tools/como-linux.jam (renamed from tools/build/v2/tools/como-linux.jam)0
-rw-r--r--tools/build/src/tools/como-win.jam (renamed from tools/build/v2/tools/como-win.jam)0
-rw-r--r--tools/build/src/tools/como.jam (renamed from tools/build/v2/tools/como.jam)0
-rw-r--r--tools/build/src/tools/convert.jam (renamed from tools/build/v2/tools/convert.jam)0
-rw-r--r--tools/build/src/tools/cray.jam (renamed from tools/build/v2/tools/cray.jam)33
-rw-r--r--tools/build/src/tools/cw-config.jam (renamed from tools/build/v2/tools/cw-config.jam)0
-rw-r--r--tools/build/src/tools/cw.jam (renamed from tools/build/v2/tools/cw.jam)0
-rw-r--r--tools/build/src/tools/darwin.jam (renamed from tools/build/v2/tools/darwin.jam)2
-rw-r--r--tools/build/src/tools/darwin.py (renamed from tools/build/v2/tools/darwin.py)0
-rw-r--r--tools/build/src/tools/dmc.jam (renamed from tools/build/v2/tools/dmc.jam)0
-rw-r--r--tools/build/src/tools/docutils.jam (renamed from tools/build/v2/tools/docutils.jam)0
-rw-r--r--tools/build/src/tools/doxproc.py (renamed from tools/build/v2/tools/doxproc.py)0
-rw-r--r--tools/build/src/tools/doxygen-config.jam (renamed from tools/build/v2/tools/doxygen-config.jam)0
-rw-r--r--tools/build/src/tools/doxygen.jam (renamed from tools/build/v2/tools/doxygen.jam)0
-rw-r--r--tools/build/src/tools/doxygen/windows-paths-check.doxyfile (renamed from tools/build/v2/tools/doxygen/windows-paths-check.doxyfile)0
-rw-r--r--tools/build/src/tools/doxygen/windows-paths-check.hpp (renamed from tools/build/v2/tools/doxygen/windows-paths-check.hpp)0
-rw-r--r--tools/build/src/tools/fop.jam (renamed from tools/build/v2/tools/fop.jam)0
-rw-r--r--tools/build/src/tools/fortran.jam (renamed from tools/build/v2/tools/fortran.jam)0
-rw-r--r--tools/build/src/tools/gcc.jam (renamed from tools/build/v2/tools/gcc.jam)1
-rw-r--r--tools/build/src/tools/gcc.py (renamed from tools/build/v2/tools/gcc.py)0
-rw-r--r--tools/build/src/tools/generate.jam (renamed from tools/build/v2/tools/generate.jam)0
-rw-r--r--tools/build/src/tools/gettext.jam (renamed from tools/build/v2/tools/gettext.jam)0
-rw-r--r--tools/build/src/tools/gfortran.jam (renamed from tools/build/v2/tools/gfortran.jam)0
-rw-r--r--tools/build/src/tools/hp_cxx.jam (renamed from tools/build/v2/tools/hp_cxx.jam)0
-rw-r--r--tools/build/src/tools/hpfortran.jam (renamed from tools/build/v2/tools/hpfortran.jam)0
-rw-r--r--tools/build/src/tools/ifort.jam (renamed from tools/build/v2/tools/ifort.jam)0
-rw-r--r--tools/build/src/tools/intel-darwin.jam (renamed from tools/build/v2/tools/intel-darwin.jam)2
-rw-r--r--tools/build/src/tools/intel-linux.jam (renamed from tools/build/v2/tools/intel-linux.jam)0
-rw-r--r--tools/build/src/tools/intel-win.jam476
-rw-r--r--tools/build/src/tools/intel.jam (renamed from tools/build/v2/tools/intel.jam)0
-rw-r--r--tools/build/src/tools/lex.jam (renamed from tools/build/v2/tools/lex.jam)0
-rw-r--r--tools/build/src/tools/libjpeg.jam (renamed from tools/build/v2/tools/jpeg.jam)7
-rw-r--r--tools/build/src/tools/libpng.jam (renamed from tools/build/v2/tools/png.jam)10
-rw-r--r--tools/build/src/tools/libtiff.jam (renamed from tools/build/v2/tools/tiff.jam)7
-rw-r--r--tools/build/src/tools/link.jam500
-rw-r--r--tools/build/src/tools/make.jam (renamed from tools/build/v2/tools/make.jam)0
-rw-r--r--tools/build/src/tools/make.py (renamed from tools/build/v2/tools/make.py)0
-rw-r--r--tools/build/src/tools/mc.jam (renamed from tools/build/v2/tools/mc.jam)0
-rw-r--r--tools/build/src/tools/mc.py (renamed from tools/build/v2/tools/mc.py)0
-rw-r--r--tools/build/src/tools/message.jam (renamed from tools/build/v2/tools/message.jam)0
-rw-r--r--tools/build/src/tools/message.py (renamed from tools/build/v2/tools/message.py)0
-rw-r--r--tools/build/src/tools/midl.jam (renamed from tools/build/v2/tools/midl.jam)0
-rw-r--r--tools/build/src/tools/midl.py (renamed from tools/build/v2/tools/midl.py)14
-rw-r--r--tools/build/src/tools/mipspro.jam (renamed from tools/build/v2/tools/mipspro.jam)0
-rw-r--r--tools/build/src/tools/mpi.jam (renamed from tools/build/v2/tools/mpi.jam)19
-rw-r--r--tools/build/src/tools/msvc-config.jam (renamed from tools/build/v2/tools/msvc-config.jam)0
-rw-r--r--tools/build/src/tools/msvc.jam (renamed from tools/build/v2/tools/msvc.jam)28
-rw-r--r--tools/build/src/tools/msvc.py (renamed from tools/build/v2/tools/msvc.py)215
-rw-r--r--tools/build/src/tools/notfile.jam (renamed from tools/build/v2/tools/notfile.jam)0
-rw-r--r--tools/build/src/tools/notfile.py (renamed from tools/build/v2/tools/notfile.py)0
-rw-r--r--tools/build/src/tools/package.jam (renamed from tools/build/v2/tools/package.jam)0
-rw-r--r--tools/build/src/tools/package.py (renamed from tools/build/v2/tools/package.py)0
-rw-r--r--tools/build/src/tools/pathscale.jam (renamed from tools/build/v2/tools/pathscale.jam)0
-rw-r--r--tools/build/src/tools/pch.jam (renamed from tools/build/v2/tools/pch.jam)0
-rw-r--r--tools/build/src/tools/pch.py (renamed from tools/build/v2/tools/pch.py)0
-rw-r--r--tools/build/src/tools/pgi.jam (renamed from tools/build/v2/tools/pgi.jam)0
-rw-r--r--tools/build/src/tools/python-config.jam (renamed from tools/build/v2/tools/python-config.jam)0
-rw-r--r--tools/build/src/tools/python.jam (renamed from tools/build/v2/tools/python.jam)6
-rw-r--r--tools/build/src/tools/qcc.jam (renamed from tools/build/v2/tools/qcc.jam)0
-rw-r--r--tools/build/src/tools/qt.jam (renamed from tools/build/v2/tools/qt.jam)0
-rw-r--r--tools/build/src/tools/qt3.jam (renamed from tools/build/v2/tools/qt3.jam)0
-rw-r--r--tools/build/src/tools/qt4.jam (renamed from tools/build/v2/tools/qt4.jam)0
-rw-r--r--tools/build/src/tools/qt5.jam (renamed from tools/build/v2/tools/qt5.jam)31
-rw-r--r--tools/build/src/tools/quickbook-config.jam (renamed from tools/build/v2/tools/quickbook-config.jam)0
-rw-r--r--tools/build/src/tools/quickbook.jam (renamed from tools/build/v2/tools/quickbook.jam)0
-rw-r--r--tools/build/src/tools/rc.jam (renamed from tools/build/v2/tools/rc.jam)0
-rw-r--r--tools/build/src/tools/rc.py (renamed from tools/build/v2/tools/rc.py)20
-rw-r--r--tools/build/src/tools/stage.jam (renamed from tools/build/v2/tools/stage.jam)0
-rw-r--r--tools/build/src/tools/stage.py (renamed from tools/build/v2/tools/stage.py)6
-rw-r--r--tools/build/src/tools/stlport.jam (renamed from tools/build/v2/tools/stlport.jam)0
-rw-r--r--tools/build/src/tools/sun.jam (renamed from tools/build/v2/tools/sun.jam)0
-rw-r--r--tools/build/src/tools/symlink.jam (renamed from tools/build/v2/tools/symlink.jam)0
-rw-r--r--tools/build/src/tools/symlink.py (renamed from tools/build/v2/tools/symlink.py)0
-rw-r--r--tools/build/src/tools/testing-aux.jam (renamed from tools/build/v2/tools/testing-aux.jam)0
-rw-r--r--tools/build/src/tools/testing.jam (renamed from tools/build/v2/tools/testing.jam)87
-rw-r--r--tools/build/src/tools/testing.py (renamed from tools/build/v2/tools/testing.py)0
-rw-r--r--tools/build/src/tools/types/__init__.py (renamed from tools/build/v2/tools/types/__init__.py)0
-rw-r--r--tools/build/src/tools/types/asm.jam (renamed from tools/build/v2/tools/types/asm.jam)0
-rw-r--r--tools/build/src/tools/types/asm.py (renamed from tools/build/v2/tools/types/asm.py)0
-rw-r--r--tools/build/src/tools/types/cpp.jam (renamed from tools/build/v2/tools/types/cpp.jam)12
-rw-r--r--tools/build/src/tools/types/cpp.py (renamed from tools/build/v2/tools/types/cpp.py)0
-rw-r--r--tools/build/src/tools/types/exe.jam (renamed from tools/build/v2/tools/types/exe.jam)0
-rw-r--r--tools/build/src/tools/types/exe.py (renamed from tools/build/v2/tools/types/exe.py)0
-rw-r--r--tools/build/src/tools/types/html.jam (renamed from tools/build/v2/tools/types/html.jam)0
-rw-r--r--tools/build/src/tools/types/html.py (renamed from tools/build/v2/tools/types/html.py)0
-rw-r--r--tools/build/src/tools/types/lib.jam (renamed from tools/build/v2/tools/types/lib.jam)0
-rw-r--r--tools/build/src/tools/types/lib.py (renamed from tools/build/v2/tools/types/lib.py)0
-rw-r--r--tools/build/src/tools/types/obj.jam (renamed from tools/build/v2/tools/types/obj.jam)0
-rw-r--r--tools/build/src/tools/types/obj.py (renamed from tools/build/v2/tools/types/obj.py)0
-rw-r--r--tools/build/src/tools/types/objc.jam (renamed from tools/build/v2/tools/types/objc.jam)0
-rw-r--r--tools/build/src/tools/types/preprocessed.jam (renamed from tools/build/v2/tools/types/preprocessed.jam)0
-rw-r--r--tools/build/src/tools/types/preprocessed.py (renamed from tools/build/v2/tools/types/preprocessed.py)0
-rw-r--r--tools/build/src/tools/types/qt.jam (renamed from tools/build/v2/tools/types/qt.jam)0
-rw-r--r--tools/build/src/tools/types/register.jam (renamed from tools/build/v2/tools/types/register.jam)0
-rw-r--r--tools/build/src/tools/types/rsp.jam (renamed from tools/build/v2/tools/types/rsp.jam)0
-rw-r--r--tools/build/src/tools/types/rsp.py (renamed from tools/build/v2/tools/types/rsp.py)0
-rw-r--r--tools/build/src/tools/unix.jam (renamed from tools/build/v2/tools/unix.jam)0
-rw-r--r--tools/build/src/tools/unix.py (renamed from tools/build/v2/tools/unix.py)0
-rw-r--r--tools/build/src/tools/vacpp.jam (renamed from tools/build/v2/tools/vacpp.jam)0
-rw-r--r--tools/build/src/tools/whale.jam (renamed from tools/build/v2/tools/whale.jam)0
-rw-r--r--tools/build/src/tools/xlf.jam (renamed from tools/build/v2/tools/xlf.jam)0
-rw-r--r--tools/build/src/tools/xsltproc-config.jam (renamed from tools/build/v2/tools/xsltproc-config.jam)0
-rw-r--r--tools/build/src/tools/xsltproc.jam (renamed from tools/build/v2/tools/xsltproc.jam)0
-rw-r--r--tools/build/src/tools/xsltproc/included.xsl (renamed from tools/build/v2/tools/xsltproc/included.xsl)0
-rw-r--r--tools/build/src/tools/xsltproc/test.xml (renamed from tools/build/v2/tools/xsltproc/test.xml)0
-rw-r--r--tools/build/src/tools/xsltproc/test.xsl (renamed from tools/build/v2/tools/xsltproc/test.xsl)0
-rw-r--r--tools/build/src/tools/zlib.jam (renamed from tools/build/v2/tools/zlib.jam)0
-rw-r--r--tools/build/src/util/__init__.py (renamed from tools/build/v2/util/__init__.py)0
-rw-r--r--tools/build/src/util/assert.jam (renamed from tools/build/v2/util/assert.jam)0
-rw-r--r--tools/build/src/util/container.jam (renamed from tools/build/v2/util/container.jam)0
-rw-r--r--tools/build/src/util/doc.jam (renamed from tools/build/v2/util/doc.jam)2
-rw-r--r--tools/build/src/util/indirect.jam (renamed from tools/build/v2/util/indirect.jam)0
-rw-r--r--tools/build/src/util/indirect.py (renamed from tools/build/v2/util/indirect.py)0
-rw-r--r--tools/build/src/util/logger.py (renamed from tools/build/v2/util/logger.py)0
-rw-r--r--tools/build/src/util/numbers.jam (renamed from tools/build/v2/util/numbers.jam)0
-rw-r--r--tools/build/src/util/option.jam (renamed from tools/build/v2/util/option.jam)0
-rw-r--r--tools/build/src/util/option.py (renamed from tools/build/v2/util/option.py)0
-rw-r--r--tools/build/src/util/order.jam (renamed from tools/build/v2/util/order.jam)0
-rw-r--r--tools/build/src/util/order.py (renamed from tools/build/v2/util/order.py)0
-rw-r--r--tools/build/src/util/os.jam (renamed from tools/build/v2/util/os.jam)0
-rw-r--r--tools/build/src/util/os_j.py (renamed from tools/build/v2/util/os_j.py)0
-rw-r--r--tools/build/src/util/path.jam (renamed from tools/build/v2/util/path.jam)0
-rw-r--r--tools/build/src/util/path.py (renamed from tools/build/v2/util/path.py)0
-rw-r--r--tools/build/src/util/print.jam (renamed from tools/build/v2/util/print.jam)0
-rw-r--r--tools/build/src/util/regex.jam (renamed from tools/build/v2/util/regex.jam)0
-rw-r--r--tools/build/src/util/regex.py (renamed from tools/build/v2/util/regex.py)0
-rw-r--r--tools/build/src/util/sequence.jam (renamed from tools/build/v2/util/sequence.jam)5
-rw-r--r--tools/build/src/util/sequence.py (renamed from tools/build/v2/util/sequence.py)0
-rw-r--r--tools/build/src/util/set.jam (renamed from tools/build/v2/util/set.jam)0
-rw-r--r--tools/build/src/util/set.py (renamed from tools/build/v2/util/set.py)0
-rw-r--r--tools/build/src/util/string.jam (renamed from tools/build/v2/util/string.jam)0
-rw-r--r--tools/build/src/util/utility.jam (renamed from tools/build/v2/util/utility.jam)0
-rw-r--r--tools/build/src/util/utility.py (renamed from tools/build/v2/util/utility.py)0
-rw-r--r--tools/build/test/BoostBuild.py (renamed from tools/build/v2/test/BoostBuild.py)4
-rwxr-xr-xtools/build/test/MockToolset.py (renamed from tools/build/v2/test/MockToolset.py)0
-rw-r--r--tools/build/test/TestCmd.py (renamed from tools/build/v2/test/TestCmd.py)0
-rw-r--r--tools/build/test/abs_workdir.py (renamed from tools/build/v2/test/abs_workdir.py)0
-rw-r--r--tools/build/test/absolute_sources.py (renamed from tools/build/v2/test/absolute_sources.py)0
-rw-r--r--tools/build/test/alias.py (renamed from tools/build/v2/test/alias.py)0
-rw-r--r--tools/build/test/alternatives.py (renamed from tools/build/v2/test/alternatives.py)0
-rw-r--r--tools/build/test/bad_dirname.py (renamed from tools/build/v2/test/bad_dirname.py)0
-rw-r--r--tools/build/test/boost-build.jam (renamed from tools/build/v2/test/boost-build.jam)2
-rw-r--r--tools/build/test/boostbook.py (renamed from tools/build/v2/test/boostbook.py)0
-rw-r--r--tools/build/test/boostbook/a.hpp (renamed from tools/build/v2/test/boostbook/a.hpp)0
-rw-r--r--tools/build/test/boostbook/docs.xml (renamed from tools/build/v2/test/boostbook/docs.xml)0
-rw-r--r--tools/build/test/boostbook/jamroot.jam (renamed from tools/build/v2/test/boostbook/jamroot.jam)0
-rw-r--r--tools/build/test/build_dir.py (renamed from tools/build/v2/test/build_dir.py)0
-rw-r--r--tools/build/test/build_file.py (renamed from tools/build/v2/test/build_file.py)0
-rw-r--r--tools/build/test/build_no.py (renamed from tools/build/v2/test/build_no.py)0
-rwxr-xr-xtools/build/test/builtin_echo.py (renamed from tools/build/v2/test/builtin_echo.py)0
-rwxr-xr-xtools/build/test/builtin_exit.py (renamed from tools/build/v2/test/builtin_exit.py)0
-rwxr-xr-xtools/build/test/builtin_glob.py87
-rwxr-xr-xtools/build/test/builtin_readlink.py24
-rwxr-xr-xtools/build/test/builtin_split_by_characters.py (renamed from tools/build/v2/test/builtin_split_by_characters.py)0
-rw-r--r--tools/build/test/c_file.py (renamed from tools/build/v2/test/c_file.py)0
-rw-r--r--tools/build/test/chain.py (renamed from tools/build/v2/test/chain.py)0
-rw-r--r--tools/build/test/clean.py (renamed from tools/build/v2/test/clean.py)0
-rwxr-xr-xtools/build/test/collect_debug_info.py (renamed from tools/build/v2/test/collect_debug_info.py)0
-rw-r--r--tools/build/test/composite.py (renamed from tools/build/v2/test/composite.py)0
-rw-r--r--tools/build/test/conditionals.py (renamed from tools/build/v2/test/conditionals.py)0
-rw-r--r--tools/build/test/conditionals2.py (renamed from tools/build/v2/test/conditionals2.py)0
-rw-r--r--tools/build/test/conditionals3.py (renamed from tools/build/v2/test/conditionals3.py)0
-rwxr-xr-xtools/build/test/conditionals_multiple.py (renamed from tools/build/v2/test/conditionals_multiple.py)0
-rwxr-xr-xtools/build/test/configuration.py (renamed from tools/build/v2/test/configuration.py)0
-rwxr-xr-xtools/build/test/copy_time.py (renamed from tools/build/v2/test/copy_time.py)0
-rw-r--r--tools/build/test/core-language/test.jam (renamed from tools/build/v2/test/core-language/test.jam)0
-rwxr-xr-xtools/build/test/core_action_output.py (renamed from tools/build/v2/test/core_action_output.py)0
-rwxr-xr-xtools/build/test/core_action_status.py (renamed from tools/build/v2/test/core_action_status.py)0
-rwxr-xr-xtools/build/test/core_actions_quietly.py (renamed from tools/build/v2/test/core_actions_quietly.py)0
-rwxr-xr-xtools/build/test/core_arguments.py (renamed from tools/build/v2/test/core_arguments.py)0
-rwxr-xr-xtools/build/test/core_at_file.py (renamed from tools/build/v2/test/core_at_file.py)0
-rwxr-xr-xtools/build/test/core_bindrule.py (renamed from tools/build/v2/test/core_bindrule.py)0
-rw-r--r--tools/build/test/core_d12.py (renamed from tools/build/v2/test/core_d12.py)0
-rw-r--r--tools/build/test/core_delete_module.py (renamed from tools/build/v2/test/core_delete_module.py)0
-rw-r--r--tools/build/test/core_dependencies.py (renamed from tools/build/v2/test/core_dependencies.py)0
-rw-r--r--tools/build/test/core_import_module.py (renamed from tools/build/v2/test/core_import_module.py)0
-rw-r--r--tools/build/test/core_jamshell.py54
-rwxr-xr-xtools/build/test/core_language.py (renamed from tools/build/v2/test/core_language.py)0
-rw-r--r--tools/build/test/core_modifiers.py (renamed from tools/build/v2/test/core_modifiers.py)0
-rwxr-xr-xtools/build/test/core_multifile_actions.py202
-rwxr-xr-xtools/build/test/core_nt_cmd_line.py (renamed from tools/build/v2/test/core_nt_cmd_line.py)0
-rwxr-xr-xtools/build/test/core_option_d2.py (renamed from tools/build/v2/test/core_option_d2.py)0
-rwxr-xr-xtools/build/test/core_option_l.py (renamed from tools/build/v2/test/core_option_l.py)0
-rwxr-xr-xtools/build/test/core_option_n.py (renamed from tools/build/v2/test/core_option_n.py)0
-rwxr-xr-xtools/build/test/core_parallel_actions.py (renamed from tools/build/v2/test/core_parallel_actions.py)0
-rwxr-xr-xtools/build/test/core_parallel_multifile_actions_1.py (renamed from tools/build/v2/test/core_parallel_multifile_actions_1.py)0
-rwxr-xr-xtools/build/test/core_parallel_multifile_actions_2.py (renamed from tools/build/v2/test/core_parallel_multifile_actions_2.py)0
-rwxr-xr-xtools/build/test/core_source_line_tracking.py (renamed from tools/build/v2/test/core_source_line_tracking.py)0
-rw-r--r--tools/build/test/core_typecheck.py (renamed from tools/build/v2/test/core_typecheck.py)0
-rwxr-xr-xtools/build/test/core_update_now.py (renamed from tools/build/v2/test/core_update_now.py)0
-rwxr-xr-xtools/build/test/core_variables_in_actions.py (renamed from tools/build/v2/test/core_variables_in_actions.py)0
-rw-r--r--tools/build/test/core_varnames.py (renamed from tools/build/v2/test/core_varnames.py)0
-rw-r--r--tools/build/test/custom_generator.py (renamed from tools/build/v2/test/custom_generator.py)0
-rw-r--r--tools/build/test/default_build.py (renamed from tools/build/v2/test/default_build.py)0
-rw-r--r--tools/build/test/default_features.py (renamed from tools/build/v2/test/default_features.py)0
-rwxr-xr-xtools/build/test/default_toolset.py (renamed from tools/build/v2/test/default_toolset.py)0
-rw-r--r--tools/build/test/dependency_property.py (renamed from tools/build/v2/test/dependency_property.py)0
-rw-r--r--tools/build/test/dependency_test.py (renamed from tools/build/v2/test/dependency_test.py)0
-rw-r--r--tools/build/test/direct_request_test.py (renamed from tools/build/v2/test/direct_request_test.py)0
-rw-r--r--tools/build/test/disambiguation.py (renamed from tools/build/v2/test/disambiguation.py)0
-rw-r--r--tools/build/test/dll_path.py (renamed from tools/build/v2/test/dll_path.py)0
-rw-r--r--tools/build/test/double_loading.py (renamed from tools/build/v2/test/double_loading.py)0
-rw-r--r--tools/build/test/duplicate.py (renamed from tools/build/v2/test/duplicate.py)0
-rw-r--r--tools/build/test/example_customization.py (renamed from tools/build/v2/test/example_customization.py)0
-rw-r--r--tools/build/test/example_gettext.py (renamed from tools/build/v2/test/example_gettext.py)0
-rw-r--r--tools/build/test/example_libraries.py (renamed from tools/build/v2/test/example_libraries.py)0
-rw-r--r--tools/build/test/example_make.py (renamed from tools/build/v2/test/example_make.py)0
-rw-r--r--tools/build/test/example_qt4.py (renamed from tools/build/v2/test/example_qt4.py)0
-rwxr-xr-xtools/build/test/exit_status.py (renamed from tools/build/v2/test/exit_status.py)0
-rw-r--r--tools/build/test/expansion.py (renamed from tools/build/v2/test/expansion.py)0
-rw-r--r--tools/build/test/explicit.py (renamed from tools/build/v2/test/explicit.py)0
-rwxr-xr-xtools/build/test/feature_cxxflags.py37
-rw-r--r--tools/build/test/free_features_request.py (renamed from tools/build/v2/test/free_features_request.py)0
-rw-r--r--tools/build/test/gcc_runtime.py (renamed from tools/build/v2/test/gcc_runtime.py)0
-rwxr-xr-xtools/build/test/generator_selection.py (renamed from tools/build/v2/test/generator_selection.py)0
-rw-r--r--tools/build/test/generators_test.py (renamed from tools/build/v2/test/generators_test.py)0
-rw-r--r--tools/build/test/implicit_dependency.py (renamed from tools/build/v2/test/implicit_dependency.py)0
-rw-r--r--tools/build/test/indirect_conditional.py (renamed from tools/build/v2/test/indirect_conditional.py)0
-rw-r--r--tools/build/test/inherit_toolset.py (renamed from tools/build/v2/test/inherit_toolset.py)0
-rwxr-xr-xtools/build/test/inherited_dependency.py (renamed from tools/build/v2/test/inherited_dependency.py)0
-rw-r--r--tools/build/test/inline.py (renamed from tools/build/v2/test/inline.py)0
-rw-r--r--tools/build/test/lib_source_property.py (renamed from tools/build/v2/test/lib_source_property.py)0
-rwxr-xr-xtools/build/test/libjpeg.py119
-rwxr-xr-xtools/build/test/libpng.py119
-rw-r--r--tools/build/test/library_chain.py (renamed from tools/build/v2/test/library_chain.py)0
-rw-r--r--tools/build/test/library_order.py (renamed from tools/build/v2/test/library_order.py)0
-rw-r--r--tools/build/test/library_property.py (renamed from tools/build/v2/test/library_property.py)0
-rwxr-xr-xtools/build/test/libtiff.py119
-rwxr-xr-xtools/build/test/link.py154
-rw-r--r--tools/build/test/load_dir.py (renamed from tools/build/v2/test/load_dir.py)0
-rw-r--r--tools/build/test/load_order.py (renamed from tools/build/v2/test/load_order.py)0
-rw-r--r--tools/build/test/loop.py (renamed from tools/build/v2/test/loop.py)0
-rw-r--r--tools/build/test/make_rule.py (renamed from tools/build/v2/test/make_rule.py)0
-rwxr-xr-xtools/build/test/message.py (renamed from tools/build/v2/test/message.py)0
-rw-r--r--tools/build/test/module_actions.py (renamed from tools/build/v2/test/module_actions.py)0
-rw-r--r--tools/build/test/ndebug.py (renamed from tools/build/v2/test/ndebug.py)0
-rw-r--r--tools/build/test/no_type.py (renamed from tools/build/v2/test/no_type.py)0
-rw-r--r--tools/build/test/notfile.py (renamed from tools/build/v2/test/notfile.py)0
-rw-r--r--tools/build/test/ordered_include.py173
-rw-r--r--tools/build/test/ordered_properties.py (renamed from tools/build/v2/test/ordered_properties.py)0
-rw-r--r--tools/build/test/out_of_tree.py (renamed from tools/build/v2/test/out_of_tree.py)0
-rw-r--r--tools/build/test/path_features.py (renamed from tools/build/v2/test/path_features.py)0
-rw-r--r--tools/build/test/pch.py (renamed from tools/build/v2/test/pch.py)0
-rw-r--r--tools/build/test/prebuilt.py (renamed from tools/build/v2/test/prebuilt.py)0
-rw-r--r--tools/build/test/prebuilt/ext/a.cpp (renamed from tools/build/v2/test/prebuilt/ext/a.cpp)0
-rw-r--r--tools/build/test/prebuilt/ext/debug/a.h (renamed from tools/build/v2/test/prebuilt/ext/debug/a.h)0
-rw-r--r--tools/build/test/prebuilt/ext/jamfile.jam (renamed from tools/build/v2/test/prebuilt/ext/jamfile.jam)0
-rw-r--r--tools/build/test/prebuilt/ext/jamfile2.jam (renamed from tools/build/v2/test/prebuilt/ext/jamfile2.jam)2
-rw-r--r--tools/build/test/prebuilt/ext/jamfile3.jam (renamed from tools/build/v2/test/prebuilt/ext/jamfile3.jam)2
-rw-r--r--tools/build/test/prebuilt/ext/jamroot.jam (renamed from tools/build/v2/test/prebuilt/ext/jamroot.jam)0
-rw-r--r--tools/build/test/prebuilt/ext/release/a.h (renamed from tools/build/v2/test/prebuilt/ext/release/a.h)0
-rw-r--r--tools/build/test/prebuilt/hello.cpp (renamed from tools/build/v2/test/prebuilt/hello.cpp)0
-rw-r--r--tools/build/test/prebuilt/jamfile.jam (renamed from tools/build/v2/test/prebuilt/jamfile.jam)0
-rw-r--r--tools/build/test/prebuilt/jamroot.jam (renamed from tools/build/v2/test/prebuilt/jamroot.jam)0
-rwxr-xr-xtools/build/test/preprocessor.py (renamed from tools/build/v2/test/preprocessor.py)0
-rw-r--r--tools/build/test/print.py (renamed from tools/build/v2/test/print.py)0
-rw-r--r--tools/build/test/project-test3/a.cpp (renamed from tools/build/v2/test/project-test3/a.cpp)0
-rw-r--r--tools/build/test/project-test3/jamfile.jam (renamed from tools/build/v2/test/project-test3/jamfile.jam)0
-rw-r--r--tools/build/test/project-test3/jamroot.jam (renamed from tools/build/v2/test/project-test3/jamroot.jam)0
-rw-r--r--tools/build/test/project-test3/lib/b.cpp (renamed from tools/build/v2/test/project-test3/lib/b.cpp)0
-rw-r--r--tools/build/test/project-test3/lib/jamfile.jam (renamed from tools/build/v2/test/project-test3/lib/jamfile.jam)0
-rw-r--r--tools/build/test/project-test3/lib2/c.cpp (renamed from tools/build/v2/test/project-test3/lib2/c.cpp)0
-rw-r--r--tools/build/test/project-test3/lib2/d.cpp (renamed from tools/build/v2/test/project-test3/lib2/d.cpp)0
-rw-r--r--tools/build/test/project-test3/lib2/helper/e.cpp (renamed from tools/build/v2/test/project-test3/lib2/helper/e.cpp)0
-rw-r--r--tools/build/test/project-test3/lib2/helper/jamfile.jam (renamed from tools/build/v2/test/project-test3/lib2/helper/jamfile.jam)0
-rw-r--r--tools/build/test/project-test3/lib2/jamfile.jam (renamed from tools/build/v2/test/project-test3/lib2/jamfile.jam)0
-rw-r--r--tools/build/test/project-test3/lib3/f.cpp (renamed from tools/build/v2/test/project-test3/lib3/f.cpp)0
-rw-r--r--tools/build/test/project-test3/lib3/jamfile.jam (renamed from tools/build/v2/test/project-test3/lib3/jamfile.jam)0
-rw-r--r--tools/build/test/project-test3/lib3/jamroot.jam (renamed from tools/build/v2/test/project-test3/lib3/jamroot.jam)0
-rw-r--r--tools/build/test/project-test3/readme.txt (renamed from tools/build/v2/test/project-test3/readme.txt)0
-rw-r--r--tools/build/test/project-test4/a.cpp (renamed from tools/build/v2/test/project-test4/a.cpp)0
-rw-r--r--tools/build/test/project-test4/a_gcc.cpp (renamed from tools/build/v2/test/project-test4/a_gcc.cpp)0
-rw-r--r--tools/build/test/project-test4/jamfile.jam (renamed from tools/build/v2/test/project-test4/jamfile.jam)0
-rw-r--r--tools/build/test/project-test4/jamfile3.jam (renamed from tools/build/v2/test/project-test4/jamfile3.jam)0
-rw-r--r--tools/build/test/project-test4/jamfile4.jam (renamed from tools/build/v2/test/project-test4/jamfile4.jam)0
-rw-r--r--tools/build/test/project-test4/jamfile5.jam (renamed from tools/build/v2/test/project-test4/jamfile5.jam)0
-rw-r--r--tools/build/test/project-test4/jamroot.jam (renamed from tools/build/v2/test/project-test4/jamroot.jam)0
-rw-r--r--tools/build/test/project-test4/lib/b.cpp (renamed from tools/build/v2/test/project-test4/lib/b.cpp)0
-rw-r--r--tools/build/test/project-test4/lib/jamfile.jam (renamed from tools/build/v2/test/project-test4/lib/jamfile.jam)0
-rw-r--r--tools/build/test/project-test4/lib/jamfile1.jam (renamed from tools/build/v2/test/project-test4/lib/jamfile1.jam)0
-rw-r--r--tools/build/test/project-test4/lib/jamfile2.jam (renamed from tools/build/v2/test/project-test4/lib/jamfile2.jam)0
-rw-r--r--tools/build/test/project-test4/lib/jamfile3.jam (renamed from tools/build/v2/test/project-test4/lib/jamfile3.jam)0
-rw-r--r--tools/build/test/project-test4/lib2/jamfile.jam (renamed from tools/build/v2/test/project-test4/lib2/jamfile.jam)0
-rw-r--r--tools/build/test/project-test4/lib2/jamfile2.jam (renamed from tools/build/v2/test/project-test4/lib2/jamfile2.jam)0
-rw-r--r--tools/build/test/project-test4/readme.txt (renamed from tools/build/v2/test/project-test4/readme.txt)0
-rw-r--r--tools/build/test/project_dependencies.py (renamed from tools/build/v2/test/project_dependencies.py)0
-rw-r--r--tools/build/test/project_glob.py (renamed from tools/build/v2/test/project_glob.py)0
-rwxr-xr-xtools/build/test/project_id.py (renamed from tools/build/v2/test/project_id.py)0
-rw-r--r--tools/build/test/project_root_constants.py (renamed from tools/build/v2/test/project_root_constants.py)0
-rw-r--r--tools/build/test/project_root_rule.py (renamed from tools/build/v2/test/project_root_rule.py)0
-rw-r--r--tools/build/test/project_test3.py (renamed from tools/build/v2/test/project_test3.py)0
-rw-r--r--tools/build/test/project_test4.py (renamed from tools/build/v2/test/project_test4.py)0
-rw-r--r--tools/build/test/property_expansion.py (renamed from tools/build/v2/test/property_expansion.py)0
-rwxr-xr-xtools/build/test/qt4.py (renamed from tools/build/v2/test/qt4.py)0
-rw-r--r--tools/build/test/qt4/jamroot.jam (renamed from tools/build/v2/test/qt4/jamroot.jam)2
-rw-r--r--tools/build/test/qt4/mock.cpp (renamed from tools/build/v2/test/qt4/mock.cpp)0
-rw-r--r--tools/build/test/qt4/mock.h (renamed from tools/build/v2/test/qt4/mock.h)0
-rw-r--r--tools/build/test/qt4/phonon.cpp (renamed from tools/build/v2/test/qt4/phonon.cpp)0
-rw-r--r--tools/build/test/qt4/qt3support.cpp (renamed from tools/build/v2/test/qt4/qt3support.cpp)0
-rw-r--r--tools/build/test/qt4/qtassistant.cpp (renamed from tools/build/v2/test/qt4/qtassistant.cpp)0
-rw-r--r--tools/build/test/qt4/qtcore.cpp (renamed from tools/build/v2/test/qt4/qtcore.cpp)0
-rw-r--r--tools/build/test/qt4/qtcorefail.cpp (renamed from tools/build/v2/test/qt4/qtcorefail.cpp)0
-rw-r--r--tools/build/test/qt4/qtdeclarative.cpp (renamed from tools/build/v2/test/qt4/qtdeclarative.cpp)0
-rw-r--r--tools/build/test/qt4/qtgui.cpp (renamed from tools/build/v2/test/qt4/qtgui.cpp)0
-rw-r--r--tools/build/test/qt4/qthelp.cpp (renamed from tools/build/v2/test/qt4/qthelp.cpp)0
-rw-r--r--tools/build/test/qt4/qtmultimedia.cpp (renamed from tools/build/v2/test/qt4/qtmultimedia.cpp)0
-rw-r--r--tools/build/test/qt4/qtnetwork.cpp (renamed from tools/build/v2/test/qt4/qtnetwork.cpp)0
-rw-r--r--tools/build/test/qt4/qtscript.cpp (renamed from tools/build/v2/test/qt4/qtscript.cpp)0
-rw-r--r--tools/build/test/qt4/qtscripttools.cpp (renamed from tools/build/v2/test/qt4/qtscripttools.cpp)0
-rw-r--r--tools/build/test/qt4/qtsql.cpp (renamed from tools/build/v2/test/qt4/qtsql.cpp)0
-rw-r--r--tools/build/test/qt4/qtsvg.cpp (renamed from tools/build/v2/test/qt4/qtsvg.cpp)0
-rw-r--r--tools/build/test/qt4/qttest.cpp (renamed from tools/build/v2/test/qt4/qttest.cpp)0
-rw-r--r--tools/build/test/qt4/qtwebkit.cpp (renamed from tools/build/v2/test/qt4/qtwebkit.cpp)0
-rw-r--r--tools/build/test/qt4/qtxml.cpp (renamed from tools/build/v2/test/qt4/qtxml.cpp)0
-rw-r--r--tools/build/test/qt4/qtxmlpatterns.cpp (renamed from tools/build/v2/test/qt4/qtxmlpatterns.cpp)0
-rw-r--r--tools/build/test/qt4/rcc.cpp (renamed from tools/build/v2/test/qt4/rcc.cpp)0
-rw-r--r--tools/build/test/qt4/rcc.qrc (renamed from tools/build/v2/test/qt4/rcc.qrc)0
-rwxr-xr-xtools/build/test/qt5.py (renamed from tools/build/v2/test/qt5.py)0
-rw-r--r--tools/build/test/qt5/jamroot.jam (renamed from tools/build/v2/test/qt5/jamroot.jam)6
-rw-r--r--tools/build/test/qt5/mock.cpp (renamed from tools/build/v2/test/qt5/mock.cpp)0
-rw-r--r--tools/build/test/qt5/mock.h (renamed from tools/build/v2/test/qt5/mock.h)0
-rw-r--r--tools/build/test/qt5/qtassistant.cpp (renamed from tools/build/v2/test/qt5/qtassistant.cpp)0
-rw-r--r--tools/build/test/qt5/qtcore.cpp (renamed from tools/build/v2/test/qt5/qtcore.cpp)0
-rw-r--r--tools/build/test/qt5/qtcorefail.cpp (renamed from tools/build/v2/test/qt5/qtcorefail.cpp)0
-rw-r--r--tools/build/test/qt5/qtdeclarative.cpp (renamed from tools/build/v2/test/qt5/qtdeclarative.cpp)0
-rw-r--r--tools/build/test/qt5/qthelp.cpp (renamed from tools/build/v2/test/qt5/qthelp.cpp)0
-rw-r--r--tools/build/test/qt5/qtmultimedia.cpp (renamed from tools/build/v2/test/qt5/qtmultimedia.cpp)0
-rw-r--r--tools/build/test/qt5/qtnetwork.cpp (renamed from tools/build/v2/test/qt5/qtnetwork.cpp)0
-rw-r--r--tools/build/test/qt5/qtquick.cpp (renamed from tools/build/v2/test/qt5/qtquick.cpp)0
-rw-r--r--tools/build/test/qt5/qtquick.qml (renamed from tools/build/v2/test/qt5/qtquick.qml)0
-rw-r--r--tools/build/test/qt5/qtscript.cpp (renamed from tools/build/v2/test/qt5/qtscript.cpp)0
-rw-r--r--tools/build/test/qt5/qtscripttools.cpp (renamed from tools/build/v2/test/qt5/qtscripttools.cpp)0
-rw-r--r--tools/build/test/qt5/qtsql.cpp (renamed from tools/build/v2/test/qt5/qtsql.cpp)0
-rw-r--r--tools/build/test/qt5/qtsvg.cpp (renamed from tools/build/v2/test/qt5/qtsvg.cpp)0
-rw-r--r--tools/build/test/qt5/qttest.cpp (renamed from tools/build/v2/test/qt5/qttest.cpp)0
-rw-r--r--tools/build/test/qt5/qtwebkit.cpp (renamed from tools/build/v2/test/qt5/qtwebkit.cpp)0
-rw-r--r--tools/build/test/qt5/qtwebkitwidgets.cpp (renamed from tools/build/v2/test/qt5/qtwebkitwidgets.cpp)0
-rw-r--r--tools/build/test/qt5/qtwidgets.cpp (renamed from tools/build/v2/test/qt5/qtwidgets.cpp)0
-rw-r--r--tools/build/test/qt5/qtxml.cpp (renamed from tools/build/v2/test/qt5/qtxml.cpp)0
-rw-r--r--tools/build/test/qt5/qtxmlpatterns.cpp (renamed from tools/build/v2/test/qt5/qtxmlpatterns.cpp)0
-rw-r--r--tools/build/test/qt5/rcc.cpp (renamed from tools/build/v2/test/qt5/rcc.cpp)0
-rw-r--r--tools/build/test/qt5/rcc.qrc (renamed from tools/build/v2/test/qt5/rcc.qrc)0
-rw-r--r--tools/build/test/railsys.py (renamed from tools/build/v2/test/railsys.py)0
-rw-r--r--tools/build/test/railsys/libx/include/test_libx.h (renamed from tools/build/v2/test/railsys/libx/include/test_libx.h)0
-rw-r--r--tools/build/test/railsys/libx/jamroot.jam (renamed from tools/build/v2/test/railsys/libx/jamroot.jam)0
-rw-r--r--tools/build/test/railsys/libx/src/jamfile.jam (renamed from tools/build/v2/test/railsys/libx/src/jamfile.jam)0
-rw-r--r--tools/build/test/railsys/libx/src/test_libx.cpp (renamed from tools/build/v2/test/railsys/libx/src/test_libx.cpp)0
-rw-r--r--tools/build/test/railsys/program/include/test_a.h (renamed from tools/build/v2/test/railsys/program/include/test_a.h)0
-rw-r--r--tools/build/test/railsys/program/jamfile.jam (renamed from tools/build/v2/test/railsys/program/jamfile.jam)2
-rw-r--r--tools/build/test/railsys/program/jamroot.jam (renamed from tools/build/v2/test/railsys/program/jamroot.jam)0
-rw-r--r--tools/build/test/railsys/program/liba/jamfile.jam (renamed from tools/build/v2/test/railsys/program/liba/jamfile.jam)0
-rw-r--r--tools/build/test/railsys/program/liba/test_a.cpp (renamed from tools/build/v2/test/railsys/program/liba/test_a.cpp)0
-rw-r--r--tools/build/test/railsys/program/main/jamfile.jam (renamed from tools/build/v2/test/railsys/program/main/jamfile.jam)0
-rw-r--r--tools/build/test/railsys/program/main/main.cpp (renamed from tools/build/v2/test/railsys/program/main/main.cpp)0
-rw-r--r--tools/build/test/readme.txt (renamed from tools/build/v2/test/readme.txt)0
-rw-r--r--tools/build/test/rebuilds.py (renamed from tools/build/v2/test/rebuilds.py)0
-rw-r--r--tools/build/test/regression.py (renamed from tools/build/v2/test/regression.py)0
-rw-r--r--tools/build/test/relative_sources.py (renamed from tools/build/v2/test/relative_sources.py)0
-rw-r--r--tools/build/test/remove_requirement.py (renamed from tools/build/v2/test/remove_requirement.py)0
-rwxr-xr-xtools/build/test/rescan_header.py (renamed from tools/build/v2/test/rescan_header.py)0
-rw-r--r--tools/build/test/resolution.py (renamed from tools/build/v2/test/resolution.py)0
-rw-r--r--tools/build/test/results-python.txt132
-rwxr-xr-xtools/build/test/scanner_causing_rebuilds.py (renamed from tools/build/v2/test/scanner_causing_rebuilds.py)0
-rw-r--r--tools/build/test/searched_lib.py (renamed from tools/build/v2/test/searched_lib.py)0
-rw-r--r--tools/build/test/skipping.py (renamed from tools/build/v2/test/skipping.py)0
-rwxr-xr-xtools/build/test/sort_rule.py (renamed from tools/build/v2/test/sort_rule.py)0
-rw-r--r--tools/build/test/source_locations.py (renamed from tools/build/v2/test/source_locations.py)0
-rwxr-xr-xtools/build/test/source_order.py53
-rwxr-xr-xtools/build/test/space_in_path.py (renamed from tools/build/v2/test/space_in_path.py)0
-rw-r--r--tools/build/test/stage.py (renamed from tools/build/v2/test/stage.py)0
-rw-r--r--tools/build/test/standalone.py (renamed from tools/build/v2/test/standalone.py)0
-rw-r--r--tools/build/test/startup/boost-root/boost-build.jam (renamed from tools/build/v2/test/startup/boost-root/boost-build.jam)0
-rw-r--r--tools/build/test/startup/boost-root/build/boost-build.jam (renamed from tools/build/v2/test/startup/boost-root/build/boost-build.jam)0
-rw-r--r--tools/build/test/startup/boost-root/build/bootstrap.jam (renamed from tools/build/v2/test/startup/boost-root/build/bootstrap.jam)0
-rw-r--r--tools/build/test/startup/bootstrap-env/boost-build.jam (renamed from tools/build/v2/test/startup/bootstrap-env/boost-build.jam)0
-rw-r--r--tools/build/test/startup/bootstrap-explicit/boost-build.jam (renamed from tools/build/v2/test/startup/bootstrap-explicit/boost-build.jam)0
-rw-r--r--tools/build/test/startup/bootstrap-implicit/readme.txt (renamed from tools/build/v2/test/startup/bootstrap-implicit/readme.txt)0
-rw-r--r--tools/build/test/startup/no-bootstrap1/boost-build.jam (renamed from tools/build/v2/test/startup/no-bootstrap1/boost-build.jam)0
-rw-r--r--tools/build/test/startup/no-bootstrap1/subdir/readme.txt (renamed from tools/build/v2/test/startup/no-bootstrap1/subdir/readme.txt)0
-rw-r--r--tools/build/test/startup/no-bootstrap2/boost-build.jam (renamed from tools/build/v2/test/startup/no-bootstrap2/boost-build.jam)0
-rw-r--r--tools/build/test/startup/no-bootstrap3/boost-build.jam (renamed from tools/build/v2/test/startup/no-bootstrap3/boost-build.jam)0
-rw-r--r--tools/build/test/startup_v2.py (renamed from tools/build/v2/test/startup_v2.py)0
-rwxr-xr-xtools/build/test/static_and_shared_library.py (renamed from tools/build/v2/test/static_and_shared_library.py)0
-rw-r--r--tools/build/test/suffix.py (renamed from tools/build/v2/test/suffix.py)0
-rw-r--r--tools/build/test/symlink.py (renamed from tools/build/v2/test/symlink.py)0
-rw-r--r--tools/build/test/tag.py (renamed from tools/build/v2/test/tag.py)0
-rw-r--r--tools/build/test/template.py (renamed from tools/build/v2/test/template.py)0
-rw-r--r--tools/build/test/test-config-example.jam (renamed from tools/build/v2/test/test-config-example.jam)0
-rw-r--r--tools/build/test/test.jam (renamed from tools/build/v2/test/test.jam)0
-rw-r--r--tools/build/test/test1.py (renamed from tools/build/v2/test/test1.py)0
-rw-r--r--tools/build/test/test2.py (renamed from tools/build/v2/test/test2.py)0
-rw-r--r--tools/build/test/test2/foo.cpp (renamed from tools/build/v2/test/test2/foo.cpp)0
-rw-r--r--tools/build/test/test2/jamroot.jam (renamed from tools/build/v2/test/test2/jamroot.jam)0
-rw-r--r--tools/build/test/test_all.py (renamed from tools/build/v2/test/test_all.py)7
-rwxr-xr-xtools/build/test/test_rc.py (renamed from tools/build/v2/test/test_rc.py)0
-rwxr-xr-xtools/build/test/test_result_dumping.py (renamed from tools/build/v2/test/test_result_dumping.py)0
-rw-r--r--tools/build/test/test_system.html (renamed from tools/build/v2/test/test_system.html)0
-rwxr-xr-xtools/build/test/testing_support.py (renamed from tools/build/v2/test/testing_support.py)0
-rw-r--r--tools/build/test/timedata.py (renamed from tools/build/v2/test/timedata.py)0
-rw-r--r--tools/build/test/toolset_requirements.py44
-rw-r--r--tools/build/test/tree.py (renamed from tools/build/v2/test/tree.py)0
-rw-r--r--tools/build/test/unit_test.py (renamed from tools/build/v2/test/unit_test.py)0
-rw-r--r--tools/build/test/unit_tests.py (renamed from tools/build/v2/test/unit_tests.py)0
-rw-r--r--tools/build/test/unused.py (renamed from tools/build/v2/test/unused.py)0
-rw-r--r--tools/build/test/use_requirements.py (renamed from tools/build/v2/test/use_requirements.py)0
-rw-r--r--tools/build/test/using.py (renamed from tools/build/v2/test/using.py)0
-rw-r--r--tools/build/test/wrapper.py (renamed from tools/build/v2/test/wrapper.py)0
-rw-r--r--tools/build/test/wrong_project.py (renamed from tools/build/v2/test/wrong_project.py)0
-rwxr-xr-xtools/build/test/zlib.py (renamed from tools/build/v2/test/zlib.py)0
-rw-r--r--tools/build/v2/test/ordered_include.py41
-rw-r--r--tools/build/v2/tools/intel-win.jam184
-rw-r--r--tools/build/website/boost.css (renamed from tools/build/v2/boost.css)0
-rw-r--r--tools/build/website/boost_build.png (renamed from tools/build/v2/boost_build.png)bin7437 -> 7437 bytes
-rw-r--r--tools/build/website/boost_build.svg (renamed from tools/build/v2/boost_build.svg)0
-rw-r--r--tools/build/website/index.html (renamed from tools/build/v2/index.html)0
-rw-r--r--tools/inspect/apple_macro_check.cpp2
-rw-r--r--tools/inspect/ascii_check.hpp2
-rw-r--r--tools/inspect/assert_macro_check.cpp6
-rw-r--r--tools/inspect/build/msvc/boost_inspect.vcxproj7
-rw-r--r--tools/inspect/build/msvc/readme.txt4
-rw-r--r--tools/inspect/deprecated_macro_check.cpp8
-rw-r--r--tools/inspect/doc/inspect.qbk5
-rw-r--r--tools/inspect/inspect.cpp101
-rw-r--r--tools/inspect/inspector.hpp2
-rw-r--r--tools/inspect/link_check.cpp8
-rw-r--r--tools/inspect/link_check.hpp2
-rw-r--r--tools/inspect/path_name_check.cpp2
-rw-r--r--tools/inspect/tab_check.hpp2
-rw-r--r--tools/inspect/time_string.hpp2
-rw-r--r--tools/inspect/unnamed_namespace_check.cpp2
-rw-r--r--tools/quickbook/doc/1_6.qbk263
-rw-r--r--tools/quickbook/doc/1_7.qbk191
-rw-r--r--tools/quickbook/doc/Jamfile.v28
-rw-r--r--tools/quickbook/doc/block.qbk191
-rw-r--r--tools/quickbook/doc/change_log.qbk35
-rw-r--r--tools/quickbook/doc/language_versions.qbk46
-rw-r--r--tools/quickbook/doc/phrase.qbk36
-rw-r--r--tools/quickbook/doc/quickbook.qbk6
-rw-r--r--tools/quickbook/doc/structure.qbk65
-rw-r--r--tools/quickbook/src/Jamfile.v210
-rw-r--r--tools/quickbook/src/actions.cpp664
-rw-r--r--tools/quickbook/src/actions.hpp138
-rw-r--r--tools/quickbook/src/block_element_grammar.cpp34
-rw-r--r--tools/quickbook/src/block_tags.hpp2
-rw-r--r--tools/quickbook/src/code_snippet.cpp2
-rw-r--r--tools/quickbook/src/dependency_tracker.cpp74
-rw-r--r--tools/quickbook/src/dependency_tracker.hpp11
-rw-r--r--tools/quickbook/src/doc_info_actions.cpp33
-rw-r--r--tools/quickbook/src/doc_info_grammar.cpp32
-rw-r--r--tools/quickbook/src/document_state.cpp472
-rw-r--r--tools/quickbook/src/document_state.hpp (renamed from tools/quickbook/src/id_manager.hpp)24
-rw-r--r--tools/quickbook/src/document_state_impl.hpp147
-rw-r--r--tools/quickbook/src/files.cpp1
-rw-r--r--tools/quickbook/src/fwd.hpp3
-rw-r--r--tools/quickbook/src/glob.cpp301
-rw-r--r--tools/quickbook/src/glob.hpp30
-rw-r--r--tools/quickbook/src/grammar.cpp6
-rw-r--r--tools/quickbook/src/grammar.hpp5
-rw-r--r--tools/quickbook/src/grammar_impl.hpp75
-rw-r--r--tools/quickbook/src/id_generation.cpp379
-rw-r--r--tools/quickbook/src/id_manager.cpp1143
-rw-r--r--tools/quickbook/src/id_xml.cpp153
-rw-r--r--tools/quickbook/src/include_paths.cpp291
-rw-r--r--tools/quickbook/src/include_paths.hpp68
-rw-r--r--tools/quickbook/src/main_grammar.cpp582
-rw-r--r--tools/quickbook/src/markups.cpp1
-rw-r--r--tools/quickbook/src/native_text.cpp (renamed from tools/quickbook/src/input_path.cpp)22
-rw-r--r--tools/quickbook/src/native_text.hpp (renamed from tools/quickbook/src/input_path.hpp)28
-rw-r--r--tools/quickbook/src/phrase_element_grammar.cpp29
-rw-r--r--tools/quickbook/src/quickbook.cpp79
-rw-r--r--tools/quickbook/src/state.cpp110
-rw-r--r--tools/quickbook/src/state.hpp37
-rw-r--r--tools/quickbook/src/state_save.hpp23
-rw-r--r--tools/quickbook/src/syntax_highlight.cpp151
-rw-r--r--tools/quickbook/src/syntax_highlight.hpp58
-rw-r--r--tools/quickbook/src/template_tags.hpp1
-rw-r--r--tools/quickbook/src/utils.cpp57
-rw-r--r--tools/quickbook/src/utils.hpp12
-rw-r--r--tools/quickbook/test/Jamfile.v224
-rw-r--r--tools/quickbook/test/anchor-1_7.gold151
-rw-r--r--tools/quickbook/test/anchor-1_7.quickbook97
-rw-r--r--tools/quickbook/test/command-line/Jamfile.v24
-rw-r--r--tools/quickbook/test/doc-info/Jamfile.v22
-rw-r--r--tools/quickbook/test/elements-1_6.gold24
-rw-r--r--tools/quickbook/test/elements-1_6.quickbook10
-rw-r--r--tools/quickbook/test/heading-1_7.gold113
-rw-r--r--tools/quickbook/test/heading-1_7.quickbook83
-rw-r--r--tools/quickbook/test/include-1_7.gold36
-rw-r--r--tools/quickbook/test/include-1_7.quickbook18
-rw-r--r--tools/quickbook/test/include/Jamfile.v26
-rw-r--r--tools/quickbook/test/include/filename-1_7.gold46
-rw-r--r--tools/quickbook/test/include/filename-1_7.quickbook21
-rw-r--r--tools/quickbook/test/include/filename_path-1_7.gold18
-rw-r--r--tools/quickbook/test/include/filename_path-1_7.quickbook7
-rw-r--r--tools/quickbook/test/include/glob-1_7.gold41
-rw-r--r--tools/quickbook/test/include/glob-1_7.quickbook39
-rw-r--r--tools/quickbook/test/include/glob1/a.qbk1
-rw-r--r--tools/quickbook/test/include/glob1/glob1-1/b.qbk1
-rw-r--r--tools/quickbook/test/include/glob2/a.qbk3
-rw-r--r--tools/quickbook/test/include/glob2/glob2-1/b.qbk1
-rw-r--r--tools/quickbook/test/include/in_section-1_5.gold28
-rw-r--r--tools/quickbook/test/include/in_section-1_6.gold24
-rw-r--r--tools/quickbook/test/include/in_section-inc1.quickbook4
-rw-r--r--tools/quickbook/test/include/in_section-inc2.quickbook4
-rw-r--r--tools/quickbook/test/include/source_mode-1_5.gold2
-rw-r--r--tools/quickbook/test/include/source_mode-1_5.quickbook3
-rw-r--r--tools/quickbook/test/include/source_mode-1_6.gold2
-rw-r--r--tools/quickbook/test/include/source_mode-1_6.quickbook3
-rw-r--r--tools/quickbook/test/include/source_mode-inc2.quickbook3
-rw-r--r--tools/quickbook/test/include/template_include-1_7.gold12
-rw-r--r--tools/quickbook/test/include/template_include-1_7.quickbook8
-rw-r--r--tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/link-1_1.gold11
-rw-r--r--tools/quickbook/test/link-1_1.quickbook7
-rw-r--r--tools/quickbook/test/link-1_6.gold11
-rw-r--r--tools/quickbook/test/link-1_6.quickbook7
-rw-r--r--tools/quickbook/test/link-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/link-1_7-fail2.quickbook6
-rw-r--r--tools/quickbook/test/link-1_7.gold18
-rw-r--r--tools/quickbook/test/link-1_7.quickbook15
-rw-r--r--tools/quickbook/test/list_test-1_6-fail.quickbook46
-rw-r--r--tools/quickbook/test/list_test-1_6.gold160
-rw-r--r--tools/quickbook/test/list_test-1_6.quickbook49
-rw-r--r--tools/quickbook/test/list_test-1_7-fail1.quickbook9
-rw-r--r--tools/quickbook/test/list_test-1_7.gold479
-rw-r--r--tools/quickbook/test/list_test-1_7.quickbook134
-rw-r--r--tools/quickbook/test/mismatched_brackets3-1_1.gold12
-rw-r--r--tools/quickbook/test/mismatched_brackets3-1_1.quickbook6
-rw-r--r--tools/quickbook/test/python/include_glob.qbk11
-rw-r--r--tools/quickbook/test/python/include_glob_deps.txt6
-rw-r--r--tools/quickbook/test/python/include_glob_locs.txt9
-rw-r--r--tools/quickbook/test/python/output-deps.py32
-rw-r--r--tools/quickbook/test/role-1_7-fail.quickbook5
-rw-r--r--tools/quickbook/test/role-1_7.gold13
-rw-r--r--tools/quickbook/test/role-1_7.quickbook13
-rw-r--r--tools/quickbook/test/section-1_7.gold26
-rw-r--r--tools/quickbook/test/section-1_7.quickbook18
-rw-r--r--tools/quickbook/test/snippets/Jamfile.v22
-rw-r--r--tools/quickbook/test/source_mode-1_7.gold27
-rw-r--r--tools/quickbook/test/source_mode-1_7.quickbook14
-rw-r--r--tools/quickbook/test/table-1_7.gold520
-rw-r--r--tools/quickbook/test/table-1_7.quickbook151
-rw-r--r--tools/quickbook/test/templates-1_3.gold23
-rw-r--r--tools/quickbook/test/templates-1_3.quickbook16
-rw-r--r--tools/quickbook/test/templates-1_4.gold7
-rw-r--r--tools/quickbook/test/templates-1_4.quickbook18
-rw-r--r--tools/quickbook/test/templates-1_5.gold269
-rw-r--r--tools/quickbook/test/templates-1_5.quickbook255
-rw-r--r--tools/quickbook/test/templates-1_6-fail1.quickbook8
-rw-r--r--tools/quickbook/test/templates-1_6.gold257
-rw-r--r--tools/quickbook/test/templates-1_6.quickbook313
-rw-r--r--tools/quickbook/test/templates-1_7-fail1.quickbook12
-rw-r--r--tools/quickbook/test/templates-1_7-fail2.quickbook11
-rw-r--r--tools/quickbook/test/templates-1_7.gold302
-rw-r--r--tools/quickbook/test/templates-1_7.quickbook322
-rw-r--r--tools/quickbook/test/unit/Jamfile.v23
-rw-r--r--tools/quickbook/test/unit/glob_test.cpp122
-rw-r--r--tools/quickbook/test/versions/Jamfile.v22
-rw-r--r--tools/quickbook/test/xinclude/Jamfile.v22
-rw-r--r--tools/regression/build/Jamroot.jam25
-rw-r--r--tools/regression/doc/index.html2
-rw-r--r--tools/regression/doc/library_status.html2
-rw-r--r--tools/regression/src/compiler_status.cpp34
-rw-r--r--tools/regression/src/library_status.cpp84
-rw-r--r--tools/regression/src/regression.py8
-rw-r--r--tools/regression/src/run_tests.sh4
-rw-r--r--tools/regression/test/test-cases/general/bjam.log6
-rw-r--r--tools/release/2release.bat16
-rw-r--r--tools/release/README11
-rw-r--r--tools/release/bjam_warnings.bat17
-rwxr-xr-xtools/release/build_docs.sh20
-rwxr-xr-xtools/release/build_release.sh20
-rw-r--r--tools/release/build_release_packages.bat47
-rwxr-xr-xtools/release/build_release_packages.sh43
-rw-r--r--tools/release/index.html64
-rwxr-xr-xtools/release/inspect.sh31
-rw-r--r--tools/release/inspect_trunk.bat42
-rw-r--r--tools/release/linux_user-config.jam21
-rwxr-xr-xtools/release/load_posix.sh10
-rwxr-xr-xtools/release/load_windows.sh10
-rwxr-xr-xtools/release/make_packages.sh45
-rw-r--r--tools/release/merge2release.bat22
-rw-r--r--tools/release/merge_release_cycle_init.bat16
-rw-r--r--tools/release/release-mgt-msvc/compare_trees/compare_trees.vcproj197
-rw-r--r--tools/release/release-mgt-msvc/msvc.sln26
-rw-r--r--tools/release/release-mgt-msvc/strftime/strftime.vcproj193
-rwxr-xr-xtools/release/release_reports.sh31
-rw-r--r--tools/release/revision_number.bat13
-rw-r--r--tools/release/snapshot.bat39
-rwxr-xr-xtools/release/snapshot.sh16
-rw-r--r--tools/release/snapshot_download_docs.bat31
-rwxr-xr-xtools/release/snapshot_inspect.sh31
-rw-r--r--tools/release/snapshot_inspection.bat28
-rw-r--r--tools/release/snapshot_posix.bat69
-rwxr-xr-xtools/release/snapshot_posix.sh65
-rw-r--r--tools/release/snapshot_windows.bat75
-rwxr-xr-xtools/release/snapshot_windows.sh58
-rw-r--r--tools/release/strftime.cpp68
-rw-r--r--tools/release/unmerged.bat17
-rw-r--r--tools/release/unmerged_all.bat86
-rw-r--r--tools/release/unmerged_whatever.bat13
-rw-r--r--tools/release/upload2sourceforge.bat13
-rw-r--r--tools/wave/build/Jamfile.v269
-rw-r--r--tools/wave/cpp.cpp1473
-rw-r--r--tools/wave/cpp.hpp43
-rw-r--r--tools/wave/cpp_config.hpp63
-rw-r--r--tools/wave/cpp_version.hpp25
-rw-r--r--tools/wave/stop_watch.hpp84
-rw-r--r--tools/wave/trace_macro_expansion.hpp1494
1129 files changed, 14879 insertions, 8540 deletions
diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2
index d7fab287a..86cbbefdd 100644
--- a/tools/Jamfile.v2
+++ b/tools/Jamfile.v2
@@ -12,6 +12,9 @@ project
:
requirements
<link>static
+ <implicit-dependency>/boost//headers
+ :
+ usage-requirements <implicit-dependency>/boost//headers
;
use-project /boost/regression : regression/build ;
diff --git a/tools/auto_index/src/auto_index.cpp b/tools/auto_index/src/auto_index.cpp
index cf5824cc9..e8d5db201 100644
--- a/tools/auto_index/src/auto_index.cpp
+++ b/tools/auto_index/src/auto_index.cpp
@@ -590,6 +590,8 @@ void process_node(boost::tiny_xml::element_ptr node, node_id* prev, title_info*
preferred_term = true;
}
parent = parent->parent.lock();
+ if(!parent)
+ break;
}
}
catch(const std::exception&){}
diff --git a/tools/bcp/add_dependent_lib.cpp b/tools/bcp/add_dependent_lib.cpp
index bb1818a2e..41cc59742 100644
--- a/tools/bcp/add_dependent_lib.cpp
+++ b/tools/bcp/add_dependent_lib.cpp
@@ -81,7 +81,7 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st
"\\("
"[^\\(\\);{}]*" // argument list
"\\)"
- "\\s*"
+ "\\s*(?:BOOST[_A-Z]+\\s*)?"
"\\{" // start of definition
"|"
"(\\<\\w+\\>)" // Maybe class name
@@ -93,7 +93,7 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st
"\\("
"[^\\(\\);{}]*" // argument list
"\\)"
- "\\s*"
+ "\\s*(?:BOOST[_A-Z]+\\s*)?"
"\\{" // start of definition
")" // end branch reset
);
@@ -135,7 +135,7 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st
"\\<(?!return)\\w+\\>[^:;{}#=<>!~%.\\w]*(";
// List of function names goes here...
const char* e3 =
- ")\\s*\\([^;()]*\\)\\s*;)";
+ ")\\s*\\([^;()]*\\)\\s*(?:BOOST[_A-Z]+\\s*)?;)";
std::string class_name_list;
std::set<std::string>::const_iterator i = class_names[libname].begin(), j = class_names[libname].end();
diff --git a/tools/boostbook/doc/boostbook.xml b/tools/boostbook/doc/boostbook.xml
index 1e57966fd..c0afdd393 100644
--- a/tools/boostbook/doc/boostbook.xml
+++ b/tools/boostbook/doc/boostbook.xml
@@ -9,7 +9,7 @@
<!DOCTYPE part PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude" id="boostbook"
- last-revision="$Date: 2010-07-19 16:29:09 -0700 (Mon, 19 Jul 2010) $">
+ last-revision="$Date$">
<partinfo>
<author>
<firstname>Douglas</firstname>
@@ -140,9 +140,9 @@ std::cout &lt;&lt; f(5, 3) &gt;&gt; std::endl;
happen in the BBv2 user configuration file,
<filename>user-config.jam</filename>. If you do not have a copy
of this file in your home directory, you should copy the one
- that resides in <code>tools/build/v2</code> to your home
+ that resides in <code>tools/build/</code> to your home
directory. Alternatively, you can edit
- <filename>tools/build/v2/user-config.jam</filename> directly or
+ <filename>tools/build/user-config.jam</filename> directly or
a site-wide <filename>site-config.jam</filename> file.</para>
<section id="boostbook.setup.xsltproc">
diff --git a/tools/boostbook/doc/documenting.xml b/tools/boostbook/doc/documenting.xml
index 04552e5f5..30e4cd88b 100644
--- a/tools/boostbook/doc/documenting.xml
+++ b/tools/boostbook/doc/documenting.xml
@@ -9,7 +9,7 @@
<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<chapter xmlns:xi="http://www.w3.org/2001/XInclude" id="boostbook.documenting"
- last-revision="$Date: 2008-07-12 12:30:45 -0700 (Sat, 12 Jul 2008) $">
+ last-revision="$Date$">
<title>Documenting libraries</title>
<para>BoostBook is an extension to <ulink
@@ -40,7 +40,7 @@
&lt;!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"&gt;
&lt;library name="Any" dirname="any" xmlns:xi="http://www.w3.org/2001/XInclude"
- id="any" last-revision="$Date: 2008-07-12 12:30:45 -0700 (Sat, 12 Jul 2008) $"&gt;
+ id="any" last-revision="$Date$"&gt;
&lt;libraryinfo&gt;
&lt;author&gt;
&lt;firstname&gt;Kevlin&lt;/firstname&gt;
@@ -99,7 +99,7 @@
<varlistentry>
<term><code>last-revision</code></term>
<listitem>
- <simpara>Always set to <code>$Date: 2008-07-12 12:30:45 -0700 (Sat, 12 Jul 2008) $</code>, which is
+ <simpara>Always set to <code>$Date$</code>, which is
expanded by CVS to include the date and time that the file
was last modified.</simpara>
</listitem>
diff --git a/tools/boostbook/doc/reference.xml b/tools/boostbook/doc/reference.xml
index 67aa7913a..d4c56a5ef 100644
--- a/tools/boostbook/doc/reference.xml
+++ b/tools/boostbook/doc/reference.xml
@@ -36,7 +36,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -140,7 +140,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -176,7 +176,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -218,7 +218,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -258,7 +258,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -294,7 +294,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>pack</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if the parameter is a parameter pack.</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -340,7 +340,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -378,7 +378,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -441,7 +441,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -481,7 +481,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -516,7 +516,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -555,7 +555,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>access</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The access specifier ("public", "private", or "protected") of the inheritance.</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>pack</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if this is a pack exapansion.</entry></row>
@@ -599,7 +599,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -717,7 +717,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -754,7 +754,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>alt</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
</tbody>
@@ -789,7 +789,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -863,7 +863,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
@@ -939,7 +939,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -991,7 +991,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1050,7 +1050,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>alt</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
</tbody>
@@ -1085,7 +1085,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1129,7 +1129,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>alt</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1165,7 +1165,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1201,7 +1201,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1236,7 +1236,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -1273,7 +1273,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1308,7 +1308,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1344,7 +1344,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1379,7 +1379,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>pack</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if this is a pack exapansion.</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1415,7 +1415,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>alt</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
</tbody>
@@ -1450,7 +1450,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1528,7 +1528,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1563,7 +1563,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1598,7 +1598,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1668,7 +1668,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1712,7 +1712,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -1783,7 +1783,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1852,7 +1852,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1887,7 +1887,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -1965,7 +1965,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
<row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -2007,7 +2007,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2046,7 +2046,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the access specification, e.g. "public", "private", or "protected".</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
</tbody>
@@ -2126,7 +2126,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2165,7 +2165,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2201,7 +2201,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2236,7 +2236,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2277,7 +2277,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2346,7 +2346,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2381,7 +2381,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2416,7 +2416,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>pack</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if the parameter is a parameter pack.</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -2453,7 +2453,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>dirname</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry/></row>
<row><entry>url</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
@@ -2497,7 +2497,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2532,7 +2532,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2568,7 +2568,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>alt</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
</tbody>
@@ -2603,7 +2603,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2639,7 +2639,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2692,7 +2692,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2728,7 +2728,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2763,7 +2763,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2798,7 +2798,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2833,7 +2833,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2868,7 +2868,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
@@ -2903,7 +2903,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2939,7 +2939,7 @@
</thead>
<tbody>
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date: 2009-10-10 07:53:46 -0700 (Sat, 10 Oct 2009) $ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
<row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
<row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
</tbody>
diff --git a/tools/boostbook/doc/together.xml b/tools/boostbook/doc/together.xml
index ca93fc53b..47269b7d6 100644
--- a/tools/boostbook/doc/together.xml
+++ b/tools/boostbook/doc/together.xml
@@ -9,7 +9,7 @@
<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<chapter xmlns:xi="http://www.w3.org/2001/XInclude" id="boostbook.together"
- last-revision="$Date: 2009-04-15 00:37:45 -0700 (Wed, 15 Apr 2009) $">
+ last-revision="$Date$">
<title>Bringing Together a BoostBook Document</title>
<section id="boostbook.linking">
diff --git a/tools/boostbook/dtd/1.1/boostbook.dtd b/tools/boostbook/dtd/1.1/boostbook.dtd
index ec2086aeb..9805ec706 100644
--- a/tools/boostbook/dtd/1.1/boostbook.dtd
+++ b/tools/boostbook/dtd/1.1/boostbook.dtd
@@ -16,8 +16,8 @@
PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
- $Revision: 55188 $
- $Date: 2009-07-26 13:11:03 -0700 (Sun, 26 Jul 2009) $
+ $Revision$
+ $Date$
-->
<!--========== Define XInclude features. ==========-->
diff --git a/tools/boostbook/dtd/boostbook.dtd b/tools/boostbook/dtd/boostbook.dtd
index 4718abe39..bd4c3f871 100644
--- a/tools/boostbook/dtd/boostbook.dtd
+++ b/tools/boostbook/dtd/boostbook.dtd
@@ -16,8 +16,8 @@
PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
- $Revision: 51774 $
- $Date: 2009-03-14 04:42:38 -0700 (Sat, 14 Mar 2009) $
+ $Revision$
+ $Date$
-->
<!--========== Define XInclude features. ==========-->
diff --git a/tools/boostbook/setup_boostbook.py b/tools/boostbook/setup_boostbook.py
index b06736afc..032587d8a 100644
--- a/tools/boostbook/setup_boostbook.py
+++ b/tools/boostbook/setup_boostbook.py
@@ -242,8 +242,8 @@ def find_user_config():
JAM_CONFIG_IN_TEMP="yes"
print " Updating Boost.Jam configuration in %s... " % JAM_CONFIG_OUT
return JAM_CONFIG_OUT
- elif os.environ.has_key( "BOOST_ROOT" ) and os.path.exists( os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" ) ):
- JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" )
+ elif os.environ.has_key( "BOOST_ROOT" ) and os.path.exists( os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/user-config.jam" ) ):
+ JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/user-config.jam" )
print " Found user-config.jam in BOOST_ROOT directory (%s)" % JAM_CONFIG_IN
JAM_CONFIG_IN_TEMP="no"
print " Writing Boost.Jam configuration to %s... " % JAM_CONFIG_OUT
@@ -286,7 +286,7 @@ def setup_boostbook( tools_directory ):
print "done."
- print "Done! Execute \"bjam --v2\" in a documentation directory to generate"
+ print "Done! Execute \"b2\" in a documentation directory to generate"
print "documentation with BoostBook. If you have not already, you will need"
print "to compile Boost.Jam."
diff --git a/tools/boostbook/setup_boostbook.sh b/tools/boostbook/setup_boostbook.sh
index 0e7903157..54348361f 100644..100755
--- a/tools/boostbook/setup_boostbook.sh
+++ b/tools/boostbook/setup_boostbook.sh
@@ -129,8 +129,8 @@ if test -r "$HOME/user-config.jam"; then
JAM_CONFIG_IN_TEMP="yes"
echo -n "Updating Boost.Jam configuration in $JAM_CONFIG_OUT... "
-elif test -r "$BOOST_ROOT/tools/build/v2/user-config.jam"; then
- JAM_CONFIG_IN="$BOOST_ROOT/tools/build/v2/user-config.jam";
+elif test -r "$BOOST_ROOT/tools/build/user-config.jam"; then
+ JAM_CONFIG_IN="$BOOST_ROOT/tools/build/user-config.jam";
JAM_CONFIG_IN_TEMP="no"
echo -n "Writing Boost.Jam configuration to $JAM_CONFIG_OUT... "
else
@@ -176,6 +176,6 @@ awk -f setup_boostbook.awk $JAM_CONFIG_IN > $JAM_CONFIG_OUT
rm -f setup_boostbook.awk
echo "done."
-echo "Done! Execute \"bjam --v2\" in a documentation directory to generate"
+echo "Done! Execute \"b2\" in a documentation directory to generate"
echo "documentation with BoostBook. If you have not already, you will need"
echo "to compile Boost.Jam."
diff --git a/tools/boostbook/test/doxygen/autodoc.gold b/tools/boostbook/test/doxygen/autodoc.gold
index 0e70f735a..95c818114 100644
--- a/tools/boostbook/test/doxygen/autodoc.gold
+++ b/tools/boostbook/test/doxygen/autodoc.gold
@@ -1,12 +1,60 @@
<?xml version="1.0" standalone="yes"?>
-<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp"><namespace name="example"><class name="example"><purpose>Documentation for class example. </purpose><class name="inner_class"><data-member name="x"><type>int</type></data-member></class><enum name="class_enum"><enumvalue name="enumerator"/></enum><typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef><typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef><typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef><typedef name="undocumented_type1"><type>short</type></typedef><typedef name="undocumented_type2"><type>double</type></typedef><data-member name="integer"><type>int</type></data-member><data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member><data-member name="const_integer"><type>const int</type></data-member><data-member name="static_integer" specifiers="static"><type>int</type></data-member><data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member><method-group name="public member functions"><method name="conversion-operator" cv="" specifiers="explicit"><type>int</type></method></method-group><constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor><copy-assignment cv="= delete"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment></class><struct name="example_template"><template>
+<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp">
+<namespace name="example">
+<class name="example"><purpose>Documentation for class example. </purpose><description><para>Detailed documentation</para><para><programlisting language="c++">void class_code_sample();
+</programlisting> </para></description><class name="inner_class"><data-member name="x"><type>int</type></data-member>
+</class><enum name="class_enum"><enumvalue name="enumerator"/></enum>
+<typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef>
+<typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef>
+<typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef>
+<typedef name="undocumented_type1"><type>short</type></typedef>
+<typedef name="undocumented_type2"><type>double</type></typedef>
+<data-member name="integer"><type>int</type></data-member>
+<data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member>
+<data-member name="const_integer"><type>const int</type></data-member>
+<data-member name="static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member>
+<method-group name="public member functions">
+<method name="virtual_method" specifiers="virtual"><type>int</type></method>
+<method name="virtual_abstract_method" cv="= 0" specifiers="virtual"><type>int</type></method>
+<method name="virtual_const_method" cv="const" specifiers="virtual"><type>int</type></method>
+<method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method>
+<method name="method_with_fp"><type>int</type><parameter name="fp"><paramtype>int(*)()</paramtype></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_string_default1"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>")"</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_string_default2"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>"("</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_char_default1"><type>int</type><parameter name=""><paramtype>char</paramtype><default>'('</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_char_default2"><type>int</type><parameter name=""><paramtype>char</paramtype><default>')'</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_fp" cv="volatile"><type>int</type><parameter name="fp"><paramtype>int(*)()</paramtype></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_string_default1" cv="volatile"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>")"</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_string_default2" cv="volatile"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>"("</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_char_default1" cv="volatile"><type>int</type><parameter name=""><paramtype>char</paramtype><default>'('</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_char_default2" cv="volatile"><type>int</type><parameter name=""><paramtype>char</paramtype><default>')'</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="const_method" cv="const"><type>void</type></method>
+<method name="volatile_method" cv="volatile"><type>void</type></method>
+<method name="trad_noexcept" cv="noexcept"><type>void</type></method>
+<method name="trad_noexcept_if" cv="noexcept(a==b &amp;&amp;(c||d)))"><type>void</type></method>
+<method name="boost_noexcept" cv="noexcept"><type>void</type></method>
+<method name="boost_noexcept_if" cv="noexcept(condition)"><type>void</type></method>
+<method name="trad_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr_or_const" cv="constexpr"><type>void</type></method>
+<method name="constexpr_noexcept" cv="constexpr noexcept"><type>void</type></method>
+<method name="conversion-operator" specifiers="explicit"><type>int</type></method>
+</method-group>
+<constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>
+<copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment>
+<method-group name="public static functions">
+<method name="static_method" specifiers="static"><type>int</type></method>
+<method name="static_constexpr" cv="constexpr" specifiers="static"><type>int</type></method>
+</method-group>
+</class><struct name="example_template"><template>
<template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
<template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
<template-type-parameter name="TypeParameterWithDefault"><default>int</default><purpose><para>This is a template parameter with a default argument </para></purpose></template-type-parameter>
</template><description><para>Test some doxygen markup</para><para><warning><para>This is just an example.</para></warning>
Embedded docbook list:</para><para>
- <orderedlist><listitem><simpara>1</simpara></listitem><listitem><simpara>2</simpara></listitem></orderedlist>
- </para><para><emphasis>Special</emphasis> <emphasis role="bold">Bold</emphasis> <computeroutput>Typewriter</computeroutput> <emphasis>Italics</emphasis> <emphasis>emphasis</emphasis> <computeroutput>parameter</computeroutput> </para><para><itemizedlist>
+<orderedlist><listitem><simpara>1</simpara></listitem><listitem><simpara>2</simpara></listitem></orderedlist>
+</para><para><emphasis>Special</emphasis> <emphasis role="bold">Bold</emphasis> <computeroutput>Typewriter</computeroutput> <emphasis>Italics</emphasis> <emphasis>emphasis</emphasis> <computeroutput>parameter</computeroutput> </para><para><itemizedlist>
<listitem><para>Arg1 first argument. </para></listitem>
<listitem><para>Arg2 second argument.</para></listitem>
</itemizedlist>
@@ -15,19 +63,37 @@ Embedded docbook list:</para><para>
<listitem><para>Second list item</para></listitem>
</itemizedlist>
Line 1<sbr/>
- Line 2</para><para><programlisting> void foo() {}
+ Line 2</para><para><programlisting language="c++">void foo() {}
</programlisting></para><para>
</para></description></struct><struct name="specialization_test"><template>
<template-type-parameter name="T"/>
</template></struct><struct-specialization name="specialization_test"><template>
<template-type-parameter name="T"/>
- </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions"/><constructor><description><para>A constructor. </para></description></constructor><destructor><description><para>A destructor. </para></description></destructor><copy-assignment cv=""><parameter name=""><paramtype>const <classname>specialization_test</classname> &amp;</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment></struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum><data-member name="namespace_integer"><type>int</type></data-member><data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member><data-member name="namespace_const_integer"><type>const int</type></data-member><data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member><function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int</paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
+ </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions">
+</method-group>
+<constructor><description><para>A constructor. </para></description></constructor>
+<destructor><description><para>A destructor. </para></description></destructor>
+<copy-assignment><type><emphasis>unspecified</emphasis></type><parameter name=""><paramtype>const <classname>specialization_test</classname> &amp;</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment>
+</struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum>
+<data-member name="namespace_integer"><type>int</type></data-member>
+<data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="namespace_const_integer"><type>const int</type></data-member>
+<data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member>
+<function name="free_function"><type>void</type><parameter name="x"><paramtype>int</paramtype><description><para>Parameter description.</para></description></parameter><description><para>
+<programlisting language="c++">void function_code_sample();
+</programlisting> </para></description></function>
+<function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int</paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
This is a test function. <classname alt="example::example">Link to class</classname> <classname alt="example::example_template">Link to class template</classname> <note><para>This is a note.</para></note>
<para><emphasis role="bold">See Also:</emphasis><para><classname alt="example::example">example::example</classname> and <classname alt="example::example_template">example_template</classname> </para></para>
-</para></description><requires><para>i &gt; j</para></requires><returns><para>The answer </para></returns></function><function name="namespace_func_template"><type>void</type><template>
+</para></description><requires><para>i &gt; j</para></requires><returns><para>The answer </para></returns></function>
+<function name="namespace_func_template"><type>void</type><template>
<template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
<template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
</template><description><para>Testing a function template.
-</para></description></function></namespace><macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro></header></library-reference>
+</para></description></function>
+</namespace>
+<macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro>
+</header>
+</library-reference> \ No newline at end of file
diff --git a/tools/boostbook/test/doxygen/boost/example.hpp b/tools/boostbook/test/doxygen/boost/example.hpp
index acceb699d..629a6d9a4 100644
--- a/tools/boostbook/test/doxygen/boost/example.hpp
+++ b/tools/boostbook/test/doxygen/boost/example.hpp
@@ -7,6 +7,12 @@
\class example::example
\brief Documentation for class example
+
+ Detailed documentation
+
+ \code{.cpp}
+ void class_code_sample();
+ \endcode
*/
/*!
@@ -23,6 +29,16 @@ enum global_enum { enumerator1 = 1, enumerator2 };
namespace example
{
+ /*!
+
+ \param x Parameter description.
+
+ \code{.cpp}
+ void function_code_sample();
+ \endcode
+ */
+ void free_function(int x);
+
int namespace_integer;
static int namespace_static_integer;
const int namespace_const_integer = 1;
@@ -34,6 +50,39 @@ namespace example
public:
example(example const&) = default;
example& operator=(example const&) = delete;
+ virtual int virtual_method();
+ virtual int virtual_abstract_method() = 0;
+ virtual int virtual_const_method() const;
+ int method_with_default_value(int = default_value);
+
+ int method_with_fp(int (*fp)(), volatile char);
+ int method_with_string_default1(char* = ")", volatile char);
+ int method_with_string_default2(char* = "(", volatile char);
+ int method_with_char_default1(char = '(', volatile char);
+ int method_with_char_default2(char = ')', volatile char);
+
+ int volatile_method_with_fp(int (*fp)(), volatile char) volatile;
+ int volatile_method_with_string_default1(char* = ")", volatile char) volatile;
+ int volatile_method_with_string_default2(char* = "(", volatile char) volatile;
+ int volatile_method_with_char_default1(char = '(', volatile char) volatile;
+ int volatile_method_with_char_default2(char = ')', volatile char) volatile;
+
+ void const_method() const;
+ void volatile_method() volatile;
+
+ void trad_noexcept() noexcept;
+ void trad_noexcept_if() noexcept(a == b && (c || d));
+ void boost_noexcept() BOOST_NOEXCEPT;
+ void boost_noexcept_if() BOOST_NOEXCEPT_IF(a == b && (c || d));
+
+ void trad_constexpr() constexpr;
+ void boost_constexpr() BOOST_CONSTEXPR;
+ void boost_constexpr_or_const() BOOST_CONSTEXPR_OR_CONST;
+
+ void constexpr_noexcept() constexpr noexcept;
+
+ static int static_method();
+ static int static_constexpr() constexpr;
int integer;
static int static_integer;
@@ -149,7 +198,7 @@ namespace example
/** A destructor. */
~specialization_test();
/** An assignment operator. */
- specialization_test& operator=(const specialization_test&);
+ detail::unspecified& operator=(const specialization_test&);
};
}
diff --git a/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.gold b/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.gold
new file mode 100644
index 000000000..9722d1038
--- /dev/null
+++ b/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.gold
@@ -0,0 +1,13 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book xmlns:xi="http://www.w3.org/2001/XInclude" id="test" lang="en">
+ <title>Test language attribute</title>
+ <programlisting>plain text</programlisting>
+ <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase><phrase role="special">}</phrase></programlisting>
+ <programlisting><phrase role="keyword">actions</phrase> something <phrase role="special">;</phrase></programlisting>
+
+ <para>
+ <computeroutput>plain text</computeroutput>
+ <computeroutput><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase><phrase role="special">}</phrase></computeroutput>
+ <computeroutput><phrase role="keyword">actions</phrase> something <phrase role="special">;</phrase></computeroutput>
+ </para>
+</book> \ No newline at end of file
diff --git a/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.xml b/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.xml
new file mode 100644
index 000000000..e5891b43d
--- /dev/null
+++ b/tools/boostbook/test/more/tests/syntax-highlight/language-attribute.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2013 Daniel James.
+
+ 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)
+-->
+<!DOCTYPE boostbook PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<boostbook id="test" xmlns:xi="http://www.w3.org/2001/XInclude"
+ last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $"
+ lang="en">
+ <title>Test language attribute</title>
+ <programlisting>plain text</programlisting>
+ <programlisting language="c++">void main() {}</programlisting>
+ <programlisting language="jam">actions something ;</programlisting>
+
+ <para>
+ <code>plain text</code>
+ <code language="c++">void main() {}</code>
+ <code language="jam">actions something ;</code>
+ </para>
+</boostbook>
+
diff --git a/tools/boostbook/xsl/annotation.xsl b/tools/boostbook/xsl/annotation.xsl
index 93acd7ce8..1d9b79e60 100644
--- a/tools/boostbook/xsl/annotation.xsl
+++ b/tools/boostbook/xsl/annotation.xsl
@@ -400,6 +400,14 @@
</computeroutput>
</xsl:template>
+ <xsl:template match="code[@language='c++']" mode="annotation">
+ <computeroutput>
+ <xsl:apply-templates mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </computeroutput>
+ </xsl:template>
+
<xsl:template match="bold" mode="annotation">
<emphasis role="bold">
<xsl:apply-templates mode="annotation"/>
diff --git a/tools/boostbook/xsl/docbook-layout.xsl b/tools/boostbook/xsl/docbook-layout.xsl
index dfd5afd0a..9a382ad5b 100644
--- a/tools/boostbook/xsl/docbook-layout.xsl
+++ b/tools/boostbook/xsl/docbook-layout.xsl
@@ -10,11 +10,16 @@
<xsl:stylesheet version = "1.0"
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
>
+
<!-- needed for calsTable template -->
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl"/>
+ <!-- Optionally add the section id to each section's class.
+ This is useful if you want to style individual sections differently. -->
+ <xsl:param name="boost.section.class.add.id" select="0"/>
+
<!--
Override the behaviour of some DocBook elements for better
integration with the new look & feel.
@@ -208,4 +213,50 @@
<xsl:with-param name="allow-anchors" select="$allow-anchors"/>
</xsl:apply-templates>
</xsl:template>
+
+
+ <!-- Adds role class for section element resulting div. So that
+ we can style them in the resulting HTML.
+ Also, add the section id, if boost.section.class.add.id = 1.
+ This can be used to style individual sections differently. -->
+ <xsl:template match="section" mode="class.value">
+ <xsl:param name="class" select="local-name(.)"/>
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="id">
+ <xsl:if test="$boost.section.class.add.id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space(concat($class, ' ',
+ @role, ' ', translate($id, '.', '_')))"/>
+ </xsl:template>
+
+ <!-- Adds role class for simplesect element resulting div. So that
+ we can style them in the resulting HTML. -->
+ <xsl:template match="simplesect" mode="class.value">
+ <xsl:param name="class" select="local-name(.)"/>
+ <xsl:param name="node" select="."/>
+ <xsl:value-of select="normalize-space(concat($class,' ',@role))"/>
+ </xsl:template>
+
+ <!-- Allow for specifying that a section should not include the parents
+ labeling. This allows us to start clean numering of a sub-section. -->
+ <xsl:template match="section[@label-style='no-parent']" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="$label != 0">
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$section.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:number format="{$format}" count="section"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:stylesheet>
diff --git a/tools/boostbook/xsl/docbook.xsl b/tools/boostbook/xsl/docbook.xsl
index d7a1db727..12bef9085 100644
--- a/tools/boostbook/xsl/docbook.xsl
+++ b/tools/boostbook/xsl/docbook.xsl
@@ -398,6 +398,10 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
</computeroutput>
</xsl:template>
+ <xsl:template match="code[@language='c++']">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
<xsl:template match="bold">
<emphasis role="bold">
<xsl:apply-templates mode="annotation"/>
@@ -454,6 +458,10 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
</programlisting>
</xsl:template>
+ <xsl:template match="programlisting[@language='c++']">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
<!-- These DocBook elements have special meaning. Use the annotation mode -->
<xsl:template match="classname|methodname|functionname|enumname|
macroname|headername|globalname">
diff --git a/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl b/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
index bb79f271b..d3a21cf3a 100644
--- a/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
+++ b/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
@@ -202,6 +202,7 @@
<xsl:attribute name="name">
<xsl:value-of select="$name"/>
</xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="with-namespace-refs"
@@ -209,6 +210,7 @@
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</namespace>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:template>
@@ -301,6 +303,7 @@
<xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</enum>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:template>
@@ -387,6 +390,7 @@
<xsl:with-param name="header" select="location/attribute::file"/>
</xsl:call-template>
</xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:if test="briefdescription/*|detaileddescription/*|inbodydescription/*">
<xsl:apply-templates select="briefdescription/*" mode="passthrough"/>
@@ -400,6 +404,7 @@
<xsl:with-param name="in-file" select="location/attribute::file"/>
</xsl:apply-templates>
</header>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:template>
@@ -518,6 +523,7 @@
<xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</macro>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:when>
<xsl:when test="@kind='function'">
@@ -717,29 +723,35 @@
<xsl:when test="@kind='public-static-func'">
<!-- TBD: pass on the fact that these are static functions -->
<method-group name="public static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:when>
<xsl:when test="@kind='protected-static-func'">
<!-- TBD: pass on the fact that these are static functions -->
<method-group name="protected static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:when>
<xsl:when test="@kind='private-static-func'">
<!-- TBD: pass on the fact that these are static functions -->
<method-group name="private static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:when>
<xsl:when test="@kind='public-func'">
<xsl:variable name="members" select="./memberdef"/>
@@ -750,21 +762,25 @@
</xsl:variable>
<xsl:if test="$num-internal-only &lt; count($members)">
<method-group name="public member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates/>
</xsl:if>
</xsl:when>
<xsl:when test="@kind='protected-func'">
<method-group name="protected member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="@kind='private-func'">
@@ -776,22 +792,26 @@
</xsl:variable>
<xsl:if test="$num-internal-only &lt; count($members)">
<method-group name="private member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="@kind='friend'">
<xsl:if test="./memberdef/detaileddescription/para or ./memberdef/briefdescription/para">
<method-group name="friend functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
<xsl:apply-templates>
<xsl:with-param name="in-section" select="true()"/>
<xsl:with-param name="in-file" select="$in-file"/>
</xsl:apply-templates>
</method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:when>
<xsl:when test="@kind='public-static-attrib' or @kind='public-attrib'">
@@ -968,6 +988,7 @@
<type><xsl:apply-templates select="type"/></type>
</typedef>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:template>
@@ -1038,6 +1059,162 @@
</xsl:if>
</xsl:template>
+ <xsl:template name="function.attributes">
+
+ <!-- argsstring = '(arguments) [= delete] [= default] [constexpt]' -->
+ <xsl:variable name="extra-qualifiers-a">
+ <xsl:if test="contains(argsstring/text(), '(')">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(argsstring/text(), '(')" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="extra-qualifiers">
+ <xsl:if test="$extra-qualifiers-a">
+ <xsl:value-of select="concat(' ', normalize-space($extra-qualifiers-a), ' ')" />
+ </xsl:if>
+ </xsl:variable>
+
+ <!-- CV Qualifiers -->
+ <!-- Plus deleted and defaulted function markers as they're not properly
+ supported in boostbook -->
+
+ <!-- noexcept is complicated because is can have parameters.
+ TODO: should really remove the noexcept parameters before doing
+ anything else. -->
+ <xsl:variable name="noexcept">
+ <xsl:choose>
+ <xsl:when test="contains($extra-qualifiers, ' noexcept(')">
+ <xsl:call-template name="noexcept-if">
+ <xsl:with-param name="condition" select="substring-after($extra-qualifiers, ' noexcept(')" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($extra-qualifiers, ' BOOST_NOEXCEPT_IF(')">
+ <xsl:call-template name="noexcept-if">
+ <xsl:with-param name="condition" select="substring-after($extra-qualifiers, ' BOOST_NOEXCEPT_IF(')" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($extra-qualifiers, ' noexcept ') or contains($extra-qualifiers, ' BOOST_NOEXCEPT ')">
+ <xsl:value-of select="'noexcept '" />
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Calculate constexpr now, so that we can avoid it getting confused
+ with const -->
+ <xsl:variable name="constexpr" select="
+ contains($extra-qualifiers, ' const expr ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR_OR_CONST ')" />
+
+ <!-- The 'substring' trick includes the string if the condition is true -->
+ <xsl:variable name="cv-qualifiers" select="normalize-space(concat(
+ substring('constexpr ', 1, 999 * $constexpr),
+ substring('const ', 1, 999 * (not($constexpr) and @const='yes')),
+ substring('volatile ', 1, 999 * (@volatile='yes' or contains($extra-qualifiers, ' volatile '))),
+ $noexcept,
+ substring('= delete ', 1, 999 * contains($extra-qualifiers, ' =delete ')),
+ substring('= default ', 1, 999 * contains($extra-qualifiers, ' =default ')),
+ substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')),
+ ''))" />
+
+ <!-- Specifiers -->
+ <xsl:variable name="specifiers" select="normalize-space(concat(
+ substring('explicit ', 1, 999 * (@explicit = 'yes')),
+ substring('virtual ', 1, 999 * (
+ @virtual='yes' or @virt='virtual' or @virt='pure-virtual')),
+ substring('static ', 1, 999 * (@static = 'yes')),
+ ''))" />
+
+ <xsl:if test="$cv-qualifiers">
+ <xsl:attribute name="cv">
+ <xsl:value-of select="$cv-qualifiers" />
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$specifiers">
+ <xsl:attribute name="specifiers">
+ <xsl:value-of select="$specifiers" />
+ </xsl:attribute>
+ </xsl:if>
+
+ </xsl:template>
+
+ <!-- $condition = string after the opening bracket of the condition -->
+ <xsl:template name="noexcept-if">
+ <xsl:param name="condition"/>
+
+ <xsl:variable name="trailing">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="$condition" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($trailing)">
+ <xsl:value-of select="concat(
+ 'noexcept(',
+ substring($condition, 1, string-length($condition) - string-length($trailing)),
+ ') ')" />
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Something has gone wrong so: -->
+ <xsl:value-of select="'noexcept(condition) '" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- $text = substring after the opening bracket -->
+ <xsl:template name="strip-brackets">
+ <xsl:param name="text"/>
+
+ <xsl:if test="contains($text, ')')">
+ <xsl:variable name="prefix1" select="substring-before($text, ')')" />
+ <xsl:variable name="prefix2" select="substring($prefix1, 1,
+ string-length(substring-before($prefix1, '(')) +
+ 999 * not(contains($prefix1, '(')))" />
+ <xsl:variable name="prefix3" select="substring($prefix2, 1,
+ string-length(substring-before($prefix2, '&quot;')) +
+ 999 * not(contains($prefix2, '&quot;')))" />
+ <xsl:variable name="prefix" select="substring($prefix3, 1,
+ string-length(substring-before($prefix3, &quot;'&quot;)) +
+ 999 * not(contains($prefix3, &quot;'&quot;)))" />
+
+ <xsl:variable name="prefix-length" select="string-length($prefix)" />
+ <xsl:variable name="char" select="substring($text, $prefix-length + 1, 1)" />
+
+ <xsl:choose>
+ <xsl:when test="$char=')'">
+ <xsl:value-of select="substring($text, $prefix-length + 2)" />
+ </xsl:when>
+ <xsl:when test="$char='('">
+ <xsl:variable name="text2">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring($text, $prefix-length + 2)" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="$text2" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$char=&quot;'&quot;">
+ <!-- Not bothering with escapes, because this is crazy enough as it is -->
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(substring($text, $prefix-length + 2), &quot;'&quot;)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$char='&quot;'">
+ <!-- Not bothering with escapes, because this is crazy enough as it is -->
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(substring($text, $prefix-length + 2), '&quot;')" />
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
<!-- Handle function children -->
<xsl:template name="function.children">
<xsl:param name="is-overloaded" select="false()"/>
@@ -1125,6 +1302,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:if>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Emit overload signatures -->
@@ -1164,20 +1342,10 @@
<xsl:if test="@explicit = 'yes'">
<xsl:attribute name="specifiers">explicit</xsl:attribute>
</xsl:if>
- <!-- CV Qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=delete') or contains(argsstring/text(),'=default')">
- <xsl:attribute name="cv">
- <!-- Cheat and add deleted and defaulted function markers to the CV qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=delete')">
- <xsl:text>= delete</xsl:text>
- </xsl:if>
- <xsl:if test="contains(argsstring/text(),'=default')">
- <xsl:text>= default</xsl:text>
- </xsl:if>
- </xsl:attribute>
- </xsl:if>
+ <xsl:call-template name="function.attributes"/>
<xsl:call-template name="function.children"/>
</constructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Handle Destructors -->
@@ -1185,41 +1353,21 @@
<destructor>
<xsl:call-template name="function.children"/>
</destructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Handle Copy Assignment -->
<xsl:template name="copy-assignment">
<copy-assignment>
- <!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no')">
- <xsl:attribute name="cv">
- <xsl:if test="@const='yes'">
- <xsl:text>const</xsl:text>
- </xsl:if>
- <xsl:if test="@volatile='yes'">
- <xsl:if test="@const='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>volatile</xsl:text>
- </xsl:if>
- <!-- Cheat and add deleted and defaulted function markers to the CV qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=delete')">
- <xsl:if test="@const='yes' or @volatile='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>= delete</xsl:text>
- </xsl:if>
- <xsl:if test="contains(argsstring/text(),'=default')">
- <xsl:if test="@const='yes' or @volatile='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>= default</xsl:text>
- </xsl:if>
- </xsl:attribute>
- </xsl:if>
+ <xsl:call-template name="function.attributes"/>
+ <!-- Return type -->
+ <xsl:element name="type">
+ <xsl:apply-templates select="type"/>
+ </xsl:element>
<xsl:call-template name="function.children"/>
</copy-assignment>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Handle conversion operator -->
@@ -1228,32 +1376,7 @@
<xsl:attribute name="name">
<xsl:text>conversion-operator</xsl:text>
</xsl:attribute>
-
- <!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
- <xsl:attribute name="cv">
- <xsl:if test="@const='yes'">
- <xsl:text>const</xsl:text>
- </xsl:if>
- <xsl:if test="@volatile='yes'">
- <xsl:if test="@const='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>volatile</xsl:text>
- </xsl:if>
- <!-- Cheat and add deleted function markers to the CV qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=delete')">
- <xsl:if test="@const='yes' or @volatile='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>= delete</xsl:text>
- </xsl:if>
- </xsl:attribute>
- </xsl:if>
-
- <xsl:if test="@explicit = 'yes'">
- <xsl:attribute name="specifiers">explicit</xsl:attribute>
- </xsl:if>
+ <xsl:call-template name="function.attributes"/>
<!-- Conversion type -->
<type>
@@ -1262,6 +1385,7 @@
<xsl:call-template name="function.children"/>
</method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Handle methods -->
@@ -1270,45 +1394,16 @@
<xsl:attribute name="name">
<xsl:value-of select="name/text()"/>
</xsl:attribute>
-
- <!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
- <xsl:attribute name="cv">
- <xsl:if test="@const='yes'">
- <xsl:text>const</xsl:text>
- </xsl:if>
- <xsl:if test="@volatile='yes'">
- <xsl:if test="@const='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>volatile</xsl:text>
- </xsl:if>
- <!-- Cheat and add deleted function markers to the CV qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=default')">
- <xsl:if test="@const='yes' or @volatile='yes'">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>= default</xsl:text>
- </xsl:if>
- </xsl:attribute>
- </xsl:if>
+ <xsl:call-template name="function.attributes"/>
<!-- Return type -->
<xsl:element name="type">
- <!-- Cheat on virtual and static by dropping them into the type -->
- <xsl:if test="@static='yes'">
- <xsl:text>static </xsl:text>
- </xsl:if>
-
- <xsl:if test="@virtual='yes'">
- <xsl:text>virtual </xsl:text>
- </xsl:if>
-
<xsl:apply-templates select="type"/>
</xsl:element>
<xsl:call-template name="function.children"/>
</method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:template>
<!-- Handle member variables -->
@@ -1336,6 +1431,7 @@
<xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</data-member>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
</xsl:if>
</xsl:template>
@@ -1612,7 +1708,7 @@
<!-- Handle program listings -->
<xsl:template match="programlisting" mode="passthrough">
- <programlisting>
+ <programlisting language="c++">
<xsl:apply-templates mode="programlisting"/>
</programlisting>
</xsl:template>
diff --git a/tools/boostbook/xsl/fo.xsl b/tools/boostbook/xsl/fo.xsl
index 422811cb8..88bacee99 100644
--- a/tools/boostbook/xsl/fo.xsl
+++ b/tools/boostbook/xsl/fo.xsl
@@ -216,13 +216,138 @@
</xsl:choose>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
- <xsl:apply-templates select="*[local-name(.)!='label']"/>
+ <xsl:apply-templates select="*[local-name(.)!='label']"/>text-align
</fo:list-item-body>
</fo:list-item>
</xsl:template>
+
<!--
+ The following rules apply text coloring to Quickbook items like
+
+ [role blue Some blue text]
+
+ These correspond to an arbitrary list of colors added to the CSS file
+
+ $(BOOST-ROOT)\doc\src\boostbook.css
+
+ and are required for building pdf documentation.
+
+ A more elegant way of doing this is probably possible.
+ Other colors can be added simply by copying these examples.
+-->
+
+<xsl:template match="phrase[@role='red']">
+ <fo:inline color="red">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='blue']">
+ <fo:inline color="blue">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='green']">
+ <fo:inline color="green">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='lime']">
+ <fo:inline color="lime">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='navy']">
+ <fo:inline color="navy">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='yellow']">
+ <fo:inline color="yellow">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='magenta']">
+ <fo:inline color="magenta">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='indigo']">
+ <fo:inline color="indigo">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='cyan']">
+ <fo:inline color="cyan">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='purple']">
+ <fo:inline color="purple">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gold']">
+ <fo:inline color="gold">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='silver']">
+ <fo:inline color="silver">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gray']">
+ <fo:inline color="gray">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<!-- alignment -->
+
+<xsl:template match="phrase[@role='aligncenter']">
+ <fo:inline>
+ <fo:block text-align="center">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignleft']">
+ <fo:inline>
+ <fo:block text-align="left">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignright']">
+ <fo:inline>
+ <fo:block text-align="right">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignjustify']">
+ <fo:inline>
+ <fo:block text-align="justify">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+ <!--
+
The following rules apply syntax highlighting to phrases
that have been appropriately marked up, the highlighting
used is the same as that used by our CSS style sheets,
diff --git a/tools/boostbook/xsl/html-base.xsl b/tools/boostbook/xsl/html-base.xsl
index 30442b1f6..022a2242f 100644
--- a/tools/boostbook/xsl/html-base.xsl
+++ b/tools/boostbook/xsl/html-base.xsl
@@ -35,6 +35,8 @@
<xsl:param name="boost.mathjax" select="0"/>
<xsl:param name="boost.mathjax.script"
select="'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'"/>
+ <!--See usage below for explanation of this param-->
+ <xsl:param name="boost.noexpand.chapter.toc" select="0"/>
<xsl:param name="admon.style"/>
<xsl:param name="admon.graphics">1</xsl:param>
@@ -138,9 +140,9 @@ set toc,title
<xsl:template name="format.svn.revision">
<xsl:param name="text"/>
- <!-- Remove the "$Date: " -->
+ <!-- Remove the "$Date: " or "$Date:: " -->
<xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
+ select="substring-after($text, ': ')"/>
<!-- Grab the year -->
<xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
@@ -182,8 +184,10 @@ set toc,title
</xsl:choose>
</xsl:variable>
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
</xsl:template>
<!-- Footer Copyright -->
@@ -228,11 +232,14 @@ set toc,title
<xsl:value-of
select="normalize-space($revision-node/attribute::rev:last-revision)"/>
</xsl:variable>
- <xsl:if test="string-length($revision-text) &gt; 0">
+ <xsl:if test="string-length($revision-text) &gt; 0 and not($revision-text = '$Date$')">
<p>
<small>
<xsl:text>Last revised: </xsl:text>
<xsl:choose>
+ <xsl:when test="not(contains($revision-text, '$Date: ')) and not(contains($revision-text, '$Date:: '))">
+ <xsl:value-of select="$revision-text"/>
+ </xsl:when>
<xsl:when test="contains($revision-text, '/')">
<xsl:call-template name="format.cvs.revision">
<xsl:with-param name="text" select="$revision-text"/>
@@ -380,4 +387,33 @@ set toc,title
<xsl:value-of select="'index'"/>
</xsl:template>
+<xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <!--
+ When boost.noexpand.chapter.toc is set to 1, then the TOC for
+ chapters is only one level deep (ie toc.max.depth has no effect)
+ and nested sections within chapters are not shown. TOC's and LOC's
+ at other levels are not effected and respond to toc.max.depth as normal.
+ -->
+ <xsl:choose>
+ <xsl:when test="local-name($toc-context) = 'book' and $boost.noexpand.chapter.toc = 1">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="foo"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="section|sect1|glossary|bibliography|index
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
</xsl:stylesheet>
+
+
diff --git a/tools/boostbook/xsl/html-help.xsl b/tools/boostbook/xsl/html-help.xsl
index 9b9978943..2234af36f 100644
--- a/tools/boostbook/xsl/html-help.xsl
+++ b/tools/boostbook/xsl/html-help.xsl
@@ -28,104 +28,6 @@
<xsl:param name="draft.mode">no</xsl:param>
<xsl:param name="admon.graphics" select="1"/>
- <xsl:template name="format.cvs.revision">
- <xsl:param name="text"/>
-
- <!-- Remove the "$Date: " -->
- <xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
-
- <!-- Grab the year -->
- <xsl:variable name="year" select="substring-before($text.noprefix, '/')"/>
- <xsl:variable name="text.noyear"
- select="substring-after($text.noprefix, '/')"/>
-
- <!-- Grab the month -->
- <xsl:variable name="month" select="substring-before($text.noyear, '/')"/>
- <xsl:variable name="text.nomonth"
- select="substring-after($text.noyear, '/')"/>
-
- <!-- Grab the year -->
- <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
- <xsl:variable name="text.noday"
- select="substring-after($text.nomonth, ' ')"/>
-
- <!-- Get the time -->
- <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
-
- <xsl:variable name="month.name">
- <xsl:choose>
- <xsl:when test="$month=1">January</xsl:when>
- <xsl:when test="$month=2">February</xsl:when>
- <xsl:when test="$month=3">March</xsl:when>
- <xsl:when test="$month=4">April</xsl:when>
- <xsl:when test="$month=5">May</xsl:when>
- <xsl:when test="$month=6">June</xsl:when>
- <xsl:when test="$month=7">July</xsl:when>
- <xsl:when test="$month=8">August</xsl:when>
- <xsl:when test="$month=9">September</xsl:when>
- <xsl:when test="$month=10">October</xsl:when>
- <xsl:when test="$month=11">November</xsl:when>
- <xsl:when test="$month=12">December</xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' GMT')"/>
- </xsl:template>
-
-
- <xsl:template name="format.svn.revision">
- <xsl:param name="text"/>
-
- <!-- Remove the "$Date: " -->
- <xsl:variable name="text.noprefix"
- select="substring-after($text, '$Date: ')"/>
-
- <!-- Grab the year -->
- <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
- <xsl:variable name="text.noyear"
- select="substring-after($text.noprefix, '-')"/>
-
- <!-- Grab the month -->
- <xsl:variable name="month" select="substring-before($text.noyear, '-')"/>
- <xsl:variable name="text.nomonth"
- select="substring-after($text.noyear, '-')"/>
-
- <!-- Grab the year -->
- <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
- <xsl:variable name="text.noday"
- select="substring-after($text.nomonth, ' ')"/>
-
- <!-- Get the time -->
- <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
- <xsl:variable name="text.notime"
- select="substring-after($text.noday, ' ')"/>
-
- <!-- Get the timezone -->
- <xsl:variable name="timezone" select="substring-before($text.notime, ' ')"/>
-
- <xsl:variable name="month.name">
- <xsl:choose>
- <xsl:when test="$month=1">January</xsl:when>
- <xsl:when test="$month=2">February</xsl:when>
- <xsl:when test="$month=3">March</xsl:when>
- <xsl:when test="$month=4">April</xsl:when>
- <xsl:when test="$month=5">May</xsl:when>
- <xsl:when test="$month=6">June</xsl:when>
- <xsl:when test="$month=7">July</xsl:when>
- <xsl:when test="$month=8">August</xsl:when>
- <xsl:when test="$month=9">September</xsl:when>
- <xsl:when test="$month=10">October</xsl:when>
- <xsl:when test="$month=11">November</xsl:when>
- <xsl:when test="$month=12">December</xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
- $time, ' ', $timezone)"/>
- </xsl:template>
-
<!-- We don't want refentry's to show up in the TOC because they
will merely be redundant with the synopsis. -->
<xsl:template match="refentry" mode="toc"/>
diff --git a/tools/boostbook/xsl/html-single.xsl b/tools/boostbook/xsl/html-single.xsl
index d453a84cc..6291f25ce 100644
--- a/tools/boostbook/xsl/html-single.xsl
+++ b/tools/boostbook/xsl/html-single.xsl
@@ -13,8 +13,20 @@
<!-- Import the HTML stylesheet -->
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
- <xsl:import href="admon.xsl"/>
- <xsl:import href="relative-href.xsl"/>
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/math.xsl"/>
+
+ <xsl:output method="html" encoding="US-ASCII" indent="no"/>
+
+ <!-- We have to make sure that our templates override all
+ docbook templates. Therefore, we include our own templates
+ instead of importing them. In order for this to work,
+ the stylesheets included here cannot also include each other -->
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
<xsl:param name="admon.style"/>
<xsl:param name="admon.graphics">1</xsl:param>
diff --git a/tools/boostbook/xsl/source-highlight.xsl b/tools/boostbook/xsl/source-highlight.xsl
index e38e4622d..7a34b8fbc 100644
--- a/tools/boostbook/xsl/source-highlight.xsl
+++ b/tools/boostbook/xsl/source-highlight.xsl
@@ -29,7 +29,7 @@
<xsl:variable name="digits" select="'1234567890'"/>
<xsl:variable name="number-chars" select="'1234567890abcdefABCDEFxX.'"/>
<xsl:variable name="keywords"
- select="' asm auto bool break case catch char class const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while '"/>
+ select="' alignas ailgnof asm auto bool break case catch char char16_t char32_t class const const_cast constexpr continue decltype default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new noexcept nullptr operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this thread_local throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while '"/>
<xsl:variable name="operators4" select="'%:%:'"/>
<xsl:variable name="operators3" select="'&gt;&gt;= &lt;&lt;= -&gt;* ...'"/>
<xsl:variable name="operators2" select="'.* :: ## &lt;: :&gt; &lt;% %&gt; %: += -= *= /= %= ^= &amp;= |= &lt;&lt; &gt;&gt; == != &lt;= &gt;= &amp;&amp; || ++ -- -&gt;'"/>
diff --git a/tools/boostdep/README.md b/tools/boostdep/README.md
new file mode 100644
index 000000000..ff87dfb85
--- /dev/null
+++ b/tools/boostdep/README.md
@@ -0,0 +1,4 @@
+boostdep
+========
+
+A tool to create Boost module dependency reports
diff --git a/tools/boostdep/examples/report.bat b/tools/boostdep/examples/report.bat
new file mode 100644
index 000000000..5690adde5
--- /dev/null
+++ b/tools/boostdep/examples/report.bat
@@ -0,0 +1,26 @@
+REM This is an example cmd.exe batch script
+REM that uses boostdep.exe to generate a
+REM complete Boost dependency report.
+REM It needs to be run from the Boost root.
+
+REM git pull
+REM git submodule update --init
+
+SET BOOSTDEP=bin.v2\tools\boostdep\src\msvc-8.0\release\link-static\threading-multi\boostdep.exe
+
+FOR /f %%i IN ('git rev-parse HEAD') DO @SET REV=%%i
+
+FOR /f %%i IN ('git rev-parse --short HEAD') DO @SET SHREV=%%i
+
+SET FOOTER=Generated on %DATE% %TIME% from revision %REV%
+
+SET OUTDIR=..\report-%SHREV%
+
+mkdir %OUTDIR%
+
+%BOOSTDEP% --list-modules > %OUTDIR%\list-modules.txt
+
+%BOOSTDEP% --footer "%FOOTER%" --html --module-overview > %OUTDIR%\module-overview.html
+%BOOSTDEP% --footer "%FOOTER%" --html --module-levels > %OUTDIR%\module-levels.html
+
+FOR /f %%i IN (%OUTDIR%\list-modules.txt) DO %BOOSTDEP% --title "Dependency Report for %%i" --footer "%FOOTER%" --html --primary %%i --secondary %%i --reverse %%i > %OUTDIR%\%%i.html
diff --git a/tools/boostdep/src/Jamfile.v2 b/tools/boostdep/src/Jamfile.v2
new file mode 100644
index 000000000..4cd3de3f4
--- /dev/null
+++ b/tools/boostdep/src/Jamfile.v2
@@ -0,0 +1,17 @@
+# Copyright 2014 Peter Dimov
+#
+# 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 boostdep ;
+
+exe boostdep :
+ # sources
+ boostdep.cpp
+ /boost//filesystem :
+ # requirements
+ :
+ # default build
+ <variant>release
+ ;
diff --git a/tools/boostdep/src/boostdep.cpp b/tools/boostdep/src/boostdep.cpp
new file mode 100644
index 000000000..6b77bc5ce
--- /dev/null
+++ b/tools/boostdep/src/boostdep.cpp
@@ -0,0 +1,1349 @@
+
+// boostdep - a tool to generate Boost dependency reports
+//
+// Copyright 2014 Peter Dimov
+//
+// 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/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <map>
+#include <set>
+#include <algorithm>
+#include <climits>
+
+namespace fs = boost::filesystem;
+
+// header -> module
+static std::map< std::string, std::string > s_header_map;
+
+static std::set< std::string > s_modules;
+
+static void scan_module_headers( fs::path const & path )
+{
+ try
+ {
+ std::string module = path.generic_string().substr( 5 ); // strip "libs/"
+
+ std::replace( module.begin(), module.end(), '/', '~' );
+
+ s_modules.insert( module );
+
+ fs::path dir = path / "include";
+ size_t n = dir.generic_string().size();
+
+ fs::recursive_directory_iterator it( dir ), last;
+
+ for( ; it != last; ++it )
+ {
+ fs::directory_entry const & e = *it;
+
+ std::string p2 = e.path().generic_string();
+ p2 = p2.substr( n+1 );
+
+ // std::cout << module << ": " << p2 << std::endl;
+
+ s_header_map[ p2 ] = module;
+ }
+ }
+ catch( fs::filesystem_error const & x )
+ {
+ std::cout << x.what() << std::endl;
+ }
+}
+
+static void scan_submodules( fs::path const & path )
+{
+ fs::directory_iterator it( path ), last;
+
+ for( ; it != last; ++it )
+ {
+ fs::directory_entry const & e = *it;
+
+ if( e.status().type() != fs::directory_file )
+ {
+ continue;
+ }
+
+ fs::path path = e.path();
+
+ if( fs::exists( path / "include" ) )
+ {
+ scan_module_headers( path );
+ }
+
+ if( fs::exists( path / "sublibs" ) )
+ {
+ scan_submodules( path );
+ }
+ }
+}
+
+static void build_header_map()
+{
+ scan_submodules( "libs" );
+}
+
+static void scan_header_dependencies( std::string const & header, std::istream & is, std::map< std::string, std::set< std::string > > & deps, std::map< std::string, std::set< std::string > > & from )
+{
+ std::string line;
+
+ while( std::getline( is, line ) )
+ {
+ while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) )
+ {
+ line.erase( 0, 1 );
+ }
+
+ if( line.empty() || line[0] != '#' ) continue;
+
+ line.erase( 0, 1 );
+
+ while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) )
+ {
+ line.erase( 0, 1 );
+ }
+
+ if( line.substr( 0, 7 ) != "include" ) continue;
+
+ line.erase( 0, 7 );
+
+ while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) )
+ {
+ line.erase( 0, 1 );
+ }
+
+ if( line.size() < 2 ) continue;
+
+ char ch = line[0];
+
+ if( ch != '<' && ch != '"' ) continue;
+
+ if( ch == '<' )
+ {
+ ch = '>';
+ }
+
+ line.erase( 0, 1 );
+
+ std::string::size_type k = line.find_first_of( ch );
+
+ if( k != std::string::npos )
+ {
+ line.erase( k );
+ }
+
+ std::map< std::string, std::string >::const_iterator i = s_header_map.find( line );
+
+ if( i != s_header_map.end() )
+ {
+ deps[ i->second ].insert( line );
+ from[ line ].insert( header );
+ }
+ else if( line.substr( 0, 6 ) == "boost/" )
+ {
+ deps[ "(unknown)" ].insert( line );
+ from[ line ].insert( header );
+ }
+ }
+}
+
+struct module_primary_actions
+{
+ virtual void heading( std::string const & module ) = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void header_start( std::string const & header ) = 0;
+ virtual void header_end( std::string const & header ) = 0;
+
+ virtual void from_header( std::string const & header ) = 0;
+};
+
+static fs::path module_include_path( std::string module )
+{
+ std::replace( module.begin(), module.end(), '~', '/' );
+ return fs::path( "libs" ) / module / "include";
+}
+
+static void scan_module_dependencies( std::string const & module, module_primary_actions & actions )
+{
+ // module -> [ header, header... ]
+ std::map< std::string, std::set< std::string > > deps;
+
+ // header -> included from [ header, header... ]
+ std::map< std::string, std::set< std::string > > from;
+
+ fs::path dir = module_include_path( module );
+ size_t n = dir.generic_string().size();
+
+ fs::recursive_directory_iterator it( dir ), last;
+
+ for( ; it != last; ++it )
+ {
+ std::string header = it->path().generic_string().substr( n+1 );
+
+ fs::ifstream is( it->path() );
+
+ scan_header_dependencies( header, is, deps, from );
+ }
+
+ actions.heading( module );
+
+ for( std::map< std::string, std::set< std::string > >::iterator i = deps.begin(); i != deps.end(); ++i )
+ {
+ if( i->first == module ) continue;
+
+ actions.module_start( i->first );
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ actions.header_start( *j );
+
+ std::set< std::string > const & f = from[ *j ];
+
+ for( std::set< std::string >::const_iterator k = f.begin(); k != f.end(); ++k )
+ {
+ actions.from_header( *k );
+ }
+
+ actions.header_end( *j );
+ }
+
+ actions.module_end( i->first );
+ }
+}
+
+// module depends on [ module, module... ]
+static std::map< std::string, std::set< std::string > > s_module_deps;
+
+// header is included by [header, header...]
+static std::map< std::string, std::set< std::string > > s_header_deps;
+
+// [ module, module... ] depend on module
+static std::map< std::string, std::set< std::string > > s_reverse_deps;
+
+struct build_mdmap_actions: public module_primary_actions
+{
+ std::string module_;
+ std::string header_;
+
+ void heading( std::string const & module )
+ {
+ module_ = module;
+ }
+
+ void module_start( std::string const & module )
+ {
+ s_module_deps[ module_ ].insert( module );
+ s_reverse_deps[ module ].insert( module_ );
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ }
+
+ void header_start( std::string const & header )
+ {
+ header_ = header;
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ }
+
+ void from_header( std::string const & header )
+ {
+ s_header_deps[ header_ ].insert( header );
+ }
+};
+
+static void build_module_dependency_map()
+{
+ for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i )
+ {
+ build_mdmap_actions actions;
+ scan_module_dependencies( *i, actions );
+ }
+}
+
+static void output_module_primary_report( std::string const & module, module_primary_actions & actions )
+{
+ try
+ {
+ scan_module_dependencies( module, actions );
+ }
+ catch( fs::filesystem_error const & x )
+ {
+ std::cout << x.what() << std::endl;
+ }
+}
+
+struct module_secondary_actions
+{
+ virtual void heading( std::string const & module ) = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void module_adds( std::string const & module ) = 0;
+};
+
+static void exclude( std::set< std::string > & x, std::set< std::string > const & y )
+{
+ for( std::set< std::string >::const_iterator i = y.begin(); i != y.end(); ++i )
+ {
+ x.erase( *i );
+ }
+}
+
+static void output_module_secondary_report( std::string const & module, module_secondary_actions & actions )
+{
+ actions.heading( module );
+
+ std::set< std::string > deps = s_module_deps[ module ];
+
+ deps.insert( module );
+
+ // build transitive closure
+
+ for( ;; )
+ {
+ std::set< std::string > deps2( deps );
+
+ for( std::set< std::string >::iterator i = deps.begin(); i != deps.end(); ++i )
+ {
+ std::set< std::string > deps3 = s_module_deps[ *i ];
+
+ exclude( deps3, deps );
+
+ if( deps3.empty() )
+ {
+ continue;
+ }
+
+ actions.module_start( *i );
+
+ for( std::set< std::string >::iterator j = deps3.begin(); j != deps3.end(); ++j )
+ {
+ actions.module_adds( *j );
+ }
+
+ actions.module_end( *i );
+
+ deps2.insert( deps3.begin(), deps3.end() );
+ }
+
+ if( deps == deps2 )
+ {
+ break;
+ }
+ else
+ {
+ deps = deps2;
+ }
+ }
+}
+
+struct header_inclusion_actions
+{
+ virtual void heading( std::string const & header, std::string const & module ) = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void header( std::string const & header ) = 0;
+};
+
+static void output_header_inclusion_report( std::string const & header, header_inclusion_actions & actions )
+{
+ std::string module = s_header_map[ header ];
+
+ actions.heading( header, module );
+
+ std::set< std::string > from = s_header_deps[ header ];
+
+ // classify 'from' dependencies by module
+
+ // module -> [header, header...]
+ std::map< std::string, std::set< std::string > > from2;
+
+ for( std::set< std::string >::iterator i = from.begin(); i != from.end(); ++i )
+ {
+ from2[ s_header_map[ *i ] ].insert( *i );
+ }
+
+ for( std::map< std::string, std::set< std::string > >::iterator i = from2.begin(); i != from2.end(); ++i )
+ {
+ actions.module_start( i->first );
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ actions.header( *j );
+ }
+
+ actions.module_end( i->first );
+ }
+}
+
+// output_module_primary_report
+
+struct module_primary_txt_actions: public module_primary_actions
+{
+ void heading( std::string const & module )
+ {
+ std::cout << "Primary dependencies for " << module << ":\n\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << module << ":\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <" << header << ">\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " from <" << header << ">\n";
+ }
+};
+
+struct module_primary_html_actions: public module_primary_actions
+{
+ void heading( std::string const & module )
+ {
+ std::cout << "\n\n<h1 id=\"primary-dependencies\">Primary dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id=\"" << module << "\"><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <h3><code>&lt;" << header << "&gt;</code></h3><ul>\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " <li>from <code>&lt;" << header << "&gt;</code></li>\n";
+ }
+};
+
+static void output_module_primary_report( std::string const & module, bool html )
+{
+ if( html )
+ {
+ module_primary_html_actions actions;
+ output_module_primary_report( module, actions );
+ }
+ else
+ {
+ module_primary_txt_actions actions;
+ output_module_primary_report( module, actions );
+ }
+}
+
+// output_module_secondary_report
+
+struct module_secondary_txt_actions: public module_secondary_actions
+{
+ void heading( std::string const & module )
+ {
+ std::cout << "Secondary dependencies for " << module << ":\n\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << module << ":\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void module_adds( std::string const & module )
+ {
+ std::cout << " adds " << module << "\n";
+ }
+};
+
+struct module_secondary_html_actions: public module_secondary_actions
+{
+ std::string m2_;
+
+ void heading( std::string const & module )
+ {
+ std::cout << "\n\n<h1 id=\"secondary-dependencies\">Secondary dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><ul>\n";
+ m2_ = module;
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void module_adds( std::string const & module )
+ {
+ std::cout << " <li><a href=\"" << m2_ << ".html#" << module << "\">adds <em>" << module << "</em></a></li>\n";
+ }
+};
+
+static void output_module_secondary_report( std::string const & module, bool html )
+{
+ if( html )
+ {
+ module_secondary_html_actions actions;
+ output_module_secondary_report( module, actions );
+ }
+ else
+ {
+ module_secondary_txt_actions actions;
+ output_module_secondary_report( module, actions );
+ }
+}
+
+// output_header_report
+
+struct header_inclusion_txt_actions: public header_inclusion_actions
+{
+ void heading( std::string const & header, std::string const & module )
+ {
+ std::cout << "Inclusion report for <" << header << "> (in module " << module << "):\n\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " from " << module << ":\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void header( std::string const & header )
+ {
+ std::cout << " <" << header << ">\n";
+ }
+};
+
+struct header_inclusion_html_actions: public header_inclusion_actions
+{
+ void heading( std::string const & header, std::string const & module )
+ {
+ std::cout << "<h1>Inclusion report for <code>&lt;" << header << "&gt;</code> (in module <em>" << module << "</em>)</h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2>From <a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><ul>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void header( std::string const & header )
+ {
+ std::cout << " <li><code>&lt;" << header << "&gt;</code></li>\n";
+ }
+};
+
+static void output_header_report( std::string const & header, bool html )
+{
+ if( html )
+ {
+ header_inclusion_html_actions actions;
+ output_header_inclusion_report( header, actions );
+ }
+ else
+ {
+ header_inclusion_txt_actions actions;
+ output_header_inclusion_report( header, actions );
+ }
+}
+
+// output_module_reverse_report
+
+struct module_reverse_actions
+{
+ virtual void heading( std::string const & module ) = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void header_start( std::string const & header ) = 0;
+ virtual void header_end( std::string const & header ) = 0;
+
+ virtual void from_header( std::string const & header ) = 0;
+};
+
+static void output_module_reverse_report( std::string const & module, module_reverse_actions & actions )
+{
+ actions.heading( module );
+
+ std::set< std::string > const from = s_reverse_deps[ module ];
+
+ for( std::set< std::string >::const_iterator i = from.begin(); i != from.end(); ++i )
+ {
+ actions.module_start( *i );
+
+ for( std::map< std::string, std::set< std::string > >::iterator j = s_header_deps.begin(); j != s_header_deps.end(); ++j )
+ {
+ if( s_header_map[ j->first ] == module )
+ {
+ bool header_started = false;
+
+ for( std::set< std::string >::iterator k = j->second.begin(); k != j->second.end(); ++k )
+ {
+ if( s_header_map[ *k ] == *i )
+ {
+ if( !header_started )
+ {
+ actions.header_start( j->first );
+
+ header_started = true;
+ }
+
+ actions.from_header( *k );
+ }
+ }
+
+ if( header_started )
+ {
+ actions.header_end( j->first );
+ }
+ }
+ }
+
+ actions.module_end( *i );
+ }
+}
+
+struct module_reverse_txt_actions: public module_reverse_actions
+{
+ void heading( std::string const & module )
+ {
+ std::cout << "Reverse dependencies for " << module << ":\n\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << module << ":\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <" << header << ">\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " from <" << header << ">\n";
+ }
+};
+
+struct module_reverse_html_actions: public module_reverse_actions
+{
+ void heading( std::string const & module )
+ {
+ std::cout << "\n\n<h1 id=\"reverse-dependencies\">Reverse dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id=\"reverse-" << module << "\"><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <h3><code>&lt;" << header << "&gt;</code></h3><ul>\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " <li>from <code>&lt;" << header << "&gt;</code></li>\n";
+ }
+};
+
+static void output_module_reverse_report( std::string const & module, bool html )
+{
+ if( html )
+ {
+ module_reverse_html_actions actions;
+ output_module_reverse_report( module, actions );
+ }
+ else
+ {
+ module_reverse_txt_actions actions;
+ output_module_reverse_report( module, actions );
+ }
+}
+
+// module_level_report
+
+int const unknown_level = INT_MAX / 2;
+
+struct module_level_actions
+{
+ virtual void heading() = 0;
+
+ virtual void level_start( int level ) = 0;
+ virtual void level_end( int level ) = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void module2( std::string const & module, int level ) = 0;
+};
+
+static void output_module_level_report( module_level_actions & actions )
+{
+ // build module level map
+
+ std::map< std::string, int > level_map;
+
+ for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i )
+ {
+ if( s_module_deps[ *i ].empty() )
+ {
+ level_map[ *i ] = 0;
+ // std::cerr << *i << ": " << 0 << std::endl;
+ }
+ else
+ {
+ level_map[ *i ] = unknown_level;
+ }
+ }
+
+ // build transitive closure to see through cycles
+
+ std::map< std::string, std::set< std::string > > deps2 = s_module_deps;
+
+ {
+ bool done;
+
+ do
+ {
+ done = true;
+
+ for( std::map< std::string, std::set< std::string > >::iterator i = deps2.begin(); i != deps2.end(); ++i )
+ {
+ std::set< std::string > tmp = i->second;
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ std::set< std::string > tmp2 = deps2[ *j ];
+ tmp.insert( tmp2.begin(), tmp2.end() );
+ }
+
+ if( tmp.size() != i->second.size() )
+ {
+ i->second = tmp;
+ done = false;
+ }
+ }
+ }
+ while( !done );
+ }
+
+ // compute acyclic levels
+
+ for( int k = 1, n = s_modules.size(); k < n; ++k )
+ {
+ for( std::map< std::string, std::set< std::string > >::iterator i = s_module_deps.begin(); i != s_module_deps.end(); ++i )
+ {
+ // i->first depends on i->second
+
+ if( level_map[ i->first ] >= unknown_level )
+ {
+ int level = 0;
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ level = std::max( level, level_map[ *j ] + 1 );
+ }
+
+ if( level == k )
+ {
+ level_map[ i->first ] = level;
+ // std::cerr << i->first << ": " << level << std::endl;
+ }
+ }
+ }
+ }
+
+ // min_level_map[ M ] == L means the level is unknown, but at least L
+ std::map< std::string, int > min_level_map;
+
+ // initialize min_level_map for acyclic dependencies
+
+ for( std::map< std::string, int >::iterator i = level_map.begin(); i != level_map.end(); ++i )
+ {
+ if( i->second < unknown_level )
+ {
+ min_level_map[ i->first ] = i->second;
+ }
+ }
+
+ // compute levels for cyclic modules
+
+ for( int k = 1, n = s_modules.size(); k < n; ++k )
+ {
+ for( std::map< std::string, std::set< std::string > >::iterator i = s_module_deps.begin(); i != s_module_deps.end(); ++i )
+ {
+ if( level_map[ i->first ] >= unknown_level )
+ {
+ int level = 0;
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ int jl = level_map[ *j ];
+
+ if( jl < unknown_level )
+ {
+ level = std::max( level, jl + 1 );
+ }
+ else
+ {
+ int ml = min_level_map[ *j ];
+
+ if( deps2[ *j ].count( i->first ) == 0 )
+ {
+ // *j does not depend on i->first, so
+ // the level of i->first is at least
+ // 1 + the minimum level of *j
+
+ ++ml;
+ }
+
+ level = std::max( level, ml );
+ }
+ }
+
+ min_level_map[ i->first ] = level;
+ }
+ }
+ }
+
+ // reverse level map
+
+ std::map< int, std::set< std::string > > reverse_level_map;
+
+ for( std::map< std::string, int >::iterator i = level_map.begin(); i != level_map.end(); ++i )
+ {
+ int level = i->second;
+
+ if( level >= unknown_level )
+ {
+ int min_level = min_level_map[ i->first ];
+
+ if( min_level != 0 )
+ {
+ level = min_level;
+ }
+ }
+
+ reverse_level_map[ level ].insert( i->first );
+ }
+
+ // output report
+
+ actions.heading();
+
+ for( std::map< int, std::set< std::string > >::iterator i = reverse_level_map.begin(); i != reverse_level_map.end(); ++i )
+ {
+ actions.level_start( i->first );
+
+ for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j )
+ {
+ actions.module_start( *j );
+
+ std::set< std::string > mdeps = s_module_deps[ *j ];
+
+ for( std::set< std::string >::iterator k = mdeps.begin(); k != mdeps.end(); ++k )
+ {
+ int level = level_map[ *k ];
+
+ if( level >= unknown_level )
+ {
+ int min_level = min_level_map[ *k ];
+
+ if( min_level != 0 )
+ {
+ level = min_level;
+ }
+ }
+
+ actions.module2( *k, level );
+ }
+
+ actions.module_end( *j );
+ }
+
+ actions.level_end( i->first );
+ }
+}
+
+struct module_level_txt_actions: public module_level_actions
+{
+ int level_;
+
+ void heading()
+ {
+ std::cout << "Module Levels:\n\n";
+ }
+
+ void level_start( int level )
+ {
+ if( level >= unknown_level )
+ {
+ std::cout << "Level (undetermined):\n";
+ }
+ else
+ {
+ std::cout << "Level " << level << ":\n";
+ }
+
+ level_ = level;
+ }
+
+ void level_end( int /*level*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " " << module;
+
+ if( level_ > 0 )
+ {
+ std::cout << " ->";
+ }
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void module2( std::string const & module, int level )
+ {
+ std::cout << " " << module << "(";
+
+ if( level >= unknown_level )
+ {
+ std::cout << "-";
+ }
+ else
+ {
+ std::cout << level;
+ }
+
+ std::cout << ")";
+ }
+};
+
+struct module_level_html_actions: public module_level_actions
+{
+ int level_;
+
+ void heading()
+ {
+ std::cout << "<h1>Module Levels</h1>\n";
+ }
+
+ void level_start( int level )
+ {
+ std::cout << " <h2>Level ";
+
+ if( level >= unknown_level )
+ {
+ std::cout << "<em>undetermined</em>";
+ }
+ else
+ {
+ std::cout << level;
+ }
+
+ std::cout << "</h2><ul>\n";
+
+ level_ = level;
+ }
+
+ void level_end( int /*level*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <li><a href =\"" << module << ".html\">" << module << "</a><small>";
+
+ if( level_ > 0 )
+ {
+ std::cout << "<br />&#8674;";
+ }
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "</small></li>\n";
+ }
+
+ void module2( std::string const & module, int level )
+ {
+ std::cout << " " << module;
+
+ if( level < unknown_level )
+ {
+ std::cout << "<sup>" << level << "</sup>";
+ }
+ }
+};
+
+static void output_module_level_report( bool html )
+{
+ if( html )
+ {
+ module_level_html_actions actions;
+ output_module_level_report( actions );
+ }
+ else
+ {
+ module_level_txt_actions actions;
+ output_module_level_report( actions );
+ }
+}
+
+// module_overview_report
+
+struct module_overview_actions
+{
+ virtual void heading() = 0;
+
+ virtual void module_start( std::string const & module ) = 0;
+ virtual void module_end( std::string const & module ) = 0;
+
+ virtual void module2( std::string const & module ) = 0;
+};
+
+static void output_module_overview_report( module_overview_actions & actions )
+{
+ actions.heading();
+
+ for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i )
+ {
+ actions.module_start( *i );
+
+ std::set< std::string > const mdeps = s_module_deps[ *i ];
+
+ for( std::set< std::string >::const_iterator j = mdeps.begin(); j != mdeps.end(); ++j )
+ {
+ actions.module2( *j );
+ }
+
+ actions.module_end( *i );
+ }
+}
+
+struct module_overview_txt_actions: public module_overview_actions
+{
+ bool deps_;
+
+ void heading()
+ {
+ std::cout << "Module Overview:\n\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << module;
+ deps_ = false;
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void module2( std::string const & module )
+ {
+ if( !deps_ )
+ {
+ std::cout << " ->";
+ deps_ = true;
+ }
+
+ std::cout << " " << module;
+ }
+};
+
+struct module_overview_html_actions: public module_overview_actions
+{
+ bool deps_;
+
+ void heading()
+ {
+ std::cout << "<h1>Module Overview</h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2><a href =\"" << module << ".html\"><em>" << module << "</em></a></h2><p><small>";
+ deps_ = false;
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "</small></p>\n";
+ }
+
+ void module2( std::string const & module )
+ {
+ if( !deps_ )
+ {
+ std::cout << "&#8674;";
+ deps_ = true;
+ }
+
+ std::cout << " " << module;
+ }
+};
+
+static void output_module_overview_report( bool html )
+{
+ if( html )
+ {
+ module_overview_html_actions actions;
+ output_module_overview_report( actions );
+ }
+ else
+ {
+ module_overview_txt_actions actions;
+ output_module_overview_report( actions );
+ }
+}
+
+//
+
+static void output_html_header( std::string const & title )
+{
+ std::cout << "<html>\n";
+ std::cout << "<head>\n";
+ std::cout << "<title>" << title << "</title>\n";
+ std::cout << "</head>\n";
+ std::cout << "<body>\n";
+}
+
+static void output_html_footer( std::string const & footer )
+{
+ std::cout << "<hr />\n";
+ std::cout << "<p><small>" << footer << "</small></p>\n";
+ std::cout << "</body>\n";
+ std::cout << "</html>\n";
+}
+
+static void enable_secondary( bool & secondary )
+{
+ if( !secondary )
+ {
+ try
+ {
+ build_module_dependency_map();
+ }
+ catch( fs::filesystem_error const & x )
+ {
+ std::cout << x.what() << std::endl;
+ }
+
+ secondary = true;
+ }
+}
+
+int main( int argc, char const* argv[] )
+{
+ if( argc < 2 )
+ {
+ std::cerr << "Usage:\n\n";
+ std::cerr << " boostdep --list-modules\n";
+ std::cerr << "\n";
+ std::cerr << " boostdep [options] --module-overview\n";
+ std::cerr << " boostdep [options] --module-levels\n";
+ std::cerr << "\n";
+ std::cerr << " boostdep [options] [--primary] <module>\n";
+ std::cerr << " boostdep [options] --secondary <module>\n";
+ std::cerr << " boostdep [options] --reverse <module>\n";
+ std::cerr << " boostdep [options] [--header] <header>\n";
+ std::cerr << "\n";
+ std::cerr << " where [options] can be [--title <title>] [--footer <footer>] [--html]\n";
+
+ return -1;
+ }
+
+ try
+ {
+ build_header_map();
+ }
+ catch( fs::filesystem_error const & x )
+ {
+ std::cout << x.what() << std::endl;
+ }
+
+ bool html = false;
+ bool secondary = false;
+
+ std::string title = "Boost Dependency Report";
+ std::string footer;
+
+ for( int i = 1; i < argc; ++i )
+ {
+ std::string option = argv[ i ];
+
+ if( option == "--list-modules" )
+ {
+ for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i )
+ {
+ std::cout << *i << "\n";
+ }
+ }
+ else if( option == "--title" )
+ {
+ if( i + 1 < argc )
+ {
+ title = argv[ ++i ];
+ }
+ }
+ else if( option == "--footer" )
+ {
+ if( i + 1 < argc )
+ {
+ footer = argv[ ++i ];
+ }
+ }
+ else if( option == "--html" )
+ {
+ if( !html )
+ {
+ html = true;
+ output_html_header( title );
+ }
+ }
+ else if( option == "--primary" )
+ {
+ if( i + 1 < argc )
+ {
+ output_module_primary_report( argv[ ++i ], html );
+ }
+ }
+ else if( option == "--secondary" )
+ {
+ if( i + 1 < argc )
+ {
+ enable_secondary( secondary );
+ output_module_secondary_report( argv[ ++i ], html );
+ }
+ }
+ else if( option == "--reverse" )
+ {
+ if( i + 1 < argc )
+ {
+ enable_secondary( secondary );
+ output_module_reverse_report( argv[ ++i ], html );
+ }
+ }
+ else if( option == "--header" )
+ {
+ if( i + 1 < argc )
+ {
+ enable_secondary( secondary );
+ output_header_report( option, html );
+ }
+ }
+ else if( option == "--module-levels" )
+ {
+ enable_secondary( secondary );
+ output_module_level_report( html );
+ }
+ else if( option == "--module-overview" )
+ {
+ enable_secondary( secondary );
+ output_module_overview_report( html );
+ }
+ else if( s_modules.count( option ) )
+ {
+ output_module_primary_report( option, html );
+ }
+ else if( s_header_map.count( option ) )
+ {
+ enable_secondary( secondary );
+ output_header_report( option, html );
+ }
+ else
+ {
+ std::cerr << "'" << option << "': not an option, module or header.\n";
+ }
+ }
+
+ if( html )
+ {
+ output_html_footer( footer );
+ }
+}
diff --git a/tools/build/v2/Jamroot.jam b/tools/build/Jamroot.jam
index 73d86ab15..54e9cc839 100644
--- a/tools/build/v2/Jamroot.jam
+++ b/tools/build/Jamroot.jam
@@ -34,14 +34,14 @@ package.install-data boost-build-core
boost-build
: # What to install
$(SELF)/boost-build.jam
- $(SELF)/build-system.jam
- [ path.glob-tree $(SELF)/build : *.jam *.py ]
- [ path.glob-tree $(SELF)/kernel : *.jam *.py ]
- [ path.glob-tree $(SELF)/util : *.jam *.py ]
- [ path.glob-tree $(SELF)/tools : *.jam *.py *.xml *.xsl *.doxyfile *.hpp ]
+ $(SELF)/src/build-system.jam
+ [ path.glob-tree $(SELF)/src/build : *.jam *.py ]
+ [ path.glob-tree $(SELF)/src/kernel : *.jam *.py ]
+ [ path.glob-tree $(SELF)/src/util : *.jam *.py ]
+ [ path.glob-tree $(SELF)/src/tools : *.jam *.py *.xml *.xsl *.doxyfile *.hpp ]
$(e2)
: # What is the root of the directory
<install-source-root>.
;
-alias install : boost-build-engine boost-build-core ; \ No newline at end of file
+alias install : boost-build-engine boost-build-core ;
diff --git a/tools/build/v2/boost-build.jam b/tools/build/boost-build.jam
index 73db0497b..a1240fdf7 100644
--- a/tools/build/v2/boost-build.jam
+++ b/tools/build/boost-build.jam
@@ -5,4 +5,4 @@
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-boost-build kernel ;
+boost-build src/kernel ;
diff --git a/tools/build/boost.css b/tools/build/boost.css
deleted file mode 100644
index d0a30762d..000000000
--- a/tools/build/boost.css
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2002 David Abrahams.
-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)
- */
-H1
-{
- FONT-SIZE: 200%
- COLOR: #00007f
-}
-H2
-{
- FONT-SIZE: 150%;
-}
-H3
-{
- FONT-SIZE: 125%;
-}
-H4
-{
- FONT-SIZE: 108%;
-}
-BODY
-{
- FONT-SIZE: 100%;
- BACKGROUND-COLOR: #ffffff
-}
-PRE
-{
- MARGIN-LEFT: 2pc;
- FONT-SIZE: 80%;
- BACKGROUND-COLOR: #dfffff
-}
-CODE
-{
- FONT-SIZE: 95%;
- white-space: pre
-}
-.index
-{
- TEXT-ALIGN: left
-}
-.page-index
-{
- TEXT-ALIGN: left
-}
-.definition
-{
- TEXT-ALIGN: left
-}
-.footnote
-{
- FONT-SIZE: 66%;
- VERTICAL-ALIGN: super;
- TEXT-DECORATION: none
-}
-.function-semantics
-{
- CLEAR: left
-}
-.metafunction-semantics
-{
- CLEAR: left
-}
diff --git a/tools/build/v2/bootstrap.bat b/tools/build/bootstrap.bat
index 58f761398..1229499cc 100644
--- a/tools/build/v2/bootstrap.bat
+++ b/tools/build/bootstrap.bat
@@ -6,22 +6,22 @@ REM Distributed under the Boost Software License, Version 1.0.
REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
ECHO Bootstrapping the build engine
-if exist ".\engine\bin.ntx86\bjam.exe" del engine\bin.ntx86\bjam.exe
-if exist ".\engine\bin.ntx86_64\bjam.exe" del engine\bin.ntx86_64\bjam.exe
-cd engine
+if exist ".\src\engine\bin.ntx86\bjam.exe" del src\engine\bin.ntx86\bjam.exe
+if exist ".\src\engine\bin.ntx86_64\bjam.exe" del src\engine\bin.ntx86_64\bjam.exe
-call .\build.bat %* > ..\bootstrap.log
+pushd src\engine
+call .\build.bat %* > ..\..\bootstrap.log
@ECHO OFF
-cd ..
+popd
-if exist ".\engine\bin.ntx86\b2.exe" (
- copy .\engine\bin.ntx86\b2.exe . > nul
- copy .\engine\bin.ntx86\bjam.exe . > nul
+if exist ".\src\engine\bin.ntx86\b2.exe" (
+ copy .\src\engine\bin.ntx86\b2.exe . > nul
+ copy .\src\engine\bin.ntx86\bjam.exe . > nul
goto :bjam_built)
-if exist ".\engine\bin.ntx86_64\b2.exe" (
- copy .\engine\bin.ntx86_64\b2.exe . > nul
- copy .\engine\bin.ntx86_64\bjam.exe . > nul
+if exist ".\src\engine\bin.ntx86_64\b2.exe" (
+ copy .\src\engine\bin.ntx86_64\b2.exe . > nul
+ copy .\src\engine\bin.ntx86_64\bjam.exe . > nul
goto :bjam_built)
goto :bjam_failure
diff --git a/tools/build/v2/bootstrap.sh b/tools/build/bootstrap.sh
index a5107577b..8523c3db3 100755
--- a/tools/build/v2/bootstrap.sh
+++ b/tools/build/bootstrap.sh
@@ -55,7 +55,7 @@ my_dir="."
# Determine the toolset, if not already decided
if test "x$TOOLSET" = x; then
- guessed_toolset=`$my_dir/engine/build.sh --guess-toolset`
+ guessed_toolset=`$my_dir/src/engine/build.sh --guess-toolset`
case $guessed_toolset in
acc | darwin | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
TOOLSET=$guessed_toolset
@@ -96,7 +96,7 @@ rm -f config.log
if test "x$B2" = x; then
echo -n "Bootstrapping the build engine with toolset $TOOLSET... "
pwd=`pwd`
- (cd "$my_dir/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
+ (cd "$my_dir/src/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
if [ $? -ne 0 ]; then
echo
echo "Failed to bootstrap the build engine"
@@ -104,11 +104,11 @@ if test "x$B2" = x; then
exit 1
fi
cd "$pwd"
- arch=`cd $my_dir/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
- B2="$my_dir/engine/$arch/b2"
+ arch=`cd $my_dir/src/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
+ B2="$my_dir/src/engine/$arch/b2"
echo "engine/$arch/b2"
cp "$B2" .
- cp "$my_dir/engine/$arch/bjam" .
+ cp "$my_dir/src/engine/$arch/bjam" .
fi
cat << EOF
diff --git a/tools/build/v2/debian/boost-build.docs b/tools/build/debian/boost-build.docs
index 70af14954..70af14954 100644
--- a/tools/build/v2/debian/boost-build.docs
+++ b/tools/build/debian/boost-build.docs
diff --git a/tools/build/v2/debian/boost-build.examples b/tools/build/debian/boost-build.examples
index e5a7b8d3b..e5a7b8d3b 100644
--- a/tools/build/v2/debian/boost-build.examples
+++ b/tools/build/debian/boost-build.examples
diff --git a/tools/build/v2/debian/changelog b/tools/build/debian/changelog
index bfc1f139c..bfc1f139c 100644
--- a/tools/build/v2/debian/changelog
+++ b/tools/build/debian/changelog
diff --git a/tools/build/v2/debian/conffiles b/tools/build/debian/conffiles
index 291d688ed..291d688ed 100644
--- a/tools/build/v2/debian/conffiles
+++ b/tools/build/debian/conffiles
diff --git a/tools/build/v2/debian/control b/tools/build/debian/control
index 7d1733e78..7d1733e78 100644
--- a/tools/build/v2/debian/control
+++ b/tools/build/debian/control
diff --git a/tools/build/v2/debian/copyright b/tools/build/debian/copyright
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/debian/copyright
+++ b/tools/build/debian/copyright
diff --git a/tools/build/v2/debian/excludes b/tools/build/debian/excludes
index 59882930d..59882930d 100644
--- a/tools/build/v2/debian/excludes
+++ b/tools/build/debian/excludes
diff --git a/tools/build/v2/debian/rules b/tools/build/debian/rules
index 96ccc418b..96ccc418b 100755
--- a/tools/build/v2/debian/rules
+++ b/tools/build/debian/rules
diff --git a/tools/build/v2/doc/bjam.qbk b/tools/build/doc/bjam.qbk
index a57a44021..a57a44021 100644
--- a/tools/build/v2/doc/bjam.qbk
+++ b/tools/build/doc/bjam.qbk
diff --git a/tools/build/v2/doc/development_plan.html b/tools/build/doc/development_plan.html
index 598c23dae..598c23dae 100644
--- a/tools/build/v2/doc/development_plan.html
+++ b/tools/build/doc/development_plan.html
diff --git a/tools/build/v2/doc/history.qbk b/tools/build/doc/history.qbk
index f5a89b0c1..f5a89b0c1 100644
--- a/tools/build/v2/doc/history.qbk
+++ b/tools/build/doc/history.qbk
diff --git a/tools/build/v2/doc/jamfile.jam b/tools/build/doc/jamfile.jam
index ac0627459..91dcce9b1 100644
--- a/tools/build/v2/doc/jamfile.jam
+++ b/tools/build/doc/jamfile.jam
@@ -14,7 +14,7 @@ boostbook userman : src/standalone.xml
<xsl:param>nav.layout=none
<implicit-dependency>jam_docs
<dependency>jam_docs
- <xsl:param>boost.root=../../../../..
+ <xsl:param>boost.root=../../../..
<xsl:param>boost.defaults=Boost
;
diff --git a/tools/build/v2/doc/src/abstract-target.xml b/tools/build/doc/src/abstract-target.xml
index dad53380c..dad53380c 100644
--- a/tools/build/v2/doc/src/abstract-target.xml
+++ b/tools/build/doc/src/abstract-target.xml
diff --git a/tools/build/v2/doc/src/architecture.xml b/tools/build/doc/src/architecture.xml
index c03575bdc..0b22defef 100644
--- a/tools/build/v2/doc/src/architecture.xml
+++ b/tools/build/doc/src/architecture.xml
@@ -14,6 +14,9 @@
<section id="bbv2.arch.overview">
<title>Overview</title>
+ <!-- FIXME: the below does not mention engine at all, making rest of the
+ text confusing. Things like 'kernel' and 'util' don't have to be
+ mentioned at all. -->
<para>
Boost.Build implementation is structured in four different components:
"kernel", "util", "build" and "tools". The first two are relatively
@@ -58,6 +61,7 @@
from them.
</para></listitem>
</itemizedlist>
+
</para>
<para>
@@ -78,13 +82,14 @@
<listitem><para>
A generator appropriate for the build properties is selected and its
<code>run</code> method is called. The method returns a list of virtual
- targets
+ targets.
</para></listitem>
<listitem><para>
- The targets are returned to the top level code. They are converted
- into bjam targets (via <code>virtual-target.actualize</code>) and passed
- to bjam for building.
+ The virtual targets are returned to the top level code, and for each instance,
+ the <literal>actualize</literal> method is called to setup nodes and updating
+ actions in the depenendency graph kepts inside Boost.Build engine. This dependency
+ graph is then updated, which runs necessary commands.
</para></listitem>
</orderedlist>
</para>
@@ -163,11 +168,11 @@ lib a : a.cpp : &lt;toolset&gt;gcc ;
<title>Virtual targets</title>
<para>
- Virtual targets correspond to atomic updatable entities. Each virtual
+ Virtual targets are atomic updatable entities. Each virtual
target can be assigned an updating action -- instance of the
<code>action</code> class. The action class, in turn, contains a list of
- source targets, properties, and a name of an bjam action which should be
- executed.
+ source targets, properties, and a name of an action which
+ should be executed.
</para>
<para>
@@ -178,12 +183,13 @@ lib a : a.cpp : &lt;toolset&gt;gcc ;
already been created. In that case, the preexisting target is returned.
</para>
+ <!-- FIXME: the below 2 para are rubbish, must be totally rewritten. -->
<para>
When all virtual targets are produced, they are "actualized". This means
that the real file names are computed, and the commands that should be run
are generated. This is done by the <code>virtual-target.actualize</code>
and <code>action.actualize</code> methods. The first is conceptually
- simple, while the second needs additional explanation. Commands in bjam
+ simple, while the second needs additional explanation. Commands in Boost.Build
are generated in a two-stage process. First, a rule with an appropriate
name (for example "gcc.compile") is called and is given a list of target
names. The rule sets some variables, like "OPTIONS". After that, the
@@ -308,20 +314,14 @@ lib a : a.cpp : &lt;toolset&gt;gcc ;
<para>
As stated above, it is possible to compile a C++ file multiple times,
using different include paths. Therefore, include dependencies for those
- compilations can be different. The problem is that bjam does not allow
- multiple scans of the same target.
- </para>
-
- <para>
- The solution in Boost.Build is straightforward. When a virtual target is
- converted to a bjam target (via the
- <literal>virtual-target.actualize</literal> method), we specify the
- scanner object to be used. The actualize method will create different bjam
- targets for different scanners.
+ compilations can be different. The problem is that Boost.Build engine does
+ not allow multiple scans of the same target. To solve that, we pass the
+ scanner object when calling <literal>virtual-target.actualize</literal>
+ and it creates different engine targets for different scanners.
</para>
<para>
- For each Boost Jam target created with a scanner is created, a
+ For each engine target created with a specified scanner, a
corresponding one is created without it. The updating action is
associated with the scanner-less target, and the target with the scanner
is made to depend on it. That way if sources for that action are touched,
@@ -355,7 +355,7 @@ a.cpp (installed copy) &lt;--(copy) ----------------------- a.cpp (no scanner
<listitem><simpara>
If when compiling "a.cpp" there is an include of "a.h", the "dir"
directory is on the include path, and a target called "a.h" will be
- generated in "dir", then bjam should discover the include, and create
+ generated in "dir", then Boost.Build should discover the include, and create
"a.h" before compiling "a.cpp".
</simpara></listitem>
diff --git a/tools/build/v2/doc/src/basic-target.xml b/tools/build/doc/src/basic-target.xml
index ae7c2795c..ae7c2795c 100644
--- a/tools/build/v2/doc/src/basic-target.xml
+++ b/tools/build/doc/src/basic-target.xml
diff --git a/tools/build/v2/doc/src/extending.xml b/tools/build/doc/src/extending.xml
index f5665b45a..8b7811dc7 100644
--- a/tools/build/v2/doc/src/extending.xml
+++ b/tools/build/doc/src/extending.xml
@@ -181,7 +181,7 @@ local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ;
once with the same properties. Returning to different instance of <classname>file-target</classname>
that correspond to the same file clearly will result in problems. Therefore, whenever
returning targets you should pass them via the <code>virtual-target.register</code>
- function, besides allowing Boost Build to track which virtual targets
+ function, besides allowing Boost.Build to track which virtual targets
got created for each metatarget, this will also replace targets with previously created identical
ones, as necessary.<footnote><para>This create-then-register pattern is caused by limitations
of the Boost.Jam language. Python port is likely to never create duplicate targets.</para></footnote>
@@ -613,7 +613,7 @@ actions inline-file
and the target type. When invoked, the generator will create a target
of type <literal>CPP</literal> with a source target of
type <literal>VERBATIM</literal> as the only source. But what command
- will be used to actually generate the file? In bjam, actions are
+ will be used to actually generate the file? In Boost.Build, actions are
specified using named "actions" blocks and the name of the action
block should be specified when creating targets. By convention,
generators use the same name of the action block as their own id. So,
@@ -888,7 +888,7 @@ actions inline-file
<listitem><para>if a feature is used to refer to a path relative
to the Jamfile, it must be a “path†feature. Such features will
- also get their values automatically converted to Boost Build's
+ also get their values automatically converted to Boost.Build's
internal path representation. For example, <code>include</code>
is a path feature.</para></listitem>
@@ -970,7 +970,7 @@ actions link bind DEF_FILE
<para> Note the <code>bind DEF_FILE</code> part. It tells
- bjam to translate the internal target name in
+ Boost.Build to translate the internal target name in
<varname>DEF_FILE</varname> to a corresponding filename in
the <code>link</code> action. Without it the expansion of
<code>$(DEF_FILE)</code> would be a strange symbol that is
@@ -981,8 +981,7 @@ actions link bind DEF_FILE
targets in general, only source files." I'm not sure
what I meant by that; maybe you can figure it out. -->
<para>
- We are almost done, but we should stop for a small workaround. Add the following
- code to msvc.jam
+ We are almost done, except for adding the follwing code to <filename>msvc.jam</filename>:
<programlisting>
rule link
@@ -992,8 +991,8 @@ rule link
</programlisting>
<!-- You *must* explain the part in [...] above. It's completely opaque to the casual reader -->
- This is needed to accomodate some bug in bjam, which hopefully
- will be fixed one day.
+ This is a workaround for a bug in Boost.Build engine, which will hopefully
+ be fixed one day.
<!-- This is *NOT* a bug!! Anyway, BBv2 shouild handle this automatically. Why doesn't it? -->
</para></listitem>
diff --git a/tools/build/v2/doc/src/faq.xml b/tools/build/doc/src/faq.xml
index a648a3761..9a7f9c458 100644
--- a/tools/build/v2/doc/src/faq.xml
+++ b/tools/build/doc/src/faq.xml
@@ -446,6 +446,37 @@ alias mylib ;
</programlisting>
</para>
</section>
+
+ <section id="bbv2.faq.names">
+ <title>
+ What is the difference between Boost.Build,
+ <filename>b2</filename>, <filename>bjam</filename> and Perforce Jam?
+ </title>
+
+ <para>
+ Boost.Build is the name of the complete build system. The executable that runs
+ it is <filename>b2</filename>. That executable is written in C and implements
+ performance-critical algorithms, like traversal of dependency graph and executing
+ commands. It also implements an interpreted language used to implement the rest of
+ Boost.Build. This executable is formally called "Boost.Build engine".
+ </para>
+
+ <para>
+ The Boost.Build engine is derived from an earlier build tool called Perforce Jam. Originally,
+ there were just minor changes, and the filename was <filename>bjam</filename>. Later on,
+ with more and more changes, the similarity of names because a disservice to users, and as of
+ Boost 1.47.0, the official name of the executable was changed to <filename>b2</filename>.
+ A copy named <filename>bjam</filename> is still created for compatibility,
+ but you are encouraged to use the new name in all cases.
+ </para>
+
+ <para>
+ Perforce Jam was an important foundation, and we gratefully acknowledge its influence,
+ but for users today, these tools share only some basics of the interpreted language.
+ </para>
+
+ </section>
+
</chapter>
<!--
diff --git a/tools/build/v2/doc/src/fragments.xml b/tools/build/doc/src/fragments.xml
index 78438a0c1..78438a0c1 100644
--- a/tools/build/v2/doc/src/fragments.xml
+++ b/tools/build/doc/src/fragments.xml
diff --git a/tools/build/v2/doc/src/howto.xml b/tools/build/doc/src/howto.xml
index de17a286a..de17a286a 100644
--- a/tools/build/v2/doc/src/howto.xml
+++ b/tools/build/doc/src/howto.xml
diff --git a/tools/build/v2/doc/src/install.xml b/tools/build/doc/src/install.xml
index 545f78669..40c8b5ccb 100644
--- a/tools/build/v2/doc/src/install.xml
+++ b/tools/build/doc/src/install.xml
@@ -103,7 +103,7 @@
</para>
<para>Placing Boost.Build into <filename>/usr/share/boost-build</filename>
- will make sure that <command>bjam</command> will find Boost.Build
+ will make sure that <command>b2</command> will find Boost.Build
without any additional setup.</para>
</listitem>
@@ -120,7 +120,7 @@ using gcc ;
</para>
<para>If those guidelines are met, users will be able to invoke
- <command>bjam</command> without any explicit configuration.
+ <command>b2/command> without any explicit configuration.
</para>
diff --git a/tools/build/v2/doc/src/main-target.xml b/tools/build/doc/src/main-target.xml
index 84afac14f..84afac14f 100644
--- a/tools/build/v2/doc/src/main-target.xml
+++ b/tools/build/doc/src/main-target.xml
diff --git a/tools/build/v2/doc/src/overview.xml b/tools/build/doc/src/overview.xml
index d0b3c193f..9fc30adb1 100644
--- a/tools/build/v2/doc/src/overview.xml
+++ b/tools/build/doc/src/overview.xml
@@ -14,9 +14,9 @@
</para>
<para>
- Boost.Build actually consists of two parts - Boost.Jam, a build engine
+ Boost.Build has two parts&mdash;a build engine
with its own interpreted language, and Boost.Build itself, implemented in
- Boost.Jam's language. The chain of events when you type
+ that language. The chain of events when you type
<command>b2</command> on the command line is as follows:
<orderedlist>
<listitem>
@@ -1183,7 +1183,9 @@ obj main : main.cpp : &lt;optimization&gt;off ;
</programlisting>
</para>
- <para id="bbv2.overview.targets.requirements.conditional">Sometimes, particular relationships need to be maintained
+ <para id="bbv2.overview.targets.requirements.conditional">
+ <indexterm><primary>requirements</primary><secondary>conditional</secondary></indexterm>
+ Sometimes, particular relationships need to be maintained
among a target's build properties. This can be achieved with
<firstterm>conditional
requirements</firstterm>. For example, you might want to set
@@ -1212,6 +1214,7 @@ lib network : network.cpp
</para>
<para id="bbv2.overview.targets.requirements.indirect">
+ <indexterm><primary>requirements</primary><secondary>indirect</secondary></indexterm>
A more powerful variant of conditional requirements
is <firstterm>indirect conditional requirements</firstterm>.
You can provide a rule that will be called with the current build properties and can compute additional properties
diff --git a/tools/build/v2/doc/src/path.xml b/tools/build/doc/src/path.xml
index f11906db5..f11906db5 100644
--- a/tools/build/v2/doc/src/path.xml
+++ b/tools/build/doc/src/path.xml
diff --git a/tools/build/v2/doc/src/project-target.xml b/tools/build/doc/src/project-target.xml
index 1e4e39a52..1e4e39a52 100644
--- a/tools/build/v2/doc/src/project-target.xml
+++ b/tools/build/doc/src/project-target.xml
diff --git a/tools/build/v2/doc/src/property-set.xml b/tools/build/doc/src/property-set.xml
index a5b5b8c7f..a5b5b8c7f 100644
--- a/tools/build/v2/doc/src/property-set.xml
+++ b/tools/build/doc/src/property-set.xml
diff --git a/tools/build/v2/doc/src/recipes.xml b/tools/build/doc/src/recipes.xml
index 7230aabdf..ec65f28e5 100644
--- a/tools/build/v2/doc/src/recipes.xml
+++ b/tools/build/doc/src/recipes.xml
@@ -6,6 +6,6 @@
future or FAQ completely supercedes it. -->
<appendix id="bbv2.recipies">
- <title>Boost Build System V2 recipes</title>
+ <title>Boost.Build System V2 recipes</title>
</appendix>
diff --git a/tools/build/v2/doc/src/reference.xml b/tools/build/doc/src/reference.xml
index 9d6fdf4c1..a8d41f221 100644
--- a/tools/build/v2/doc/src/reference.xml
+++ b/tools/build/doc/src/reference.xml
@@ -17,8 +17,9 @@
<section id="bbv2.reference.init">
<title>Initialization</title>
- <para>bjam's first job upon startup is to load the Jam code that
- implements the build system. To do this, it searches for a file
+ <para>
+ Immediately upon starting, the Boost.Build engine (<command>b2</command>)
+ loads the Jam code that implements the build system. To do this, it searches for a file
called <filename>boost-build.jam</filename>, first in the invocation directory, then
in its parent and so forth up to the filesystem root, and finally
in the directories specified by the environment variable
@@ -110,6 +111,33 @@ boost-build build-system ;
<xref linkend="bbv2.builtins.testing"/>.</para></listitem>
</varlistentry>
+ <varlistentry id="bbv2.reference.check-target-builds">
+ <indexterm><primary>check-target-builds</primary></indexterm>
+ <term><literal>check-target-builds</literal></term>
+
+ <listitem><para>The <literal>check-target-builds</literal> allows you
+ to conditionally use different properties depending on whether some
+ metatarget builds, or not. This is similar to functionality of configure
+ script in autotools projects. The function signature is:
+ </para>
+ <programlisting>
+rule check-target-builds ( target message ? : true-properties * : false-properties * )
+ </programlisting>
+
+ <para>This function can only be used when passing requirements or usage
+ requirements to a metatarget rule. For example, to make an application link
+ to a library if it's avavailable, one has use the following:</para>
+ <programlisting>
+exe app : app.cpp : [ check-target-builds has_foo "System has foo" : &lt;library&gt;foo : &lt;define&gt;FOO_MISSING=1 ] ;
+ </programlisting>
+
+ <para>For another example, the alias rule can be used to consolidate configuraiton
+ choices and make them available to other metatargets, like so:</para>
+ <programlisting>
+alias foobar : : : : [ check-target-builds has_foo "System has foo" : &lt;library&gt;foo : &lt;library&gt;bar ] ;
+ </programlisting>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><literal>obj</literal></term>
@@ -653,6 +681,21 @@ path-constant DATA : data/a.txt ;
</listitem>
</varlistentry>
+ <varlistentry><term><literal>runtime-debugging</literal></term>
+
+ <listitem>
+ <para><emphasis role="bold">Allowed values:</emphasis> <literal>on</literal>, <literal>off</literal>.</para>
+
+ <para>The <literal>runtime-debugging</literal> feature specifies if
+ produced object files, executables and libraries should include
+ behaviour useful only for debugging, such as asserts.
+ Typically, the value of this feature is implicitly set by the
+ <literal>variant</literal> feature, but it can be explicitly
+ specified by the user. The most common usage is to build
+ release variant with debugging output.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry><term><literal>target-os</literal></term>
<listitem>
@@ -741,7 +784,7 @@ path-constant DATA : data/a.txt ;
<para>
<emphasis role="bold">Note:</emphasis> Due to some internal details
- in the current Boost Build implementation it is not possible to have
+ in the current Boost.Build implementation it is not possible to have
features whose valid values are all positive integer. As a
workaround a large set of allowed values has been defined for this
feature and, if a different one is needed, user can easily add it by
@@ -2026,6 +2069,8 @@ import path : native make : native-path make-path ;
</section>
<xi:include href="path.xml"/>
+ <xi:include href="regex.xml"/>
+ <xi:include href="sequence.xml"/>
<xi:include href="type.xml"/>
</section>
diff --git a/tools/build/doc/src/regex.xml b/tools/build/doc/src/regex.xml
new file mode 100644
index 000000000..234c6eae4
--- /dev/null
+++ b/tools/build/doc/src/regex.xml
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+
+<section id="bbv2.reference.modules.regex">
+
+ <title>regex</title>
+ <indexterm>
+ <primary>regex</primary>
+ <secondary>module</secondary>
+ </indexterm>
+
+ <para>
+ Contains rules for string processing using regular expressions.
+ </para>
+
+ <itemizedlist>
+
+ <listitem><para>
+ <code language="jam">"x*"</code> matches the pattern
+ <code language="jam">"x"</code> zero or more times.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"x+"</code> matches <code language="jam">"x"</code>
+ one or more times.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"x?"</code> matches <code language="jam">"x"</code>
+ zero or one time.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"[abcd]"</code> matches any of the characters,
+ <code language="jam">"a"</code>, <code language="jam">"b"</code>,
+ <code language="jam">"c"</code>, and <code language="jam">"d"</code>.
+ A character range such as <code language="jam">"[a-z]"</code> matches
+ any character between <code language="jam">"a"</code> and
+ <code language="jam">"z"</code>. <code language="jam">"[^abc]"</code>
+ matches any character which is not <code language="jam">"a"</code>,
+ <code language="jam">"b"</code>, or <code language="jam">"c"</code>.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"x|y"</code> matches either pattern
+ <code language="jam">"x"</code> or pattern <code language="jam">"y"</code>
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">(x)</code> matches <code language="jam">"x"</code>
+ and captures it.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"^"</code> matches the beginning of the string.
+ </para></listitem>
+
+ <listitem><para>
+ <code language="jam">"$"</code> matches the end of the string.
+ </para></listitem>
+
+ <listitem><para>
+ "\&lt;" matches the beginning of a word.
+ </para></listitem>
+
+ <listitem><para>
+ "\&gt;" matches the end of a word.
+ </para></listitem>
+
+ </itemizedlist>
+
+ <orderedlist>
+
+ <listitem id="bbv2.reference.modules.regex.split">
+ <indexterm zone="bbv2.reference.modules.regex.split">
+ <primary>split</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule split ( string separator )</code>
+ <para>Returns a list of the following substrings:
+ <orderedlist>
+ <listitem><para>from beginning till the first occurrence of
+ <code language="jam">separator</code> or till the end,
+ </para></listitem>
+ <listitem><para>between each occurrence of
+ <code language="jam">separator</code> and the next occurrence,
+ </para></listitem>
+ <listitem><para>from the last occurrence of
+ <code language="jam">separator</code> till the end.
+ </para></listitem>
+ </orderedlist>
+ If no separator is present, the result will contain only one element.
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.split-list">
+ <indexterm zone="bbv2.reference.modules.regex.split-list">
+ <primary>split-list</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule split-list ( list * : separator )</code>
+ <para>Returns the concatenated results of applying
+ <link linkend="bbv2.reference.modules.regex.split">regex.split</link>
+ to every element of the list using the separator pattern.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.match">
+ <indexterm zone="bbv2.reference.modules.regex.match">
+ <primary>match</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule match ( pattern : string : indices * )</code>
+ <para>Match <code language="jam">string</code> against
+ <code language="jam">pattern</code>, and return the elements
+ indicated by <code language="jam">indices</code>.
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.transform">
+ <indexterm zone="bbv2.reference.modules.regex.transform">
+ <primary>transform</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule transform ( list * : pattern : indices * )</code>
+ <para>Matches all elements of <code language="jam">list</code> against
+ the <code language="jam">pattern</code> and returns a list of elements
+ indicated by <code language="jam">indices</code> of all successful
+ matches. If <code language="jam">indices</code> is omitted returns a list
+ of first parenthesized groups of all successful matches.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.escape">
+ <indexterm zone="bbv2.reference.modules.regex.escape">
+ <primary>escape</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule escape ( string : symbols : escape-symbol )</code>
+ <para>Escapes all of the characters in <code language="jam">symbols</code>
+ using the escape symbol <code language="jam">escape-symbol</code> for
+ the given string, and returns the escaped string.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.replace">
+ <indexterm zone="bbv2.reference.modules.regex.replace">
+ <primary>replace</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule replace ( string match replacement )</code>
+ <para>Replaces occurrences of a match string in a given string and
+ returns the new string. The match string can be a regex expression.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.regex.replace-list">
+ <indexterm zone="bbv2.reference.modules.regex.replace-list">
+ <primary>replace-list</primary>
+ <secondary>regex</secondary>
+ </indexterm>
+ <code language="jam">rule replace-list ( list * : match : replacement )</code>
+ <para>Replaces occurrences of a match string in a given list of strings
+ and returns a list of new strings. The match string can be a regex
+ expression.
+ </para>
+ </listitem>
+
+ </orderedlist>
+
+ <para>See also: <link linkend="jam.language.rules.builtins.utility._match__">MATCH</link></para>
+
+</section>
diff --git a/tools/build/doc/src/sequence.xml b/tools/build/doc/src/sequence.xml
new file mode 100644
index 000000000..54b2fbdba
--- /dev/null
+++ b/tools/build/doc/src/sequence.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+
+<section id="bbv2.reference.modules.sequence">
+
+ <title>sequence</title>
+ <indexterm>
+ <primary>sequence</primary>
+ <secondary>module</secondary>
+ </indexterm>
+
+ <para>
+ Various useful list functions. Note that algorithms in this module
+ execute largely in the caller's module namespace, so that local
+ rules can be used as function objects. Also note that most predicates
+ can be multi-element lists. In that case, all but the first element
+ are prepended to the first argument which is passed to the rule named
+ by the first element.
+ </para>
+
+ <orderedlist>
+
+ <listitem id="bbv2.reference.modules.sequence.filter">
+ <indexterm zone="bbv2.reference.modules.sequence.filter">
+ <primary>filter</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule filter ( predicate + : sequence * )</code>
+ <para>Return the elements <code language="jam">e</code> of
+ <code language="jam">$(sequence)</code> for which
+ <code language="jam">[ $(predicate) e ]</code> has a non-null value.
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.transform">
+ <indexterm zone="bbv2.reference.modules.sequence.transform">
+ <primary>transform</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule transform ( function + : sequence * )</code>
+ <para>Return a new sequence consisting of
+ <code language="jam">[ $(function) $(e) ]</code> for each element
+ <code language="jam">e</code> of <code language="jam">$(sequence)</code>.
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.reverse">
+ <indexterm zone="bbv2.reference.modules.sequence.reverse">
+ <primary>reverse</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule reverse ( s * )</code>
+ <para>Returns the elements of <code language="jam">s</code> in
+ reverse order.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.insertion-sort">
+ <indexterm zone="bbv2.reference.modules.sequence.insertion-sort">
+ <primary>insertion-sort</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule insertion-sort ( s * : ordered * )</code>
+ <para>Insertion-sort <code language="jam">s</code> using the
+ BinaryPredicate <code language="jam">ordered</code>.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.merge">
+ <indexterm zone="bbv2.reference.modules.sequence.merge">
+ <primary>merge</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule merge ( s1 * : s2 * : ordered * )</code>
+ <para>Merge two ordered sequences using the BinaryPredicate
+ <code language="jam">ordered</code>.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.join">
+ <indexterm zone="bbv2.reference.modules.sequence.join">
+ <primary>join</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule join ( s * : joint ? )</code>
+ <para>Join the elements of <code language="jam">s</code> into one
+ long string. If <code language="jam">joint</code> is supplied, it
+ is used as a separator.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.length">
+ <indexterm zone="bbv2.reference.modules.sequence.length">
+ <primary>length</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule length ( s * )</code>
+ <para>Find the length of any sequence.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.unique">
+ <indexterm zone="bbv2.reference.modules.sequence.unique">
+ <primary>unique</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule unique ( list * : stable ? )</code>
+ <para>Removes duplicates from <code language="jam">list</code>.
+ If <code language="jam">stable</code> is passed, then the order
+ of the elements will be unchanged.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.max-element">
+ <indexterm zone="bbv2.reference.modules.sequence.max-element">
+ <primary>max-element</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule max-element ( elements + : ordered ? )</code>
+ <para>Returns the maximum number in <code language="jam">elements</code>.
+ Uses <code language="jam">ordered</code> for comparisons or
+ <link linkend="bbv2.reference.modules.numbers.less">numbers.less</link>
+ if none is provided.</para>
+ </listitem>
+
+ <listitem id="bbv2.reference.modules.sequence.select-highest-ranked">
+ <indexterm zone="bbv2.reference.modules.sequence.select-highest-ranked">
+ <primary>select-highest-ranked</primary>
+ <secondary>sequence</secondary>
+ </indexterm>
+ <code language="jam">rule select-highest-ranked ( elements * : ranks * )</code>
+ <para>Returns all of <code language="jam">elements</code> for which
+ the corresponding element in the parallel list
+ <code language="jam">rank</code> is equal to the maximum value in
+ <code language="jam">rank</code>.</para>
+ </listitem>
+
+ </orderedlist>
+
+</section>
diff --git a/tools/build/v2/doc/src/standalone.xml b/tools/build/doc/src/standalone.xml
index 22ffff1ee..a48d2a0f8 100644
--- a/tools/build/v2/doc/src/standalone.xml
+++ b/tools/build/doc/src/standalone.xml
@@ -3,13 +3,14 @@
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude"
- id="bbv2" last-revision="$Date: 2011-01-25 10:06:12 -0800 (Tue, 25 Jan 2011) $">
+ id="bbv2" last-revision="$Date$">
<bookinfo>
<copyright>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
+ <year>2014</year>
<holder>Vladimir Prus</holder>
</copyright>
diff --git a/tools/build/v2/doc/src/tasks.xml b/tools/build/doc/src/tasks.xml
index d6419d4d8..8ff82f0b8 100644
--- a/tools/build/v2/doc/src/tasks.xml
+++ b/tools/build/doc/src/tasks.xml
@@ -400,22 +400,6 @@ unit-test helpers_test : helpers_test.cpp helpers ;
not miss a unit test failure.
</para>
- <para>
- By default, the executable is run directly. Sometimes, it is desirable to
- run the executable using some helper command. You should use the <literal>
- testing.launcher</literal> property to specify the name of the helper
- command. For example, if you write:
-<programlisting>
-unit-test helpers_test
- : helpers_test.cpp helpers
- : <emphasis role="bold">&lt;testing.launcher&gt;valgrind</emphasis>
- ;
-</programlisting>
- The command used to run the executable will be:
-<screen>
-<emphasis role="bold">valgrind</emphasis> bin/$toolset/debug/helpers_test
-</screen>
- </para>
<para>
There are few specialized testing rules, listed below:
@@ -447,8 +431,8 @@ rule run ( sources + : args * : input-files * : requirements * : target-name ?
<varname>args</varname> and <varname>input-files</varname> as command-line
arguments. The <varname>args</varname> parameter is passed verbatim and
the values of the <varname>input-files</varname> parameter are treated as
- paths relative to containing Jamfile, and are adjusted if <command>bjam
- </command> is invoked from a different directory. The
+ paths relative to containing Jamfile, and are adjusted if <command>b2</command>
+ is invoked from a different directory. The
<code>run-fail</code> rule is identical to the <code>run</code> rule,
except that it expects that the run fails.
</para>
@@ -489,6 +473,82 @@ boost-test(<replaceable>test-type</replaceable>) <replaceable>path</replaceable>
files created when test passes into human-readable status table of tests.
Such processing utilities are not included in Boost.Build.
</para>
+
+ <para>The following features adjust behaviour of the testing metatargets.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>testing.arg</literal></term>
+ <indexterm><primary>testing.arg</primary></indexterm>
+
+ <listitem>
+ <para>
+ Defines an argument to be passed to the target when it is executed
+ before the list of input files.
+ </para>
+
+ <para>
+<programlisting>
+unit-test helpers_test
+ : helpers_test.cpp helpers
+ : <emphasis role="bold">&lt;testing.arg&gt;"--foo bar"</emphasis>
+ ;
+</programlisting>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>testing.input-file</literal></term>
+ <indexterm><primary>testing.input-file</primary></indexterm>
+
+ <listitem>
+ <para>
+ Specifies a file to be passed to the executable on the command line
+ after the arguments. All files must be specified in alphabetical
+ order due to constrainsts in the current implementation.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>testing.launcher</literal></term>
+ <indexterm><primary>testing.launcher</primary></indexterm>
+
+ <listitem>
+ <para>
+ By default, the executable is run directly. Sometimes, it is
+ desirable to run the executable using some helper command. You
+ should use the this property to specify the name of the helper
+ command. For example, if you write:
+<programlisting>
+unit-test helpers_test
+ : helpers_test.cpp helpers
+ : <emphasis role="bold">&lt;testing.launcher&gt;valgrind</emphasis>
+ ;
+</programlisting>
+ The command used to run the executable will be:
+<screen>
+<emphasis role="bold">valgrind</emphasis> bin/$toolset/debug/helpers_test
+</screen>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>test-info</literal></term>
+ <indexterm><primary>test-info</primary></indexterm>
+
+ <listitem>
+ <para>
+ A description of the test. This is displayed as part of the
+ <literal>--dump-tests</literal> command-line option.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
</section>
<section id="bbv2.builtins.raw">
diff --git a/tools/build/v2/doc/src/tutorial.xml b/tools/build/doc/src/tutorial.xml
index 141ed9196..141ed9196 100644
--- a/tools/build/v2/doc/src/tutorial.xml
+++ b/tools/build/doc/src/tutorial.xml
diff --git a/tools/build/v2/doc/src/type.xml b/tools/build/doc/src/type.xml
index 6ca7cc7ae..6ca7cc7ae 100644
--- a/tools/build/v2/doc/src/type.xml
+++ b/tools/build/doc/src/type.xml
diff --git a/tools/build/v2/doc/src/typed-target.xml b/tools/build/doc/src/typed-target.xml
index 2a7d7c98c..2a7d7c98c 100644
--- a/tools/build/v2/doc/src/typed-target.xml
+++ b/tools/build/doc/src/typed-target.xml
diff --git a/tools/build/v2/doc/src/userman.xml b/tools/build/doc/src/userman.xml
index c3f070f39..72bcce72d 100644
--- a/tools/build/v2/doc/src/userman.xml
+++ b/tools/build/doc/src/userman.xml
@@ -3,13 +3,14 @@
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude"
- id="bbv2" last-revision="$Date: 2011-01-25 10:06:12 -0800 (Tue, 25 Jan 2011) $">
+ id="bbv2" last-revision="$Date$">
<partinfo>
<copyright>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
+ <year>2014</year>
<holder>Vladimir Prus</holder>
</copyright>
diff --git a/tools/build/v2/doc/tools.html b/tools/build/doc/tools.html
index 8b4929d29..8b4929d29 100644
--- a/tools/build/v2/doc/tools.html
+++ b/tools/build/doc/tools.html
diff --git a/tools/build/v2/example/boost-build.jam b/tools/build/example/boost-build.jam
index efcc231fe..02abe407f 100644
--- a/tools/build/v2/example/boost-build.jam
+++ b/tools/build/example/boost-build.jam
@@ -3,4 +3,4 @@
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-boost-build ../kernel ;
+boost-build ../src/kernel ;
diff --git a/tools/build/v2/example/built_tool/Jamroot.jam b/tools/build/example/built_tool/Jamroot.jam
index c458650e8..c458650e8 100644
--- a/tools/build/v2/example/built_tool/Jamroot.jam
+++ b/tools/build/example/built_tool/Jamroot.jam
diff --git a/tools/build/v2/example/built_tool/core/Jamfile.jam b/tools/build/example/built_tool/core/Jamfile.jam
index 2d96f7182..2d96f7182 100644
--- a/tools/build/v2/example/built_tool/core/Jamfile.jam
+++ b/tools/build/example/built_tool/core/Jamfile.jam
diff --git a/tools/build/v2/example/built_tool/core/a.td b/tools/build/example/built_tool/core/a.td
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/example/built_tool/core/a.td
+++ b/tools/build/example/built_tool/core/a.td
diff --git a/tools/build/v2/example/built_tool/core/core.cpp b/tools/build/example/built_tool/core/core.cpp
index 31a133726..31a133726 100644
--- a/tools/build/v2/example/built_tool/core/core.cpp
+++ b/tools/build/example/built_tool/core/core.cpp
diff --git a/tools/build/v2/example/built_tool/readme.txt b/tools/build/example/built_tool/readme.txt
index bbb9f9b3a..bbb9f9b3a 100644
--- a/tools/build/v2/example/built_tool/readme.txt
+++ b/tools/build/example/built_tool/readme.txt
diff --git a/tools/build/v2/example/built_tool/tblgen/Jamfile.jam b/tools/build/example/built_tool/tblgen/Jamfile.jam
index af4906278..af4906278 100644
--- a/tools/build/v2/example/built_tool/tblgen/Jamfile.jam
+++ b/tools/build/example/built_tool/tblgen/Jamfile.jam
diff --git a/tools/build/v2/example/built_tool/tblgen/tblgen.cpp b/tools/build/example/built_tool/tblgen/tblgen.cpp
index fbd058133..fbd058133 100644
--- a/tools/build/v2/example/built_tool/tblgen/tblgen.cpp
+++ b/tools/build/example/built_tool/tblgen/tblgen.cpp
diff --git a/tools/build/v2/example/customization/class.verbatim b/tools/build/example/customization/class.verbatim
index 5c0d7b803..5c0d7b803 100644
--- a/tools/build/v2/example/customization/class.verbatim
+++ b/tools/build/example/customization/class.verbatim
diff --git a/tools/build/v2/example/customization/codegen.cpp b/tools/build/example/customization/codegen.cpp
index 6cdb45e4d..6cdb45e4d 100644
--- a/tools/build/v2/example/customization/codegen.cpp
+++ b/tools/build/example/customization/codegen.cpp
diff --git a/tools/build/v2/example/customization/inline_file.py b/tools/build/example/customization/inline_file.py
index a48c5fc9d..a48c5fc9d 100755..100644
--- a/tools/build/v2/example/customization/inline_file.py
+++ b/tools/build/example/customization/inline_file.py
diff --git a/tools/build/v2/example/customization/jamroot.jam b/tools/build/example/customization/jamroot.jam
index 5e986d91c..5e986d91c 100644
--- a/tools/build/v2/example/customization/jamroot.jam
+++ b/tools/build/example/customization/jamroot.jam
diff --git a/tools/build/v2/example/customization/readme.txt b/tools/build/example/customization/readme.txt
index 7ee04f1a2..7ee04f1a2 100644
--- a/tools/build/v2/example/customization/readme.txt
+++ b/tools/build/example/customization/readme.txt
diff --git a/tools/build/v2/example/customization/t1.verbatim b/tools/build/example/customization/t1.verbatim
index 144540f29..144540f29 100644
--- a/tools/build/v2/example/customization/t1.verbatim
+++ b/tools/build/example/customization/t1.verbatim
diff --git a/tools/build/v2/example/customization/t2.verbatim b/tools/build/example/customization/t2.verbatim
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/example/customization/t2.verbatim
+++ b/tools/build/example/customization/t2.verbatim
diff --git a/tools/build/v2/example/customization/usage.verbatim b/tools/build/example/customization/usage.verbatim
index 0fc4b4a37..0fc4b4a37 100644
--- a/tools/build/v2/example/customization/usage.verbatim
+++ b/tools/build/example/customization/usage.verbatim
diff --git a/tools/build/v2/example/customization/verbatim.jam b/tools/build/example/customization/verbatim.jam
index 931fdce33..931fdce33 100644
--- a/tools/build/v2/example/customization/verbatim.jam
+++ b/tools/build/example/customization/verbatim.jam
diff --git a/tools/build/v2/example/customization/verbatim.py b/tools/build/example/customization/verbatim.py
index be285976c..be285976c 100644
--- a/tools/build/v2/example/customization/verbatim.py
+++ b/tools/build/example/customization/verbatim.py
diff --git a/tools/build/v2/example/generate/REAME.txt b/tools/build/example/generate/REAME.txt
index fc2b20772..fc2b20772 100644
--- a/tools/build/v2/example/generate/REAME.txt
+++ b/tools/build/example/generate/REAME.txt
diff --git a/tools/build/v2/example/generate/a.cpp b/tools/build/example/generate/a.cpp
index 364975671..364975671 100644
--- a/tools/build/v2/example/generate/a.cpp
+++ b/tools/build/example/generate/a.cpp
diff --git a/tools/build/v2/example/generate/gen.jam b/tools/build/example/generate/gen.jam
index 73232aab5..73232aab5 100644
--- a/tools/build/v2/example/generate/gen.jam
+++ b/tools/build/example/generate/gen.jam
diff --git a/tools/build/v2/example/generate/gen.py b/tools/build/example/generate/gen.py
index 09ee15b43..09ee15b43 100644
--- a/tools/build/v2/example/generate/gen.py
+++ b/tools/build/example/generate/gen.py
diff --git a/tools/build/v2/example/generate/jamroot.jam b/tools/build/example/generate/jamroot.jam
index c48f2207b..c48f2207b 100644
--- a/tools/build/v2/example/generate/jamroot.jam
+++ b/tools/build/example/generate/jamroot.jam
diff --git a/tools/build/v2/example/generator/README.txt b/tools/build/example/generator/README.txt
index f26a856a5..f26a856a5 100644
--- a/tools/build/v2/example/generator/README.txt
+++ b/tools/build/example/generator/README.txt
diff --git a/tools/build/v2/example/generator/foo.gci b/tools/build/example/generator/foo.gci
index 2ccc45c6c..2ccc45c6c 100644
--- a/tools/build/v2/example/generator/foo.gci
+++ b/tools/build/example/generator/foo.gci
diff --git a/tools/build/v2/example/generator/jamroot.jam b/tools/build/example/generator/jamroot.jam
index 9703134db..9703134db 100644
--- a/tools/build/v2/example/generator/jamroot.jam
+++ b/tools/build/example/generator/jamroot.jam
diff --git a/tools/build/v2/example/generator/soap.jam b/tools/build/example/generator/soap.jam
index d28bfdecc..d28bfdecc 100644
--- a/tools/build/v2/example/generator/soap.jam
+++ b/tools/build/example/generator/soap.jam
diff --git a/tools/build/v2/example/gettext/jamfile.jam b/tools/build/example/gettext/jamfile.jam
index d5096df30..d5096df30 100644
--- a/tools/build/v2/example/gettext/jamfile.jam
+++ b/tools/build/example/gettext/jamfile.jam
diff --git a/tools/build/v2/example/gettext/jamroot.jam b/tools/build/example/gettext/jamroot.jam
index 862f8930c..862f8930c 100644
--- a/tools/build/v2/example/gettext/jamroot.jam
+++ b/tools/build/example/gettext/jamroot.jam
diff --git a/tools/build/v2/example/gettext/main.cpp b/tools/build/example/gettext/main.cpp
index 6888e1aba..6888e1aba 100644
--- a/tools/build/v2/example/gettext/main.cpp
+++ b/tools/build/example/gettext/main.cpp
diff --git a/tools/build/v2/example/gettext/readme.txt b/tools/build/example/gettext/readme.txt
index 9c8fee6fd..9c8fee6fd 100644
--- a/tools/build/v2/example/gettext/readme.txt
+++ b/tools/build/example/gettext/readme.txt
diff --git a/tools/build/v2/example/gettext/russian.po b/tools/build/example/gettext/russian.po
index daa7121c3..daa7121c3 100644
--- a/tools/build/v2/example/gettext/russian.po
+++ b/tools/build/example/gettext/russian.po
diff --git a/tools/build/v2/example/hello/hello.cpp b/tools/build/example/hello/hello.cpp
index 680802289..680802289 100644
--- a/tools/build/v2/example/hello/hello.cpp
+++ b/tools/build/example/hello/hello.cpp
diff --git a/tools/build/v2/example/hello/jamroot.jam b/tools/build/example/hello/jamroot.jam
index 672ec02e9..672ec02e9 100644
--- a/tools/build/v2/example/hello/jamroot.jam
+++ b/tools/build/example/hello/jamroot.jam
diff --git a/tools/build/v2/example/hello/readme.txt b/tools/build/example/hello/readme.txt
index f416be675..f416be675 100644
--- a/tools/build/v2/example/hello/readme.txt
+++ b/tools/build/example/hello/readme.txt
diff --git a/tools/build/v2/example/libraries/app/app.cpp b/tools/build/example/libraries/app/app.cpp
index f62c1c35d..f62c1c35d 100644
--- a/tools/build/v2/example/libraries/app/app.cpp
+++ b/tools/build/example/libraries/app/app.cpp
diff --git a/tools/build/v2/example/libraries/app/jamfile.jam b/tools/build/example/libraries/app/jamfile.jam
index ed2054e13..ed2054e13 100644
--- a/tools/build/v2/example/libraries/app/jamfile.jam
+++ b/tools/build/example/libraries/app/jamfile.jam
diff --git a/tools/build/v2/example/libraries/jamroot.jam b/tools/build/example/libraries/jamroot.jam
index 5e0dc4814..5e0dc4814 100644
--- a/tools/build/v2/example/libraries/jamroot.jam
+++ b/tools/build/example/libraries/jamroot.jam
diff --git a/tools/build/v2/example/libraries/util/foo/bar.cpp b/tools/build/example/libraries/util/foo/bar.cpp
index e6339ee9b..e6339ee9b 100644
--- a/tools/build/v2/example/libraries/util/foo/bar.cpp
+++ b/tools/build/example/libraries/util/foo/bar.cpp
diff --git a/tools/build/v2/example/libraries/util/foo/include/lib1.h b/tools/build/example/libraries/util/foo/include/lib1.h
index 50f5e19d2..50f5e19d2 100644
--- a/tools/build/v2/example/libraries/util/foo/include/lib1.h
+++ b/tools/build/example/libraries/util/foo/include/lib1.h
diff --git a/tools/build/v2/example/libraries/util/foo/jamfile.jam b/tools/build/example/libraries/util/foo/jamfile.jam
index 7b6359ea4..7b6359ea4 100644
--- a/tools/build/v2/example/libraries/util/foo/jamfile.jam
+++ b/tools/build/example/libraries/util/foo/jamfile.jam
diff --git a/tools/build/v2/example/make/foo.py b/tools/build/example/make/foo.py
index e4c0b824a..e4c0b824a 100644
--- a/tools/build/v2/example/make/foo.py
+++ b/tools/build/example/make/foo.py
diff --git a/tools/build/v2/example/make/jamroot.jam b/tools/build/example/make/jamroot.jam
index 7bb98e353..7bb98e353 100644
--- a/tools/build/v2/example/make/jamroot.jam
+++ b/tools/build/example/make/jamroot.jam
diff --git a/tools/build/v2/example/make/main_cpp.pro b/tools/build/example/make/main_cpp.pro
index 237c8ce18..237c8ce18 100644
--- a/tools/build/v2/example/make/main_cpp.pro
+++ b/tools/build/example/make/main_cpp.pro
diff --git a/tools/build/v2/example/make/readme.txt b/tools/build/example/make/readme.txt
index 333c55a71..333c55a71 100644
--- a/tools/build/v2/example/make/readme.txt
+++ b/tools/build/example/make/readme.txt
diff --git a/tools/build/v2/example/pch/include/pch.hpp b/tools/build/example/pch/include/pch.hpp
index 8f05cc43d..8f05cc43d 100644
--- a/tools/build/v2/example/pch/include/pch.hpp
+++ b/tools/build/example/pch/include/pch.hpp
diff --git a/tools/build/v2/example/pch/jamroot.jam b/tools/build/example/pch/jamroot.jam
index 115164aae..115164aae 100644
--- a/tools/build/v2/example/pch/jamroot.jam
+++ b/tools/build/example/pch/jamroot.jam
diff --git a/tools/build/v2/example/pch/source/hello_world.cpp b/tools/build/example/pch/source/hello_world.cpp
index f618056a0..f618056a0 100644
--- a/tools/build/v2/example/pch/source/hello_world.cpp
+++ b/tools/build/example/pch/source/hello_world.cpp
diff --git a/tools/build/v2/example/python_modules/jamroot.jam b/tools/build/example/python_modules/jamroot.jam
index c53e75d58..c53e75d58 100644
--- a/tools/build/v2/example/python_modules/jamroot.jam
+++ b/tools/build/example/python_modules/jamroot.jam
diff --git a/tools/build/v2/example/python_modules/python_helpers.jam b/tools/build/example/python_modules/python_helpers.jam
index 5a79aeebf..5a79aeebf 100644
--- a/tools/build/v2/example/python_modules/python_helpers.jam
+++ b/tools/build/example/python_modules/python_helpers.jam
diff --git a/tools/build/v2/example/python_modules/python_helpers.py b/tools/build/example/python_modules/python_helpers.py
index 8148f57c3..8148f57c3 100644
--- a/tools/build/v2/example/python_modules/python_helpers.py
+++ b/tools/build/example/python_modules/python_helpers.py
diff --git a/tools/build/v2/example/python_modules/readme.txt b/tools/build/example/python_modules/readme.txt
index 0fe6ee55e..0fe6ee55e 100644
--- a/tools/build/v2/example/python_modules/readme.txt
+++ b/tools/build/example/python_modules/readme.txt
diff --git a/tools/build/v2/example/qt/README.txt b/tools/build/example/qt/README.txt
index d187c31c3..d187c31c3 100644
--- a/tools/build/v2/example/qt/README.txt
+++ b/tools/build/example/qt/README.txt
diff --git a/tools/build/v2/example/qt/qt3/hello/canvas.cpp b/tools/build/example/qt/qt3/hello/canvas.cpp
index c6d23c9d4..c6d23c9d4 100644
--- a/tools/build/v2/example/qt/qt3/hello/canvas.cpp
+++ b/tools/build/example/qt/qt3/hello/canvas.cpp
diff --git a/tools/build/v2/example/qt/qt3/hello/canvas.h b/tools/build/example/qt/qt3/hello/canvas.h
index f9f950267..f9f950267 100644
--- a/tools/build/v2/example/qt/qt3/hello/canvas.h
+++ b/tools/build/example/qt/qt3/hello/canvas.h
diff --git a/tools/build/v2/example/qt/qt3/hello/jamroot.jam b/tools/build/example/qt/qt3/hello/jamroot.jam
index 03be582e5..03be582e5 100644
--- a/tools/build/v2/example/qt/qt3/hello/jamroot.jam
+++ b/tools/build/example/qt/qt3/hello/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt3/hello/main.cpp b/tools/build/example/qt/qt3/hello/main.cpp
index 8f1ffc2fb..8f1ffc2fb 100644
--- a/tools/build/v2/example/qt/qt3/hello/main.cpp
+++ b/tools/build/example/qt/qt3/hello/main.cpp
diff --git a/tools/build/v2/example/qt/qt3/moccable-cpp/jamroot.jam b/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam
index 85778da20..85778da20 100644
--- a/tools/build/v2/example/qt/qt3/moccable-cpp/jamroot.jam
+++ b/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt3/moccable-cpp/main.cpp b/tools/build/example/qt/qt3/moccable-cpp/main.cpp
index ed36f7469..ed36f7469 100644
--- a/tools/build/v2/example/qt/qt3/moccable-cpp/main.cpp
+++ b/tools/build/example/qt/qt3/moccable-cpp/main.cpp
diff --git a/tools/build/v2/example/qt/qt3/uic/hello_world_widget.ui b/tools/build/example/qt/qt3/uic/hello_world_widget.ui
index 26cc73487..26cc73487 100644
--- a/tools/build/v2/example/qt/qt3/uic/hello_world_widget.ui
+++ b/tools/build/example/qt/qt3/uic/hello_world_widget.ui
diff --git a/tools/build/v2/example/qt/qt3/uic/jamroot.jam b/tools/build/example/qt/qt3/uic/jamroot.jam
index d0b806294..d0b806294 100644
--- a/tools/build/v2/example/qt/qt3/uic/jamroot.jam
+++ b/tools/build/example/qt/qt3/uic/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt3/uic/main.cpp b/tools/build/example/qt/qt3/uic/main.cpp
index f2a08b5fa..f2a08b5fa 100644
--- a/tools/build/v2/example/qt/qt3/uic/main.cpp
+++ b/tools/build/example/qt/qt3/uic/main.cpp
diff --git a/tools/build/v2/example/qt/qt4/hello/arrow.cpp b/tools/build/example/qt/qt4/hello/arrow.cpp
index e821b1690..e821b1690 100644
--- a/tools/build/v2/example/qt/qt4/hello/arrow.cpp
+++ b/tools/build/example/qt/qt4/hello/arrow.cpp
diff --git a/tools/build/v2/example/qt/qt4/hello/arrow.h b/tools/build/example/qt/qt4/hello/arrow.h
index d7743864f..d7743864f 100644
--- a/tools/build/v2/example/qt/qt4/hello/arrow.h
+++ b/tools/build/example/qt/qt4/hello/arrow.h
diff --git a/tools/build/v2/example/qt/qt4/hello/jamroot.jam b/tools/build/example/qt/qt4/hello/jamroot.jam
index 83952f17b..83952f17b 100644
--- a/tools/build/v2/example/qt/qt4/hello/jamroot.jam
+++ b/tools/build/example/qt/qt4/hello/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt4/hello/main.cpp b/tools/build/example/qt/qt4/hello/main.cpp
index df27444bd..df27444bd 100644
--- a/tools/build/v2/example/qt/qt4/hello/main.cpp
+++ b/tools/build/example/qt/qt4/hello/main.cpp
diff --git a/tools/build/v2/example/qt/qt4/moccable-cpp/jamroot.jam b/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam
index d07b9c7d3..d07b9c7d3 100644
--- a/tools/build/v2/example/qt/qt4/moccable-cpp/jamroot.jam
+++ b/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt4/moccable-cpp/main.cpp b/tools/build/example/qt/qt4/moccable-cpp/main.cpp
index ffc96cc3e..ffc96cc3e 100644
--- a/tools/build/v2/example/qt/qt4/moccable-cpp/main.cpp
+++ b/tools/build/example/qt/qt4/moccable-cpp/main.cpp
diff --git a/tools/build/v2/example/qt/qt4/uic/hello_world_widget.ui b/tools/build/example/qt/qt4/uic/hello_world_widget.ui
index 67060b336..67060b336 100644
--- a/tools/build/v2/example/qt/qt4/uic/hello_world_widget.ui
+++ b/tools/build/example/qt/qt4/uic/hello_world_widget.ui
diff --git a/tools/build/v2/example/qt/qt4/uic/jamroot.jam b/tools/build/example/qt/qt4/uic/jamroot.jam
index 40675a72e..40675a72e 100644
--- a/tools/build/v2/example/qt/qt4/uic/jamroot.jam
+++ b/tools/build/example/qt/qt4/uic/jamroot.jam
diff --git a/tools/build/v2/example/qt/qt4/uic/main.cpp b/tools/build/example/qt/qt4/uic/main.cpp
index fc72fd5e6..fc72fd5e6 100644
--- a/tools/build/v2/example/qt/qt4/uic/main.cpp
+++ b/tools/build/example/qt/qt4/uic/main.cpp
diff --git a/tools/build/v2/site-config.jam b/tools/build/example/site-config.jam
index ad22d6744..ad22d6744 100644
--- a/tools/build/v2/site-config.jam
+++ b/tools/build/example/site-config.jam
diff --git a/tools/build/example/testing/compile-fail.cpp b/tools/build/example/testing/compile-fail.cpp
new file mode 100644
index 000000000..cd3e09409
--- /dev/null
+++ b/tools/build/example/testing/compile-fail.cpp
@@ -0,0 +1,16 @@
+// Copyright (c) 2014 Rene Rivera
+//
+// 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)
+//
+// http://www.boost.org
+//
+
+#include <iostream>
+
+int main()
+{
+ std::cout << "Bye!\n";
+ return 1
+}
diff --git a/tools/build/example/testing/fail.cpp b/tools/build/example/testing/fail.cpp
new file mode 100644
index 000000000..f1efa1ee2
--- /dev/null
+++ b/tools/build/example/testing/fail.cpp
@@ -0,0 +1,16 @@
+// Copyright (c) 2014 Rene Rivera
+//
+// 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)
+//
+// http://www.boost.org
+//
+
+#include <iostream>
+
+int main()
+{
+ std::cout << "Bye!\n";
+ return 1;
+}
diff --git a/tools/build/example/testing/jamroot.jam b/tools/build/example/testing/jamroot.jam
new file mode 100644
index 000000000..047aff39c
--- /dev/null
+++ b/tools/build/example/testing/jamroot.jam
@@ -0,0 +1,10 @@
+# Copyright 2014 Rene Rivera
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+using testing ;
+
+run success.cpp : : ;
+run-fail fail.cpp : : ;
+compile success.cpp : : success-compile ;
+compile-fail compile-fail.cpp ;
diff --git a/tools/build/example/testing/success.cpp b/tools/build/example/testing/success.cpp
new file mode 100644
index 000000000..e2fa7a4a9
--- /dev/null
+++ b/tools/build/example/testing/success.cpp
@@ -0,0 +1,16 @@
+// Copyright (c) 2014 Rene Rivera
+//
+// 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)
+//
+// http://www.boost.org
+//
+
+#include <iostream>
+
+int main()
+{
+ std::cout << "Hi!\n";
+ return 0;
+}
diff --git a/tools/build/v2/user-config.jam b/tools/build/example/user-config.jam
index fbbf13fd0..fbbf13fd0 100644
--- a/tools/build/v2/user-config.jam
+++ b/tools/build/example/user-config.jam
diff --git a/tools/build/v2/example/variant/a.cpp b/tools/build/example/variant/a.cpp
index 42b69f335..42b69f335 100644
--- a/tools/build/v2/example/variant/a.cpp
+++ b/tools/build/example/variant/a.cpp
diff --git a/tools/build/v2/example/variant/jamfile.jam b/tools/build/example/variant/jamfile.jam
index 9f8c580be..9f8c580be 100644
--- a/tools/build/v2/example/variant/jamfile.jam
+++ b/tools/build/example/variant/jamfile.jam
diff --git a/tools/build/v2/example/variant/jamroot.jam b/tools/build/example/variant/jamroot.jam
index e19476ccc..e19476ccc 100644
--- a/tools/build/v2/example/variant/jamroot.jam
+++ b/tools/build/example/variant/jamroot.jam
diff --git a/tools/build/v2/example/variant/libs/jamfile.jam b/tools/build/example/variant/libs/jamfile.jam
index 4366b7624..4366b7624 100644
--- a/tools/build/v2/example/variant/libs/jamfile.jam
+++ b/tools/build/example/variant/libs/jamfile.jam
diff --git a/tools/build/v2/example/variant/libs/l.cpp b/tools/build/example/variant/libs/l.cpp
index 26cb4b1e6..26cb4b1e6 100644
--- a/tools/build/v2/example/variant/libs/l.cpp
+++ b/tools/build/example/variant/libs/l.cpp
diff --git a/tools/build/v2/example/variant/readme.txt b/tools/build/example/variant/readme.txt
index 5ab1b938a..5ab1b938a 100644
--- a/tools/build/v2/example/variant/readme.txt
+++ b/tools/build/example/variant/readme.txt
diff --git a/tools/build/index.html b/tools/build/index.html
deleted file mode 100644
index 12f22e413..000000000
--- a/tools/build/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!--
- Copyright 2003 Rene Rivera.
- 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)
- -->
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="refresh" content="0; URL=v2/index.html" />
-
- <title></title>
-</head>
-
-<body>
- Automatic redirection failed, please go to <a href=
- "v2/index.html">v2/index.html</a>.
-</body>
-</html>
diff --git a/tools/build/v2/notes/README.txt b/tools/build/notes/README.txt
index 96ef0c3aa..96ef0c3aa 100644
--- a/tools/build/v2/notes/README.txt
+++ b/tools/build/notes/README.txt
diff --git a/tools/build/v2/notes/build_dir_option.txt b/tools/build/notes/build_dir_option.txt
index 6dbecaed6..6dbecaed6 100644
--- a/tools/build/v2/notes/build_dir_option.txt
+++ b/tools/build/notes/build_dir_option.txt
diff --git a/tools/build/v2/changes.txt b/tools/build/notes/changes.txt
index 7ac8ffa2f..7ac8ffa2f 100644
--- a/tools/build/v2/changes.txt
+++ b/tools/build/notes/changes.txt
diff --git a/tools/build/v2/hacking.txt b/tools/build/notes/hacking.txt
index 3c059173b..3c059173b 100644
--- a/tools/build/v2/hacking.txt
+++ b/tools/build/notes/hacking.txt
diff --git a/tools/build/v2/notes/relative_source_paths.txt b/tools/build/notes/relative_source_paths.txt
index 2f0557893..2f0557893 100644
--- a/tools/build/v2/notes/relative_source_paths.txt
+++ b/tools/build/notes/relative_source_paths.txt
diff --git a/tools/build/v2/release_procedure.txt b/tools/build/notes/release_procedure.txt
index 007921a61..007921a61 100644
--- a/tools/build/v2/release_procedure.txt
+++ b/tools/build/notes/release_procedure.txt
diff --git a/tools/build/v2/nightly.sh b/tools/build/scripts/nightly.sh
index 0d9f310c0..0d9f310c0 100755
--- a/tools/build/v2/nightly.sh
+++ b/tools/build/scripts/nightly.sh
diff --git a/tools/build/v2/roll.sh b/tools/build/scripts/roll.sh
index 3702d3199..3702d3199 100755
--- a/tools/build/v2/roll.sh
+++ b/tools/build/scripts/roll.sh
diff --git a/tools/build/v2/to_merge.sh b/tools/build/scripts/to_merge.sh
index c514f2101..c514f2101 100755
--- a/tools/build/v2/to_merge.sh
+++ b/tools/build/scripts/to_merge.sh
diff --git a/tools/build/v2/bootstrap.jam b/tools/build/src/bootstrap.jam
index af3e8bf50..af3e8bf50 100644
--- a/tools/build/v2/bootstrap.jam
+++ b/tools/build/src/bootstrap.jam
diff --git a/tools/build/v2/build-system.jam b/tools/build/src/build-system.jam
index 247326a96..247326a96 100644
--- a/tools/build/v2/build-system.jam
+++ b/tools/build/src/build-system.jam
diff --git a/tools/build/v2/build/__init__.py b/tools/build/src/build/__init__.py
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/build/__init__.py
+++ b/tools/build/src/build/__init__.py
diff --git a/tools/build/v2/build/ac.jam b/tools/build/src/build/ac.jam
index 71bc16c37..71bc16c37 100644
--- a/tools/build/v2/build/ac.jam
+++ b/tools/build/src/build/ac.jam
diff --git a/tools/build/v2/build/alias.jam b/tools/build/src/build/alias.jam
index 9ac8cb895..9ac8cb895 100644
--- a/tools/build/v2/build/alias.jam
+++ b/tools/build/src/build/alias.jam
diff --git a/tools/build/v2/build/alias.py b/tools/build/src/build/alias.py
index 575e53609..575e53609 100755
--- a/tools/build/v2/build/alias.py
+++ b/tools/build/src/build/alias.py
diff --git a/tools/build/v2/build/build-request.jam b/tools/build/src/build/build-request.jam
index 2a1bbb467..2a1bbb467 100644
--- a/tools/build/v2/build/build-request.jam
+++ b/tools/build/src/build/build-request.jam
diff --git a/tools/build/v2/build/build_request.py b/tools/build/src/build/build_request.py
index 118033e1e..118033e1e 100644
--- a/tools/build/v2/build/build_request.py
+++ b/tools/build/src/build/build_request.py
diff --git a/tools/build/v2/build/config-cache.jam b/tools/build/src/build/config-cache.jam
index ff05fb6f8..5297dbb84 100644
--- a/tools/build/v2/build/config-cache.jam
+++ b/tools/build/src/build/config-cache.jam
@@ -23,7 +23,8 @@ rule save ( )
{
if $(.cache-file)
{
- local target = <new-cache-file>$(.cache-file) ;
+ local cache-file-native = [ path.native $(.cache-file) ] ;
+ local target = <new-cache-file>$(cache-file-native) ;
local contents = "# Automatically generated by Boost.Build.\n# Do not edit.\n\nmodule config-cache {\n" ;
for local var in $(.all-vars)
{
@@ -54,7 +55,7 @@ rule load ( cache-file )
{
errors.error duplicate load of cache file ;
}
- cache-file = $(cache-file) ;
+ cache-file = [ path.native $(cache-file) ] ;
if [ path.exists $(cache-file) ] && ! ( --reconfigure in [ modules.peek : ARGV ] )
{
include <old-cache-file>$(cache-file) ;
diff --git a/tools/build/v2/build/configure.jam b/tools/build/src/build/configure.jam
index 66b81b349..543bade35 100644
--- a/tools/build/v2/build/configure.jam
+++ b/tools/build/src/build/configure.jam
@@ -123,76 +123,87 @@ rule print-configure-checks-summary ( )
}
}
-
-# Attempt to build a metatarget named by 'metatarget-reference' in context of
-# 'project' with properties 'ps'. Returns non-empty value if build is OK.
-#
-rule builds-raw ( metatarget-reference : project : ps : what : retry ? )
+# Attempts to build a set of virtual targets
+rule try-build ( targets * : ps : what : retry ? )
{
+ local cache-name = $(what) [ $(ps).raw ] ;
+ cache-name = $(cache-name:J=-) ;
+ local value = [ config-cache.get $(cache-name) ] ;
+
local result ;
+ local jam-targets ;
- if ! $(retry) && ! $(.$(what)-tested.$(ps))
+ for local t in $(targets)
{
- .$(what)-tested.$(ps) = true ;
-
- local cache-name = $(what) [ $(ps).raw ] ;
- cache-name = $(cache-name:J=-) ;
- local value = [ config-cache.get $(cache-name) ] ;
-
- local targets = [ targets.generate-from-reference
- $(metatarget-reference) : $(project) : $(ps) ] ;
-
- local jam-targets ;
- for local t in $(targets[2-])
+ jam-targets += [ $(t).actualize ] ;
+ }
+
+ if $(value)
+ {
+ local x = [ PAD " - $(what)" : $(.width) ] ;
+ if $(value) = true
{
- jam-targets += [ $(t).actualize ] ;
+ .$(what)-supported.$(ps) = yes ;
+ result = true ;
+ log-check-result "$(x) : yes (cached)" ;
}
-
- if $(value)
+ else
{
- local x = [ PAD " - $(what)" : $(.width) ] ;
- if $(value) = true
- {
- .$(what)-supported.$(ps) = yes ;
- result = true ;
- log-check-result "$(x) : yes (cached)" ;
- }
- else
- {
- log-check-result "$(x) : no (cached)" ;
- }
- }
- else if ! UPDATE_NOW in [ RULENAMES ]
+ log-check-result "$(x) : no (cached)" ;
+ }
+ }
+ else if ! UPDATE_NOW in [ RULENAMES ]
+ {
+ # Cannot determine. Assume existance.
+ }
+ else
+ {
+ local x = [ PAD " - $(what)" : $(.width) ] ;
+ if [ UPDATE_NOW $(jam-targets) :
+ $(.log-fd) : ignore-minus-n : ignore-minus-q ]
{
- # Cannot determine. Assume existance.
+ .$(what)-supported.$(ps) = yes ;
+ result = true ;
+ log-check-result "$(x) : yes" ;
}
else
{
- local x = [ PAD " - $(what)" : $(.width) ] ;
- if [ UPDATE_NOW $(jam-targets) :
- $(.log-fd) : ignore-minus-n : ignore-minus-q ]
- {
- .$(what)-supported.$(ps) = yes ;
- result = true ;
- log-check-result "$(x) : yes" ;
- }
- else
- {
- log-check-result "$(x) : no" ;
- }
+ log-check-result "$(x) : no" ;
+ }
+ }
+ if ! $(value)
+ {
+ if $(result)
+ {
+ config-cache.set $(cache-name) : true ;
}
- if ! $(value)
+ else
{
- if $(result)
- {
- config-cache.set $(cache-name) : true ;
- }
- else
- {
- config-cache.set $(cache-name) : false ;
- }
- }
+ config-cache.set $(cache-name) : false ;
+ }
+ }
+ return $(result) ;
+}
+
+# Attempt to build a metatarget named by 'metatarget-reference'
+# in context of 'project' with properties 'ps'.
+# Returns non-empty value if build is OK.
+rule builds-raw ( metatarget-reference : project : ps : what : retry ? )
+{
+ local result ;
+
+ if ! $(retry) && ! $(.$(what)-tested.$(ps))
+ {
+ .$(what)-tested.$(ps) = true ;
+
+ local targets = [ targets.generate-from-reference
+ $(metatarget-reference) : $(project) : $(ps) ] ;
+
+ result = [ try-build $(targets[2-]) : $(ps) : $(what) : $(retry) ] ;
+ .$(what)-supported.$(ps) = $(result) ;
+
return $(result) ;
+
}
else
{
diff --git a/tools/build/v2/build/configure.py b/tools/build/src/build/configure.py
index 0426832c4..0426832c4 100644
--- a/tools/build/v2/build/configure.py
+++ b/tools/build/src/build/configure.py
diff --git a/tools/build/v2/build/engine.py b/tools/build/src/build/engine.py
index 9e624dae8..9e624dae8 100644
--- a/tools/build/v2/build/engine.py
+++ b/tools/build/src/build/engine.py
diff --git a/tools/build/v2/build/errors.py b/tools/build/src/build/errors.py
index d9dceefe0..d9dceefe0 100644
--- a/tools/build/v2/build/errors.py
+++ b/tools/build/src/build/errors.py
diff --git a/tools/build/v2/build/feature.jam b/tools/build/src/build/feature.jam
index ee6abc591..ee6abc591 100644
--- a/tools/build/v2/build/feature.jam
+++ b/tools/build/src/build/feature.jam
diff --git a/tools/build/v2/build/feature.py b/tools/build/src/build/feature.py
index 289aca14c..2ab6e5c67 100644
--- a/tools/build/v2/build/feature.py
+++ b/tools/build/src/build/feature.py
@@ -226,7 +226,7 @@ def valid (names):
if isinstance (names, str):
return valid_one (names)
else:
- return [ valid_one (name) for name in names ]
+ return all([ valid_one (name) for name in names ])
def attributes (feature):
""" Returns the attributes of the given feature.
@@ -525,7 +525,7 @@ def subfeature (feature_name, value_string, subfeature, subvalues, attributes =
def compose (composite_property_s, component_properties_s):
""" Sets the components of the given composite property.
- All paremeters are <feature>value strings
+ All parameters are <feature>value strings
"""
import property
@@ -715,7 +715,7 @@ def add_defaults (properties):
if not p.condition():
handled_features.add(p.feature())
- missing_top = [f for f in __all_top_features if not f in handled_features]
+ missing_top = [f for f in __all_top_features if not f in handled_features]
more = defaults(missing_top)
result.extend(more)
for p in more:
diff --git a/tools/build/v2/build/generators.jam b/tools/build/src/build/generators.jam
index ec7183a32..27fb22487 100644
--- a/tools/build/v2/build/generators.jam
+++ b/tools/build/src/build/generators.jam
@@ -667,7 +667,7 @@ class generator
result += $(source) ;
}
}
- return [ sequence.unique $(result) ] ;
+ return [ sequence.unique $(result) : stable ] ;
}
}
diff --git a/tools/build/v2/build/generators.py b/tools/build/src/build/generators.py
index 7c8264538..dd195a840 100644
--- a/tools/build/v2/build/generators.py
+++ b/tools/build/src/build/generators.py
@@ -1060,9 +1060,9 @@ def construct (project, name, target_type, prop_set, sources, top_level=False):
__construct_stack.append (1)
+ increase_indent ()
+
if project.manager().logger().on():
- increase_indent ()
-
dout( "*** construct " + target_type)
for s in sources:
@@ -1072,7 +1072,7 @@ def construct (project, name, target_type, prop_set, sources, top_level=False):
result = __construct_really(project, name, target_type, prop_set, sources)
- project.manager().logger().decrease_indent()
+ decrease_indent()
__construct_stack = __construct_stack [1:]
diff --git a/tools/build/v2/build/project.ann.py b/tools/build/src/build/project.ann.py
index 349f54955..349f54955 100644
--- a/tools/build/v2/build/project.ann.py
+++ b/tools/build/src/build/project.ann.py
diff --git a/tools/build/v2/build/project.jam b/tools/build/src/build/project.jam
index c9a090982..c9a090982 100644
--- a/tools/build/v2/build/project.jam
+++ b/tools/build/src/build/project.jam
diff --git a/tools/build/v2/build/project.py b/tools/build/src/build/project.py
index a08ba09d5..1cbc0e8c0 100644
--- a/tools/build/v2/build/project.py
+++ b/tools/build/src/build/project.py
@@ -372,7 +372,7 @@ actual value %s""" % (jamfile_module, saved_project, self.current_project))
module-name is the name of the project module.
location is the location (directory) of the project to initialize.
- If not specified, stanalone project will be initialized
+ If not specified, standalone project will be initialized
"""
if "--debug-loading" in self.manager.argv():
@@ -395,7 +395,6 @@ actual value %s""" % (jamfile_module, saved_project, self.current_project))
# so that it can declare targets. This is intended so that you can put
# a .jam file in your sources and use it via 'using'. Standard modules
# (in 'tools' subdir) may not assume source dir is set.
- module = sys.modules[module_name]
attributes.set("source-location", self.loaded_tool_module_path_[module_name], exact=1)
python_standalone = True
diff --git a/tools/build/v2/build/property-set.jam b/tools/build/src/build/property-set.jam
index 55cb55645..55cb55645 100644
--- a/tools/build/v2/build/property-set.jam
+++ b/tools/build/src/build/property-set.jam
diff --git a/tools/build/v2/build/property.jam b/tools/build/src/build/property.jam
index dc9dbd849..7fdf18757 100644
--- a/tools/build/v2/build/property.jam
+++ b/tools/build/src/build/property.jam
@@ -523,7 +523,7 @@ rule translate ( properties * : project-id : project-location : context-module )
else
{
import errors ;
- errors.error "'$(e)' is not a valid property specification" ;
+ errors.error "'$(property)' is not a valid property specification" ;
}
} else {
local attributes = [ feature.attributes $(feature) ] ;
diff --git a/tools/build/v2/build/property.py b/tools/build/src/build/property.py
index c8bbdb29f..dab83c7c8 100644
--- a/tools/build/v2/build/property.py
+++ b/tools/build/src/build/property.py
@@ -22,6 +22,9 @@ __re_colon = re.compile (':')
__re_has_condition = re.compile (r':<')
__re_separate_condition_and_property = re.compile (r'(.*):(<.*)')
+__not_applicable_feature='not-applicable-in-this-context'
+feature.feature(__not_applicable_feature, [], ['free'])
+
class Property(object):
__slots__ = ('_feature', '_value', '_condition')
@@ -89,9 +92,24 @@ def create_from_string(s, allow_condition=False,allow_missing_value=False):
else:
raise get_manager().errors()("Invalid property '%s' -- unknown feature" % s)
else:
- f = feature.get(feature_name)
+ if feature.valid(feature_name):
+ f = feature.get(feature_name)
+ value = get_value(s)
+ else:
+ # In case feature name is not known, it is wrong to do a hard error.
+ # Feature sets change depending on the toolset. So e.g.
+ # <toolset-X:version> is an unknown feature when using toolset Y.
+ #
+ # Ideally we would like to ignore this value, but most of
+ # Boost.Build code expects that we return a valid Property. For this
+ # reason we use a sentinel <not-applicable-in-this-context> feature.
+ #
+ # The underlying cause for this problem is that python port Property
+ # is more strict than its Jam counterpart and must always reference
+ # a valid feature.
+ f = feature.get(__not_applicable_feature)
+ value = s
- value = get_value(s)
if not value and not allow_missing_value:
get_manager().errors()("Invalid property '%s' -- no value specified" % s)
diff --git a/tools/build/v2/build/property_set.py b/tools/build/src/build/property_set.py
index d970f7734..4fff814c9 100644
--- a/tools/build/v2/build/property_set.py
+++ b/tools/build/src/build/property_set.py
@@ -6,6 +6,8 @@
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
+import hashlib
+
from b2.util.utility import *
import property, feature, string
import b2.build.feature
@@ -371,7 +373,9 @@ class PropertySet:
is_relative = False
else:
- p = self.as_path ()
+ p = self.as_path()
+ if hash_maybe:
+ p = hash_maybe(p)
# Really, an ugly hack. Boost regression test system requires
# specific target paths, and it seems that changing it to handle
@@ -446,4 +450,11 @@ class PropertySet:
def __contains__(self, item):
return item in self.all_set_
+
+def hash(p):
+ m = hashlib.md5()
+ m.update(p)
+ return m.hexdigest()
+
+hash_maybe = hash if "--hash" in bjam.variable("ARGV") else None
diff --git a/tools/build/v2/build/readme.txt b/tools/build/src/build/readme.txt
index b15055b8e..b15055b8e 100644
--- a/tools/build/v2/build/readme.txt
+++ b/tools/build/src/build/readme.txt
diff --git a/tools/build/v2/build/scanner.jam b/tools/build/src/build/scanner.jam
index ed5507029..ed5507029 100644
--- a/tools/build/v2/build/scanner.jam
+++ b/tools/build/src/build/scanner.jam
diff --git a/tools/build/v2/build/scanner.py b/tools/build/src/build/scanner.py
index 19f1431d4..19f1431d4 100644
--- a/tools/build/v2/build/scanner.py
+++ b/tools/build/src/build/scanner.py
diff --git a/tools/build/v2/build/targets.jam b/tools/build/src/build/targets.jam
index 3bd39a30e..3bd39a30e 100644
--- a/tools/build/v2/build/targets.jam
+++ b/tools/build/src/build/targets.jam
diff --git a/tools/build/v2/build/targets.py b/tools/build/src/build/targets.py
index b8546809a..acf10e4fd 100644
--- a/tools/build/v2/build/targets.py
+++ b/tools/build/src/build/targets.py
@@ -588,8 +588,9 @@ class ProjectTarget (AbstractTarget):
l = get('source-location')
value = os.path.join(l, value)
- # Now make the value absolute path
- value = os.path.join(os.getcwd(), value)
+ # Now make the value absolute path. Constants should be in
+ # platform-native form.
+ value = os.path.normpath(os.path.join(os.getcwd(), value))
self.constants_[name] = value
bjam.call("set-variable", self.project_module(), name, value)
@@ -1238,10 +1239,8 @@ class BasicTarget (AbstractTarget):
# they are propagated only to direct dependents. We might need
# a more general mechanism, but for now, only those two
# features are special.
- raw = subvariant.sources_usage_requirements().raw()
- raw = property.change(raw, "<pch-header>", None);
- raw = property.change(raw, "<pch-file>", None);
- result = result.add(property_set.create(raw))
+ removed_pch = filter(lambda prop: prop.feature().name() not in ['<pch-header>', '<pch-file>'], subvariant.sources_usage_requirements().all())
+ result = result.add(property_set.PropertySet(removed_pch))
return result
@@ -1345,7 +1344,7 @@ def apply_default_build(property_set, default_build):
compressed = feature.compress_subproperties(property_set.all())
result = build_request.expand_no_defaults(
- b2.build.property_set.create([p]) for p in (compressed + defaults_to_apply))
+ b2.build.property_set.create(feature.expand([p])) for p in (compressed + defaults_to_apply))
else:
result.append (property_set)
diff --git a/tools/build/v2/build/toolset.jam b/tools/build/src/build/toolset.jam
index 6e5b98049..a942cd906 100644
--- a/tools/build/v2/build/toolset.jam
+++ b/tools/build/src/build/toolset.jam
@@ -17,6 +17,8 @@ import regex ;
import sequence ;
import set ;
import property-set ;
+import order ;
+import "class" : new ;
.flag-no = 1 ;
@@ -237,6 +239,7 @@ rule handle-flag-value ( value * : properties * )
if $(value:G)
{
local matches = [ property.select $(value) : $(properties) ] ;
+ local order ;
for local p in $(matches)
{
local att = [ feature.attributes $(p:G) ] ;
@@ -263,11 +266,24 @@ rule handle-flag-value ( value * : properties * )
}
if path in $(att)
{
- result += [ sequence.transform path.native : $(values) ] ;
+ values = [ sequence.transform path.native : $(values) ] ;
}
- else
+ result += $(values) ;
+ if $(values[2])
{
- result += $(values) ;
+ if ! $(order)
+ {
+ order = [ new order ] ;
+ }
+ local prev ;
+ for local v in $(values)
+ {
+ if $(prev)
+ {
+ $(order).add-pair $(prev) $(v) ;
+ }
+ prev = $(v) ;
+ }
}
}
else
@@ -275,6 +291,11 @@ rule handle-flag-value ( value * : properties * )
result += $(p:G=) ;
}
}
+ if $(order)
+ {
+ result = [ $(order).order [ sequence.unique $(result) : stable ] ] ;
+ DELETE_MODULE $(order) ;
+ }
}
else
{
@@ -559,7 +580,7 @@ rule add-requirements ( requirements * )
{
if ! $(.ignore-requirements)
{
- requirements = [ property.translate-indirect $(specification) : [ CALLER_MODULE ] ] ;
+ requirements = [ property.translate-indirect $(requirements) : [ CALLER_MODULE ] ] ;
requirements = [ property.expand-subfeatures-in-conditions $(requirements) ] ;
requirements = [ property.make $(requirements) ] ;
.requirements = [ $(.requirements).add-raw $(requirements) ] ;
diff --git a/tools/build/v2/build/toolset.py b/tools/build/src/build/toolset.py
index 3665ab872..3665ab872 100644
--- a/tools/build/v2/build/toolset.py
+++ b/tools/build/src/build/toolset.py
diff --git a/tools/build/v2/build/type.jam b/tools/build/src/build/type.jam
index e8cc44ebb..e8cc44ebb 100644
--- a/tools/build/v2/build/type.jam
+++ b/tools/build/src/build/type.jam
diff --git a/tools/build/v2/build/type.py b/tools/build/src/build/type.py
index e815739f4..e815739f4 100644
--- a/tools/build/v2/build/type.py
+++ b/tools/build/src/build/type.py
diff --git a/tools/build/v2/build/version.jam b/tools/build/src/build/version.jam
index d4b787d6d..fa8fb3a56 100644
--- a/tools/build/v2/build/version.jam
+++ b/tools/build/src/build/version.jam
@@ -6,8 +6,8 @@
import numbers ;
-.major = "2011" ;
-.minor = "12" ;
+.major = "2014" ;
+.minor = "03" ;
rule boost-build ( )
diff --git a/tools/build/v2/build/virtual-target.jam b/tools/build/src/build/virtual-target.jam
index f62eadbe1..44a706db3 100644
--- a/tools/build/v2/build/virtual-target.jam
+++ b/tools/build/src/build/virtual-target.jam
@@ -1324,8 +1324,9 @@ class subvariant
for local t in $(self.created-targets)
{
# Skip targets of the wrong type.
+ local type = [ $(t).type ] ;
if ! $(target-type) ||
- [ type.is-derived [ $(t).type ] $(target-type) ]
+ ( $(type) && [ type.is-derived $(type) $(target-type) ] )
{
result = [ sequence.merge $(result) : [ $(t).path ] ] ;
}
diff --git a/tools/build/v2/build/virtual_target.py b/tools/build/src/build/virtual_target.py
index c44559f5b..f3d190f64 100644
--- a/tools/build/v2/build/virtual_target.py
+++ b/tools/build/src/build/virtual_target.py
@@ -402,7 +402,7 @@ class AbstractFileTarget (VirtualTarget):
""" Sets the path. When generating target name, it will override any path
computation from properties.
"""
- self.path_ = path
+ self.path_ = os.path.normpath(path)
def action (self):
""" Returns the action.
@@ -465,7 +465,7 @@ class AbstractFileTarget (VirtualTarget):
def actual_name (self):
if not self.actual_name_:
- self.actual_name_ = '<' + self.grist() + '>' + self.name_
+ self.actual_name_ = '<' + self.grist() + '>' + os.path.normpath(self.name_)
return self.actual_name_
diff --git a/tools/build/v2/build_system.py b/tools/build/src/build_system.py
index c5757c817..c5757c817 100644
--- a/tools/build/v2/build_system.py
+++ b/tools/build/src/build_system.py
diff --git a/tools/build/v2/contrib/boost.jam b/tools/build/src/contrib/boost.jam
index 7daefd0c7..7daefd0c7 100644
--- a/tools/build/v2/contrib/boost.jam
+++ b/tools/build/src/contrib/boost.jam
diff --git a/tools/build/src/contrib/boost.py b/tools/build/src/contrib/boost.py
new file mode 100644
index 000000000..e0bbcf34d
--- /dev/null
+++ b/tools/build/src/contrib/boost.py
@@ -0,0 +1,279 @@
+# $Id: boost.jam 62249 2010-05-26 19:05:19Z steven_watanabe $
+# Copyright 2008 Roland Schwarz
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Boost library support module.
+#
+# This module allows to use the boost library from boost-build projects.
+# The location of a boost source tree or the path to a pre-built
+# version of the library can be configured from either site-config.jam
+# or user-config.jam. If no location is configured the module looks for
+# a BOOST_ROOT environment variable, which should point to a boost source
+# tree. As a last resort it tries to use pre-built libraries from the standard
+# search path of the compiler.
+#
+# If the location to a source tree is known, the module can be configured
+# from the *-config.jam files:
+#
+# using boost : 1.35 : <root>/path-to-boost-root ;
+#
+# If the location to a pre-built version is known:
+#
+# using boost : 1.34
+# : <include>/usr/local/include/boost_1_34
+# <library>/usr/local/lib
+# ;
+#
+# It is legal to configure more than one boost library version in the config
+# files. The version identifier is used to disambiguate between them.
+# The first configured version becomes the default.
+#
+# To use a boost library you need to put a 'use' statement into your
+# Jamfile:
+#
+# import boost ;
+#
+# boost.use-project 1.35 ;
+#
+# If you don't care about a specific version you just can omit the version
+# part, in which case the default is picked up:
+#
+# boost.use-project ;
+#
+# The library can be referenced with the project identifier '/boost'. To
+# reference the program_options you would specify:
+#
+# exe myexe : mysrc.cpp : <library>/boost//program_options ;
+#
+# Note that the requirements are automatically transformed into suitable
+# tags to find the correct pre-built library.
+#
+
+import re
+
+import bjam
+
+from b2.build import alias, property, property_set, feature
+from b2.manager import get_manager
+from b2.tools import builtin, common
+from b2.util import bjam_signature, regex
+
+
+# TODO: This is currently necessary in Python Port, but was not in Jam.
+feature.feature('layout', ['system', 'versioned', 'tag'], ['optional'])
+feature.feature('root', [], ['optional', 'free'])
+feature.feature('build-id', [], ['optional', 'free'])
+
+__initialized = None
+__boost_auto_config = property_set.create([property.Property('layout', 'system')])
+__boost_configured = {}
+__boost_default = None
+__build_id = None
+
+__debug = None
+
+def debug():
+ global __debug
+ if __debug is None:
+ __debug = "--debug-configuration" in bjam.variable("ARGV")
+ return __debug
+
+
+# Configuration of the boost library to use.
+#
+# This can either be a boost source tree or
+# pre-built libraries. The 'version' parameter must be a valid boost
+# version number, e.g. 1.35, if specifying a pre-built version with
+# versioned layout. It may be a symbolic name, e.g. 'trunk' if specifying
+# a source tree. The options are specified as named parameters (like
+# properties). The following paramters are available:
+#
+# <root>/path-to-boost-root: Specify a source tree.
+#
+# <include>/path-to-include: The include directory to search.
+#
+# <library>/path-to-library: The library directory to search.
+#
+# <layout>system or <layout>versioned.
+#
+# <build-id>my_build_id: The custom build id to use.
+#
+def init(version, options = None):
+ assert(isinstance(version,list))
+ assert(len(version)==1)
+ version = version[0]
+ if version in __boost_configured:
+ get_manager().errors()("Boost {} already configured.".format(version));
+ else:
+ global __boost_default
+ if debug():
+ if not __boost_default:
+ print "notice: configuring default boost library {}".format(version)
+ print "notice: configuring boost library {}".format(version)
+
+ if not __boost_default:
+ __boost_default = version
+ properties = []
+ for option in options:
+ properties.append(property.create_from_string(option))
+ __boost_configured[ version ] = property_set.PropertySet(properties)
+
+projects = get_manager().projects()
+rules = projects.project_rules()
+
+
+# Use a certain version of the library.
+#
+# The use-project rule causes the module to define a boost project of
+# searchable pre-built boost libraries, or references a source tree
+# of the boost library. If the 'version' parameter is omitted either
+# the configured default (first in config files) is used or an auto
+# configuration will be attempted.
+#
+@bjam_signature(([ "version", "?" ], ))
+def use_project(version = None):
+ projects.push_current( projects.current() )
+ if not version:
+ version = __boost_default
+ if not version:
+ version = "auto_config"
+
+ global __initialized
+ if __initialized:
+ if __initialized != version:
+ get_manager().errors()('Attempt to use {} with different parameters'.format('boost'))
+ else:
+ if version in __boost_configured:
+ opts = __boost_configured[ version ]
+ root = opts.get('<root>' )
+ inc = opts.get('<include>')
+ lib = opts.get('<library>')
+
+ if debug():
+ print "notice: using boost library {} {}".format( version, opt.raw() )
+
+ global __layout
+ global __version_tag
+ __layout = opts.get('<layout>')
+ if not __layout:
+ __layout = 'versioned'
+ __build_id = opts.get('<build-id>')
+ __version_tag = re.sub("[*\\/:.\"\' ]", "_", version)
+ __initialized = version
+
+ if ( root and inc ) or \
+ ( root and lib ) or \
+ ( lib and not inc ) or \
+ ( not lib and inc ):
+ get_manager().errors()("Ambiguous parameters, use either <root> or <inlude> with <library>.")
+ elif not root and not inc:
+ root = bjam.variable("BOOST_ROOT")
+
+ module = projects.current().project_module()
+
+ if root:
+ bjam.call('call-in-module', module, 'use-project', ['boost', root])
+ else:
+ projects.initialize(__name__)
+ if version == '0.0.1':
+ boost_0_0_1( inc, lib )
+ else:
+ boost_std( inc, lib )
+ else:
+ get_manager().errors()("Reference to unconfigured boost version.")
+ projects.pop_current()
+
+
+rules.add_rule( 'boost.use-project', use_project )
+
+def boost_std(inc = None, lib = None):
+ # The default definitions for pre-built libraries.
+ rules.project(
+ ['boost'],
+ ['usage-requirements'] + ['<include>{}'.format(i) for i in inc] + ['<define>BOOST_ALL_NO_LIB'],
+ ['requirements'] + ['<search>{}'.format(l) for l in lib])
+
+ # TODO: There should be a better way to add a Python function into a
+ # project requirements property set.
+ tag_prop_set = property_set.create([property.Property('<tag>', tag_std)])
+ attributes = projects.attributes(projects.current().project_module())
+ attributes.requirements = attributes.requirements.refine(tag_prop_set)
+
+ alias('headers')
+
+ def boost_lib(lib_name, dyn_link_macro):
+ if (isinstance(lib_name,str)):
+ lib_name = [lib_name]
+ builtin.lib(lib_name, usage_requirements=['<link>shared:<define>{}'.format(dyn_link_macro)])
+
+ boost_lib('date_time' , 'BOOST_DATE_TIME_DYN_LINK' )
+ boost_lib('filesystem' , 'BOOST_FILE_SYSTEM_DYN_LINK' )
+ boost_lib('graph' , 'BOOST_GRAPH_DYN_LINK' )
+ boost_lib('graph_parallel' , 'BOOST_GRAPH_DYN_LINK' )
+ boost_lib('iostreams' , 'BOOST_IOSTREAMS_DYN_LINK' )
+ boost_lib('locale' , 'BOOST_LOG_DYN_LINK' )
+ boost_lib('log' , 'BOOST_LOG_DYN_LINK' )
+ boost_lib('log_setup' , 'BOOST_LOG_DYN_LINK' )
+ boost_lib('math_tr1' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('math_tr1f' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('math_tr1l' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('math_c99' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('math_c99f' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('math_c99l' , 'BOOST_MATH_TR1_DYN_LINK' )
+ boost_lib('mpi' , 'BOOST_MPI_DYN_LINK' )
+ boost_lib('program_options' , 'BOOST_PROGRAM_OPTIONS_DYN_LINK')
+ boost_lib('python' , 'BOOST_PYTHON_DYN_LINK' )
+ boost_lib('python3' , 'BOOST_PYTHON_DYN_LINK' )
+ boost_lib('random' , 'BOOST_RANDOM_DYN_LINK' )
+ boost_lib('regex' , 'BOOST_REGEX_DYN_LINK' )
+ boost_lib('serialization' , 'BOOST_SERIALIZATION_DYN_LINK' )
+ boost_lib('wserialization' , 'BOOST_SERIALIZATION_DYN_LINK' )
+ boost_lib('signals' , 'BOOST_SIGNALS_DYN_LINK' )
+ boost_lib('system' , 'BOOST_SYSTEM_DYN_LINK' )
+ boost_lib('unit_test_framework' , 'BOOST_TEST_DYN_LINK' )
+ boost_lib('prg_exec_monitor' , 'BOOST_TEST_DYN_LINK' )
+ boost_lib('test_exec_monitor' , 'BOOST_TEST_DYN_LINK' )
+ boost_lib('thread' , 'BOOST_THREAD_DYN_DLL' )
+ boost_lib('wave' , 'BOOST_WAVE_DYN_LINK' )
+
+def boost_0_0_1( inc, lib ):
+ print "You are trying to use an example placeholder for boost libs." ;
+ # Copy this template to another place (in the file boost.jam)
+ # and define a project and libraries modelled after the
+ # boost_std rule. Please note that it is also possible to have
+ # a per version taging rule in case they are different between
+ # versions.
+
+def tag_std(name, type, prop_set):
+ name = 'boost_' + name
+ if 'static' in prop_set.get('<link>') and 'windows' in prop_set.get('<target-os>'):
+ name = 'lib' + name
+ result = None
+
+ if __layout == 'system':
+ versionRe = re.search('^([0-9]+)_([0-9]+)', __version_tag)
+ if versionRe and versionRe.group(1) == '1' and int(versionRe.group(2)) < 39:
+ result = tag_tagged(name, type, prop_set)
+ else:
+ result = tag_system(name, type, prop_set)
+ elif __layout == 'tagged':
+ result = tag_tagged(name, type, prop_set)
+ elif __layout == 'versioned':
+ result = tag_versioned(name, type, prop_set)
+ else:
+ get_manager().errors()("Missing layout")
+ return result
+
+def tag_maybe(param):
+ return ['-{}'.format(param)] if param else []
+
+def tag_system(name, type, prop_set):
+ return common.format_name(['<base>'] + tag_maybe(__build_id), name, type, prop_set)
+
+def tag_system(name, type, prop_set):
+ return common.format_name(['<base>', '<threading>', '<runtime>'] + tag_maybe(__build_id), name, type, prop_set)
+
+def tag_versioned(name, type, prop_set):
+ return common.format_name(['<base>', '<toolset>', '<threading>', '<runtime>'] + tag_maybe(__version_tag) + tag_maybe(__build_id),
+ name, type, prop_set)
diff --git a/tools/build/v2/contrib/tntnet.jam b/tools/build/src/contrib/tntnet.jam
index 0bd0ae559..0bd0ae559 100644
--- a/tools/build/v2/contrib/tntnet.jam
+++ b/tools/build/src/contrib/tntnet.jam
diff --git a/tools/build/v2/contrib/wxFormBuilder.jam b/tools/build/src/contrib/wxFormBuilder.jam
index c9ee2de72..c9ee2de72 100644
--- a/tools/build/v2/contrib/wxFormBuilder.jam
+++ b/tools/build/src/contrib/wxFormBuilder.jam
diff --git a/tools/build/v2/engine/Jambase b/tools/build/src/engine/Jambase
index 94f8fbde5..94f8fbde5 100644
--- a/tools/build/v2/engine/Jambase
+++ b/tools/build/src/engine/Jambase
diff --git a/tools/build/v2/engine/boehm_gc/AmigaOS.c b/tools/build/src/engine/boehm_gc/AmigaOS.c
index d17150394..d17150394 100644
--- a/tools/build/v2/engine/boehm_gc/AmigaOS.c
+++ b/tools/build/src/engine/boehm_gc/AmigaOS.c
diff --git a/tools/build/v2/engine/boehm_gc/BCC_MAKEFILE b/tools/build/src/engine/boehm_gc/BCC_MAKEFILE
index b825ec4df..b825ec4df 100644
--- a/tools/build/v2/engine/boehm_gc/BCC_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/BCC_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/ChangeLog b/tools/build/src/engine/boehm_gc/ChangeLog
index 96bf3171e..96bf3171e 100644
--- a/tools/build/v2/engine/boehm_gc/ChangeLog
+++ b/tools/build/src/engine/boehm_gc/ChangeLog
diff --git a/tools/build/v2/engine/boehm_gc/EMX_MAKEFILE b/tools/build/src/engine/boehm_gc/EMX_MAKEFILE
index c7e5bb806..c7e5bb806 100644
--- a/tools/build/v2/engine/boehm_gc/EMX_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/EMX_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/MacOS.c b/tools/build/src/engine/boehm_gc/MacOS.c
index b56bea782..b56bea782 100644
--- a/tools/build/v2/engine/boehm_gc/MacOS.c
+++ b/tools/build/src/engine/boehm_gc/MacOS.c
diff --git a/tools/build/v2/engine/boehm_gc/MacProjects.sit.hqx b/tools/build/src/engine/boehm_gc/MacProjects.sit.hqx
index 99dff88b4..99dff88b4 100644
--- a/tools/build/v2/engine/boehm_gc/MacProjects.sit.hqx
+++ b/tools/build/src/engine/boehm_gc/MacProjects.sit.hqx
diff --git a/tools/build/v2/engine/boehm_gc/Mac_files/MacOS_Test_config.h b/tools/build/src/engine/boehm_gc/Mac_files/MacOS_Test_config.h
index 4e5d25277..4e5d25277 100644
--- a/tools/build/v2/engine/boehm_gc/Mac_files/MacOS_Test_config.h
+++ b/tools/build/src/engine/boehm_gc/Mac_files/MacOS_Test_config.h
diff --git a/tools/build/v2/engine/boehm_gc/Mac_files/MacOS_config.h b/tools/build/src/engine/boehm_gc/Mac_files/MacOS_config.h
index 407bdf154..407bdf154 100644
--- a/tools/build/v2/engine/boehm_gc/Mac_files/MacOS_config.h
+++ b/tools/build/src/engine/boehm_gc/Mac_files/MacOS_config.h
diff --git a/tools/build/v2/engine/boehm_gc/Mac_files/dataend.c b/tools/build/src/engine/boehm_gc/Mac_files/dataend.c
index a3e3fe844..a3e3fe844 100644
--- a/tools/build/v2/engine/boehm_gc/Mac_files/dataend.c
+++ b/tools/build/src/engine/boehm_gc/Mac_files/dataend.c
diff --git a/tools/build/v2/engine/boehm_gc/Mac_files/datastart.c b/tools/build/src/engine/boehm_gc/Mac_files/datastart.c
index a9e0dd594..a9e0dd594 100644
--- a/tools/build/v2/engine/boehm_gc/Mac_files/datastart.c
+++ b/tools/build/src/engine/boehm_gc/Mac_files/datastart.c
diff --git a/tools/build/v2/engine/boehm_gc/Makefile.DLLs b/tools/build/src/engine/boehm_gc/Makefile.DLLs
index 011f49d3b..011f49d3b 100644
--- a/tools/build/v2/engine/boehm_gc/Makefile.DLLs
+++ b/tools/build/src/engine/boehm_gc/Makefile.DLLs
diff --git a/tools/build/v2/engine/boehm_gc/Makefile.am b/tools/build/src/engine/boehm_gc/Makefile.am
index e632864df..e632864df 100644
--- a/tools/build/v2/engine/boehm_gc/Makefile.am
+++ b/tools/build/src/engine/boehm_gc/Makefile.am
diff --git a/tools/build/v2/engine/boehm_gc/Makefile.direct b/tools/build/src/engine/boehm_gc/Makefile.direct
index 40195a562..40195a562 100644
--- a/tools/build/v2/engine/boehm_gc/Makefile.direct
+++ b/tools/build/src/engine/boehm_gc/Makefile.direct
diff --git a/tools/build/v2/engine/boehm_gc/Makefile.dj b/tools/build/src/engine/boehm_gc/Makefile.dj
index 4618eb845..4618eb845 100644
--- a/tools/build/v2/engine/boehm_gc/Makefile.dj
+++ b/tools/build/src/engine/boehm_gc/Makefile.dj
diff --git a/tools/build/v2/engine/boehm_gc/Makefile.in b/tools/build/src/engine/boehm_gc/Makefile.in
index f4dbe12d6..f4dbe12d6 100644
--- a/tools/build/v2/engine/boehm_gc/Makefile.in
+++ b/tools/build/src/engine/boehm_gc/Makefile.in
diff --git a/tools/build/v2/engine/boehm_gc/NT_MAKEFILE b/tools/build/src/engine/boehm_gc/NT_MAKEFILE
index c8739effc..c8739effc 100755
--- a/tools/build/v2/engine/boehm_gc/NT_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/NT_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE b/tools/build/src/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE
index d0f912751..d0f912751 100644
--- a/tools/build/v2/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/NT_THREADS_MAKEFILE b/tools/build/src/engine/boehm_gc/NT_THREADS_MAKEFILE
index 5c02c9023..5c02c9023 100644
--- a/tools/build/v2/engine/boehm_gc/NT_THREADS_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/NT_THREADS_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE b/tools/build/src/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
index 91a0f60ef..91a0f60ef 100644
--- a/tools/build/v2/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/OS2_MAKEFILE b/tools/build/src/engine/boehm_gc/OS2_MAKEFILE
index c6bad7abc..c6bad7abc 100644
--- a/tools/build/v2/engine/boehm_gc/OS2_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/OS2_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/PCR-Makefile b/tools/build/src/engine/boehm_gc/PCR-Makefile
index db4c9f018..db4c9f018 100644
--- a/tools/build/v2/engine/boehm_gc/PCR-Makefile
+++ b/tools/build/src/engine/boehm_gc/PCR-Makefile
diff --git a/tools/build/v2/engine/boehm_gc/README.QUICK b/tools/build/src/engine/boehm_gc/README.QUICK
index 5ffa505c9..5ffa505c9 100644
--- a/tools/build/v2/engine/boehm_gc/README.QUICK
+++ b/tools/build/src/engine/boehm_gc/README.QUICK
diff --git a/tools/build/v2/engine/boehm_gc/SMakefile.amiga b/tools/build/src/engine/boehm_gc/SMakefile.amiga
index 94fb72386..94fb72386 100644
--- a/tools/build/v2/engine/boehm_gc/SMakefile.amiga
+++ b/tools/build/src/engine/boehm_gc/SMakefile.amiga
diff --git a/tools/build/v2/engine/boehm_gc/WCC_MAKEFILE b/tools/build/src/engine/boehm_gc/WCC_MAKEFILE
index 6b1d78bae..6b1d78bae 100644
--- a/tools/build/v2/engine/boehm_gc/WCC_MAKEFILE
+++ b/tools/build/src/engine/boehm_gc/WCC_MAKEFILE
diff --git a/tools/build/v2/engine/boehm_gc/acinclude.m4 b/tools/build/src/engine/boehm_gc/acinclude.m4
index 72602a004..72602a004 100644
--- a/tools/build/v2/engine/boehm_gc/acinclude.m4
+++ b/tools/build/src/engine/boehm_gc/acinclude.m4
diff --git a/tools/build/v2/engine/boehm_gc/aclocal.m4 b/tools/build/src/engine/boehm_gc/aclocal.m4
index 8d195b518..8d195b518 100644
--- a/tools/build/v2/engine/boehm_gc/aclocal.m4
+++ b/tools/build/src/engine/boehm_gc/aclocal.m4
diff --git a/tools/build/v2/engine/boehm_gc/add_gc_prefix.c b/tools/build/src/engine/boehm_gc/add_gc_prefix.c
index 59515c786..59515c786 100644
--- a/tools/build/v2/engine/boehm_gc/add_gc_prefix.c
+++ b/tools/build/src/engine/boehm_gc/add_gc_prefix.c
diff --git a/tools/build/v2/engine/boehm_gc/allchblk.c b/tools/build/src/engine/boehm_gc/allchblk.c
index 0cec29d60..0cec29d60 100644
--- a/tools/build/v2/engine/boehm_gc/allchblk.c
+++ b/tools/build/src/engine/boehm_gc/allchblk.c
diff --git a/tools/build/v2/engine/boehm_gc/alloc.c b/tools/build/src/engine/boehm_gc/alloc.c
index 94a968e0a..94a968e0a 100644
--- a/tools/build/v2/engine/boehm_gc/alloc.c
+++ b/tools/build/src/engine/boehm_gc/alloc.c
diff --git a/tools/build/v2/engine/boehm_gc/alpha_mach_dep.S b/tools/build/src/engine/boehm_gc/alpha_mach_dep.S
index d4def2405..d4def2405 100644
--- a/tools/build/v2/engine/boehm_gc/alpha_mach_dep.S
+++ b/tools/build/src/engine/boehm_gc/alpha_mach_dep.S
diff --git a/tools/build/v2/engine/boehm_gc/backgraph.c b/tools/build/src/engine/boehm_gc/backgraph.c
index 59c330f46..59c330f46 100644
--- a/tools/build/v2/engine/boehm_gc/backgraph.c
+++ b/tools/build/src/engine/boehm_gc/backgraph.c
diff --git a/tools/build/v2/engine/boehm_gc/bdw-gc.pc b/tools/build/src/engine/boehm_gc/bdw-gc.pc
index 55fc3346f..55fc3346f 100644
--- a/tools/build/v2/engine/boehm_gc/bdw-gc.pc
+++ b/tools/build/src/engine/boehm_gc/bdw-gc.pc
diff --git a/tools/build/v2/engine/boehm_gc/bdw-gc.pc.in b/tools/build/src/engine/boehm_gc/bdw-gc.pc.in
index ef4c23410..ef4c23410 100644
--- a/tools/build/v2/engine/boehm_gc/bdw-gc.pc.in
+++ b/tools/build/src/engine/boehm_gc/bdw-gc.pc.in
diff --git a/tools/build/v2/engine/boehm_gc/blacklst.c b/tools/build/src/engine/boehm_gc/blacklst.c
index afcad9c21..afcad9c21 100644
--- a/tools/build/v2/engine/boehm_gc/blacklst.c
+++ b/tools/build/src/engine/boehm_gc/blacklst.c
diff --git a/tools/build/v2/engine/boehm_gc/callprocs b/tools/build/src/engine/boehm_gc/callprocs
index a8793f0b7..a8793f0b7 100755
--- a/tools/build/v2/engine/boehm_gc/callprocs
+++ b/tools/build/src/engine/boehm_gc/callprocs
diff --git a/tools/build/v2/engine/boehm_gc/checksums.c b/tools/build/src/engine/boehm_gc/checksums.c
index 0942acb48..0942acb48 100644
--- a/tools/build/v2/engine/boehm_gc/checksums.c
+++ b/tools/build/src/engine/boehm_gc/checksums.c
diff --git a/tools/build/v2/engine/boehm_gc/compile b/tools/build/src/engine/boehm_gc/compile
index 3d2170320..3d2170320 100755
--- a/tools/build/v2/engine/boehm_gc/compile
+++ b/tools/build/src/engine/boehm_gc/compile
diff --git a/tools/build/v2/engine/boehm_gc/config.guess b/tools/build/src/engine/boehm_gc/config.guess
index 7924ac077..7924ac077 100755
--- a/tools/build/v2/engine/boehm_gc/config.guess
+++ b/tools/build/src/engine/boehm_gc/config.guess
diff --git a/tools/build/v2/engine/boehm_gc/config.sub b/tools/build/src/engine/boehm_gc/config.sub
index 70584b007..70584b007 100644
--- a/tools/build/v2/engine/boehm_gc/config.sub
+++ b/tools/build/src/engine/boehm_gc/config.sub
diff --git a/tools/build/v2/engine/boehm_gc/configure b/tools/build/src/engine/boehm_gc/configure
index e2092d1cf..e2092d1cf 100755
--- a/tools/build/v2/engine/boehm_gc/configure
+++ b/tools/build/src/engine/boehm_gc/configure
diff --git a/tools/build/v2/engine/boehm_gc/configure.ac b/tools/build/src/engine/boehm_gc/configure.ac
index 7922b13fc..7922b13fc 100644
--- a/tools/build/v2/engine/boehm_gc/configure.ac
+++ b/tools/build/src/engine/boehm_gc/configure.ac
diff --git a/tools/build/v2/engine/boehm_gc/configure.host b/tools/build/src/engine/boehm_gc/configure.host
index a98a0a7cb..a98a0a7cb 100644
--- a/tools/build/v2/engine/boehm_gc/configure.host
+++ b/tools/build/src/engine/boehm_gc/configure.host
diff --git a/tools/build/v2/engine/boehm_gc/configure_atomic_ops.sh b/tools/build/src/engine/boehm_gc/configure_atomic_ops.sh
index 6a0e31a71..6a0e31a71 100755
--- a/tools/build/v2/engine/boehm_gc/configure_atomic_ops.sh
+++ b/tools/build/src/engine/boehm_gc/configure_atomic_ops.sh
diff --git a/tools/build/v2/engine/boehm_gc/cord/cord.am b/tools/build/src/engine/boehm_gc/cord/cord.am
index fc5e8cc20..fc5e8cc20 100644
--- a/tools/build/v2/engine/boehm_gc/cord/cord.am
+++ b/tools/build/src/engine/boehm_gc/cord/cord.am
diff --git a/tools/build/v2/engine/boehm_gc/cord/cordbscs.c b/tools/build/src/engine/boehm_gc/cord/cordbscs.c
index d83f4067d..d83f4067d 100644
--- a/tools/build/v2/engine/boehm_gc/cord/cordbscs.c
+++ b/tools/build/src/engine/boehm_gc/cord/cordbscs.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/cordprnt.c b/tools/build/src/engine/boehm_gc/cord/cordprnt.c
index 6d278feda..6d278feda 100644
--- a/tools/build/v2/engine/boehm_gc/cord/cordprnt.c
+++ b/tools/build/src/engine/boehm_gc/cord/cordprnt.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/cordtest.c b/tools/build/src/engine/boehm_gc/cord/cordtest.c
index 08333ca04..08333ca04 100644
--- a/tools/build/v2/engine/boehm_gc/cord/cordtest.c
+++ b/tools/build/src/engine/boehm_gc/cord/cordtest.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/cordxtra.c b/tools/build/src/engine/boehm_gc/cord/cordxtra.c
index b0a746226..b0a746226 100644
--- a/tools/build/v2/engine/boehm_gc/cord/cordxtra.c
+++ b/tools/build/src/engine/boehm_gc/cord/cordxtra.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/de.c b/tools/build/src/engine/boehm_gc/cord/de.c
index 989e19a88..989e19a88 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de.c
+++ b/tools/build/src/engine/boehm_gc/cord/de.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/de_cmds.h b/tools/build/src/engine/boehm_gc/cord/de_cmds.h
index f42ddcf2d..f42ddcf2d 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de_cmds.h
+++ b/tools/build/src/engine/boehm_gc/cord/de_cmds.h
diff --git a/tools/build/v2/engine/boehm_gc/cord/de_win.ICO b/tools/build/src/engine/boehm_gc/cord/de_win.ICO
index b20ac3ee1..b20ac3ee1 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de_win.ICO
+++ b/tools/build/src/engine/boehm_gc/cord/de_win.ICO
Binary files differ
diff --git a/tools/build/v2/engine/boehm_gc/cord/de_win.RC b/tools/build/src/engine/boehm_gc/cord/de_win.RC
index 554a30043..554a30043 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de_win.RC
+++ b/tools/build/src/engine/boehm_gc/cord/de_win.RC
diff --git a/tools/build/v2/engine/boehm_gc/cord/de_win.c b/tools/build/src/engine/boehm_gc/cord/de_win.c
index 1871736e3..1871736e3 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de_win.c
+++ b/tools/build/src/engine/boehm_gc/cord/de_win.c
diff --git a/tools/build/v2/engine/boehm_gc/cord/de_win.h b/tools/build/src/engine/boehm_gc/cord/de_win.h
index 57a47b45c..57a47b45c 100644
--- a/tools/build/v2/engine/boehm_gc/cord/de_win.h
+++ b/tools/build/src/engine/boehm_gc/cord/de_win.h
diff --git a/tools/build/v2/engine/boehm_gc/darwin_stop_world.c b/tools/build/src/engine/boehm_gc/darwin_stop_world.c
index a2f092645..a2f092645 100644
--- a/tools/build/v2/engine/boehm_gc/darwin_stop_world.c
+++ b/tools/build/src/engine/boehm_gc/darwin_stop_world.c
diff --git a/tools/build/v2/engine/boehm_gc/dbg_mlc.c b/tools/build/src/engine/boehm_gc/dbg_mlc.c
index 4b72e390a..4b72e390a 100644
--- a/tools/build/v2/engine/boehm_gc/dbg_mlc.c
+++ b/tools/build/src/engine/boehm_gc/dbg_mlc.c
diff --git a/tools/build/v2/engine/boehm_gc/depcomp b/tools/build/src/engine/boehm_gc/depcomp
index 3480ce4e9..3480ce4e9 100755
--- a/tools/build/v2/engine/boehm_gc/depcomp
+++ b/tools/build/src/engine/boehm_gc/depcomp
diff --git a/tools/build/v2/engine/boehm_gc/digimars.mak b/tools/build/src/engine/boehm_gc/digimars.mak
index 208061182..208061182 100644
--- a/tools/build/v2/engine/boehm_gc/digimars.mak
+++ b/tools/build/src/engine/boehm_gc/digimars.mak
diff --git a/tools/build/v2/engine/boehm_gc/doc/README b/tools/build/src/engine/boehm_gc/doc/README
index 33a6740bc..33a6740bc 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README
+++ b/tools/build/src/engine/boehm_gc/doc/README
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.DGUX386 b/tools/build/src/engine/boehm_gc/doc/README.DGUX386
index 9d6d84788..9d6d84788 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.DGUX386
+++ b/tools/build/src/engine/boehm_gc/doc/README.DGUX386
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.Mac b/tools/build/src/engine/boehm_gc/doc/README.Mac
index ae9c1d5e5..ae9c1d5e5 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.Mac
+++ b/tools/build/src/engine/boehm_gc/doc/README.Mac
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.MacOSX b/tools/build/src/engine/boehm_gc/doc/README.MacOSX
index f5333d51a..f5333d51a 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.MacOSX
+++ b/tools/build/src/engine/boehm_gc/doc/README.MacOSX
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.OS2 b/tools/build/src/engine/boehm_gc/doc/README.OS2
index 5345bbd0f..5345bbd0f 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.OS2
+++ b/tools/build/src/engine/boehm_gc/doc/README.OS2
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.amiga b/tools/build/src/engine/boehm_gc/doc/README.amiga
index 730dce3fe..730dce3fe 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.amiga
+++ b/tools/build/src/engine/boehm_gc/doc/README.amiga
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.arm.cross b/tools/build/src/engine/boehm_gc/doc/README.arm.cross
index 96744edaf..96744edaf 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.arm.cross
+++ b/tools/build/src/engine/boehm_gc/doc/README.arm.cross
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.autoconf b/tools/build/src/engine/boehm_gc/doc/README.autoconf
index 53fcf5a50..53fcf5a50 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.autoconf
+++ b/tools/build/src/engine/boehm_gc/doc/README.autoconf
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.changes b/tools/build/src/engine/boehm_gc/doc/README.changes
index 27bf33eaa..27bf33eaa 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.changes
+++ b/tools/build/src/engine/boehm_gc/doc/README.changes
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.contributors b/tools/build/src/engine/boehm_gc/doc/README.contributors
index fd5c95f22..fd5c95f22 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.contributors
+++ b/tools/build/src/engine/boehm_gc/doc/README.contributors
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.cords b/tools/build/src/engine/boehm_gc/doc/README.cords
index 3485e0145..3485e0145 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.cords
+++ b/tools/build/src/engine/boehm_gc/doc/README.cords
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.darwin b/tools/build/src/engine/boehm_gc/doc/README.darwin
index b413ff338..b413ff338 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.darwin
+++ b/tools/build/src/engine/boehm_gc/doc/README.darwin
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.dj b/tools/build/src/engine/boehm_gc/doc/README.dj
index 613bc423c..613bc423c 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.dj
+++ b/tools/build/src/engine/boehm_gc/doc/README.dj
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.environment b/tools/build/src/engine/boehm_gc/doc/README.environment
index d50d37094..d50d37094 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.environment
+++ b/tools/build/src/engine/boehm_gc/doc/README.environment
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.ews4800 b/tools/build/src/engine/boehm_gc/doc/README.ews4800
index 80bca2b3d..80bca2b3d 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.ews4800
+++ b/tools/build/src/engine/boehm_gc/doc/README.ews4800
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.hp b/tools/build/src/engine/boehm_gc/doc/README.hp
index caa8bdd19..caa8bdd19 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.hp
+++ b/tools/build/src/engine/boehm_gc/doc/README.hp
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.linux b/tools/build/src/engine/boehm_gc/doc/README.linux
index 3c5018148..3c5018148 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.linux
+++ b/tools/build/src/engine/boehm_gc/doc/README.linux
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.macros b/tools/build/src/engine/boehm_gc/doc/README.macros
index 6a9a1fdcb..6a9a1fdcb 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.macros
+++ b/tools/build/src/engine/boehm_gc/doc/README.macros
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.rs6000 b/tools/build/src/engine/boehm_gc/doc/README.rs6000
index f5630b20a..f5630b20a 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.rs6000
+++ b/tools/build/src/engine/boehm_gc/doc/README.rs6000
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.sgi b/tools/build/src/engine/boehm_gc/doc/README.sgi
index 7bdb50a4e..7bdb50a4e 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.sgi
+++ b/tools/build/src/engine/boehm_gc/doc/README.sgi
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.solaris2 b/tools/build/src/engine/boehm_gc/doc/README.solaris2
index 73620342f..73620342f 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.solaris2
+++ b/tools/build/src/engine/boehm_gc/doc/README.solaris2
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.uts b/tools/build/src/engine/boehm_gc/doc/README.uts
index 6be49667d..6be49667d 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.uts
+++ b/tools/build/src/engine/boehm_gc/doc/README.uts
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.win32 b/tools/build/src/engine/boehm_gc/doc/README.win32
index 1dce2b9e7..1dce2b9e7 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.win32
+++ b/tools/build/src/engine/boehm_gc/doc/README.win32
diff --git a/tools/build/v2/engine/boehm_gc/doc/README.win64 b/tools/build/src/engine/boehm_gc/doc/README.win64
index 9db0e78c6..9db0e78c6 100644
--- a/tools/build/v2/engine/boehm_gc/doc/README.win64
+++ b/tools/build/src/engine/boehm_gc/doc/README.win64
diff --git a/tools/build/v2/engine/boehm_gc/doc/barrett_diagram b/tools/build/src/engine/boehm_gc/doc/barrett_diagram
index 27e80dc15..27e80dc15 100644
--- a/tools/build/v2/engine/boehm_gc/doc/barrett_diagram
+++ b/tools/build/src/engine/boehm_gc/doc/barrett_diagram
diff --git a/tools/build/v2/engine/boehm_gc/doc/debugging.html b/tools/build/src/engine/boehm_gc/doc/debugging.html
index 7c65f2bb4..7c65f2bb4 100644
--- a/tools/build/v2/engine/boehm_gc/doc/debugging.html
+++ b/tools/build/src/engine/boehm_gc/doc/debugging.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/doc.am b/tools/build/src/engine/boehm_gc/doc/doc.am
index 8d5f67d33..8d5f67d33 100644
--- a/tools/build/v2/engine/boehm_gc/doc/doc.am
+++ b/tools/build/src/engine/boehm_gc/doc/doc.am
diff --git a/tools/build/v2/engine/boehm_gc/doc/gc.man b/tools/build/src/engine/boehm_gc/doc/gc.man
index 2a550c712..2a550c712 100644
--- a/tools/build/v2/engine/boehm_gc/doc/gc.man
+++ b/tools/build/src/engine/boehm_gc/doc/gc.man
diff --git a/tools/build/v2/engine/boehm_gc/doc/gcdescr.html b/tools/build/src/engine/boehm_gc/doc/gcdescr.html
index dc08470e4..dc08470e4 100644
--- a/tools/build/v2/engine/boehm_gc/doc/gcdescr.html
+++ b/tools/build/src/engine/boehm_gc/doc/gcdescr.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/gcinterface.html b/tools/build/src/engine/boehm_gc/doc/gcinterface.html
index 74230aa6c..74230aa6c 100644
--- a/tools/build/v2/engine/boehm_gc/doc/gcinterface.html
+++ b/tools/build/src/engine/boehm_gc/doc/gcinterface.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/leak.html b/tools/build/src/engine/boehm_gc/doc/leak.html
index 8f460c9f6..8f460c9f6 100644
--- a/tools/build/v2/engine/boehm_gc/doc/leak.html
+++ b/tools/build/src/engine/boehm_gc/doc/leak.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/overview.html b/tools/build/src/engine/boehm_gc/doc/overview.html
index d31f93700..d31f93700 100644
--- a/tools/build/v2/engine/boehm_gc/doc/overview.html
+++ b/tools/build/src/engine/boehm_gc/doc/overview.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/porting.html b/tools/build/src/engine/boehm_gc/doc/porting.html
index 5a06c228e..5a06c228e 100644
--- a/tools/build/v2/engine/boehm_gc/doc/porting.html
+++ b/tools/build/src/engine/boehm_gc/doc/porting.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/scale.html b/tools/build/src/engine/boehm_gc/doc/scale.html
index 2e70148df..2e70148df 100644
--- a/tools/build/v2/engine/boehm_gc/doc/scale.html
+++ b/tools/build/src/engine/boehm_gc/doc/scale.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/simple_example.html b/tools/build/src/engine/boehm_gc/doc/simple_example.html
index 0bc0953ef..0bc0953ef 100644
--- a/tools/build/v2/engine/boehm_gc/doc/simple_example.html
+++ b/tools/build/src/engine/boehm_gc/doc/simple_example.html
diff --git a/tools/build/v2/engine/boehm_gc/doc/tree.html b/tools/build/src/engine/boehm_gc/doc/tree.html
index c46a281cc..c46a281cc 100644
--- a/tools/build/v2/engine/boehm_gc/doc/tree.html
+++ b/tools/build/src/engine/boehm_gc/doc/tree.html
diff --git a/tools/build/v2/engine/boehm_gc/dyn_load.c b/tools/build/src/engine/boehm_gc/dyn_load.c
index 36968ba5d..36968ba5d 100644
--- a/tools/build/v2/engine/boehm_gc/dyn_load.c
+++ b/tools/build/src/engine/boehm_gc/dyn_load.c
diff --git a/tools/build/v2/engine/boehm_gc/finalize.c b/tools/build/src/engine/boehm_gc/finalize.c
index 6ae36c2dd..6ae36c2dd 100644
--- a/tools/build/v2/engine/boehm_gc/finalize.c
+++ b/tools/build/src/engine/boehm_gc/finalize.c
diff --git a/tools/build/v2/engine/boehm_gc/gc.mak b/tools/build/src/engine/boehm_gc/gc.mak
index 5c02c9023..5c02c9023 100644
--- a/tools/build/v2/engine/boehm_gc/gc.mak
+++ b/tools/build/src/engine/boehm_gc/gc.mak
diff --git a/tools/build/v2/engine/boehm_gc/gc_cpp.cc b/tools/build/src/engine/boehm_gc/gc_cpp.cc
index c4dc4cd25..c4dc4cd25 100644
--- a/tools/build/v2/engine/boehm_gc/gc_cpp.cc
+++ b/tools/build/src/engine/boehm_gc/gc_cpp.cc
diff --git a/tools/build/v2/engine/boehm_gc/gc_cpp.cpp b/tools/build/src/engine/boehm_gc/gc_cpp.cpp
index f6bd95e59..f6bd95e59 100644
--- a/tools/build/v2/engine/boehm_gc/gc_cpp.cpp
+++ b/tools/build/src/engine/boehm_gc/gc_cpp.cpp
diff --git a/tools/build/v2/engine/boehm_gc/gc_dlopen.c b/tools/build/src/engine/boehm_gc/gc_dlopen.c
index 51659d1e8..51659d1e8 100644
--- a/tools/build/v2/engine/boehm_gc/gc_dlopen.c
+++ b/tools/build/src/engine/boehm_gc/gc_dlopen.c
diff --git a/tools/build/v2/engine/boehm_gc/gcj_mlc.c b/tools/build/src/engine/boehm_gc/gcj_mlc.c
index 7e5beb188..7e5beb188 100644
--- a/tools/build/v2/engine/boehm_gc/gcj_mlc.c
+++ b/tools/build/src/engine/boehm_gc/gcj_mlc.c
diff --git a/tools/build/v2/engine/boehm_gc/gcname.c b/tools/build/src/engine/boehm_gc/gcname.c
index e2119d799..e2119d799 100644
--- a/tools/build/v2/engine/boehm_gc/gcname.c
+++ b/tools/build/src/engine/boehm_gc/gcname.c
diff --git a/tools/build/v2/engine/boehm_gc/headers.c b/tools/build/src/engine/boehm_gc/headers.c
index 6b4eb8492..6b4eb8492 100644
--- a/tools/build/v2/engine/boehm_gc/headers.c
+++ b/tools/build/src/engine/boehm_gc/headers.c
diff --git a/tools/build/v2/engine/boehm_gc/hpux_test_and_clear.s b/tools/build/src/engine/boehm_gc/hpux_test_and_clear.s
index f09b21140..f09b21140 100644
--- a/tools/build/v2/engine/boehm_gc/hpux_test_and_clear.s
+++ b/tools/build/src/engine/boehm_gc/hpux_test_and_clear.s
diff --git a/tools/build/v2/engine/boehm_gc/ia64_save_regs_in_stack.s b/tools/build/src/engine/boehm_gc/ia64_save_regs_in_stack.s
index 3b18c0841..3b18c0841 100644
--- a/tools/build/v2/engine/boehm_gc/ia64_save_regs_in_stack.s
+++ b/tools/build/src/engine/boehm_gc/ia64_save_regs_in_stack.s
diff --git a/tools/build/v2/engine/boehm_gc/if_mach.c b/tools/build/src/engine/boehm_gc/if_mach.c
index d6e0a70d7..d6e0a70d7 100644
--- a/tools/build/v2/engine/boehm_gc/if_mach.c
+++ b/tools/build/src/engine/boehm_gc/if_mach.c
diff --git a/tools/build/v2/engine/boehm_gc/if_not_there.c b/tools/build/src/engine/boehm_gc/if_not_there.c
index 7af6fba4e..7af6fba4e 100644
--- a/tools/build/v2/engine/boehm_gc/if_not_there.c
+++ b/tools/build/src/engine/boehm_gc/if_not_there.c
diff --git a/tools/build/v2/engine/boehm_gc/include/cord.h b/tools/build/src/engine/boehm_gc/include/cord.h
index 926089e86..926089e86 100644
--- a/tools/build/v2/engine/boehm_gc/include/cord.h
+++ b/tools/build/src/engine/boehm_gc/include/cord.h
diff --git a/tools/build/v2/engine/boehm_gc/include/ec.h b/tools/build/src/engine/boehm_gc/include/ec.h
index c829b83ad..c829b83ad 100644
--- a/tools/build/v2/engine/boehm_gc/include/ec.h
+++ b/tools/build/src/engine/boehm_gc/include/ec.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc.h b/tools/build/src/engine/boehm_gc/include/gc.h
index cc950888f..cc950888f 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc.h
+++ b/tools/build/src/engine/boehm_gc/include/gc.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_allocator.h b/tools/build/src/engine/boehm_gc/include/gc_allocator.h
index 4f3117b3b..4f3117b3b 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_allocator.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_allocator.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_amiga_redirects.h b/tools/build/src/engine/boehm_gc/include/gc_amiga_redirects.h
index 9e975c8c8..9e975c8c8 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_amiga_redirects.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_amiga_redirects.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_backptr.h b/tools/build/src/engine/boehm_gc/include/gc_backptr.h
index 5899496e0..5899496e0 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_backptr.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_backptr.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h b/tools/build/src/engine/boehm_gc/include/gc_config_macros.h
index 66abf0b1e..66abf0b1e 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_config_macros.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_cpp.h b/tools/build/src/engine/boehm_gc/include/gc_cpp.h
index d3df21121..d3df21121 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_cpp.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_cpp.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_gcj.h b/tools/build/src/engine/boehm_gc/include/gc_gcj.h
index 699ddf5d4..699ddf5d4 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_gcj.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_gcj.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_inline.h b/tools/build/src/engine/boehm_gc/include/gc_inline.h
index da7e2e91f..da7e2e91f 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_inline.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_inline.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_mark.h b/tools/build/src/engine/boehm_gc/include/gc_mark.h
index 8ee50b5d4..8ee50b5d4 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_mark.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_mark.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_pthread_redirects.h b/tools/build/src/engine/boehm_gc/include/gc_pthread_redirects.h
index b567f63e1..b567f63e1 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_pthread_redirects.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_pthread_redirects.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_tiny_fl.h b/tools/build/src/engine/boehm_gc/include/gc_tiny_fl.h
index 52b6864b6..52b6864b6 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_tiny_fl.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_tiny_fl.h
diff --git a/tools/build/v2/engine/boehm_gc/include/gc_typed.h b/tools/build/src/engine/boehm_gc/include/gc_typed.h
index 1086acdd1..1086acdd1 100644
--- a/tools/build/v2/engine/boehm_gc/include/gc_typed.h
+++ b/tools/build/src/engine/boehm_gc/include/gc_typed.h
diff --git a/tools/build/v2/engine/boehm_gc/include/include.am b/tools/build/src/engine/boehm_gc/include/include.am
index 78c57c346..78c57c346 100644
--- a/tools/build/v2/engine/boehm_gc/include/include.am
+++ b/tools/build/src/engine/boehm_gc/include/include.am
diff --git a/tools/build/v2/engine/boehm_gc/include/javaxfc.h b/tools/build/src/engine/boehm_gc/include/javaxfc.h
index 23e01005a..23e01005a 100644
--- a/tools/build/v2/engine/boehm_gc/include/javaxfc.h
+++ b/tools/build/src/engine/boehm_gc/include/javaxfc.h
diff --git a/tools/build/v2/engine/boehm_gc/include/leak_detector.h b/tools/build/src/engine/boehm_gc/include/leak_detector.h
index 1d02f4007..1d02f4007 100644
--- a/tools/build/v2/engine/boehm_gc/include/leak_detector.h
+++ b/tools/build/src/engine/boehm_gc/include/leak_detector.h
diff --git a/tools/build/v2/engine/boehm_gc/include/new_gc_alloc.h b/tools/build/src/engine/boehm_gc/include/new_gc_alloc.h
index b4906af54..b4906af54 100644
--- a/tools/build/v2/engine/boehm_gc/include/new_gc_alloc.h
+++ b/tools/build/src/engine/boehm_gc/include/new_gc_alloc.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/cord_pos.h b/tools/build/src/engine/boehm_gc/include/private/cord_pos.h
index d2b24bb8a..d2b24bb8a 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/cord_pos.h
+++ b/tools/build/src/engine/boehm_gc/include/private/cord_pos.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/darwin_semaphore.h b/tools/build/src/engine/boehm_gc/include/private/darwin_semaphore.h
index 0f43982d5..0f43982d5 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/darwin_semaphore.h
+++ b/tools/build/src/engine/boehm_gc/include/private/darwin_semaphore.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/darwin_stop_world.h b/tools/build/src/engine/boehm_gc/include/private/darwin_stop_world.h
index f6f5314ee..f6f5314ee 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/darwin_stop_world.h
+++ b/tools/build/src/engine/boehm_gc/include/private/darwin_stop_world.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/dbg_mlc.h b/tools/build/src/engine/boehm_gc/include/private/dbg_mlc.h
index fcd027c4f..fcd027c4f 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/dbg_mlc.h
+++ b/tools/build/src/engine/boehm_gc/include/private/dbg_mlc.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/gc_hdrs.h b/tools/build/src/engine/boehm_gc/include/private/gc_hdrs.h
index 559556ca7..559556ca7 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/gc_hdrs.h
+++ b/tools/build/src/engine/boehm_gc/include/private/gc_hdrs.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/gc_locks.h b/tools/build/src/engine/boehm_gc/include/private/gc_locks.h
index d7c83b07b..d7c83b07b 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/gc_locks.h
+++ b/tools/build/src/engine/boehm_gc/include/private/gc_locks.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/gc_pmark.h b/tools/build/src/engine/boehm_gc/include/private/gc_pmark.h
index 36083970a..36083970a 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/gc_pmark.h
+++ b/tools/build/src/engine/boehm_gc/include/private/gc_pmark.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/gc_priv.h b/tools/build/src/engine/boehm_gc/include/private/gc_priv.h
index ec93ffea9..ec93ffea9 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/gc_priv.h
+++ b/tools/build/src/engine/boehm_gc/include/private/gc_priv.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h b/tools/build/src/engine/boehm_gc/include/private/gcconfig.h
index 20f35bc3a..20f35bc3a 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h
+++ b/tools/build/src/engine/boehm_gc/include/private/gcconfig.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/msvc_dbg.h b/tools/build/src/engine/boehm_gc/include/private/msvc_dbg.h
index 1d3030aaa..1d3030aaa 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/msvc_dbg.h
+++ b/tools/build/src/engine/boehm_gc/include/private/msvc_dbg.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/pthread_stop_world.h b/tools/build/src/engine/boehm_gc/include/private/pthread_stop_world.h
index 6f9197a1f..6f9197a1f 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/pthread_stop_world.h
+++ b/tools/build/src/engine/boehm_gc/include/private/pthread_stop_world.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/pthread_support.h b/tools/build/src/engine/boehm_gc/include/private/pthread_support.h
index 77f1ad1a9..77f1ad1a9 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/pthread_support.h
+++ b/tools/build/src/engine/boehm_gc/include/private/pthread_support.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/specific.h b/tools/build/src/engine/boehm_gc/include/private/specific.h
index fc2e8f9e6..fc2e8f9e6 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/specific.h
+++ b/tools/build/src/engine/boehm_gc/include/private/specific.h
diff --git a/tools/build/v2/engine/boehm_gc/include/private/thread_local_alloc.h b/tools/build/src/engine/boehm_gc/include/private/thread_local_alloc.h
index 4c2c5362f..4c2c5362f 100644
--- a/tools/build/v2/engine/boehm_gc/include/private/thread_local_alloc.h
+++ b/tools/build/src/engine/boehm_gc/include/private/thread_local_alloc.h
diff --git a/tools/build/v2/engine/boehm_gc/include/weakpointer.h b/tools/build/src/engine/boehm_gc/include/weakpointer.h
index 84906b00a..84906b00a 100644
--- a/tools/build/v2/engine/boehm_gc/include/weakpointer.h
+++ b/tools/build/src/engine/boehm_gc/include/weakpointer.h
diff --git a/tools/build/v2/engine/boehm_gc/install-sh b/tools/build/src/engine/boehm_gc/install-sh
index 398a88e14..398a88e14 100755
--- a/tools/build/v2/engine/boehm_gc/install-sh
+++ b/tools/build/src/engine/boehm_gc/install-sh
diff --git a/tools/build/v2/engine/boehm_gc/libtool.m4 b/tools/build/src/engine/boehm_gc/libtool.m4
index 0f53cb592..0f53cb592 100644
--- a/tools/build/v2/engine/boehm_gc/libtool.m4
+++ b/tools/build/src/engine/boehm_gc/libtool.m4
diff --git a/tools/build/v2/engine/boehm_gc/ltmain.sh b/tools/build/src/engine/boehm_gc/ltmain.sh
index 06823e057..06823e057 100755
--- a/tools/build/v2/engine/boehm_gc/ltmain.sh
+++ b/tools/build/src/engine/boehm_gc/ltmain.sh
diff --git a/tools/build/v2/engine/boehm_gc/mach_dep.c b/tools/build/src/engine/boehm_gc/mach_dep.c
index 4f05843c6..4f05843c6 100644
--- a/tools/build/v2/engine/boehm_gc/mach_dep.c
+++ b/tools/build/src/engine/boehm_gc/mach_dep.c
diff --git a/tools/build/v2/engine/boehm_gc/malloc.c b/tools/build/src/engine/boehm_gc/malloc.c
index 94032640e..94032640e 100644
--- a/tools/build/v2/engine/boehm_gc/malloc.c
+++ b/tools/build/src/engine/boehm_gc/malloc.c
diff --git a/tools/build/v2/engine/boehm_gc/mallocx.c b/tools/build/src/engine/boehm_gc/mallocx.c
index 4649b73ac..4649b73ac 100644
--- a/tools/build/v2/engine/boehm_gc/mallocx.c
+++ b/tools/build/src/engine/boehm_gc/mallocx.c
diff --git a/tools/build/v2/engine/boehm_gc/mark.c b/tools/build/src/engine/boehm_gc/mark.c
index 3e5c46d1b..3e5c46d1b 100644
--- a/tools/build/v2/engine/boehm_gc/mark.c
+++ b/tools/build/src/engine/boehm_gc/mark.c
diff --git a/tools/build/v2/engine/boehm_gc/mark_rts.c b/tools/build/src/engine/boehm_gc/mark_rts.c
index 05ece1c2b..05ece1c2b 100644
--- a/tools/build/v2/engine/boehm_gc/mark_rts.c
+++ b/tools/build/src/engine/boehm_gc/mark_rts.c
diff --git a/tools/build/v2/engine/boehm_gc/mips_sgi_mach_dep.s b/tools/build/src/engine/boehm_gc/mips_sgi_mach_dep.s
index 56390280a..56390280a 100644
--- a/tools/build/v2/engine/boehm_gc/mips_sgi_mach_dep.s
+++ b/tools/build/src/engine/boehm_gc/mips_sgi_mach_dep.s
diff --git a/tools/build/v2/engine/boehm_gc/mips_ultrix_mach_dep.s b/tools/build/src/engine/boehm_gc/mips_ultrix_mach_dep.s
index 178224e31..178224e31 100644
--- a/tools/build/v2/engine/boehm_gc/mips_ultrix_mach_dep.s
+++ b/tools/build/src/engine/boehm_gc/mips_ultrix_mach_dep.s
diff --git a/tools/build/v2/engine/boehm_gc/misc.c b/tools/build/src/engine/boehm_gc/misc.c
index 37e509336..37e509336 100644
--- a/tools/build/v2/engine/boehm_gc/misc.c
+++ b/tools/build/src/engine/boehm_gc/misc.c
diff --git a/tools/build/v2/engine/boehm_gc/missing b/tools/build/src/engine/boehm_gc/missing
index dd583709f..dd583709f 100755
--- a/tools/build/v2/engine/boehm_gc/missing
+++ b/tools/build/src/engine/boehm_gc/missing
diff --git a/tools/build/v2/engine/boehm_gc/mkinstalldirs b/tools/build/src/engine/boehm_gc/mkinstalldirs
index 82a561f43..82a561f43 100755
--- a/tools/build/v2/engine/boehm_gc/mkinstalldirs
+++ b/tools/build/src/engine/boehm_gc/mkinstalldirs
diff --git a/tools/build/v2/engine/boehm_gc/msvc_dbg.c b/tools/build/src/engine/boehm_gc/msvc_dbg.c
index b172025ba..b172025ba 100644
--- a/tools/build/v2/engine/boehm_gc/msvc_dbg.c
+++ b/tools/build/src/engine/boehm_gc/msvc_dbg.c
diff --git a/tools/build/v2/engine/boehm_gc/new_hblk.c b/tools/build/src/engine/boehm_gc/new_hblk.c
index 5d5a56f2a..5d5a56f2a 100644
--- a/tools/build/v2/engine/boehm_gc/new_hblk.c
+++ b/tools/build/src/engine/boehm_gc/new_hblk.c
diff --git a/tools/build/v2/engine/boehm_gc/obj_map.c b/tools/build/src/engine/boehm_gc/obj_map.c
index c295c4033..c295c4033 100644
--- a/tools/build/v2/engine/boehm_gc/obj_map.c
+++ b/tools/build/src/engine/boehm_gc/obj_map.c
diff --git a/tools/build/v2/engine/boehm_gc/os_dep.c b/tools/build/src/engine/boehm_gc/os_dep.c
index bb8fa08f6..bb8fa08f6 100644
--- a/tools/build/v2/engine/boehm_gc/os_dep.c
+++ b/tools/build/src/engine/boehm_gc/os_dep.c
diff --git a/tools/build/v2/engine/boehm_gc/pcr_interface.c b/tools/build/src/engine/boehm_gc/pcr_interface.c
index 77bddf80b..77bddf80b 100644
--- a/tools/build/v2/engine/boehm_gc/pcr_interface.c
+++ b/tools/build/src/engine/boehm_gc/pcr_interface.c
diff --git a/tools/build/v2/engine/boehm_gc/pthread_stop_world.c b/tools/build/src/engine/boehm_gc/pthread_stop_world.c
index 3a1524b96..3a1524b96 100644
--- a/tools/build/v2/engine/boehm_gc/pthread_stop_world.c
+++ b/tools/build/src/engine/boehm_gc/pthread_stop_world.c
diff --git a/tools/build/v2/engine/boehm_gc/pthread_support.c b/tools/build/src/engine/boehm_gc/pthread_support.c
index 955eea2da..955eea2da 100644
--- a/tools/build/v2/engine/boehm_gc/pthread_support.c
+++ b/tools/build/src/engine/boehm_gc/pthread_support.c
diff --git a/tools/build/v2/engine/boehm_gc/ptr_chck.c b/tools/build/src/engine/boehm_gc/ptr_chck.c
index d04d2daf5..d04d2daf5 100644
--- a/tools/build/v2/engine/boehm_gc/ptr_chck.c
+++ b/tools/build/src/engine/boehm_gc/ptr_chck.c
diff --git a/tools/build/v2/engine/boehm_gc/real_malloc.c b/tools/build/src/engine/boehm_gc/real_malloc.c
index 85befdcba..85befdcba 100644
--- a/tools/build/v2/engine/boehm_gc/real_malloc.c
+++ b/tools/build/src/engine/boehm_gc/real_malloc.c
diff --git a/tools/build/v2/engine/boehm_gc/reclaim.c b/tools/build/src/engine/boehm_gc/reclaim.c
index cd50fa481..cd50fa481 100644
--- a/tools/build/v2/engine/boehm_gc/reclaim.c
+++ b/tools/build/src/engine/boehm_gc/reclaim.c
diff --git a/tools/build/v2/engine/boehm_gc/rs6000_mach_dep.s b/tools/build/src/engine/boehm_gc/rs6000_mach_dep.s
index 12bf9a84d..12bf9a84d 100644
--- a/tools/build/v2/engine/boehm_gc/rs6000_mach_dep.s
+++ b/tools/build/src/engine/boehm_gc/rs6000_mach_dep.s
diff --git a/tools/build/v2/engine/boehm_gc/setjmp_t.c b/tools/build/src/engine/boehm_gc/setjmp_t.c
index 5a171df0c..5a171df0c 100644
--- a/tools/build/v2/engine/boehm_gc/setjmp_t.c
+++ b/tools/build/src/engine/boehm_gc/setjmp_t.c
diff --git a/tools/build/v2/engine/boehm_gc/sparc_mach_dep.S b/tools/build/src/engine/boehm_gc/sparc_mach_dep.S
index e8ad6556f..e8ad6556f 100644
--- a/tools/build/v2/engine/boehm_gc/sparc_mach_dep.S
+++ b/tools/build/src/engine/boehm_gc/sparc_mach_dep.S
diff --git a/tools/build/v2/engine/boehm_gc/sparc_netbsd_mach_dep.s b/tools/build/src/engine/boehm_gc/sparc_netbsd_mach_dep.s
index bc3f16037..bc3f16037 100644
--- a/tools/build/v2/engine/boehm_gc/sparc_netbsd_mach_dep.s
+++ b/tools/build/src/engine/boehm_gc/sparc_netbsd_mach_dep.s
diff --git a/tools/build/v2/engine/boehm_gc/sparc_sunos4_mach_dep.s b/tools/build/src/engine/boehm_gc/sparc_sunos4_mach_dep.s
index 41858073e..41858073e 100644
--- a/tools/build/v2/engine/boehm_gc/sparc_sunos4_mach_dep.s
+++ b/tools/build/src/engine/boehm_gc/sparc_sunos4_mach_dep.s
diff --git a/tools/build/v2/engine/boehm_gc/specific.c b/tools/build/src/engine/boehm_gc/specific.c
index b8ea49dd3..b8ea49dd3 100644
--- a/tools/build/v2/engine/boehm_gc/specific.c
+++ b/tools/build/src/engine/boehm_gc/specific.c
diff --git a/tools/build/v2/engine/boehm_gc/stubborn.c b/tools/build/src/engine/boehm_gc/stubborn.c
index f4e095839..f4e095839 100644
--- a/tools/build/v2/engine/boehm_gc/stubborn.c
+++ b/tools/build/src/engine/boehm_gc/stubborn.c
diff --git a/tools/build/v2/engine/boehm_gc/tests/leak_test.c b/tools/build/src/engine/boehm_gc/tests/leak_test.c
index d6a60d47a..d6a60d47a 100644
--- a/tools/build/v2/engine/boehm_gc/tests/leak_test.c
+++ b/tools/build/src/engine/boehm_gc/tests/leak_test.c
diff --git a/tools/build/v2/engine/boehm_gc/tests/middle.c b/tools/build/src/engine/boehm_gc/tests/middle.c
index ebb348c49..ebb348c49 100644
--- a/tools/build/v2/engine/boehm_gc/tests/middle.c
+++ b/tools/build/src/engine/boehm_gc/tests/middle.c
diff --git a/tools/build/v2/engine/boehm_gc/tests/test.c b/tools/build/src/engine/boehm_gc/tests/test.c
index 47cf99b59..47cf99b59 100644
--- a/tools/build/v2/engine/boehm_gc/tests/test.c
+++ b/tools/build/src/engine/boehm_gc/tests/test.c
diff --git a/tools/build/v2/engine/boehm_gc/tests/test_cpp.cc b/tools/build/src/engine/boehm_gc/tests/test_cpp.cc
index 9bf53de81..9bf53de81 100644
--- a/tools/build/v2/engine/boehm_gc/tests/test_cpp.cc
+++ b/tools/build/src/engine/boehm_gc/tests/test_cpp.cc
diff --git a/tools/build/v2/engine/boehm_gc/tests/tests.am b/tools/build/src/engine/boehm_gc/tests/tests.am
index aedac1fa6..aedac1fa6 100644
--- a/tools/build/v2/engine/boehm_gc/tests/tests.am
+++ b/tools/build/src/engine/boehm_gc/tests/tests.am
diff --git a/tools/build/v2/engine/boehm_gc/tests/thread_leak_test.c b/tools/build/src/engine/boehm_gc/tests/thread_leak_test.c
index f2c15e967..f2c15e967 100644
--- a/tools/build/v2/engine/boehm_gc/tests/thread_leak_test.c
+++ b/tools/build/src/engine/boehm_gc/tests/thread_leak_test.c
diff --git a/tools/build/v2/engine/boehm_gc/thread_local_alloc.c b/tools/build/src/engine/boehm_gc/thread_local_alloc.c
index f747b3557..f747b3557 100644
--- a/tools/build/v2/engine/boehm_gc/thread_local_alloc.c
+++ b/tools/build/src/engine/boehm_gc/thread_local_alloc.c
diff --git a/tools/build/v2/engine/boehm_gc/threadlibs.c b/tools/build/src/engine/boehm_gc/threadlibs.c
index f2ab58250..f2ab58250 100644
--- a/tools/build/v2/engine/boehm_gc/threadlibs.c
+++ b/tools/build/src/engine/boehm_gc/threadlibs.c
diff --git a/tools/build/v2/engine/boehm_gc/typd_mlc.c b/tools/build/src/engine/boehm_gc/typd_mlc.c
index c46616323..c46616323 100644
--- a/tools/build/v2/engine/boehm_gc/typd_mlc.c
+++ b/tools/build/src/engine/boehm_gc/typd_mlc.c
diff --git a/tools/build/v2/engine/boehm_gc/version.h b/tools/build/src/engine/boehm_gc/version.h
index 112dec30e..112dec30e 100644
--- a/tools/build/v2/engine/boehm_gc/version.h
+++ b/tools/build/src/engine/boehm_gc/version.h
diff --git a/tools/build/v2/engine/boehm_gc/win32_threads.c b/tools/build/src/engine/boehm_gc/win32_threads.c
index ac5797190..ac5797190 100644
--- a/tools/build/v2/engine/boehm_gc/win32_threads.c
+++ b/tools/build/src/engine/boehm_gc/win32_threads.c
diff --git a/tools/build/v2/engine/boost-jam.spec b/tools/build/src/engine/boost-jam.spec
index bc572fc96..bc572fc96 100644
--- a/tools/build/v2/engine/boost-jam.spec
+++ b/tools/build/src/engine/boost-jam.spec
diff --git a/tools/build/v2/engine/boost-no-inspect b/tools/build/src/engine/boost-no-inspect
index 8a06f3a70..8a06f3a70 100644
--- a/tools/build/v2/engine/boost-no-inspect
+++ b/tools/build/src/engine/boost-no-inspect
diff --git a/tools/build/v2/engine/build.bat b/tools/build/src/engine/build.bat
index 36e818a53..c96e508e7 100644
--- a/tools/build/v2/engine/build.bat
+++ b/tools/build/src/engine/build.bat
@@ -28,7 +28,7 @@ ECHO ### You can specify the toolset as the argument, i.e.:
ECHO ### .\build.bat msvc
ECHO ###
ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin,
-ECHO ### intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11
+ECHO ### intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11, vc12, vc14
ECHO ###
call :Set_Error
endlocal
@@ -36,7 +36,7 @@ goto :eof
:Test_Path
-REM Tests for the given file(executable) presence in the directories in the PATH
+REM Tests for the given executable file presence in the directories in the PATH
REM environment variable. Additionaly sets FOUND_PATH to the path of the
REM found file.
call :Clear_Error
@@ -101,6 +101,26 @@ call :Test_Empty %ProgramFiles%
if not errorlevel 1 set ProgramFiles=C:\Program Files
call :Clear_Error
+if NOT "_%VS140COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET=vc14"
+ set "BOOST_JAM_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\"
+ goto :eof)
+call :Clear_Error
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 14.0\VC\VCVARSALL.BAT" (
+ set "BOOST_JAM_TOOLSET=vc14"
+ set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 14.0\VC\"
+ goto :eof)
+call :Clear_Error
+if NOT "_%VS120COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET=vc12"
+ set "BOOST_JAM_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
+ goto :eof)
+call :Clear_Error
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\VCVARSALL.BAT" (
+ set "BOOST_JAM_TOOLSET=vc12"
+ set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 12.0\VC\"
+ goto :eof)
+call :Clear_Error
if NOT "_%VS110COMNTOOLS%_" == "__" (
set "BOOST_JAM_TOOLSET=vc11"
set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
@@ -282,7 +302,7 @@ REM the toolset was guessed at and found, or when the toolset
REM was indicated in the command arguments.
REM NOTE: The strange multiple "if ?? == _toolset_" tests are that way
REM because in BAT variables are subsituted only once during a single
-REM command. A complete "if ... ( commands ) else ( commands )"
+REM command. A complete "if ... else ..."
REM is a single command, even though it's in multiple lines here.
:Setup_Args
call :Clear_Error
@@ -396,6 +416,36 @@ set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
set "_known_=1"
:Skip_VC11
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc12_" goto Skip_VC12
+if NOT "_%VS120COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
+ )
+if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
+if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if "_%VCINSTALLDIR%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
+ ) )
+set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_VC12
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc14_" goto Skip_VC14
+if NOT "_%VS140COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\"
+ )
+if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
+if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if "_%VCINSTALLDIR%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
+ ) )
+set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_VC14
if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto Skip_BORLAND
if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
call :Test_Path bcc32.exe )
@@ -488,11 +538,11 @@ set test=%test:"###=%
set test=%test:###"=%
set test=%test:###=%
if "%test%" == "--update" goto Found_Update
-endlocal
+endlocal & set BOOST_JAM_TOOLSET=%BOOST_JAM_TOOLSET%
shift
if not "_%BJAM_UPDATE%_" == "_update_" goto Check_Update
:Found_Update
-endlocal
+endlocal & set BOOST_JAM_TOOLSET=%BOOST_JAM_TOOLSET%
set BJAM_UPDATE=update
:Check_Update_End
if "_%BJAM_UPDATE%_" == "_update_" (
diff --git a/tools/build/v2/engine/build.jam b/tools/build/src/engine/build.jam
index b5087856b..0263d4637 100644
--- a/tools/build/v2/engine/build.jam
+++ b/tools/build/src/engine/build.jam
@@ -371,12 +371,26 @@ toolset vc10 cl : /Fe /Fe /Fd /Fo : -D
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+## Microsoft Visual C++ 2012
toolset vc11 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+## Microsoft Visual C++ 2013
+toolset vc12 cl : /Fe /Fe /Fd /Fo : -D
+ : /nologo
+ [ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
+ [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
+ -I$(--python-include) -I$(--extra-include)
+ : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+toolset vc14 cl : /Fe /Fe /Fd /Fo : -D
+ : /nologo
+ [ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
+ [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
+ -I$(--python-include) -I$(--extra-include)
+ : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
# First set the build commands and options according to the
# preset toolset.
@@ -483,8 +497,8 @@ jam.source =
make.c make1.c mem.c object.c option.c output.c parse.c pathsys.c regexp.c
rules.c scan.c search.c subst.c w32_getreg.c timestamp.c variable.c
modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c
- modules/set.c modules/path.c modules/regex.c modules/property-set.c
- modules/sequence.c modules/order.c ;
+ [ .path modules set.c ] [ .path modules path.c ] [ .path modules regex.c ]
+ [ .path modules property-set.c ] [ .path modules sequence.c ] [ .path modules order.c ] ;
if $(OS) = NT
{
jam.source += execnt.c filent.c pathnt.c ;
diff --git a/tools/build/v2/engine/build.sh b/tools/build/src/engine/build.sh
index 5f78a5631..470ea3c07 100755
--- a/tools/build/v2/engine/build.sh
+++ b/tools/build/src/engine/build.sh
@@ -247,18 +247,18 @@ MKJAMBASE_SOURCES="mkjambase.c"
BJAM_SOURCES="\
command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c\
hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c\
- object.c option.c output.c parse.c pathsys.c pathunix.c regexp.c rules.c\
+ object.c option.c output.c parse.c pathsys.c regexp.c rules.c\
scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c\
builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c\
modules/path.c modules/regex.c modules/property-set.c modules/sequence.c\
modules/order.c"
case $BOOST_JAM_TOOLSET in
mingw)
- BJAM_SOURCES="${BJAM_SOURCES} execnt.c filent.c"
+ BJAM_SOURCES="${BJAM_SOURCES} execnt.c filent.c pathnt.c"
;;
*)
- BJAM_SOURCES="${BJAM_SOURCES} execunix.c fileunix.c"
+ BJAM_SOURCES="${BJAM_SOURCES} execunix.c fileunix.c pathunix.c"
;;
esac
diff --git a/tools/build/v2/engine/builtins.c b/tools/build/src/engine/builtins.c
index e4130bb92..daa73db9a 100644
--- a/tools/build/v2/engine/builtins.c
+++ b/tools/build/src/engine/builtins.c
@@ -29,6 +29,16 @@
#include <ctype.h>
+#ifdef OS_NT
+#include <windows.h>
+#ifndef FSCTL_GET_REPARSE_POINT
+/* MinGW's version of windows.h is missing this, so we need
+ * to include winioctl.h directly
+ */
+#include <winioctl.h>
+#endif
+#endif
+
#if defined(USE_EXECUNIX)
# include <sys/types.h>
# include <sys/wait.h>
@@ -425,6 +435,11 @@ void load_builtins()
char const * args [] = { "path", 0 };
bind_builtin( "MAKEDIR", builtin_makedir, 0, args );
}
+
+ {
+ const char * args [] = { "path", 0 };
+ bind_builtin( "READLINK", builtin_readlink, 0, args );
+ }
/* Initialize builtin modules. */
init_set();
@@ -1827,6 +1842,116 @@ LIST * builtin_makedir( FRAME * frame, int flags )
: list_new( object_copy( list_front( path ) ) );
}
+LIST *builtin_readlink( FRAME * frame, int flags )
+{
+ const char * path = object_str( list_front( lol_get( frame->args, 0 ) ) );
+#ifdef OS_NT
+
+ /* This struct is declared in ntifs.h which is
+ * part of the Windows Driver Kit.
+ */
+ typedef struct _REPARSE_DATA_BUFFER {
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union {
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[ 1 ];
+ } SymbolicLinkReparseBuffer;
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[ 1 ];
+ } MountPointReparseBuffer;
+ struct {
+ UCHAR DataBuffer[ 1 ];
+ } GenericReparseBuffer;
+ };
+ } REPARSE_DATA_BUFFER;
+
+ HANDLE hLink = CreateFileA( path, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL );
+ DWORD n;
+ union {
+ REPARSE_DATA_BUFFER reparse;
+ char data[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
+ } buf;
+ int okay = DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, &buf, sizeof(buf), &n, NULL);
+
+ CloseHandle( hLink );
+
+ if (okay && buf.reparse.ReparseTag == IO_REPARSE_TAG_SYMLINK )
+ {
+ int index = buf.reparse.SymbolicLinkReparseBuffer.SubstituteNameOffset / 2;
+ int length = buf.reparse.SymbolicLinkReparseBuffer.SubstituteNameLength / 2;
+ char cbuf[MAX_PATH + 1];
+ int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.SymbolicLinkReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL );
+ if( numchars >= sizeof(cbuf) )
+ {
+ return 0;
+ }
+ cbuf[numchars] = '\0';
+ return list_new( object_new( cbuf ) );
+ }
+ else if( okay && buf.reparse.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT )
+ {
+ int index = buf.reparse.MountPointReparseBuffer.SubstituteNameOffset / 2;
+ int length = buf.reparse.MountPointReparseBuffer.SubstituteNameLength / 2;
+ char cbuf[MAX_PATH + 1];
+ const char * result;
+ int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.MountPointReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL );
+ if( numchars >= sizeof(cbuf) )
+ {
+ return 0;
+ }
+ cbuf[numchars] = '\0';
+ /* strip off the leading "\??\" */
+ result = cbuf;
+ if ( cbuf[ 0 ] == '\\' && cbuf[ 1 ] == '?' &&
+ cbuf[ 2 ] == '?' && cbuf[ 3 ] == '\\' &&
+ cbuf[ 4 ] != '\0' && cbuf[ 5 ] == ':' )
+ {
+ result += 4;
+ }
+ return list_new( object_new( result ) );
+ }
+ return 0;
+#else
+ char static_buf[256];
+ char * buf = static_buf;
+ size_t bufsize = 256;
+ LIST * result = 0;
+ while (1) {
+ ssize_t len = readlink( path, buf, bufsize );
+ if ( len < 0 )
+ {
+ break;
+ }
+ else if ( len < bufsize )
+ {
+ buf[ len ] = '\0';
+ result = list_new( object_new( buf ) );
+ break;
+ }
+ if ( buf != static_buf )
+ BJAM_FREE( buf );
+ bufsize *= 2;
+ buf = BJAM_MALLOC( bufsize );
+ }
+
+ if ( buf != static_buf )
+ BJAM_FREE( buf );
+
+ return result;
+#endif
+}
+
#ifdef HAVE_PYTHON
diff --git a/tools/build/v2/engine/builtins.h b/tools/build/src/engine/builtins.h
index b7a967ce0..6d0c87367 100644
--- a/tools/build/v2/engine/builtins.h
+++ b/tools/build/src/engine/builtins.h
@@ -63,6 +63,7 @@ LIST *builtin_pad( FRAME * frame, int flags );
LIST *builtin_precious( FRAME * frame, int flags );
LIST *builtin_self_path( FRAME * frame, int flags );
LIST *builtin_makedir( FRAME * frame, int flags );
+LIST *builtin_readlink( FRAME * frame, int flags );
void backtrace( FRAME *frame );
extern int last_update_now_status;
diff --git a/tools/build/v2/engine/bump_version.py b/tools/build/src/engine/bump_version.py
index 177142288..177142288 100644
--- a/tools/build/v2/engine/bump_version.py
+++ b/tools/build/src/engine/bump_version.py
diff --git a/tools/build/v2/engine/class.c b/tools/build/src/engine/class.c
index a4abfaac8..a4abfaac8 100644
--- a/tools/build/v2/engine/class.c
+++ b/tools/build/src/engine/class.c
diff --git a/tools/build/v2/engine/class.h b/tools/build/src/engine/class.h
index 256d298b5..256d298b5 100644
--- a/tools/build/v2/engine/class.h
+++ b/tools/build/src/engine/class.h
diff --git a/tools/build/v2/engine/command.c b/tools/build/src/engine/command.c
index 571b8b6d0..31141fc97 100644
--- a/tools/build/v2/engine/command.c
+++ b/tools/build/src/engine/command.c
@@ -24,6 +24,37 @@
/*
+ * cmdlist_append_cmd
+ */
+CMDLIST * cmdlist_append_cmd( CMDLIST * l, CMD * cmd )
+{
+ CMDLIST * result = (CMDLIST *)BJAM_MALLOC( sizeof( CMDLIST ) );
+ result->iscmd = 1;
+ result->next = l;
+ result->impl.cmd = cmd;
+ return result;
+}
+
+CMDLIST * cmdlist_append_target( CMDLIST * l, TARGET * t )
+{
+ CMDLIST * result = (CMDLIST *)BJAM_MALLOC( sizeof( CMDLIST ) );
+ result->iscmd = 0;
+ result->next = l;
+ result->impl.t = t;
+ return result;
+}
+
+void cmdlist_free( CMDLIST * l )
+{
+ while ( l )
+ {
+ CMDLIST * tmp = l->next;
+ BJAM_FREE( l );
+ l = tmp;
+ }
+}
+
+/*
* cmd_new() - return a new CMD.
*/
@@ -37,6 +68,10 @@ CMD * cmd_new( RULE * rule, LIST * targets, LIST * sources, LIST * shell )
cmd->shell = shell;
cmd->next = 0;
cmd->noop = 0;
+ cmd->asynccnt = 1;
+ cmd->status = 0;
+ cmd->lock = NULL;
+ cmd->unlock = NULL;
lol_init( &cmd->args );
lol_add( &cmd->args, targets );
@@ -62,9 +97,11 @@ CMD * cmd_new( RULE * rule, LIST * targets, LIST * sources, LIST * shell )
void cmd_free( CMD * cmd )
{
+ cmdlist_free( cmd->next );
lol_free( &cmd->args );
list_free( cmd->shell );
string_free( cmd->buf );
+ freetargets( cmd->unlock );
BJAM_FREE( (void *)cmd );
}
diff --git a/tools/build/v2/engine/command.h b/tools/build/src/engine/command.h
index ba6557710..fd59ed11d 100644
--- a/tools/build/v2/engine/command.h
+++ b/tools/build/src/engine/command.h
@@ -46,14 +46,41 @@
typedef struct _cmd CMD;
+
+/*
+ * A list whose elements are either TARGETS or CMDS.
+ * CMDLIST is used only by CMD. A TARGET means that
+ * the CMD is the last updating action required to
+ * build the target. A CMD is the next CMD required
+ * to build the same target. (Note that a single action
+ * can update more than one target, so the CMDs form
+ * a DAG, not a straight linear list.)
+ */
+typedef struct _cmdlist {
+ struct _cmdlist * next;
+ union {
+ CMD * cmd;
+ TARGET * t;
+ } impl;
+ char iscmd;
+} CMDLIST;
+
+CMDLIST * cmdlist_append_cmd( CMDLIST *, CMD * );
+CMDLIST * cmdlist_append_target( CMDLIST *, TARGET * );
+void cmd_list_free( CMDLIST * );
+
struct _cmd
{
- CMD * next;
+ CMDLIST * next;
RULE * rule; /* rule->actions contains shell script */
LIST * shell; /* $(JAMSHELL) value */
LOL args; /* LISTs for $(<), $(>) */
string buf[ 1 ]; /* actual commands */
int noop; /* no-op commands should be faked instead of executed */
+ int asynccnt; /* number of outstanding dependencies */
+ TARGETS * lock; /* semaphores that are required by this cmd. */
+ TARGETS * unlock; /* semaphores that are released when this cmd finishes. */
+ char status; /* the command status */
};
CMD * cmd_new
diff --git a/tools/build/v2/engine/compile.c b/tools/build/src/engine/compile.c
index db46937ca..a690b9fa5 100644
--- a/tools/build/v2/engine/compile.c
+++ b/tools/build/src/engine/compile.c
@@ -117,56 +117,17 @@ LIST * evaluate_rule( RULE * rule, OBJECT * rulename, FRAME * frame )
action->refs = 1;
/* If we have a group of targets all being built using the same action
- * then we must not allow any of them to be used as sources unless they
- * are all up to date and their action does not need to be run or their
- * action has had a chance to finish its work and build all of them
- * anew.
- *
- * Without this it might be possible, in case of a multi-process build,
- * for their action, triggered to building one of the targets, to still
- * be running when another target in the group reports as done in order
- * to avoid triggering the same action again and gets used prematurely.
- *
- * As a quick-fix to achieve this effect we make all the targets list
- * each other as 'included targets'. More precisely, we mark the first
- * listed target as including all the other targets in the list and vice
- * versa. This makes anyone depending on any of those targets implicitly
- * depend on all of them, thus making sure none of those targets can be
- * used as sources until all of them have been built. Note that direct
- * dependencies could not have been used due to the 'circular
- * dependency' issue.
- *
- * TODO: Although the current implementation solves the problem of one
- * of the targets getting used before its action completes its work, it
- * also forces the action to run whenever any of the targets in the
- * group is not up to date even though some of them might not actually
- * be used by the targets being built. We should see how we can
- * correctly recognize such cases and use that to avoid running the
- * action if possible and not rebuild targets not actually depending on
- * targets that are not up to date.
- *
- * TODO: Current solution using fake INCLUDES relations may cause
- * actions to be run when the affected targets are built by multiple
- * actions. E.g. if we have the following actions registered in the
- * order specified:
- * (I) builds targets A & B
- * (II) builds target B
- * and we want to build a target depending on target A, then both
- * actions (I) & (II) will be run, even though the second one does not
- * have any direct relationship to target A. Consider whether this is
- * desired behaviour or not. It could be that Boost Build should (or
- * possibly already does) run all actions registered for a given target
- * if any of them needs to be run in which case our INCLUDES relations
- * are not actually causing any actions to be run that would not have
- * been run without them.
+ * and any of these targets is updated, then we have to consider them
+ * all to be out-dated. We do this by adding a REBUILDS in both directions
+ * between the first target and all the other targets.
*/
if ( action->targets )
{
TARGET * const t0 = action->targets->target;
for ( t = action->targets->next; t; t = t->next )
{
- target_include( t->target, t0 );
- target_include( t0, t->target );
+ t->target->rebuilds = targetentry( t->target->rebuilds, t0 );
+ t0->rebuilds = targetentry( t0->rebuilds, t->target );
}
}
diff --git a/tools/build/v2/engine/compile.h b/tools/build/src/engine/compile.h
index c70f98b9e..c70f98b9e 100644
--- a/tools/build/v2/engine/compile.h
+++ b/tools/build/src/engine/compile.h
diff --git a/tools/build/v2/engine/constants.c b/tools/build/src/engine/constants.c
index 891d32294..891d32294 100644
--- a/tools/build/v2/engine/constants.c
+++ b/tools/build/src/engine/constants.c
diff --git a/tools/build/v2/engine/constants.h b/tools/build/src/engine/constants.h
index 60d7073b9..60d7073b9 100644
--- a/tools/build/v2/engine/constants.h
+++ b/tools/build/src/engine/constants.h
diff --git a/tools/build/v2/engine/cwd.c b/tools/build/src/engine/cwd.c
index 7ebe97045..7ebe97045 100644
--- a/tools/build/v2/engine/cwd.c
+++ b/tools/build/src/engine/cwd.c
diff --git a/tools/build/v2/engine/cwd.h b/tools/build/src/engine/cwd.h
index 886714a8f..886714a8f 100644
--- a/tools/build/v2/engine/cwd.h
+++ b/tools/build/src/engine/cwd.h
diff --git a/tools/build/v2/engine/debian/changelog b/tools/build/src/engine/debian/changelog
index 29084289c..29084289c 100644
--- a/tools/build/v2/engine/debian/changelog
+++ b/tools/build/src/engine/debian/changelog
diff --git a/tools/build/v2/engine/debian/control b/tools/build/src/engine/debian/control
index c7f151932..c7f151932 100644
--- a/tools/build/v2/engine/debian/control
+++ b/tools/build/src/engine/debian/control
diff --git a/tools/build/v2/engine/debian/copyright b/tools/build/src/engine/debian/copyright
index f72e4e3a9..f72e4e3a9 100644
--- a/tools/build/v2/engine/debian/copyright
+++ b/tools/build/src/engine/debian/copyright
diff --git a/tools/build/v2/engine/debian/jam.man.sgml b/tools/build/src/engine/debian/jam.man.sgml
index ee21d4d83..ee21d4d83 100644
--- a/tools/build/v2/engine/debian/jam.man.sgml
+++ b/tools/build/src/engine/debian/jam.man.sgml
diff --git a/tools/build/v2/engine/debian/rules b/tools/build/src/engine/debian/rules
index 756052a3b..756052a3b 100755
--- a/tools/build/v2/engine/debian/rules
+++ b/tools/build/src/engine/debian/rules
diff --git a/tools/build/v2/engine/debug.c b/tools/build/src/engine/debug.c
index 2a656551b..2a656551b 100644
--- a/tools/build/v2/engine/debug.c
+++ b/tools/build/src/engine/debug.c
diff --git a/tools/build/v2/engine/debug.h b/tools/build/src/engine/debug.h
index 4151d27fa..4151d27fa 100644
--- a/tools/build/v2/engine/debug.h
+++ b/tools/build/src/engine/debug.h
diff --git a/tools/build/v2/engine/execcmd.c b/tools/build/src/engine/execcmd.c
index f751cbff3..f751cbff3 100644
--- a/tools/build/v2/engine/execcmd.c
+++ b/tools/build/src/engine/execcmd.c
diff --git a/tools/build/v2/engine/execcmd.h b/tools/build/src/engine/execcmd.h
index ab145aa1d..ab145aa1d 100644
--- a/tools/build/v2/engine/execcmd.h
+++ b/tools/build/src/engine/execcmd.h
diff --git a/tools/build/v2/engine/execnt.c b/tools/build/src/engine/execnt.c
index ca89bd0f0..12ed75987 100644
--- a/tools/build/v2/engine/execnt.c
+++ b/tools/build/src/engine/execnt.c
@@ -97,7 +97,7 @@ static void string_new_from_argv( string * result, char const * const * argv );
/* frees and renews the given string */
static void string_renew( string * const );
/* reports the last failed Windows API related error message */
-static void reportWindowsError( char const * const apiName );
+static void reportWindowsError( char const * const apiName, int slot );
/* closes a Windows HANDLE and resets its variable to 0. */
static void closeWinHandle( HANDLE * const handle );
@@ -439,19 +439,23 @@ static void invoke_cmd( char const * const command, int const slot )
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = TRUE;
+ /* Create output buffers. */
+ string_new( cmdtab[ slot ].buffer_out );
+ string_new( cmdtab[ slot ].buffer_err );
+
/* Create pipes for communicating with the child process. */
if ( !CreatePipe( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ],
&cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ], &sa, 0 ) )
{
- reportWindowsError( "CreatePipe" );
- exit( EXITBAD );
+ reportWindowsError( "CreatePipe", slot );
+ return;
}
if ( globs.pipe_action && !CreatePipe( &cmdtab[ slot ].pipe_err[
EXECCMD_PIPE_READ ], &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ],
&sa, 0 ) )
{
- reportWindowsError( "CreatePipe" );
- exit( EXITBAD );
+ reportWindowsError( "CreatePipe", slot );
+ return;
}
/* Set handle inheritance off for the pipe ends the parent reads from. */
@@ -475,10 +479,6 @@ static void invoke_cmd( char const * const command, int const slot )
/* Let the child inherit stdin, as some commands assume it is available. */
si.hStdInput = GetStdHandle( STD_INPUT_HANDLE );
- /* Create output buffers. */
- string_new( cmdtab[ slot ].buffer_out );
- string_new( cmdtab[ slot ].buffer_err );
-
if ( DEBUG_EXECCMD )
printf( "Command string for CreateProcessA(): '%s'\n", command );
@@ -495,8 +495,8 @@ static void invoke_cmd( char const * const command, int const slot )
&si , /* startup info */
&cmdtab[ slot ].pi ) ) /* child process info, if created */
{
- reportWindowsError( "CreateProcessA" );
- exit( EXITBAD );
+ reportWindowsError( "CreateProcessA", slot );
+ return;
}
}
@@ -1204,9 +1204,12 @@ static void string_new_from_argv( string * result, char const * const * argv )
* Reports the last failed Windows API related error message.
*/
-static void reportWindowsError( char const * const apiName )
+static void reportWindowsError( char const * const apiName, int slot )
{
char * errorMessage;
+ char buf[24];
+ string * err_buf;
+ timing_info time;
DWORD const errorCode = GetLastError();
DWORD apiResult = FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER | /* __in DWORD dwFlags */
@@ -1218,14 +1221,49 @@ static void reportWindowsError( char const * const apiName )
(LPSTR)&errorMessage, /* __out LPTSTR lpBuffer */
0, /* __in DWORD nSize */
0 ); /* __in_opt va_list * Arguments */
+
+ /* Build a message as if the process had written to stderr. */
+ if ( globs.pipe_action )
+ err_buf = cmdtab[ slot ].buffer_err;
+ else
+ err_buf = cmdtab[ slot ].buffer_out;
+ string_append( err_buf, apiName );
+ string_append( err_buf, "() Windows API failed: " );
+ sprintf( buf, "%d", errorCode );
+ string_append( err_buf, buf );
+
if ( !apiResult )
- printf( "%s() Windows API failed: %d.\n", apiName, errorCode );
+ string_append( err_buf, ".\n" );
else
{
- printf( "%s() Windows API failed: %d - %s\n", apiName, errorCode,
- errorMessage );
+ string_append( err_buf, " - " );
+ string_append( err_buf, errorMessage );
+ /* Make sure that the buffer is terminated with a newline */
+ if( err_buf->value[ err_buf->size - 1 ] != '\n' )
+ string_push_back( err_buf, '\n' );
LocalFree( errorMessage );
}
+
+ /* Since the process didn't actually start, use a blank timing_info. */
+ time.system = 0;
+ time.user = 0;
+ timestamp_current( &time.start );
+ timestamp_current( &time.end );
+
+ /* Invoke the callback with a failure status. */
+ (*cmdtab[ slot ].func)( cmdtab[ slot ].closure, EXEC_CMD_FAIL, &time,
+ cmdtab[ slot ].buffer_out->value, cmdtab[ slot ].buffer_err->value,
+ EXIT_OK );
+
+ /* Clean up any handles that were opened. */
+ closeWinHandle( &cmdtab[ slot ].pi.hProcess );
+ closeWinHandle( &cmdtab[ slot ].pi.hThread );
+ closeWinHandle( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ] );
+ closeWinHandle( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ] );
+ closeWinHandle( &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_READ ] );
+ closeWinHandle( &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ] );
+ string_renew( cmdtab[ slot ].buffer_out );
+ string_renew( cmdtab[ slot ].buffer_err );
}
diff --git a/tools/build/v2/engine/execunix.c b/tools/build/src/engine/execunix.c
index 965e58011..965e58011 100644
--- a/tools/build/v2/engine/execunix.c
+++ b/tools/build/src/engine/execunix.c
diff --git a/tools/build/v2/engine/filent.c b/tools/build/src/engine/filent.c
index e4ac3319b..00dcc49b3 100644
--- a/tools/build/v2/engine/filent.c
+++ b/tools/build/src/engine/filent.c
@@ -122,6 +122,19 @@ int file_collect_dir_content_( file_info_t * const d )
ff->is_file = !ff->is_dir;
ff->exists = 1;
timestamp_from_filetime( &ff->time, &finfo.ftLastWriteTime );
+ // Use the timestamp of the link target, not the link itself
+ // (i.e. stat instead of lstat)
+ if ( finfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT )
+ {
+ HANDLE hLink = CreateFileA( pathname->value, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
+ BY_HANDLE_FILE_INFORMATION target_finfo[ 1 ];
+ if ( hLink != INVALID_HANDLE_VALUE && GetFileInformationByHandle( hLink, target_finfo ) )
+ {
+ ff->is_file = target_finfo->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? 0 : 1;
+ ff->is_dir = target_finfo->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? 1 : 0;
+ timestamp_from_filetime( &ff->time, &target_finfo->ftLastWriteTime );
+ }
+ }
}
}
while ( FindNextFile( findHandle, &finfo ) );
diff --git a/tools/build/v2/engine/filesys.c b/tools/build/src/engine/filesys.c
index dadaef82e..dadaef82e 100644
--- a/tools/build/v2/engine/filesys.c
+++ b/tools/build/src/engine/filesys.c
diff --git a/tools/build/v2/engine/filesys.h b/tools/build/src/engine/filesys.h
index 74fa3958f..74fa3958f 100644
--- a/tools/build/v2/engine/filesys.h
+++ b/tools/build/src/engine/filesys.h
diff --git a/tools/build/v2/engine/fileunix.c b/tools/build/src/engine/fileunix.c
index bff3a42f5..bff3a42f5 100644
--- a/tools/build/v2/engine/fileunix.c
+++ b/tools/build/src/engine/fileunix.c
diff --git a/tools/build/v2/engine/frames.c b/tools/build/src/engine/frames.c
index 0491c5c32..0491c5c32 100644
--- a/tools/build/v2/engine/frames.c
+++ b/tools/build/src/engine/frames.c
diff --git a/tools/build/v2/engine/frames.h b/tools/build/src/engine/frames.h
index 2e99f1737..2e99f1737 100644
--- a/tools/build/v2/engine/frames.h
+++ b/tools/build/src/engine/frames.h
diff --git a/tools/build/v2/engine/function.c b/tools/build/src/engine/function.c
index 690855e14..690855e14 100644
--- a/tools/build/v2/engine/function.c
+++ b/tools/build/src/engine/function.c
diff --git a/tools/build/v2/engine/function.h b/tools/build/src/engine/function.h
index 64f26b3cf..64f26b3cf 100644
--- a/tools/build/v2/engine/function.h
+++ b/tools/build/src/engine/function.h
diff --git a/tools/build/v2/engine/glob.c b/tools/build/src/engine/glob.c
index bec00ee56..bec00ee56 100644
--- a/tools/build/v2/engine/glob.c
+++ b/tools/build/src/engine/glob.c
diff --git a/tools/build/v2/engine/hash.c b/tools/build/src/engine/hash.c
index 36f836668..36f836668 100644
--- a/tools/build/v2/engine/hash.c
+++ b/tools/build/src/engine/hash.c
diff --git a/tools/build/v2/engine/hash.h b/tools/build/src/engine/hash.h
index 7c40e8c4a..7c40e8c4a 100644
--- a/tools/build/v2/engine/hash.h
+++ b/tools/build/src/engine/hash.h
diff --git a/tools/build/v2/engine/hcache.c b/tools/build/src/engine/hcache.c
index 3cf15f776..3cf15f776 100644
--- a/tools/build/v2/engine/hcache.c
+++ b/tools/build/src/engine/hcache.c
diff --git a/tools/build/v2/engine/hcache.h b/tools/build/src/engine/hcache.h
index a9d929d51..a9d929d51 100644
--- a/tools/build/v2/engine/hcache.h
+++ b/tools/build/src/engine/hcache.h
diff --git a/tools/build/v2/engine/hdrmacro.c b/tools/build/src/engine/hdrmacro.c
index eb4fe90f4..eb4fe90f4 100644
--- a/tools/build/v2/engine/hdrmacro.c
+++ b/tools/build/src/engine/hdrmacro.c
diff --git a/tools/build/v2/engine/hdrmacro.h b/tools/build/src/engine/hdrmacro.h
index 7595ede26..7595ede26 100644
--- a/tools/build/v2/engine/hdrmacro.h
+++ b/tools/build/src/engine/hdrmacro.h
diff --git a/tools/build/v2/engine/headers.c b/tools/build/src/engine/headers.c
index 0d9558d5d..0d9558d5d 100644
--- a/tools/build/v2/engine/headers.c
+++ b/tools/build/src/engine/headers.c
diff --git a/tools/build/v2/engine/headers.h b/tools/build/src/engine/headers.h
index 1c0a642df..1c0a642df 100644
--- a/tools/build/v2/engine/headers.h
+++ b/tools/build/src/engine/headers.h
diff --git a/tools/build/v2/engine/jam.c b/tools/build/src/engine/jam.c
index 1c80eec50..1c80eec50 100644
--- a/tools/build/v2/engine/jam.c
+++ b/tools/build/src/engine/jam.c
diff --git a/tools/build/v2/engine/jam.h b/tools/build/src/engine/jam.h
index 86ad0e86b..497a5bfb1 100644
--- a/tools/build/v2/engine/jam.h
+++ b/tools/build/src/engine/jam.h
@@ -409,7 +409,7 @@
#define MAXSYM 1024 /* longest symbol in the environment */
#define MAXJPATH 1024 /* longest filename */
-#define MAXJOBS 64 /* internally enforced -j limit */
+#define MAXJOBS 256 /* internally enforced -j limit */
#define MAXARGC 32 /* words in $(JAMSHELL) */
/* Jam private definitions below. */
diff --git a/tools/build/v2/engine/jambase.c b/tools/build/src/engine/jambase.c
index b15282bc3..b15282bc3 100644
--- a/tools/build/v2/engine/jambase.c
+++ b/tools/build/src/engine/jambase.c
diff --git a/tools/build/v2/engine/jambase.h b/tools/build/src/engine/jambase.h
index c05ec7922..c05ec7922 100644
--- a/tools/build/v2/engine/jambase.h
+++ b/tools/build/src/engine/jambase.h
diff --git a/tools/build/v2/engine/jamgram.c b/tools/build/src/engine/jamgram.c
index 48c85228e..48c85228e 100644
--- a/tools/build/v2/engine/jamgram.c
+++ b/tools/build/src/engine/jamgram.c
diff --git a/tools/build/v2/engine/jamgram.h b/tools/build/src/engine/jamgram.h
index 97f117535..97f117535 100644
--- a/tools/build/v2/engine/jamgram.h
+++ b/tools/build/src/engine/jamgram.h
diff --git a/tools/build/v2/engine/jamgram.y b/tools/build/src/engine/jamgram.y
index 543f1561a..543f1561a 100644
--- a/tools/build/v2/engine/jamgram.y
+++ b/tools/build/src/engine/jamgram.y
diff --git a/tools/build/v2/engine/jamgram.yy b/tools/build/src/engine/jamgram.yy
index 8d20e3896..8d20e3896 100644
--- a/tools/build/v2/engine/jamgram.yy
+++ b/tools/build/src/engine/jamgram.yy
diff --git a/tools/build/v2/engine/jamgramtab.h b/tools/build/src/engine/jamgramtab.h
index a0fd43f6a..a0fd43f6a 100644
--- a/tools/build/v2/engine/jamgramtab.h
+++ b/tools/build/src/engine/jamgramtab.h
diff --git a/tools/build/v2/engine/lists.c b/tools/build/src/engine/lists.c
index 3f2309b05..3f2309b05 100644
--- a/tools/build/v2/engine/lists.c
+++ b/tools/build/src/engine/lists.c
diff --git a/tools/build/v2/engine/lists.h b/tools/build/src/engine/lists.h
index 3dd8fe873..3dd8fe873 100644
--- a/tools/build/v2/engine/lists.h
+++ b/tools/build/src/engine/lists.h
diff --git a/tools/build/v2/engine/make.c b/tools/build/src/engine/make.c
index afc8bb938..c83f525c8 100644
--- a/tools/build/v2/engine/make.c
+++ b/tools/build/src/engine/make.c
@@ -161,6 +161,8 @@ int make( LIST * targets, int anyhow )
* make0() to be updated.
*/
+static void force_rebuilds( TARGET * t );
+
static void update_dependants( TARGET * t )
{
TARGETS * q;
@@ -190,6 +192,8 @@ static void update_dependants( TARGET * t )
update_dependants( p );
}
}
+ /* Make sure that rebuilds can be chained. */
+ force_rebuilds( t );
}
@@ -676,7 +680,30 @@ void make0
else
fate = t->fate;
- /* Step 4g: If this target needs to be built, force rebuild everything in
+ /*
+ * Step 4g: If this target needs to be built, make0 all targets
+ * that are updated by the same actions used to update this target.
+ * These have already been marked as REBUILDS, and make1 has
+ * special handling for them. We just need to make sure that
+ * they get make0ed.
+ */
+ if ( ( fate >= T_FATE_BUILD ) && ( fate < T_FATE_BROKEN ) )
+ {
+ ACTIONS * a;
+ TARGETS * c;
+ for ( a = t->actions; a; a = a->next )
+ {
+ for ( c = a->action->targets; c; c = c->next )
+ {
+ if ( c->target->fate == T_FATE_INIT )
+ {
+ make0( c->target, ptime, depth + 1, counts, anyhow, rescanning );
+ }
+ }
+ }
+ }
+
+ /* Step 4h: If this target needs to be built, force rebuild everything in
* its rebuilds list.
*/
if ( ( fate >= T_FATE_BUILD ) && ( fate < T_FATE_BROKEN ) )
diff --git a/tools/build/v2/engine/make.h b/tools/build/src/engine/make.h
index 2c3ba1678..2c3ba1678 100644
--- a/tools/build/v2/engine/make.h
+++ b/tools/build/src/engine/make.h
diff --git a/tools/build/v2/engine/make1.c b/tools/build/src/engine/make1.c
index 71eee1231..5a96dc4e5 100644
--- a/tools/build/v2/engine/make1.c
+++ b/tools/build/src/engine/make1.c
@@ -63,6 +63,12 @@ static SETTINGS * make1settings ( struct module_t *, LIST * vars );
static void make1bind ( TARGET * );
static TARGET * make1findcycle ( TARGET * );
static void make1breakcycle( TARGET *, TARGET * cycle_root );
+static void push_cmds( CMDLIST * cmds, int status );
+static int cmd_sem_lock( TARGET * t );
+static void cmd_sem_unlock( TARGET * t );
+
+static int targets_contains( TARGETS * l, TARGET * t );
+static int targets_equal( TARGETS * l1, TARGETS * l2 );
/* Ugly static - it is too hard to carry it through the callbacks. */
@@ -372,33 +378,16 @@ static void make1b( state * const pState )
TARGET * failed = 0;
char const * failed_name = "dependencies";
+ pop_state( &state_stack );
+
/* If any dependencies are still outstanding, wait until they signal their
* completion by pushing this same state for their parent targets.
*/
if ( --t->asynccnt )
{
- pop_state( &state_stack );
return;
}
- /* Try to aquire a semaphore. If it is locked, wait until the target that
- * locked it is built and signals completition.
- */
-#ifdef OPT_SEMAPHORE
- if ( t->semaphore && t->semaphore->asynccnt )
- {
- /* Append 't' to the list of targets waiting on semaphore. */
- t->semaphore->parents = targetentry( t->semaphore->parents, t );
- t->asynccnt++;
-
- if ( DEBUG_EXECCMD )
- printf( "SEM: %s is busy, delaying launch of %s\n",
- object_str( t->semaphore->name ), object_str( t->name ) );
- pop_state( &state_stack );
- return;
- }
-#endif
-
/* Now ready to build target 't', if dependencies built OK. */
/* Collect status from dependencies. If -n was passed then act as though all
@@ -492,28 +481,19 @@ static void make1b( state * const pState )
abort();
}
-#ifdef OPT_SEMAPHORE
- /* If there is a semaphore, indicate that it is in use. */
- if ( t->semaphore )
- {
- ++t->semaphore->asynccnt;
- if ( DEBUG_EXECCMD )
- printf( "SEM: %s now used by %s\n", object_str( t->semaphore->name
- ), object_str( t->name ) );
- }
-#endif
-
/* Proceed to MAKE1C to begin executing the chain of commands prepared for
* building the target. If we are not going to build the target (e.g. due to
* dependency failures or no commands needing to be run) the chain will be
* empty and MAKE1C processing will directly signal the target's completion.
*/
- /* Implementation note:
- * Morfing the current state on the stack instead of popping it and
- * pushing a new one is a slight optimization with no side-effects since we
- * pushed no other states while processing this one.
- */
- pState->curstate = T_STATE_MAKE1C;
+
+ if ( t->cmds == NULL || --( ( CMD * )t->cmds )->asynccnt == 0 )
+ push_state( &state_stack, t, NULL, T_STATE_MAKE1C );
+ else if ( DEBUG_EXECCMD )
+ {
+ CMD * cmd = ( CMD * )t->cmds;
+ printf( "Delaying %s %s: %d targets not ready\n", object_str( cmd->rule->name ), object_str( t->boundname ), cmd->asynccnt );
+ }
}
@@ -534,7 +514,7 @@ static void make1c( state const * const pState )
TARGET * const t = pState->t;
CMD * const cmd = (CMD *)t->cmds;
- if ( cmd && t->status == EXEC_CMD_OK )
+ if ( cmd )
{
/* Pop state first in case something below (e.g. exec_cmd(), exec_wait()
* or make1c_closure()) pushes a new state. Note that we must not access
@@ -543,6 +523,21 @@ static void make1c( state const * const pState )
*/
pop_state( &state_stack );
+ if ( cmd->status != EXEC_CMD_OK )
+ {
+ t->cmds = NULL;
+ push_cmds( cmd->next, cmd->status );
+ cmd_free( cmd );
+ return;
+ }
+
+#ifdef OPT_SEMAPHORE
+ if ( ! cmd_sem_lock( t ) )
+ {
+ return;
+ }
+#endif
+
/* Increment the jobs running counter. */
++cmdsrunning;
@@ -575,14 +570,6 @@ static void make1c( state const * const pState )
{
ACTIONS * actions;
- /* Collect status from actions, and distribute it as well. */
- for ( actions = t->actions; actions; actions = actions->next )
- if ( actions->action->status > t->status )
- t->status = actions->action->status;
- for ( actions = t->actions; actions; actions = actions->next )
- if ( t->status > actions->action->status )
- actions->action->status = t->status;
-
/* Tally success/failure for those we tried to update. */
if ( t->progress == T_MAKE_RUNNING )
switch ( t->status )
@@ -677,38 +664,6 @@ static void make1c( state const * const pState )
push_state( &temp_stack, c->target, NULL, T_STATE_MAKE1B );
}
-#ifdef OPT_SEMAPHORE
- /* If there is a semaphore, it is now free. */
- if ( t->semaphore )
- {
- assert( t->semaphore->asynccnt == 1 );
- --t->semaphore->asynccnt;
-
- if ( DEBUG_EXECCMD )
- printf( "SEM: %s is now free\n", object_str(
- t->semaphore->name ) );
-
- /* If anything is waiting, notify the next target. There is no
- * point in notifying all waiting targets, since they will be
- * notified again.
- */
- if ( t->semaphore->parents )
- {
- TARGETS * first = t->semaphore->parents;
- t->semaphore->parents = first->next;
- if ( first->next )
- first->next->tail = first->tail;
-
- if ( DEBUG_EXECCMD )
- printf( "SEM: placing %s on stack\n", object_str(
- first->target->name ) );
- push_state( &temp_stack, first->target, NULL, T_STATE_MAKE1B
- );
- BJAM_FREE( first );
- }
- }
-#endif
-
/* Must pop state before pushing any more. */
pop_state( &state_stack );
@@ -945,12 +900,57 @@ static void make1c_closure
}
}
+#ifdef OPT_SEMAPHORE
+ /* Release any semaphores used by this action. */
+ cmd_sem_unlock( t );
+#endif
+
/* Free this command and push the MAKE1C state to execute the next one
* scheduled for building this same target.
*/
- t->cmds = (char *)cmd_next( cmd );
+ t->cmds = NULL;
+ push_cmds( cmd->next, t->status );
cmd_free( cmd );
- push_state( &state_stack, t, NULL, T_STATE_MAKE1C );
+}
+
+/* push the next MAKE1C state after a command is run. */
+static void push_cmds( CMDLIST * cmds, int status )
+{
+ CMDLIST * cmd_iter;
+ for( cmd_iter = cmds; cmd_iter; cmd_iter = cmd_iter->next )
+ {
+ if ( cmd_iter->iscmd )
+ {
+ CMD * next_cmd = cmd_iter->impl.cmd;
+ /* Propagate the command status. */
+ if ( next_cmd->status < status )
+ next_cmd->status = status;
+ if ( --next_cmd->asynccnt == 0 )
+ {
+ /* Select the first target associated with the action.
+ * This is safe because sibling CMDs cannot have targets
+ * in common.
+ */
+ TARGET * first_target = bindtarget( list_front( lol_get( &next_cmd->args, 0 ) ) );
+ first_target->cmds = (char *)next_cmd;
+ push_state( &state_stack, first_target, NULL, T_STATE_MAKE1C );
+ }
+ else if ( DEBUG_EXECCMD )
+ {
+ TARGET * first_target = bindtarget( list_front( lol_get( &next_cmd->args, 0 ) ) );
+ printf( "Delaying %s %s: %d targets not ready\n", object_str( next_cmd->rule->name ), object_str( first_target->boundname ), next_cmd->asynccnt );
+ }
+ }
+ else
+ {
+ /* This is a target that we're finished updating */
+ TARGET * updated_target = cmd_iter->impl.t;
+ if ( updated_target->status < status )
+ updated_target->status = status;
+ updated_target->cmds = NULL;
+ push_state( &state_stack, updated_target, NULL, T_STATE_MAKE1C );
+ }
+ }
}
@@ -995,15 +995,14 @@ static void swap_settings
static CMD * make1cmds( TARGET * t )
{
CMD * cmds = 0;
- CMD * * cmds_next = &cmds;
+ CMD * last_cmd;
LIST * shell = L0;
module_t * settings_module = 0;
TARGET * settings_target = 0;
ACTIONS * a0;
int const running_flag = globs.noexec ? A_RUNNING_NOEXEC : A_RUNNING;
- /* Step through actions. Actions may be shared with other targets or grouped
- * using RULE_TOGETHER, so actions already seen are skipped.
+ /* Step through actions.
*/
for ( a0 = t->actions; a0; a0 = a0->next )
{
@@ -1014,11 +1013,36 @@ static CMD * make1cmds( TARGET * t )
LIST * ns;
ACTIONS * a1;
- /* Only do rules with commands to execute. If this action has already
- * been executed, use saved status.
+ /* Only do rules with commands to execute.
*/
- if ( !actions || a0->action->running >= running_flag )
+ if ( !actions )
+ continue;
+
+ if ( a0->action->running >= running_flag )
+ {
+ CMD * first;
+ /* If this action was skipped either because it was
+ * combined with another action by RULE_TOGETHER, or
+ * because all of its sources were filtered out,
+ * then we don't have anything to do here.
+ */
+ if ( a0->action->first_cmd == NULL )
+ continue;
+ /* This action has already been processed for another target.
+ * Just set up the dependency graph correctly and move on.
+ */
+ first = a0->action->first_cmd;
+ if( cmds )
+ {
+ last_cmd->next = cmdlist_append_cmd( last_cmd->next, first );
+ }
+ else
+ {
+ cmds = first;
+ }
+ last_cmd = a0->action->last_cmd;
continue;
+ }
a0->action->running = running_flag;
@@ -1031,7 +1055,8 @@ static CMD * make1cmds( TARGET * t )
if ( actions->flags & RULE_TOGETHER )
for ( a1 = a0->next; a1; a1 = a1->next )
if ( a1->action->rule == rule &&
- a1->action->running < running_flag )
+ a1->action->running < running_flag &&
+ targets_equal( a0->action->targets, a1->action->targets ) )
{
ns = make1list( ns, a1->action->sources, actions->flags );
a1->action->running = running_flag;
@@ -1076,8 +1101,12 @@ static CMD * make1cmds( TARGET * t )
int const length = list_length( ns );
int start = 0;
int chunk = length;
+ int cmd_count = 0;
LIST * cmd_targets = L0;
LIST * cmd_shell = L0;
+ TARGETS * semaphores = NULL;
+ TARGETS * targets_iter;
+ int unique_targets;
do
{
CMD * cmd;
@@ -1138,8 +1167,20 @@ static CMD * make1cmds( TARGET * t )
if ( accept_command )
{
/* Chain it up. */
- *cmds_next = cmd;
- cmds_next = &cmd->next;
+ if ( cmds )
+ {
+ last_cmd->next = cmdlist_append_cmd( last_cmd->next, cmd );
+ last_cmd = cmd;
+ }
+ else
+ {
+ cmds = last_cmd = cmd;
+ }
+
+ if ( cmd_count++ == 0 )
+ {
+ a0->action->first_cmd = cmd;
+ }
/* Mark lists we need recreated for the next command since
* they got consumed by the cmd object.
@@ -1160,6 +1201,39 @@ static CMD * make1cmds( TARGET * t )
start += chunk;
}
while ( start < length );
+
+ /* Record the end of the actions cmds */
+ a0->action->last_cmd = last_cmd;
+
+ unique_targets = 0;
+ for ( targets_iter = a0->action->targets; targets_iter; targets_iter = targets_iter->next )
+ {
+ if ( targets_contains( targets_iter->next, targets_iter->target ) )
+ continue;
+ /* Add all targets produced by the action to the update list. */
+ push_state( &state_stack, targets_iter->target, NULL, T_STATE_MAKE1A );
+ ++unique_targets;
+ }
+ /* We need to wait until all the targets agree that
+ * it's okay to run this action.
+ */
+ ( ( CMD * )a0->action->first_cmd )->asynccnt = unique_targets;
+
+#if OPT_SEMAPHORE
+ /* Collect semaphores */
+ for ( targets_iter = a0->action->targets; targets_iter; targets_iter = targets_iter->next )
+ {
+ TARGET * sem = targets_iter->target->semaphore;
+ if ( sem )
+ {
+ TARGETS * semiter;
+ if ( ! targets_contains( semaphores, sem ) )
+ semaphores = targetentry( semaphores, sem );
+ }
+ }
+ ( ( CMD * )a0->action->first_cmd )->lock = semaphores;
+ ( ( CMD * )a0->action->last_cmd )->unlock = semaphores;
+#endif
}
/* These were always copied when used. */
@@ -1171,6 +1245,11 @@ static CMD * make1cmds( TARGET * t )
freesettings( boundvars );
}
+ if ( cmds )
+ {
+ last_cmd->next = cmdlist_append_target( last_cmd->next, t );
+ }
+
swap_settings( &settings_module, &settings_target, 0, 0 );
return cmds;
}
@@ -1281,3 +1360,101 @@ static void make1bind( TARGET * t )
t->binding = timestamp_empty( &t->time ) ? T_BIND_MISSING : T_BIND_EXISTS;
popsettings( root_module(), t->settings );
}
+
+
+static int targets_contains( TARGETS * l, TARGET * t )
+{
+ for ( ; l; l = l->next )
+ {
+ if ( t == l->target )
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int targets_equal( TARGETS * l1, TARGETS * l2 )
+{
+ for ( ; l1 && l2; l1 = l1->next, l2 = l2->next )
+ {
+ if ( l1->target != l2->target )
+ return 0;
+ }
+ return !l1 && !l2;
+}
+
+
+#ifdef OPT_SEMAPHORE
+
+static int cmd_sem_lock( TARGET * t )
+{
+ CMD * cmd = (CMD *)t->cmds;
+ TARGETS * iter;
+ /* Check whether all the semaphores required for updating
+ * this target are free.
+ */
+ for ( iter = cmd->lock; iter; iter = iter->next )
+ {
+ if ( iter->target->asynccnt > 0 )
+ {
+ if ( DEBUG_EXECCMD )
+ printf( "SEM: %s is busy, delaying launch of %s\n",
+ object_str( iter->target->name ), object_str( t->name ) );
+ iter->target->parents = targetentry( iter->target->parents, t );
+ return 0;
+ }
+ }
+ /* Lock the semaphores. */
+ for ( iter = cmd->lock; iter; iter = iter->next )
+ {
+ ++iter->target->asynccnt;
+ if ( DEBUG_EXECCMD )
+ printf( "SEM: %s now used by %s\n", object_str( iter->target->name
+ ), object_str( t->name ) );
+ }
+ /* A cmd only needs to be locked around its execution.
+ * clearing cmd->lock here makes it safe to call cmd_sem_lock
+ * twice.
+ */
+ cmd->lock = NULL;
+ return 1;
+}
+
+static void cmd_sem_unlock( TARGET * t )
+{
+ CMD * cmd = ( CMD * )t->cmds;
+ TARGETS * iter;
+ /* Release the semaphores. */
+ for ( iter = cmd->unlock; iter; iter = iter->next )
+ {
+ if ( DEBUG_EXECCMD )
+ printf( "SEM: %s is now free\n", object_str(
+ iter->target->name ) );
+ --iter->target->asynccnt;
+ assert( iter->target->asynccnt <= 0 );
+ }
+ for ( iter = cmd->unlock; iter; iter = iter->next )
+ {
+ /* Find a waiting target that's ready */
+ while ( iter->target->parents )
+ {
+ TARGETS * first = iter->target->parents;
+ TARGET * t1 = first->target;
+
+ /* Pop the first waiting CMD */
+ if ( first->next )
+ first->next->tail = first->tail;
+ iter->target->parents = first->next;
+ BJAM_FREE( first );
+
+ if ( cmd_sem_lock( t1 ) )
+ {
+ push_state( &state_stack, t1, NULL, T_STATE_MAKE1C );
+ break;
+ }
+ }
+ }
+}
+
+#endif
diff --git a/tools/build/v2/engine/md5.c b/tools/build/src/engine/md5.c
index c35d96c5e..c35d96c5e 100644
--- a/tools/build/v2/engine/md5.c
+++ b/tools/build/src/engine/md5.c
diff --git a/tools/build/v2/engine/md5.h b/tools/build/src/engine/md5.h
index 698c995d8..698c995d8 100644
--- a/tools/build/v2/engine/md5.h
+++ b/tools/build/src/engine/md5.h
diff --git a/tools/build/v2/engine/mem.c b/tools/build/src/engine/mem.c
index 6a11fb38a..6a11fb38a 100644
--- a/tools/build/v2/engine/mem.c
+++ b/tools/build/src/engine/mem.c
diff --git a/tools/build/v2/engine/mem.h b/tools/build/src/engine/mem.h
index 8718b07fd..8718b07fd 100644
--- a/tools/build/v2/engine/mem.h
+++ b/tools/build/src/engine/mem.h
diff --git a/tools/build/v2/engine/mkjambase.c b/tools/build/src/engine/mkjambase.c
index cdf599820..cdf599820 100644
--- a/tools/build/v2/engine/mkjambase.c
+++ b/tools/build/src/engine/mkjambase.c
diff --git a/tools/build/v2/engine/modules.c b/tools/build/src/engine/modules.c
index 6be82fe12..6be82fe12 100644
--- a/tools/build/v2/engine/modules.c
+++ b/tools/build/src/engine/modules.c
diff --git a/tools/build/v2/engine/modules.h b/tools/build/src/engine/modules.h
index 1b161c6e5..1b161c6e5 100644
--- a/tools/build/v2/engine/modules.h
+++ b/tools/build/src/engine/modules.h
diff --git a/tools/build/v2/engine/modules/order.c b/tools/build/src/engine/modules/order.c
index 3a83d3895..3a83d3895 100644
--- a/tools/build/v2/engine/modules/order.c
+++ b/tools/build/src/engine/modules/order.c
diff --git a/tools/build/v2/engine/modules/path.c b/tools/build/src/engine/modules/path.c
index f8dedaccd..f8dedaccd 100644
--- a/tools/build/v2/engine/modules/path.c
+++ b/tools/build/src/engine/modules/path.c
diff --git a/tools/build/v2/engine/modules/property-set.c b/tools/build/src/engine/modules/property-set.c
index 21e35d5ab..21e35d5ab 100644
--- a/tools/build/v2/engine/modules/property-set.c
+++ b/tools/build/src/engine/modules/property-set.c
diff --git a/tools/build/v2/engine/modules/readme.txt b/tools/build/src/engine/modules/readme.txt
index 2edf6e17f..2edf6e17f 100644
--- a/tools/build/v2/engine/modules/readme.txt
+++ b/tools/build/src/engine/modules/readme.txt
diff --git a/tools/build/v2/engine/modules/regex.c b/tools/build/src/engine/modules/regex.c
index d9f8177bf..d9f8177bf 100644
--- a/tools/build/v2/engine/modules/regex.c
+++ b/tools/build/src/engine/modules/regex.c
diff --git a/tools/build/v2/engine/modules/sequence.c b/tools/build/src/engine/modules/sequence.c
index 08ed30599..08ed30599 100644
--- a/tools/build/v2/engine/modules/sequence.c
+++ b/tools/build/src/engine/modules/sequence.c
diff --git a/tools/build/v2/engine/modules/set.c b/tools/build/src/engine/modules/set.c
index 77a314d57..77a314d57 100644
--- a/tools/build/v2/engine/modules/set.c
+++ b/tools/build/src/engine/modules/set.c
diff --git a/tools/build/v2/engine/native.c b/tools/build/src/engine/native.c
index 68828aa31..68828aa31 100644
--- a/tools/build/v2/engine/native.c
+++ b/tools/build/src/engine/native.c
diff --git a/tools/build/v2/engine/native.h b/tools/build/src/engine/native.h
index 6d38d01e0..6d38d01e0 100644
--- a/tools/build/v2/engine/native.h
+++ b/tools/build/src/engine/native.h
diff --git a/tools/build/v2/engine/object.c b/tools/build/src/engine/object.c
index ef46e4ae4..ef46e4ae4 100644
--- a/tools/build/v2/engine/object.c
+++ b/tools/build/src/engine/object.c
diff --git a/tools/build/v2/engine/object.h b/tools/build/src/engine/object.h
index cabb9f6f2..cabb9f6f2 100644
--- a/tools/build/v2/engine/object.h
+++ b/tools/build/src/engine/object.h
diff --git a/tools/build/v2/engine/option.c b/tools/build/src/engine/option.c
index d25e5e8ad..d25e5e8ad 100644
--- a/tools/build/v2/engine/option.c
+++ b/tools/build/src/engine/option.c
diff --git a/tools/build/v2/engine/option.h b/tools/build/src/engine/option.h
index 7c9c7479b..7c9c7479b 100644
--- a/tools/build/v2/engine/option.h
+++ b/tools/build/src/engine/option.h
diff --git a/tools/build/v2/engine/output.c b/tools/build/src/engine/output.c
index eaaee434b..eaaee434b 100644
--- a/tools/build/v2/engine/output.c
+++ b/tools/build/src/engine/output.c
diff --git a/tools/build/v2/engine/output.h b/tools/build/src/engine/output.h
index 186e867f6..186e867f6 100644
--- a/tools/build/v2/engine/output.h
+++ b/tools/build/src/engine/output.h
diff --git a/tools/build/v2/engine/parse.c b/tools/build/src/engine/parse.c
index 02412e085..02412e085 100644
--- a/tools/build/v2/engine/parse.c
+++ b/tools/build/src/engine/parse.c
diff --git a/tools/build/v2/engine/parse.h b/tools/build/src/engine/parse.h
index bb47af6d3..bb47af6d3 100644
--- a/tools/build/v2/engine/parse.h
+++ b/tools/build/src/engine/parse.h
diff --git a/tools/build/v2/engine/patchlevel.h b/tools/build/src/engine/patchlevel.h
index 60b0d61d7..4da43e1ff 100644
--- a/tools/build/v2/engine/patchlevel.h
+++ b/tools/build/src/engine/patchlevel.h
@@ -7,11 +7,11 @@
/* Keep JAMVERSYM in sync with VERSION. */
/* It can be accessed as $(JAMVERSION) in the Jamfile. */
-#define VERSION_MAJOR 2011
-#define VERSION_MINOR 12
-#define VERSION_PATCH 1
-#define VERSION_MAJOR_SYM "2011"
-#define VERSION_MINOR_SYM "12"
-#define VERSION_PATCH_SYM "01"
-#define VERSION "2011.12.1"
-#define JAMVERSYM "JAMVERSION=2011.12"
+#define VERSION_MAJOR 2014
+#define VERSION_MINOR 3
+#define VERSION_PATCH 0
+#define VERSION_MAJOR_SYM "2014"
+#define VERSION_MINOR_SYM "03"
+#define VERSION_PATCH_SYM "00"
+#define VERSION "2014.03"
+#define JAMVERSYM "JAMVERSION=2014.03"
diff --git a/tools/build/v2/engine/pathnt.c b/tools/build/src/engine/pathnt.c
index 8abf8fe7b..412f5f4b5 100644
--- a/tools/build/v2/engine/pathnt.c
+++ b/tools/build/src/engine/pathnt.c
@@ -175,6 +175,10 @@ static int canonicWindowsPath( char const * const path, int const path_length,
return 1;
}
}
+ else
+ {
+ return 1;
+ }
}
return 0;
}
@@ -243,7 +247,10 @@ static path_key_entry * path_key( OBJECT * const path,
{
nresult->path = normalized;
if ( known_to_be_canonic )
+ {
nresult->key = object_copy( path );
+ nresult->exists = 1;
+ }
else
{
string canonic_path[ 1 ];
diff --git a/tools/build/v2/engine/pathsys.c b/tools/build/src/engine/pathsys.c
index ae4e6e052..ae4e6e052 100644
--- a/tools/build/v2/engine/pathsys.c
+++ b/tools/build/src/engine/pathsys.c
diff --git a/tools/build/v2/engine/pathsys.h b/tools/build/src/engine/pathsys.h
index 9b7a4caf1..9b7a4caf1 100644
--- a/tools/build/v2/engine/pathsys.h
+++ b/tools/build/src/engine/pathsys.h
diff --git a/tools/build/v2/engine/pathunix.c b/tools/build/src/engine/pathunix.c
index 8ca0d185e..8ca0d185e 100644
--- a/tools/build/v2/engine/pathunix.c
+++ b/tools/build/src/engine/pathunix.c
diff --git a/tools/build/v2/engine/regexp.c b/tools/build/src/engine/regexp.c
index c64201b90..c64201b90 100644
--- a/tools/build/v2/engine/regexp.c
+++ b/tools/build/src/engine/regexp.c
diff --git a/tools/build/v2/engine/regexp.h b/tools/build/src/engine/regexp.h
index 6898ccdce..6898ccdce 100644
--- a/tools/build/v2/engine/regexp.h
+++ b/tools/build/src/engine/regexp.h
diff --git a/tools/build/v2/engine/rules.c b/tools/build/src/engine/rules.c
index 7947c5507..7947c5507 100644
--- a/tools/build/v2/engine/rules.c
+++ b/tools/build/src/engine/rules.c
diff --git a/tools/build/v2/engine/rules.h b/tools/build/src/engine/rules.h
index fe2792f43..f3a020bb8 100644
--- a/tools/build/v2/engine/rules.h
+++ b/tools/build/src/engine/rules.h
@@ -92,8 +92,13 @@ struct _action
#define A_INIT 0
#define A_RUNNING_NOEXEC 1
#define A_RUNNING 2
- char status; /* see TARGET status */
int refs;
+
+ /* WARNING: These variables are used to pass state required by make1cmds and
+ * are not valid anywhere else.
+ */
+ void * first_cmd; /* Pointer to the first CMD created by this action */
+ void * last_cmd; /* Pointer to the last CMD created by this action */
};
/* SETTINGS - variables to set when executing a TARGET's ACTIONS. */
diff --git a/tools/build/v2/engine/scan.c b/tools/build/src/engine/scan.c
index d92fdca14..d92fdca14 100644
--- a/tools/build/v2/engine/scan.c
+++ b/tools/build/src/engine/scan.c
diff --git a/tools/build/v2/engine/scan.h b/tools/build/src/engine/scan.h
index 745477fc1..745477fc1 100644
--- a/tools/build/v2/engine/scan.h
+++ b/tools/build/src/engine/scan.h
diff --git a/tools/build/v2/engine/search.c b/tools/build/src/engine/search.c
index b2beadaaa..b2beadaaa 100644
--- a/tools/build/v2/engine/search.c
+++ b/tools/build/src/engine/search.c
diff --git a/tools/build/v2/engine/search.h b/tools/build/src/engine/search.h
index 7e74f7972..7e74f7972 100644
--- a/tools/build/v2/engine/search.h
+++ b/tools/build/src/engine/search.h
diff --git a/tools/build/v2/engine/strings.c b/tools/build/src/engine/strings.c
index 3d3e19b3e..3d3e19b3e 100644
--- a/tools/build/v2/engine/strings.c
+++ b/tools/build/src/engine/strings.c
diff --git a/tools/build/v2/engine/strings.h b/tools/build/src/engine/strings.h
index 749f28783..749f28783 100644
--- a/tools/build/v2/engine/strings.h
+++ b/tools/build/src/engine/strings.h
diff --git a/tools/build/v2/engine/subst.c b/tools/build/src/engine/subst.c
index a5fcee08c..a5fcee08c 100644
--- a/tools/build/v2/engine/subst.c
+++ b/tools/build/src/engine/subst.c
diff --git a/tools/build/v2/engine/subst.h b/tools/build/src/engine/subst.h
index 7dc09a614..7dc09a614 100644
--- a/tools/build/v2/engine/subst.h
+++ b/tools/build/src/engine/subst.h
diff --git a/tools/build/v2/engine/timestamp.c b/tools/build/src/engine/timestamp.c
index 0d016985e..0d016985e 100644
--- a/tools/build/v2/engine/timestamp.c
+++ b/tools/build/src/engine/timestamp.c
diff --git a/tools/build/v2/engine/timestamp.h b/tools/build/src/engine/timestamp.h
index aaf1310fe..ecedb5f92 100644
--- a/tools/build/v2/engine/timestamp.h
+++ b/tools/build/src/engine/timestamp.h
@@ -14,7 +14,6 @@
#include "object.h"
#ifdef OS_NT
-# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
diff --git a/tools/build/v2/engine/variable.c b/tools/build/src/engine/variable.c
index 2c292fbc8..2c292fbc8 100644
--- a/tools/build/v2/engine/variable.c
+++ b/tools/build/src/engine/variable.c
diff --git a/tools/build/v2/engine/variable.h b/tools/build/src/engine/variable.h
index ddb452bc1..ddb452bc1 100644
--- a/tools/build/v2/engine/variable.h
+++ b/tools/build/src/engine/variable.h
diff --git a/tools/build/v2/engine/w32_getreg.c b/tools/build/src/engine/w32_getreg.c
index dd2d0fc70..dd2d0fc70 100644
--- a/tools/build/v2/engine/w32_getreg.c
+++ b/tools/build/src/engine/w32_getreg.c
diff --git a/tools/build/v2/engine/yyacc.c b/tools/build/src/engine/yyacc.c
index b5efc96b5..b5efc96b5 100644
--- a/tools/build/v2/engine/yyacc.c
+++ b/tools/build/src/engine/yyacc.c
diff --git a/tools/build/v2/exceptions.py b/tools/build/src/exceptions.py
index 5750abfe3..5750abfe3 100644
--- a/tools/build/v2/exceptions.py
+++ b/tools/build/src/exceptions.py
diff --git a/tools/build/v2/kernel/boost-build.jam b/tools/build/src/kernel/boost-build.jam
index 377f6ec02..377f6ec02 100644..100755
--- a/tools/build/v2/kernel/boost-build.jam
+++ b/tools/build/src/kernel/boost-build.jam
diff --git a/tools/build/v2/kernel/bootstrap.jam b/tools/build/src/kernel/bootstrap.jam
index c4320dc29..c4320dc29 100644
--- a/tools/build/v2/kernel/bootstrap.jam
+++ b/tools/build/src/kernel/bootstrap.jam
diff --git a/tools/build/v2/kernel/bootstrap.py b/tools/build/src/kernel/bootstrap.py
index 2e8dd37b7..2e8dd37b7 100644
--- a/tools/build/v2/kernel/bootstrap.py
+++ b/tools/build/src/kernel/bootstrap.py
diff --git a/tools/build/v2/kernel/class.jam b/tools/build/src/kernel/class.jam
index e48ab6ddb..e48ab6ddb 100644
--- a/tools/build/v2/kernel/class.jam
+++ b/tools/build/src/kernel/class.jam
diff --git a/tools/build/v2/kernel/errors.jam b/tools/build/src/kernel/errors.jam
index 9563396ec..9563396ec 100644
--- a/tools/build/v2/kernel/errors.jam
+++ b/tools/build/src/kernel/errors.jam
diff --git a/tools/build/v2/kernel/modules.jam b/tools/build/src/kernel/modules.jam
index 425822532..425822532 100644
--- a/tools/build/v2/kernel/modules.jam
+++ b/tools/build/src/kernel/modules.jam
diff --git a/tools/build/v2/manager.py b/tools/build/src/manager.py
index 473857fc7..473857fc7 100644
--- a/tools/build/v2/manager.py
+++ b/tools/build/src/manager.py
diff --git a/tools/build/v2/options/help.jam b/tools/build/src/options/help.jam
index b507e1edd..b507e1edd 100644..100755
--- a/tools/build/v2/options/help.jam
+++ b/tools/build/src/options/help.jam
diff --git a/tools/build/v2/tools/__init__.py b/tools/build/src/tools/__init__.py
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/tools/__init__.py
+++ b/tools/build/src/tools/__init__.py
diff --git a/tools/build/v2/tools/acc.jam b/tools/build/src/tools/acc.jam
index f04c9dc87..f04c9dc87 100644
--- a/tools/build/v2/tools/acc.jam
+++ b/tools/build/src/tools/acc.jam
diff --git a/tools/build/v2/tools/auto-index.jam b/tools/build/src/tools/auto-index.jam
index 41d04828a..41d04828a 100644
--- a/tools/build/v2/tools/auto-index.jam
+++ b/tools/build/src/tools/auto-index.jam
diff --git a/tools/build/v2/tools/bison.jam b/tools/build/src/tools/bison.jam
index 0689d4bd8..0689d4bd8 100644
--- a/tools/build/v2/tools/bison.jam
+++ b/tools/build/src/tools/bison.jam
diff --git a/tools/build/v2/tools/boostbook-config.jam b/tools/build/src/tools/boostbook-config.jam
index 6e3f3ddc1..6e3f3ddc1 100644
--- a/tools/build/v2/tools/boostbook-config.jam
+++ b/tools/build/src/tools/boostbook-config.jam
diff --git a/tools/build/v2/tools/boostbook.jam b/tools/build/src/tools/boostbook.jam
index de83dec64..42342d9bb 100644
--- a/tools/build/v2/tools/boostbook.jam
+++ b/tools/build/src/tools/boostbook.jam
@@ -178,6 +178,7 @@ rule print-error ( location message * )
rule make-error ( message * )
{
+ import errors ;
return [ errors.nearest-user-location ] $(message) ;
}
@@ -204,7 +205,6 @@ rule check-docbook-xsl-dir ( )
{
if ! [ path.glob $(.docbook-xsl-dir) : common/common.xsl ]
{
- import errors ;
.error-message = [ make-error BoostBook: could not find docbook XSL stylesheets
in: [ path.native $(.docbook-xsl-dir) ] ] ;
}
@@ -223,7 +223,6 @@ rule check-docbook-dtd-dir ( )
{
if ! [ path.glob $(.docbook-dtd-dir) : docbookx.dtd ]
{
- import errors ;
.error-message = [ make-error BoostBook: could not find docbook DTD in: [
path.native $(.docbook-dtd-dir) ] ] ;
}
@@ -278,7 +277,6 @@ rule check-boostbook-dir ( boostbook-dir ? )
{
if $(boostbook-dir) && ! [ path.glob $(boostbook-dir) : xsl ]
{
- import errors ;
.error-message = [ make-error BoostBook: could not find boostbook in: [ path.native
$(boostbook-dir) ] ] ;
}
diff --git a/tools/build/v2/tools/borland.jam b/tools/build/src/tools/borland.jam
index 6e43ca93a..3fc215da9 100644
--- a/tools/build/v2/tools/borland.jam
+++ b/tools/build/src/tools/borland.jam
@@ -94,7 +94,8 @@ flags borland OPTIONS <threading>multi : -tWM ;
-flags borland.compile OPTIONS <cxxflags> ;
+flags borland.compile OPTIONS <cflags> ;
+flags borland.compile.c++ OPTIONS <cxxflags> ;
flags borland.compile DEFINES <define> ;
flags borland.compile INCLUDES <include> ;
diff --git a/tools/build/v2/tools/builtin.jam b/tools/build/src/tools/builtin.jam
index 176de13ff..d62680afd 100644
--- a/tools/build/v2/tools/builtin.jam
+++ b/tools/build/src/tools/builtin.jam
@@ -40,7 +40,7 @@ import convert ;
import generate ;
-.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd openbsd osf
+.os-names = aix android bsd cygwin darwin freebsd hpux iphone linux netbsd openbsd osf
qnx qnxnto sgi solaris unix unixware windows
elf # Not actually an OS -- used for targeting bare metal where object
# format is ELF. This catches both -elf and -eabi gcc targets and well
diff --git a/tools/build/v2/tools/builtin.py b/tools/build/src/tools/builtin.py
index 35c1a40d8..68ddfed4b 100644
--- a/tools/build/v2/tools/builtin.py
+++ b/tools/build/src/tools/builtin.py
@@ -66,7 +66,7 @@ def variant (name, parents_or_properties, explicit_properties = []):
p = parents[0]
# TODO: the check may be stricter
if not feature.is_implicit_value (p):
- raise BaseException ("Invalid base varaint '%s'" % p)
+ raise BaseException ("Invalid base variant '%s'" % p)
inherited = __variant_explicit_properties[p]
@@ -196,6 +196,14 @@ def register_globals ():
'on'], # Fail the compilation if there are warnings.
['incidental', 'propagated'])
+ feature.feature('c++-template-depth',
+ [str(i) for i in range(64,1024+1,64)] +
+ [str(i) for i in range(20,1000+1,10)] +
+ # Maximum template instantiation depth guaranteed for ANSI/ISO C++
+ # conforming programs.
+ ['17'],
+ ['incidental', 'optional', 'propagated'])
+
feature.feature ('source', [], ['free', 'dependency', 'incidental'])
feature.feature ('library', [], ['free', 'dependency', 'incidental'])
feature.feature ('file', [], ['free', 'dependency', 'incidental'])
@@ -325,21 +333,15 @@ reset ()
register_globals ()
class SearchedLibTarget (virtual_target.AbstractFileTarget):
- def __init__ (self, name, project, shared, real_name, search, action):
+ def __init__ (self, name, project, shared, search, action):
virtual_target.AbstractFileTarget.__init__ (self, name, 'SEARCHED_LIB', project, action)
self.shared_ = shared
- self.real_name_ = real_name
- if not self.real_name_:
- self.real_name_ = name
self.search_ = search
def shared (self):
return self.shared_
- def real_name (self):
- return self.real_name_
-
def search (self):
return self.search_
@@ -506,10 +508,10 @@ class SearchedLibGenerator (generators.Generator):
if real_name:
real_name = real_name[0]
else:
- real_nake = name
+ real_name = name
search = feature.get_values('<search>', properties)
usage_requirements = property_set.create(['<xdll-path>' + p for p in search])
- t = SearchedLibTarget(name, project, shared, real_name, search, a)
+ t = SearchedLibTarget(real_name, project, shared, search, a)
# We return sources for a simple reason. If there's
# lib png : z : <name>png ;
@@ -669,7 +671,7 @@ class LinkingGenerator (generators.Generator):
fst = []
for s in sources:
if type.is_derived(s.type(), 'SEARCHED_LIB'):
- n = s.real_name()
+ n = s.name()
if s.shared():
fsa.append(n)
diff --git a/tools/build/v2/tools/cast.jam b/tools/build/src/tools/cast.jam
index 41b0ac338..41b0ac338 100644
--- a/tools/build/v2/tools/cast.jam
+++ b/tools/build/src/tools/cast.jam
diff --git a/tools/build/v2/tools/cast.py b/tools/build/src/tools/cast.py
index 8f053f110..8f053f110 100644
--- a/tools/build/v2/tools/cast.py
+++ b/tools/build/src/tools/cast.py
diff --git a/tools/build/v2/tools/clang-darwin.jam b/tools/build/src/tools/clang-darwin.jam
index a8abc7d6a..51e5fad75 100644
--- a/tools/build/v2/tools/clang-darwin.jam
+++ b/tools/build/src/tools/clang-darwin.jam
@@ -73,7 +73,7 @@ rule init ( version ? : command * : options * )
SPACE = " " ;
flags clang-darwin.compile OPTIONS <cflags> ;
-flags clang-darwin.compile OPTIONS <cxxflags> ;
+flags clang-darwin.compile.c++ OPTIONS <cxxflags> ;
# flags clang-darwin.compile INCLUDES <include> ;
# Declare flags and action for compilation.
@@ -161,10 +161,10 @@ rule link ( targets * : sources * : properties * )
actions link bind LIBRARIES
{
- "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
}
actions link.dll bind LIBRARIES
{
- "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
}
diff --git a/tools/build/v2/tools/clang-linux.jam b/tools/build/src/tools/clang-linux.jam
index 2999c2d69..668078e09 100644
--- a/tools/build/v2/tools/clang-linux.jam
+++ b/tools/build/src/tools/clang-linux.jam
@@ -179,7 +179,7 @@ rule link ( targets * : sources * : properties * ) {
}
actions link bind LIBRARIES {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}
rule link.dll ( targets * : sources * : properties * ) {
@@ -191,6 +191,6 @@ rule link.dll ( targets * : sources * : properties * ) {
# Differ from 'link' above only by -shared.
actions link.dll bind LIBRARIES {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}
diff --git a/tools/build/v2/tools/clang.jam b/tools/build/src/tools/clang.jam
index e0ac9a553..e0ac9a553 100644
--- a/tools/build/v2/tools/clang.jam
+++ b/tools/build/src/tools/clang.jam
diff --git a/tools/build/v2/tools/common.jam b/tools/build/src/tools/common.jam
index 8404febf9..8404febf9 100644
--- a/tools/build/v2/tools/common.jam
+++ b/tools/build/src/tools/common.jam
diff --git a/tools/build/v2/tools/common.py b/tools/build/src/tools/common.py
index 3eb0f7d3f..b1ee26f0c 100644
--- a/tools/build/v2/tools/common.py
+++ b/tools/build/src/tools/common.py
@@ -16,7 +16,10 @@ import os
import os.path
import sys
-from b2.build import feature
+# for some reason this fails on Python 2.7(r27:82525)
+# from b2.build import virtual_target
+import b2.build.virtual_target
+from b2.build import feature, type
from b2.util.utility import *
from b2.util import path
@@ -640,13 +643,13 @@ def format_name(format, name, target_type, prop_set):
if grist == '<base>':
result += os.path.basename(name)
elif grist == '<toolset>':
- result += join_tag(ungrist(f),
+ result += join_tag(get_value(f),
toolset_tag(name, target_type, prop_set))
elif grist == '<threading>':
- result += join_tag(ungrist(f),
+ result += join_tag(get_value(f),
threading_tag(name, target_type, prop_set))
elif grist == '<runtime>':
- result += join_tag(ungrist(f),
+ result += join_tag(get_value(f),
runtime_tag(name, target_type, prop_set))
elif grist.startswith('<version:'):
key = grist[len('<version:'):-1]
@@ -654,7 +657,7 @@ def format_name(format, name, target_type, prop_set):
if not version:
version = key
version = __re_version.match(version)
- result += join_tag(ungrist(f), version[1] + '_' + version[2])
+ result += join_tag(get_value(f), version[1] + '_' + version[2])
elif grist.startswith('<property:'):
key = grist[len('<property:'):-1]
property_re = re.compile('<(' + key + ')>')
@@ -670,15 +673,17 @@ def format_name(format, name, target_type, prop_set):
assert(len(p) == 1)
result += join_tag(ungrist(f), p)
else:
- result += ungrist(f)
+ result += f
- result = virtual_target.add_prefix_and_suffix(
+ result = b2.build.virtual_target.add_prefix_and_suffix(
''.join(result), target_type, prop_set)
return result
def join_tag(joiner, tag):
- if not joiner: joiner = '-'
- return joiner + tag
+ if tag:
+ if not joiner: joiner = '-'
+ return joiner + tag
+ return ''
__re_toolset_version = re.compile(r"<toolset.*version>(\d+)[.](\d*)")
@@ -687,7 +692,7 @@ def toolset_tag(name, target_type, prop_set):
properties = prop_set.raw()
tools = prop_set.get('<toolset>')
- assert(len(tools) == 0)
+ assert(len(tools) == 1)
tools = tools[0]
if tools.startswith('borland'): tag += 'bcb'
elif tools.startswith('como'): tag += 'como'
diff --git a/tools/build/v2/tools/como-linux.jam b/tools/build/src/tools/como-linux.jam
index 5c554c8f8..5c554c8f8 100644
--- a/tools/build/v2/tools/como-linux.jam
+++ b/tools/build/src/tools/como-linux.jam
diff --git a/tools/build/v2/tools/como-win.jam b/tools/build/src/tools/como-win.jam
index d21a70d6f..d21a70d6f 100644
--- a/tools/build/v2/tools/como-win.jam
+++ b/tools/build/src/tools/como-win.jam
diff --git a/tools/build/v2/tools/como.jam b/tools/build/src/tools/como.jam
index 04a05a94b..04a05a94b 100644
--- a/tools/build/v2/tools/como.jam
+++ b/tools/build/src/tools/como.jam
diff --git a/tools/build/v2/tools/convert.jam b/tools/build/src/tools/convert.jam
index ac1d70101..ac1d70101 100644
--- a/tools/build/v2/tools/convert.jam
+++ b/tools/build/src/tools/convert.jam
diff --git a/tools/build/v2/tools/cray.jam b/tools/build/src/tools/cray.jam
index a37fe23b2..1fa1ddc01 100644
--- a/tools/build/v2/tools/cray.jam
+++ b/tools/build/src/tools/cray.jam
@@ -1,6 +1,7 @@
# Copyright 2001 David Abrahams.
# Copyright 2004, 2005 Markus Schoepflin.
# Copyright 2011, John Maddock
+# Copyright 2013, Cray, Inc.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -47,24 +48,36 @@ generators.register-c-compiler cray.compile.c++ : CPP : OBJ : <toolset>cray ;
generators.register-c-compiler cray.compile.c : C : OBJ : <toolset>cray ;
-
-# No static linking as far as I can tell.
+# unlike most compliers, Cray defaults to static linking.
# flags cxx LINKFLAGS <runtime-link>static : -bstatic ;
-flags cray.compile OPTIONS <debug-symbols>on : -Gn ;
-flags cray.link OPTIONS <debug-symbols>on : -Gn ;
+# flags cray.compile OPTIONS <debug-symbols>on : -G0 ;
+flags cray.compile OPTIONS <debug-symbols>on : -g ;
+# flags cray.link OPTIONS <debug-symbols>on : -G0 ;
+flags cray.link OPTIONS <debug-symbols>on : -g ;
flags cray.compile OPTIONS <optimization>off : -O0 ;
-flags cray.compile OPTIONS <optimization>speed : -O3 ;
+flags cray.compile OPTIONS <optimization>speed : -O2 ;
flags cray.compile OPTIONS <optimization>space : -O1 ;
+# flags cray.compile OPTIONS <inlining>off : -hipa0 ;
+# flags cray.compile OPTIONS <inlining>on : ;
+# flags cray.compile OPTIONS <inlining>full : -hipa5 ;
+
flags cray.compile OPTIONS <cflags> ;
flags cray.compile.c++ OPTIONS <cxxflags> ;
flags cray.compile DEFINES <define> ;
flags cray.compile INCLUDES <include> ;
flags cray.link OPTIONS <linkflags> ;
-flags cray.compile OPTIONS <link>shared : -fPIC ;
-flags cray.link OPTIONS <link>shared : -fPIC ;
+# flags cray.compile OPTIONS : -hgnu -fPIC -h system_alloc -h tolerant -h ipa0 ;
+flags cray.compile OPTIONS : -march=bdver1 -mfpmath=sse -mfma4 -mavx -funroll-all-loops -mprefer-avx128 -fprefetch-loop-arrays --param prefetch-latency=300 -minline-all-stringops -ffast-math -fno-finite-math-only ;
+flags cray.compile OPTIONS <link>shared : -dynamic ;
+flags cray.compile OPTIONS <link>static : -static ;
+# flags cray.link OPTIONS <link>static : -static ;
+# flags cray.link OPTIONS <link>shared ;
+flags cray.link OPTIONS <link>static : -static -march=bdver1 -mfpmath=sse -mfma4 -mavx -funroll-all-loops -mprefer-avx128 -fprefetch-loop-arrays --param prefetch-latency=300 -minline-all-stringops -ffast-math -fno-finite-math-only -Xlinker --allow-multiple-definition ;
+flags cray.link OPTIONS <link>shared : -march=bdver1 -mfpmath=sse -mfma4 -mavx -funroll-all-loops -mprefer-avx128 -fprefetch-loop-arrays --param prefetch-latency=300 -minline-all-stringops -ffast-math -fno-finite-math-only -Xlinker --allow-multiple-definition ;
+flags cray.link LOPTIONS <link>shared : -dynamic ;
flags cray.link LIBPATH <library-path> ;
flags cray.link LIBRARIES <library-file> ;
@@ -73,7 +86,7 @@ flags cray.link FINDLIBS-SA <find-shared-library> ;
actions link bind LIBRARIES
{
- $(CONFIG_COMMAND) $(OPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+ $(CONFIG_COMMAND) $(OPTIONS) $(LOPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
}
# When creating dynamic libraries, we don't want to be warned about unresolved
@@ -83,7 +96,7 @@ actions link bind LIBRARIES
actions link.dll bind LIBRARIES
{
- $(CONFIG_COMMAND) -shared $(OPTIONS) -o "$(<[1])" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+ $(CONFIG_COMMAND) -o "$(<[1])" -Wl,-h -Wl,$(<[-1]:D=) -shared -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
}
@@ -103,7 +116,7 @@ actions compile.c
actions compile.c++
{
- $(CONFIG_COMMAND) -c -h gnu $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+ $(CONFIG_COMMAND) -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
}
# Always create archive from scratch. See the gcc toolet for rationale.
diff --git a/tools/build/v2/tools/cw-config.jam b/tools/build/src/tools/cw-config.jam
index 1211b7c04..1211b7c04 100644
--- a/tools/build/v2/tools/cw-config.jam
+++ b/tools/build/src/tools/cw-config.jam
diff --git a/tools/build/v2/tools/cw.jam b/tools/build/src/tools/cw.jam
index ddcbfeb2b..ddcbfeb2b 100644
--- a/tools/build/v2/tools/cw.jam
+++ b/tools/build/src/tools/cw.jam
diff --git a/tools/build/v2/tools/darwin.jam b/tools/build/src/tools/darwin.jam
index 84ad488bd..edd6b7a4e 100644
--- a/tools/build/v2/tools/darwin.jam
+++ b/tools/build/src/tools/darwin.jam
@@ -146,6 +146,8 @@ rule init ( version ? : command * : options * : requirement * )
{
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
}
+ # - GCC on Darwin with -pedantic, suppress unsupported long long warning
+ flags darwin.compile OPTIONS $(condition)/<warnings>all : -Wno-long-long ;
# - Set the link flags common with the GCC toolset.
gcc.init-link-flags darwin darwin $(condition) ;
diff --git a/tools/build/v2/tools/darwin.py b/tools/build/src/tools/darwin.py
index c29196060..c29196060 100644
--- a/tools/build/v2/tools/darwin.py
+++ b/tools/build/src/tools/darwin.py
diff --git a/tools/build/v2/tools/dmc.jam b/tools/build/src/tools/dmc.jam
index 8af8725a8..8af8725a8 100644
--- a/tools/build/v2/tools/dmc.jam
+++ b/tools/build/src/tools/dmc.jam
diff --git a/tools/build/v2/tools/docutils.jam b/tools/build/src/tools/docutils.jam
index fc775b6fc..fc775b6fc 100644
--- a/tools/build/v2/tools/docutils.jam
+++ b/tools/build/src/tools/docutils.jam
diff --git a/tools/build/v2/tools/doxproc.py b/tools/build/src/tools/doxproc.py
index 4cbd5edd2..4cbd5edd2 100644
--- a/tools/build/v2/tools/doxproc.py
+++ b/tools/build/src/tools/doxproc.py
diff --git a/tools/build/v2/tools/doxygen-config.jam b/tools/build/src/tools/doxygen-config.jam
index 2cd2ccaeb..2cd2ccaeb 100644
--- a/tools/build/v2/tools/doxygen-config.jam
+++ b/tools/build/src/tools/doxygen-config.jam
diff --git a/tools/build/v2/tools/doxygen.jam b/tools/build/src/tools/doxygen.jam
index 6a56ccdc2..6a56ccdc2 100644
--- a/tools/build/v2/tools/doxygen.jam
+++ b/tools/build/src/tools/doxygen.jam
diff --git a/tools/build/v2/tools/doxygen/windows-paths-check.doxyfile b/tools/build/src/tools/doxygen/windows-paths-check.doxyfile
index 9b969df9c..9b969df9c 100644
--- a/tools/build/v2/tools/doxygen/windows-paths-check.doxyfile
+++ b/tools/build/src/tools/doxygen/windows-paths-check.doxyfile
diff --git a/tools/build/v2/tools/doxygen/windows-paths-check.hpp b/tools/build/src/tools/doxygen/windows-paths-check.hpp
index e69de29bb..e69de29bb 100644
--- a/tools/build/v2/tools/doxygen/windows-paths-check.hpp
+++ b/tools/build/src/tools/doxygen/windows-paths-check.hpp
diff --git a/tools/build/v2/tools/fop.jam b/tools/build/src/tools/fop.jam
index c24b8725f..c24b8725f 100644
--- a/tools/build/v2/tools/fop.jam
+++ b/tools/build/src/tools/fop.jam
diff --git a/tools/build/v2/tools/fortran.jam b/tools/build/src/tools/fortran.jam
index 37665825e..37665825e 100644
--- a/tools/build/v2/tools/fortran.jam
+++ b/tools/build/src/tools/fortran.jam
diff --git a/tools/build/v2/tools/gcc.jam b/tools/build/src/tools/gcc.jam
index ef90f05c7..599e20ff7 100644
--- a/tools/build/v2/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
@@ -1025,6 +1025,7 @@ rule setup-threading ( targets * : sources * : properties * )
switch $(target)
{
+ case android : # No threading options, everything is in already.
case windows : option = -mthreads ;
case cygwin : option = -mthreads ;
case solaris : option = -pthreads ; libs = rt ;
diff --git a/tools/build/v2/tools/gcc.py b/tools/build/src/tools/gcc.py
index c2f3b0206..c2f3b0206 100644
--- a/tools/build/v2/tools/gcc.py
+++ b/tools/build/src/tools/gcc.py
diff --git a/tools/build/v2/tools/generate.jam b/tools/build/src/tools/generate.jam
index 6732fa355..6732fa355 100644
--- a/tools/build/v2/tools/generate.jam
+++ b/tools/build/src/tools/generate.jam
diff --git a/tools/build/v2/tools/gettext.jam b/tools/build/src/tools/gettext.jam
index 99a43ffe9..99a43ffe9 100644
--- a/tools/build/v2/tools/gettext.jam
+++ b/tools/build/src/tools/gettext.jam
diff --git a/tools/build/v2/tools/gfortran.jam b/tools/build/src/tools/gfortran.jam
index 0aa69b85c..0aa69b85c 100644
--- a/tools/build/v2/tools/gfortran.jam
+++ b/tools/build/src/tools/gfortran.jam
diff --git a/tools/build/v2/tools/hp_cxx.jam b/tools/build/src/tools/hp_cxx.jam
index 86cd783e2..86cd783e2 100644
--- a/tools/build/v2/tools/hp_cxx.jam
+++ b/tools/build/src/tools/hp_cxx.jam
diff --git a/tools/build/v2/tools/hpfortran.jam b/tools/build/src/tools/hpfortran.jam
index 96e8d18b5..96e8d18b5 100644
--- a/tools/build/v2/tools/hpfortran.jam
+++ b/tools/build/src/tools/hpfortran.jam
diff --git a/tools/build/v2/tools/ifort.jam b/tools/build/src/tools/ifort.jam
index eb7c19881..eb7c19881 100644
--- a/tools/build/v2/tools/ifort.jam
+++ b/tools/build/src/tools/ifort.jam
diff --git a/tools/build/v2/tools/intel-darwin.jam b/tools/build/src/tools/intel-darwin.jam
index c682a7f70..8c77834af 100644
--- a/tools/build/v2/tools/intel-darwin.jam
+++ b/tools/build/src/tools/intel-darwin.jam
@@ -126,7 +126,7 @@ rule init ( version ? : command * : options * )
SPACE = " " ;
flags intel-darwin.compile OPTIONS <cflags> ;
-flags intel-darwin.compile OPTIONS <cxxflags> ;
+flags intel-darwin.compile.c++ OPTIONS <cxxflags> ;
# flags intel-darwin.compile INCLUDES <include> ;
flags intel-darwin.compile OPTIONS <optimization>space : -O1 ; # no specific space optimization flag in icc
diff --git a/tools/build/v2/tools/intel-linux.jam b/tools/build/src/tools/intel-linux.jam
index d9164add8..d9164add8 100644
--- a/tools/build/v2/tools/intel-linux.jam
+++ b/tools/build/src/tools/intel-linux.jam
diff --git a/tools/build/src/tools/intel-win.jam b/tools/build/src/tools/intel-win.jam
new file mode 100644
index 000000000..81e43dacd
--- /dev/null
+++ b/tools/build/src/tools/intel-win.jam
@@ -0,0 +1,476 @@
+# Copyright Vladimir Prus 2004.
+# 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)
+
+# Importing common is needed because the rules we inherit here depend on it.
+# That is nasty.
+import common ;
+import errors ;
+import feature ;
+import intel ;
+import msvc ;
+import os ;
+import set ;
+import toolset ;
+import generators ;
+import type ;
+import path ;
+
+feature.extend-subfeature toolset intel : platform : win ;
+
+toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
+toolset.inherit-flags intel-win : msvc : : YLOPTION ;
+toolset.inherit-rules intel-win : msvc ;
+
+# Override default do-nothing generators.
+generators.override intel-win.compile.c.pch : pch.default-c-pch-generator ;
+generators.override intel-win.compile.c++.pch : pch.default-cpp-pch-generator ;
+generators.override intel-win.compile.rc : rc.compile.resource ;
+generators.override intel-win.compile.mc : mc.compile ;
+
+toolset.flags intel-win.compile PCH_SOURCE <pch>on : <pch-source> ;
+
+toolset.add-requirements <toolset>intel-win,<runtime-link>shared:<threading>multi ;
+
+# Initializes the intel toolset for windows
+rule init ( version ? : # the compiler version
+ command * : # the command to invoke the compiler itself
+ options * # Additional option: <compatibility>
+ # either 'vc6', 'vc7', 'vc7.1'
+ # or 'native'(default).
+ )
+{
+ if $(version)
+ {
+ configure $(version) : $(command) : $(options) ;
+ }
+ else
+ {
+ if $(command)
+ {
+ errors.error "Autodetect of version from command not implemented!" ;
+ }
+ local intel_versions = [ get-autodetect-versions () ] ;
+ if ! $(intel_versions)
+ {
+ errors.error "No intel compiler version found!" ;
+ }
+ else
+ {
+ local msvc-version = [ feature.get-values <compatibility> : $(options) ] ; # On auto config mode the user can still request a msvc backend. If some intel compiler doesn't support it, don't try to configure it!
+ msvc-version = [ get-msvc-version-from-vc-string $(msvc-version) ] ;
+ for local v in $(intel_versions)
+ {
+ if [ is-msvc-supported $(v) : $(msvc-version) ]
+ {
+ configure $(v) : : $(options) ;
+ }
+ }
+ }
+ }
+}
+
+local rule configure ( version ? : command * : options * )
+{
+ local compatibility =
+ [ feature.get-values <compatibility> : $(options) ] ;
+ # Allow to specify toolset and visual studio backend from commandline .e.g --toolset=intel-14.0-vc10
+ local vc_in_version = [ MATCH (vc[0-9]+(\\.[0-9]+)?)$ : $(version) ] ;
+ vc_in_version = $(vc_in_version[1]) ;
+ if $(compatibility) && $(vc_in_version)
+ {
+ if $(compatibility) != $(vc_in_version)
+ {
+ errors.error "feature compatibility and vc version in toolset present!" ;
+ }
+ }
+
+ if $(vc_in_version) && ! $(compatibility)
+ {
+ # vc Version must be stripped before check-init-parameters is called!
+ version = [ MATCH (.+)-vc.+$ : $(version) ] ;
+
+ compatibility = $(vc_in_version) ;
+ options += <compatibility>$(vc_in_version) ;
+ }
+ if $(compatibility)
+ {
+ configure-really $(version) : $(command) : $(options) : $(compatibility) ;
+ }
+ else
+ {
+ local msvc_versions = [ feature.values <toolset-msvc:version> ] ;
+ if ! $(msvc_versions)
+ {
+ ECHO notice: no msvc versions detected. trying auto detect ;
+ toolset.using msvc : all ;
+ msvc_versions = [ feature.values <toolset-msvc:version> ] ;
+ }
+ if ! $(.iclvars-$(version)-supported-vcs)
+ {
+ errors.error "Supported msvc versions not known for intel $(version)" ;
+ }
+
+ for local v in $(msvc_versions)
+ {
+ if [ MATCH "($(v))" : $(.iclvars-$(version)-supported-vcs) ]
+ {
+ # Strip trailing .0 from msvc version as intel compiler uses atm only major version for Qvc
+ local m = [ MATCH ([0-9]+).0$ : $(v) ] ;
+ if $(m)
+ {
+ v = $(m) ;
+ }
+ v = "vc$(v)" ;
+ local options_really = $(options) ;
+ options_really += <compatibility>$(v) ;
+ if $(.debug-configuration)
+ {
+ ECHO "configure: intel version: $(version) msvc version: $(v)" ;
+ }
+ configure-really $(version) : $(command) : $(options) : $(v) ;
+ }
+ }
+ if ! [ feature.values <toolset-intel:version> ]
+ {
+ errors.error "Failed to register an intel toolset!" ;
+ }
+ }
+}
+
+local rule configure-really ( version ? : command * : options * : compatibility )
+{
+ local condition = [ common.check-init-parameters intel-win
+ : version $(version) : compatibility $(compatibility) ] ;
+
+ local m = [ MATCH ([0-9]+).* : $(version) ] ;
+ local major = $(m[1]) ;
+ if ! $(major)
+ {
+ errors.error "Major version not found: $(version)" ;
+ }
+
+ local msvc-version = [ get-msvc-version-from-vc-string $(compatibility) ] ;
+ if ! $(msvc-version)
+ {
+ errors.user-error "Invalid value for compatibility option:"
+ $(compatibility) ;
+ }
+
+ command = [ get-compiler-invocation-cmd $(major) : $(command) ] ;
+
+ common.handle-options intel-win : $(condition) : $(command) : $(options) ;
+
+ local root ;
+ if $(command)
+ {
+ root = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ if $(major) >= 12
+ {
+ root = [ path.make $(root) ] ;
+ root = [ path.parent $(root) ] ;
+ }
+ root = $(root)/ ;
+ }
+
+ local setup ;
+ setup = [ GLOB $(root) : iclvars_*.bat ] ;
+ if ! $(setup)
+ {
+ setup = [ path.join $(root) "iclvars.bat" ] ;
+ setup = [ path.native $(setup) ] ;
+ }
+
+ local target_types ;
+ local iclvars_vs_arg ;
+ if $(major) >= 12
+ {
+ # if we have a known intel toolset check for visual studio compatibility
+ # if not trust parameters
+ if ! [ is-msvc-supported $(version) : $(msvc-version) ]
+ {
+ errors.error "msvc $(msvc-version) not supported for intel toolset version $(version)" ;
+ }
+ if $(.iclvars-version-alias-$(compatibility))
+ {
+ iclvars_vs_arg = $(.iclvars-version-alias-$(compatibility)) ;
+ }
+ else
+ {
+ errors.error "Don't know what parameter to pass for vc version ( $(compatibility) )" ;
+ }
+ if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITECTURE ] ]
+ {
+ target_types = ia32 intel64 ;
+ }
+ else
+ {
+ target_types = ia32 ia32_intel64 ;
+ }
+ }
+ else
+ {
+ target_types = default ;
+ iclvars_vs_arg = $(compatibility) ;
+ }
+
+ local default-assembler-intel64 = ml64 ;
+ local default-assembler-ia32_intel64 = ml64 ;
+ local default-assembler-ia32 = "ml -coff" ;
+ assembler = [ feature.get-values <assembler> : $(options) ] ;
+
+ for local c in $(target_types)
+ {
+ local cpu-conditions ;
+ local setup-call ;
+ if $(major) >= 12
+ {
+ setup-call = "call \""$(setup)"\" $(c) $(iclvars_vs_arg) > nul " ;
+ cpu-conditions = $(condition)/$(.cpu-arch-$(c)) ;
+ }
+ else
+ {
+ setup-call = "call \""$(setup)"\" $(compatibility) > nul " ;
+ cpu-conditions = $(condition) ;
+ }
+
+
+ if [ os.name ] = NT
+ {
+ setup-call = $(setup-call)"
+ " ;
+ }
+ else
+ {
+ setup-call = "cmd /S /C "$(setup-call)" \"&&\" " ;
+ }
+
+ if $(.debug-configuration)
+ {
+ for local cond in $(cpu-conditions)
+ {
+ ECHO "notice: [intel-cfg] condition: '$(cond)', setup: '$(setup-call)'" ;
+ }
+ }
+
+ local cpu-assembler = $(assembler) ;
+ cpu-assembler ?= $(default-assembler-$(c)) ;
+
+ toolset.flags intel-win.compile .CC $(cpu-conditions) : $(setup-call)icl ;
+ toolset.flags intel-win.link .LD $(cpu-conditions) : $(setup-call)xilink /nologo ;
+ toolset.flags intel-win.archive .LD $(cpu-conditions) : $(setup-call)xilink /lib /nologo ;
+ toolset.flags intel-win.link .MT $(cpu-conditions) : $(setup-call)mt -nologo ;
+ toolset.flags intel-win.compile .ASM $(cpu-conditions) : $(setup-call)$(cpu-assembler) -nologo ;
+ toolset.flags intel-win.compile .MC $(cpu-conditions) : $(setup-call)mc ;
+ toolset.flags intel-win.compile .RC $(cpu-conditions) : $(setup-call)rc ;
+ }
+
+ # Depending on the settings, running of tests require some runtime DLLs.
+ toolset.flags intel-win RUN_PATH $(condition) : $(root) ;
+
+
+ local C++FLAGS ;
+
+ C++FLAGS += /nologo ;
+
+ # Reduce the number of spurious error messages
+ C++FLAGS += /Qwn5 /Qwd985 ;
+
+ # Enable ADL
+ C++FLAGS += -Qoption,c,--arg_dep_lookup ; #"c" works for C++, too
+
+ # Disable Microsoft "secure" overloads in Dinkumware libraries since they
+ # cause compile errors with Intel versions 9 and 10.
+ if $(major) < 12
+ {
+ C++FLAGS += -D_SECURE_SCL=0 ;
+ }
+
+ if $(major) > 5
+ {
+ C++FLAGS += /Zc:forScope ; # Add support for correct for loop scoping.
+ }
+
+ # Add options recognized only by intel7 and above.
+ if $(major) >= 7
+ {
+ C++FLAGS += /Qansi_alias ;
+ }
+
+ if $(compatibility) = vc6
+ {
+ C++FLAGS +=
+ # Emulate VC6
+ /Qvc6
+
+ # No wchar_t support in vc6 dinkum library. Furthermore, in vc6
+ # compatibility-mode, wchar_t is not a distinct type from unsigned
+ # short.
+ -DBOOST_NO_INTRINSIC_WCHAR_T
+ ;
+ }
+ else
+ {
+ if $(major) > 5
+ {
+ # Add support for wchar_t
+ C++FLAGS += /Zc:wchar_t
+ # Tell the dinkumware library about it.
+ -D_NATIVE_WCHAR_T_DEFINED
+ ;
+ }
+ }
+
+ if $(compatibility) && $(compatibility) != native
+ {
+ C++FLAGS += /Q$(compatibility) ;
+ }
+ else
+ {
+ C++FLAGS +=
+ -Qoption,cpp,--arg_dep_lookup
+ # The following options were intended to disable the Intel compiler's
+ # 'bug-emulation' mode, but were later reported to be causing ICE with
+ # Intel-Win 9.0. It is not yet clear which options can be safely used.
+ # -Qoption,cpp,--const_string_literals
+ # -Qoption,cpp,--new_for_init
+ # -Qoption,cpp,--no_implicit_typename
+ # -Qoption,cpp,--no_friend_injection
+ # -Qoption,cpp,--no_microsoft_bugs
+ ;
+ }
+
+ toolset.flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
+ # By default, when creating PCH, intel adds 'i' to the explicitly
+ # specified name of the PCH file. Of course, Boost.Build is not
+ # happy when compiler produces not the file it was asked for.
+ # The option below stops this behaviour.
+ toolset.flags intel-win CFLAGS : -Qpchi- ;
+
+ if ! $(compatibility)
+ {
+ # If there's no backend version, assume 7.1.
+ compatibility = vc7.1 ;
+ }
+
+ msvc.configure-version-specific intel-win : $(msvc-version) : $(condition) ;
+}
+
+local rule get-autodetect-versions
+{
+ local result ;
+ for local v in $(.intel-autodetect-versions)
+ {
+ local major = [ MATCH ([0-9]+).* : $(v) ] ; # Use only major version
+ if [ get-icl-path-from-environment $(major) ]
+ {
+ result += $(v) ;
+ }
+ }
+ return $(result) ;
+}
+
+local rule get-icl-path-from-environment ( major_version )
+{
+ local path = [ os.environ ICPP_COMPILER$(major_version) ] ;
+ if $(path)
+ {
+ path = [ path.make $(path) ] ;
+ local cmdpath ;
+ local subdirs = $(.icl-target-subdirectories) ;
+ while $(subdirs)
+ {
+ cmdpath = [ path.join $(path) "bin/$(subdirs[0])/icl.exe" ] ;
+ cmdpath = [ path.native $(cmdpath) ] ;
+ if [ path.exists $(cmdpath) ]
+ {
+ subdirs = ;
+ } else {
+ cmdpath = ;
+ subdirs = $(subdirs[2-]) ;
+ }
+ }
+ path = $(cmdpath) ;
+ }
+ return $(path) ;
+}
+
+local rule get-compiler-invocation-cmd ( major_version : command * )
+{
+ if $(command)
+ {
+ return [ common.get-invocation-command intel-win : icl.exe : $(command) ] ;
+ }
+ else
+ {
+ local path = [ get-icl-path-from-environment $(major_version) ] ;
+ return [ common.get-invocation-command intel-win : icl.exe : $(path) ] ;
+ }
+}
+
+local rule is-msvc-supported ( intel-version : msvc-version )
+{
+ if ! $(msvc-version)
+ {
+ return true ;
+ }
+ else
+ {
+ if $(.iclvars-$(intel-version)-supported-vcs)
+ {
+ if [ MATCH "($(msvc-version))" : $(.iclvars-$(intel-version)-supported-vcs) ]
+ {
+ return true ;
+ }
+ }
+ else
+ {
+ return true ;
+ }
+ }
+}
+
+local rule get-msvc-version-from-vc-string ( vc-string )
+{
+ local r = [ MATCH "^vc([0-9]+(\\.[0-9]+)?)$" : $(vc-string) ] ;
+ return $(r[1]) ;
+}
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Copied from msvc.jam
+# Supported CPU architectures.
+.cpu-arch-ia32 =
+ <architecture>/<address-model>
+ <architecture>/<address-model>32
+ <architecture>x86/<address-model>
+ <architecture>x86/<address-model>32 ;
+
+.cpu-arch-intel64 =
+ <architecture>/<address-model>64
+ <architecture>x86/<address-model>64 ;
+
+.cpu-arch-ia32_intel64 =
+ <architecture>/<address-model>64
+ <architecture>x86/<address-model>64 ;
+
+.intel-autodetect-versions = 14.0 13.0 12.0 ;
+.iclvars-12.0-supported-vcs = "10.0 9.0 8.0" ;
+.iclvars-12.1-supported-vcs = "10.0 9.0 8.0" ;
+.iclvars-13.0-supported-vcs = "11.0 10.0 9.0" ;
+.iclvars-14.0-supported-vcs = "12.0 11.0 10.0 9.0" ;
+.iclvars-version-alias-vc12 = vs2013 ;
+.iclvars-version-alias-vc11 = vs2012 ;
+.iclvars-version-alias-vc10 = vs2010 ;
+.iclvars-version-alias-vc9 = vs2008 ;
+.iclvars-version-alias-vc8 = vs2005 ;
+.icl-target-subdirectories = ia32 ia32_intel64 intel64 ;
+
+toolset.flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;
+
+toolset.flags intel-win YLOPTION ;
+
diff --git a/tools/build/v2/tools/intel.jam b/tools/build/src/tools/intel.jam
index 67038aa28..67038aa28 100644
--- a/tools/build/v2/tools/intel.jam
+++ b/tools/build/src/tools/intel.jam
diff --git a/tools/build/v2/tools/lex.jam b/tools/build/src/tools/lex.jam
index 75d641318..75d641318 100644
--- a/tools/build/v2/tools/lex.jam
+++ b/tools/build/src/tools/lex.jam
diff --git a/tools/build/v2/tools/jpeg.jam b/tools/build/src/tools/libjpeg.jam
index 128ab6353..309b59df6 100644
--- a/tools/build/v2/tools/jpeg.jam
+++ b/tools/build/src/tools/libjpeg.jam
@@ -23,10 +23,9 @@ import indirect ;
import property ;
import property-set ;
-header = jconfig.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h jpeglib.h
- jversion.h ;
+header = jpeglib.h ;
-names = libjpeg ;
+names = jpeg ;
sources = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c
@@ -166,7 +165,7 @@ rule init (
}
else if $(source-path) && ! $(no-build-from-source)
{
- build-name ?= z ;
+ build-name ?= jpeg ;
library-id = [ CALC $(library-id) + 1 ] ;
tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
if $(tag) && ! [ MATCH ^([^%]*)%([^%]+)$ : $(tag) ]
diff --git a/tools/build/v2/tools/png.jam b/tools/build/src/tools/libpng.jam
index 0544fe905..46e3cc9ae 100644
--- a/tools/build/v2/tools/png.jam
+++ b/tools/build/src/tools/libpng.jam
@@ -24,7 +24,7 @@ import property ;
import property-set ;
header = png.h ;
-names = libpng ;
+names = png ;
sources = png.c pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c ;
@@ -124,7 +124,7 @@ rule init (
condition = [ property-set.create [ $(condition).base ] ] ;
local no-build-from-source ;
- # Ignore environmental ZLIB_SOURCE if this initialization
+ # Ignore environmental LIBPNG_SOURCE if this initialization
# requested to search for a specific pre-built library.
if $(library-path) || $(include-path) || $(library-name)
{
@@ -140,7 +140,7 @@ rule init (
}
}
- source-path ?= [ modules.peek : ZLIB_SOURCE ] ;
+ source-path ?= [ modules.peek : LIBPNG_SOURCE ] ;
if $(.configured.$(condition))
{
@@ -159,7 +159,7 @@ rule init (
}
else if $(source-path) && ! $(no-build-from-source)
{
- build-name ?= z ;
+ build-name ?= png ;
library-id = [ CALC $(library-id) + 1 ] ;
tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
if $(tag) && ! [ MATCH ^([^%]*)%([^%]+)$ : $(tag) ]
@@ -193,7 +193,7 @@ rule init (
<include>$(source-path)
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
- <link>shared:<define>ZLIB_DLL
+ <link>shared:<define>LIBPNG_DLL
:
: <include>$(source-path) ] ;
}
diff --git a/tools/build/v2/tools/tiff.jam b/tools/build/src/tools/libtiff.jam
index 14f235e3f..cbd8ad015 100644
--- a/tools/build/v2/tools/tiff.jam
+++ b/tools/build/src/tools/libtiff.jam
@@ -23,9 +23,8 @@ import indirect ;
import property ;
import property-set ;
-header = tiff.h tiffio.hxx ;
-
-names = libtiff ;
+header = tiff.h ;
+names = tiff ;
sources = tif_aux.c tif_close.c tif_codec.c tif_color.c tif_compress.c tif_dir.c tif_dirinfo.c
tif_dirread.c tif_dirwrite.c tif_dumpmode.c tif_error.c tif_extension.c tif_fax3.c tif_fax3sm.c
@@ -163,7 +162,7 @@ rule init (
}
else if $(source-path) && ! $(no-build-from-source)
{
- build-name ?= z ;
+ build-name ?= tiff ;
library-id = [ CALC $(library-id) + 1 ] ;
tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
if $(tag) && ! [ MATCH ^([^%]*)%([^%]+)$ : $(tag) ]
diff --git a/tools/build/src/tools/link.jam b/tools/build/src/tools/link.jam
new file mode 100644
index 000000000..4a7034b8a
--- /dev/null
+++ b/tools/build/src/tools/link.jam
@@ -0,0 +1,500 @@
+# Copyright 2012 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import os ;
+import targets ;
+import project ;
+import "class" : new ;
+import virtual-target ;
+import configure ;
+import path ;
+import property ;
+import property-set ;
+import common ;
+
+rule get-root-project ( project )
+{
+ # Find the root project.
+ local root-project = $(project) ;
+ root-project = [ $(root-project).project-module ] ;
+ while
+ [ project.attribute $(root-project) parent-module ] &&
+ [ project.attribute $(root-project) parent-module ] != user-config &&
+ [ project.attribute $(root-project) parent-module ] != project-config
+ {
+ root-project = [ project.attribute $(root-project) parent-module ] ;
+ }
+ return $(root-project) ;
+}
+
+TOUCH = [ common.file-touch-command ] ;
+
+actions touch {
+ $(TOUCH) "$(<)"
+}
+
+rule can-symlink ( project : ps )
+{
+ if ! $(.can-symlink)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-symlink-source : :
+ $(project) : [ new action : link.touch ] ] ;
+ local target = [ new file-target test-symlink : :
+ $(project) : [ new action $(source-target) : link.mklink ] ] ;
+
+ if [ configure.try-build $(target) : $(ps) : "symlinks supported" ]
+ {
+ .can-symlink = true ;
+ }
+ else
+ {
+ .can-symlink = false ;
+ }
+ }
+ if $(.can-symlink) = true
+ {
+ return true ;
+ }
+}
+
+if [ os.name ] = NT
+{
+
+# Test for Windows junctions (mklink /J)
+rule can-junction ( project : ps )
+{
+ if ! $(.can-junction)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-junction-source : :
+ $(project) : [ new action : common.mkdir ] ] ;
+ local target = [ new file-target test-junction : :
+ $(project) : [ new action $(source-target) : link.junction ] ] ;
+
+ if [ configure.try-build $(target) : $(ps) : "junctions supported" ]
+ {
+ .can-junction = true ;
+ }
+ else
+ {
+ .can-junction = false ;
+ }
+ }
+ if $(.can-junction) = true
+ {
+ return true ;
+ }
+}
+
+}
+else
+{
+
+rule can-junction ( project : ps )
+{
+}
+
+}
+
+rule can-hardlink ( project : ps )
+{
+ if ! $(.can-hardlink)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-hardlink-source : :
+ $(project) : [ new action : link.touch ] ] ;
+ # Use <location-prefix> so that the destination link is created
+ # in a different directory. AFS refuses to make hard links
+ # between files in different directories, so we want to check
+ # it.
+ local target = [ new file-target test-hardlink : :
+ $(project) : [ new action $(source-target) : link.hardlink
+ : [ new property-set <location-prefix>symlink ]
+ ] ] ;
+
+ if [ configure.try-build $(target) : $(ps) : "hardlinks supported" ]
+ {
+ .can-hardlink = true ;
+ }
+ else
+ {
+ .can-hardlink = false ;
+ }
+ }
+ if $(.can-hardlink) = true
+ {
+ return true ;
+ }
+}
+
+class file-or-directory-reference : basic-target
+{
+ import virtual-target ;
+ import property-set ;
+ import path ;
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ return [ property-set.empty ] [ virtual-target.from-file $(self.name) :
+ [ location ] : $(self.project) ] ;
+ }
+
+ # Returns true if the referred file really exists.
+ rule exists ( )
+ {
+ location ;
+ return $(self.file-path) ;
+ }
+
+ # Returns the location of target. Needed by 'testing.jam'.
+ rule location ( )
+ {
+ if ! $(self.file-location)
+ {
+ local source-location = [ $(self.project).get source-location ] ;
+ for local src-dir in $(source-location)
+ {
+ if ! $(self.file-location)
+ {
+ local location = [ path.root $(self.name) $(src-dir) ] ;
+ if [ path.exists [ path.native $(location) ] ]
+ {
+ self.file-location = $(src-dir) ;
+ self.file-path = $(location) ;
+ }
+ }
+ }
+ }
+ return $(self.file-location) ;
+ }
+}
+
+class symlink-target-class : basic-target
+{
+ import path ;
+ import virtual-target ;
+ import link ;
+ import os ;
+ import type ;
+ rule construct ( name : source-target : property-set )
+ {
+ local location = [ path.join
+ [ $(source-target).path ] [ $(source-target).name ] ] ;
+ local files = [ path.glob-tree $(location) : * ] ;
+ local targets ;
+
+ # If we have symlinks, don't bother checking
+ # for hardlinks and junctions.
+ if ! [ link.can-symlink $(self.project) : $(property-set) ]
+ {
+ link.can-junction $(self.project) : $(property-set) ;
+ link.can-hardlink $(self.project) : $(property-set) ;
+ }
+
+ if [ $(property-set).get <location> ]
+ {
+ property-set = [ property-set.create
+ [ property.select <location> : [ $(property-set).raw ] ] ] ;
+ }
+ else
+ {
+ local path,relative-to-build-dir = [ $(property-set).target-path ] ;
+ local path = $(path,relative-to-build-dir[1]) ;
+ local relative-to-build-dir = $(path,relative-to-build-dir[2]) ;
+
+ if $(relative-to-build-dir)
+ {
+ path = [ path.join [ $(self.project).build-dir ] $(path) ] ;
+ }
+
+ property-set = [ property-set.create <location>$(path) ] ;
+ }
+
+ local a = [ new non-scanning-action $(source-target) :
+ link.do-link-recursively : $(property-set) ] ;
+
+ local t = [ new notfile-target $(name)
+ : $(self.project) : $(a) ] ;
+
+ return [ property-set.empty ] [ virtual-target.register $(t) ] ;
+ }
+}
+
+rule do-file-link
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ local source = [ path.native [ path.relative-to [ path.pwd ] $(>) ] ] ;
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ if $(.can-symlink) = true
+ {
+ link.mklink $(target) : $(source) ;
+ }
+ else if $(.can-hardlink) = true
+ {
+ DEPENDS $(target) : $(source) ;
+ link.hardlink $(target) : $(source) ;
+ }
+ else
+ {
+ DEPENDS $(target) : $(source) ;
+ common.copy $(target) : $(source) ;
+ }
+}
+
+rule do-link
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ local source = [ path.native [ path.relative-to [ path.pwd ] $(>) ] ] ;
+ local relative = [ path.native [ path.relative-to [ path.parent $(<) ] $(>) ] ] ;
+ if ! [ on $(target) return $(MKLINK_OR_DIR) ]
+ {
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ mklink-or-dir $(target) : $(source) ;
+ }
+ if [ os.name ] = NT
+ {
+ if $(.can-symlink) = true
+ {
+ MKLINK_OR_DIR on $(target) = mklink /D \"$(target)\" \"$(relative)\" ;
+ }
+ else
+ {
+ # This function should only be called
+ # if either symlinks or junctions are supported.
+ # To get here $(.can-junction) must be true.
+ mklink-opt = /J ;
+ MKLINK_OR_DIR on $(target) = mklink /J \"$(target)\" \"$(source)\" ;
+ }
+ }
+ else
+ {
+ MKLINK_OR_DIR on $(target) = ln -s $(relative) $(target) ;
+ }
+}
+
+rule do-split
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ if ! [ on $(target) return $(MKLINK_OR_DIR) ]
+ {
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ common.mkdir $(target) ;
+ }
+ MKLINK_OR_DIR on $(target) = mkdir \"$(target)\" ;
+}
+
+rule do-rm
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ ALWAYS $(target) ;
+ RM on $(target) = rmdir ;
+ link.rm $(target) ;
+}
+
+rule mklink-or-dir
+{
+ NOUPDATE $(<) ;
+}
+
+actions mklink-or-dir
+{
+ $(MKLINK_OR_DIR)
+}
+
+rule link-entries ( target : files * : split ? )
+{
+ for local s in $(files)
+ {
+ local t = [ path.join $(target) [ path.basename $(s) ] ] ;
+ if ! $(.known-dirs.$(t))
+ {
+ local t = [ path.native [ path.relative-to [ path.pwd ] $(t) ] ] ;
+ local s = [ path.native [ path.relative-to [ path.pwd ] $(target) ] ] ;
+ LOCATE on $(t) = . ;
+ DEPENDS $(t) : $(s) ;
+ NOUPDATE $(s) ;
+ }
+ if $(split)
+ {
+ link-recursively $(t) : $(s) ;
+ }
+ else
+ {
+ link-entries $(t) : [ path.glob $(s) : * ] ;
+ }
+ }
+ if ! $(.known-dirs.$(target))
+ {
+ .known-dirs.$(target) += $(files) ;
+ .known-dirs.base.$(target) = $(.current-target) ;
+ }
+}
+
+rule link-recursively ( target : source : no-recurse ? )
+{
+ local split ;
+ if [ CHECK_IF_FILE [ path.native $(source) ] ]
+ {
+ do-file-link $(target) : $(source) ;
+ }
+ else if $(.known-dirs.$(target)) && ! $(no-recurse)
+ {
+ split = true ;
+ if ! $(.split-dirs.$(target))
+ {
+ local .current-target = $(.known-dirs.base.$(target)) ;
+ for local s in $(.known-dirs.$(target))
+ {
+ local t = [ path.join $(target) [ path.basename $(s) ] ] ;
+ link-recursively $(t) : $(s) : flat ;
+ }
+ if [ READLINK [ path.native $(target) ] ]
+ {
+ do-rm $(target) ;
+ }
+ do-split $(target) ;
+ .split-dirs.$(target) = true ;
+ }
+ }
+ else if [ path.exists [ path.native $(target) ] ]
+ {
+ local link-target = [ READLINK [ path.native $(target) ] ] ;
+ if $(link-target)
+ {
+ local full-path =
+ [ path.root [ path.make $(link-target) ] [ path.parent $(target) ] ] ;
+ if $(full-path) != $(source)
+ {
+ do-rm $(target) ;
+ do-split $(target) ;
+ split = true ;
+ }
+ }
+ else
+ {
+ do-split $(target) ;
+ split = true ;
+ }
+ }
+ else if $(.can-symlink) = false && $(.can-junction) = false
+ {
+ if [ READLINK [ path.native $(target) ] ]
+ {
+ do-rm $(target) ;
+ }
+ do-split $(target) ;
+ split = true ;
+ }
+ else
+ {
+ do-link $(target) : $(source) ;
+ }
+
+ if ! $(no-recurse)
+ {
+ link-entries $(target) : [ path.glob $(source) : * ] : $(split) ;
+ }
+}
+
+rule do-link-recursively ( target : source : properties * )
+{
+ local target-path = [ property.select <location> : $(properties) ] ;
+ local source-path = [ on $(source) return $(LOCATE) ] [ on $(source) return $(SEARCH) ] ;
+
+ local absolute-target = [ path.root
+ [ path.join [ path.make $(target-path[1]:G=) ]
+ [ path.basename [ path.make $(source:G=) ] ] ]
+ [ path.pwd ] ] ;
+
+ local absolute-source = [ path.root
+ [ path.root [ path.make $(source:G=) ]
+ [ path.make $(source-path[1]) ] ]
+ [ path.pwd ] ] ;
+
+ local .current-target = $(target) ;
+
+ link-recursively $(absolute-target) : $(absolute-source) ;
+}
+
+rule mklink
+{
+ local target-path = [ on $(<) return $(LOCATE) ] [ on $(<) return $(SEARCH) ] . ;
+ local source-path = [ on $(>) return $(LOCATE) ] [ on $(>) return $(SEARCH) ] . ;
+ local relative-path = [ path.relative-to
+ [ path.parent [ path.join [ path.root [ path.make $(target-path[1]) ] [ path.pwd ] ] [ path.make $(<:G=) ] ] ]
+ [ path.join [ path.root [ path.make $(source-path[1]) ] [ path.pwd ] ] [ path.make $(>:G=) ] ] ] ;
+
+ PATH_TO_SOURCE on $(<) = [ path.native $(relative-path) ] ;
+ NOUPDATE $(<) ;
+}
+
+if [ os.name ] = NT
+{
+
+actions junction
+{
+ if exist "$(<)" del "$(<)"
+ mklink /J "$(<)" "$(>)"
+}
+
+actions mklink
+{
+ if exist "$(<)" del "$(<)"
+ mklink "$(<)" "$(PATH_TO_SOURCE)"
+}
+
+actions hardlink
+{
+ if exist "$(<)" del "$(<)"
+ mklink /H "$(<)" "$(>)"
+}
+
+actions rm
+{
+ rmdir "$(<)"
+}
+
+}
+else
+{
+
+actions mklink
+{
+ ln -f -s "$(PATH_TO_SOURCE)" "$(<)"
+}
+
+actions hardlink
+{
+ ln -f "$(>)" "$(<)"
+}
+
+actions rm
+{
+ rm "$(<)"
+}
+
+}
+
+rule link-directory ( name : sources : requirements * : default-build * : usage-requirements * )
+{
+ local project = [ project.current ] ;
+ sources = [ new file-or-directory-reference $(sources) : $(project) ] ;
+ targets.main-target-alternative $(sources) ;
+ return [ targets.main-target-alternative
+ [ new symlink-target-class $(name) : $(project)
+ : [ targets.main-target-sources $(sources) : $(name) : no-renaming ]
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ : [ targets.main-target-default-build : $(project) ]
+ : [ targets.main-target-usage-requirements $(usage-requirements) :
+ $(project) ] ] ] ;
+}
+
+IMPORT $(__name__) : link-directory : : link-directory ;
diff --git a/tools/build/v2/tools/make.jam b/tools/build/src/tools/make.jam
index 40b59faf3..40b59faf3 100644
--- a/tools/build/v2/tools/make.jam
+++ b/tools/build/src/tools/make.jam
diff --git a/tools/build/v2/tools/make.py b/tools/build/src/tools/make.py
index 10baa1cb4..10baa1cb4 100644
--- a/tools/build/v2/tools/make.py
+++ b/tools/build/src/tools/make.py
diff --git a/tools/build/v2/tools/mc.jam b/tools/build/src/tools/mc.jam
index 578377735..578377735 100644
--- a/tools/build/v2/tools/mc.jam
+++ b/tools/build/src/tools/mc.jam
diff --git a/tools/build/v2/tools/mc.py b/tools/build/src/tools/mc.py
index c194acdff..c194acdff 100644
--- a/tools/build/v2/tools/mc.py
+++ b/tools/build/src/tools/mc.py
diff --git a/tools/build/v2/tools/message.jam b/tools/build/src/tools/message.jam
index 672b6e0bc..672b6e0bc 100644
--- a/tools/build/v2/tools/message.jam
+++ b/tools/build/src/tools/message.jam
diff --git a/tools/build/v2/tools/message.py b/tools/build/src/tools/message.py
index cc0b946ff..cc0b946ff 100644
--- a/tools/build/v2/tools/message.py
+++ b/tools/build/src/tools/message.py
diff --git a/tools/build/v2/tools/midl.jam b/tools/build/src/tools/midl.jam
index 0aa5dda31..0aa5dda31 100644
--- a/tools/build/v2/tools/midl.jam
+++ b/tools/build/src/tools/midl.jam
diff --git a/tools/build/v2/tools/midl.py b/tools/build/src/tools/midl.py
index 45811d16b..43bcdf6fe 100644
--- a/tools/build/v2/tools/midl.py
+++ b/tools/build/src/tools/midl.py
@@ -11,7 +11,7 @@ from b2.build.toolset import flags
from b2.build.feature import feature
from b2.manager import get_manager
from b2.tools import builtin, common
-from b2.util import regex
+from b2.util import regex, utility
def init():
pass
@@ -52,8 +52,8 @@ class MidlScanner(scanner.Scanner):
imported_tlbs = regex.transform(matches, self.re_importlib, [1, 3])
# CONSIDER: the new scoping rule seem to defeat "on target" variables.
- g = bjam.call('get-target-variable', target, 'HDRGRIST')
- b = os.path.normalize_path(os.path.dirname(binding))
+ g = bjam.call('get-target-variable', target, 'HDRGRIST')[0]
+ b = os.path.normpath(os.path.dirname(binding))
# Attach binding of including file to included targets.
# When target is directly created from virtual target
@@ -75,10 +75,10 @@ class MidlScanner(scanner.Scanner):
bjam.call('INCLUDES', [target], all)
bjam.call('DEPENDS', [target], imported_tlbs)
bjam.call('NOCARE', all + imported_tlbs)
- engine.set_target_variable(included_angle , 'SEARCH', ungrist(self.includes))
- engine.set_target_variable(included_quoted, 'SEARCH', b + ungrist(self.includes))
- engine.set_target_variable(imported , 'SEARCH', b + ungrist(self.includes))
- engine.set_target_variable(imported_tlbs , 'SEARCH', b + ungrist(self.includes))
+ engine.set_target_variable(included_angle , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(included_quoted, 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(imported , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(imported_tlbs , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
get_manager().scanners().propagate(type.get_scanner('CPP', PropertySet(self.includes)), included_angle + included_quoted)
get_manager().scanners().propagate(self, imported)
diff --git a/tools/build/v2/tools/mipspro.jam b/tools/build/src/tools/mipspro.jam
index 417eaefcf..417eaefcf 100644
--- a/tools/build/v2/tools/mipspro.jam
+++ b/tools/build/src/tools/mipspro.jam
diff --git a/tools/build/v2/tools/mpi.jam b/tools/build/src/tools/mpi.jam
index 0fe490bec..a161101bc 100644
--- a/tools/build/v2/tools/mpi.jam
+++ b/tools/build/src/tools/mpi.jam
@@ -291,6 +291,12 @@ rule init ( mpicxx ? : options * : mpirun-with-options * )
command = [ common.get-invocation-command mpi : mpicxx ] ;
}
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "CC", which is used by Cray
+ command = [ common.get-invocation-command mpi : CC ] ;
+ }
+
local result ;
local compile_flags ;
local link_flags ;
@@ -314,7 +320,7 @@ rule init ( mpicxx ? : options * : mpirun-with-options * )
# Prepend COMPILER as the executable name, to match the format of
# other compilation commands.
- compile_flags = "COMPILER $(compile_flags)" ;
+ compile_flags = "COMPILER $(compile_flags) -DOMPI_SKIP_MPICXX " ;
link_flags = "COMPILER $(link_flags)" ;
}
# Look for LAM-MPI's -showme
@@ -396,6 +402,17 @@ rule init ( mpicxx ? : options * : mpirun-with-options * )
compile_flags = "$(compile_flags) $(f_flags)" ;
}
}
+ # Cray
+ else if [ safe-shell-command "$(command) -v" ]
+ {
+ compile_flags = [ safe-shell-command "$(command) -###" ] ;
+ link_flags = [ safe-shell-command "$(command) -###" ] ;
+ # ECHO "Noel: compile_flags: $(compile_flags)" ;
+ # ECHO "Noel: link_flags: $(link_flags)" ;
+ result = " " ;
+ }
+
+ # Prepend COMPILER as the executable name, to match the format of
if $(result) || $(compile_flags) && $(link_flags)
{
diff --git a/tools/build/v2/tools/msvc-config.jam b/tools/build/src/tools/msvc-config.jam
index 6c71e3b00..6c71e3b00 100644
--- a/tools/build/v2/tools/msvc-config.jam
+++ b/tools/build/src/tools/msvc-config.jam
diff --git a/tools/build/v2/tools/msvc.jam b/tools/build/src/tools/msvc.jam
index 211858670..65feebdea 100644
--- a/tools/build/v2/tools/msvc.jam
+++ b/tools/build/src/tools/msvc.jam
@@ -55,7 +55,7 @@ type.register PDB : pdb ;
# using msvc : 6.5 : cl.exe ;
# using msvc : 7.0 : Y:/foo/bar/cl.exe ;
#
-# The version parameter may be ommited:
+# The version parameter may be omitted:
#
# using msvc : : Z:/foo/bar/cl.exe ;
#
@@ -749,7 +749,15 @@ local rule configure-really ( version ? : options * )
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
- if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
+ if [ MATCH "(Microsoft Visual Studio 14)" : $(command) ]
+ {
+ version = 14.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 12)" : $(command) ]
+ {
+ version = 12.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
{
version = 11.0 ;
}
@@ -897,9 +905,9 @@ local rule configure-really ( version ? : options * )
setup-$(c) = [ feature.get-values <setup-$(c)> : $(options) ] ;
- if ! $(setup-$(c))-is-not-empty
+ if ! $(setup-$(c))-is-defined
{
- if $(global-setup)-is-not-empty
+ if $(global-setup)-is-defined
{
setup-$(c) = $(global-setup) ;
@@ -912,7 +920,8 @@ local rule configure-really ( version ? : options * )
}
else
{
- setup-$(c) = [ locate-default-setup $(command) : $(parent) : $(default-setup-$(c)) ] ;
+ setup-$(c) = [ locate-default-setup $(command) :
+ $(parent) : $(default-setup-$(c)) ] ;
}
}
@@ -1377,7 +1386,8 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
merom-xe kentsfield kentsfield-xe penryn wolfdale
yorksfield nehalem sandy-bridge ivy-bridge haswell ;
.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
- athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 ;
+ athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3
+ btver1 btver2 ;
.cpu-type-g7 = pentium4 pentium4m athlon athlon-tbird athlon-4 athlon-xp
athlon-mp $(.cpu-type-em64t) $(.cpu-type-amd64) ;
.cpu-type-itanium = itanium itanium1 merced ;
@@ -1385,7 +1395,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
# Known toolset versions, in order of preference.
-.known-versions = 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
+.known-versions = 14.0 12.0 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
7.1toolkit 7.0 6.0 ;
# Version aliases.
@@ -1396,6 +1406,8 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-alias-9 = 9.0 ;
.version-alias-10 = 10.0 ;
.version-alias-11 = 11.0 ;
+.version-alias-12 = 12.0 ;
+.version-alias-14 = 14.0 ;
# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1409,6 +1421,8 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
.version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
+.version-12.0-reg = "VisualStudio\\12.0\\Setup\\VC" ;
+.version-14.0-reg = "VisualStudio\\14.0\\Setup\\VC" ;
# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
diff --git a/tools/build/v2/tools/msvc.py b/tools/build/src/tools/msvc.py
index cb733e2e0..1f9cc2ccb 100644
--- a/tools/build/v2/tools/msvc.py
+++ b/tools/build/src/tools/msvc.py
@@ -71,7 +71,7 @@ type.register('PDB',['pdb'])
# using msvc : 6.5 : cl.exe ;
# using msvc : 7.0 : Y:/foo/bar/cl.exe ;
#
-# The version parameter may be ommited:
+# The version parameter may be omitted:
#
# using msvc : : Z:/foo/bar/cl.exe ;
#
@@ -152,7 +152,7 @@ def configure_version_specific(toolset_arg, version, conditions):
# options are off by default. If we are sure that the msvc version is at
# 7.*, add those options explicitly. We can be sure either if user specified
# version 7.* explicitly or if we auto-detected the version ourselves.
- if not re.match('^6\\.', version):
+ if not re.search('^6\\.', version):
toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',conditions, ['/Zc:forScope','/Zc:wchar_t'])
toolset.flags('{}.compile.c++'.format(toolset_arg), 'C++FLAGS',conditions, ['/wd4675'])
@@ -160,7 +160,7 @@ def configure_version_specific(toolset_arg, version, conditions):
# versions have a bug, causing them to emit the deprecation warning even
# with /W0.
toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',extend_conditions(conditions,['<warnings>off']), ['/wd4996'])
- if re.match('^[78]\\.', version):
+ if re.search('^[78]\.', version):
# 64-bit compatibility warning deprecated since 9.0, see
# http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx
toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',extend_conditions(conditions,['<warnings>all']), ['/Wp64'])
@@ -168,7 +168,7 @@ def configure_version_specific(toolset_arg, version, conditions):
#
# Processor-specific optimization.
#
- if re.match('^[67]', version ):
+ if re.search('^[67]', version ):
# 8.0 deprecates some of the options.
toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<optimization>speed','<optimization>space']), ['/Ogiy', '/Gs'])
toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<optimization>speed']), ['/Ot'])
@@ -270,76 +270,45 @@ def expand_target_variable(target,var,prefix=None,suffix=None):
return " ".join([ ("" if prefix is None else prefix) + elem + ("" if suffix is None else suffix) for elem in list ])
-compile_c_cpp_pch = '''$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(.escaped-double-quote)$(>[1]:D=)$(.escaped-double-quote)$(.nl))" $(.CC.FILTER)'''
-# Action for running the C/C++ compiler using precompiled headers. An already
-# built source file for compiling the precompiled headers is expected to be
-# given as one of the source parameters.
-compile_c_cpp_pch_s = '''$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)'''
-
def get_rspline(targets, lang_opt):
- result = lang_opt + ' ' + \
- expand_target_variable(targets, 'UNDEFS', '-U' ) + ' ' + \
- expand_target_variable(targets, 'CFLAGS' ) + ' ' + \
- expand_target_variable(targets, 'C++FLAGS' ) + ' ' + \
- expand_target_variable(targets, 'OPTIONS' ) + ' -c ' + \
- expand_target_variable(targets, 'DEFINES', '\n-D' ) + ' ' + \
- expand_target_variable(targets, 'INCLUDES', '\n"-I', '"' )
+ result = lang_opt + '\n' + \
+ expand_target_variable(targets, 'UNDEFS' , '\n-U' ) + \
+ expand_target_variable(targets, 'CFLAGS' , '\n' ) + \
+ expand_target_variable(targets, 'C++FLAGS', '\n' ) + \
+ expand_target_variable(targets, 'OPTIONS' , '\n' ) + '\n-c' + \
+ expand_target_variable(targets, 'DEFINES' , '\n-D' , '\n' ) + \
+ expand_target_variable(targets, 'INCLUDES', '\n"-I', '"\n' )
bjam.call('set-target-variable', targets, 'CC_RSPLINE', result)
def compile_c(targets, sources = [], properties = None):
- get_manager().engine().set_target_variable( targets[1], 'C++FLAGS', '' )
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
get_rspline(targets, '-TC')
- sources += bjam.call('get-target-variable',targets,'PCH_FILE')
- sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
compile_c_cpp(targets,sources)
def compile_c_preprocess(targets, sources = [], properties = None):
- get_manager().engine().set_target_variable( target[1], 'C++FLAGS', '' )
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
get_rspline(targets, '-TC')
- sources += bjam.call('get-target-variable',targets,'PCH_FILE')
- sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
preprocess_c_cpp(targets,sources)
def compile_c_pch(targets, sources = [], properties = []):
- get_manager().engine().set_target_variable( target[1], 'C++FLAGS', '' )
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
+ get_rspline([targets[0]], '-TC')
get_rspline([targets[1]], '-TC')
- get_rspline([targets[2]], '-TC')
- pch_source = bjam.call('get-target-variable', targets, 'PCH_SOURCE')
- sources += pch_source
- if pch_source:
- get_manager().engine().set_update_action('compile-c-c++-pch-s', targets, sources, properties)
- get_manager().engine().add_dependency(targets,pch_source)
- compile_c_cpp_pch_s(targets,sources)
- else:
- get_manager().engine().set_update_action('compile-c-c++-pch', targets, sources, properties)
- compile_c_cpp_pch(targets,sources)
toolset.flags( 'msvc', 'YLOPTION', [], ['-Yl'] )
def compile_cpp(targets,sources=[],properties=None):
get_rspline(targets,'-TP')
- sources += bjam.call('get-target-variable',targets,'PCH_FILE')
- sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
+ bjam.call('set-target-variable', targets, 'PCH_FILE', sources)
compile_c_cpp(targets,sources)
def compile_cpp_preprocess(targets,sources=[],properties=None):
get_rspline(targets,'-TP')
- sources += bjam.call('get-target-variable',targets,'PCH_FILE')
- sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
preprocess_c_cpp(targets,sources)
def compile_cpp_pch(targets,sources=[],properties=None):
+ get_rspline([targets[0]], '-TP')
get_rspline([targets[1]], '-TP')
- get_rspline([targets[2]], '-TP')
- pch_source = bjam.call('get-target-variable', targets, 'PCH_SOURCE')
- sources += pch_source
- if pch_source:
- get_manager().engine().set_update_action('compile-c-c++-pch-s', targets, sources, properties)
- get_manager().engine().add_dependency(targets,pch_source)
- compile_c_cpp_pch_s(targets,sources)
- else:
- get_manager().engine().set_update_action('compile-c-c++-pch', targets, sources, properties)
- compile_c_cpp_pch(targets,sources)
# Action for running the C/C++ compiler without using precompiled headers.
@@ -357,33 +326,68 @@ def compile_cpp_pch(targets,sources=[],properties=None):
# as in this case the compiler must be used to create a single PDB for our library.
#
-compile_action = '$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)'
-engine.register_action(
+class SetupAction:
+ def __init__(self, setup_func, function):
+ self.setup_func = setup_func
+ self.function = function
+
+ def __call__(self, targets, sources, property_set):
+ assert(callable(self.setup_func))
+ # This can modify sources.
+ action_name = self.setup_func(targets, sources, property_set)
+ # Bjam actions defined from Python have only the command
+ # to execute, and no associated jam procedural code. So
+ # passing 'property_set' to it is not necessary.
+ bjam.call("set-update-action", action_name, targets, sources, [])
+ if self.function:
+ self.function(targets, sources, property_set)
+
+def register_setup_action(action_name,setup_function,function=None):
+ global engine
+ if engine.actions.has_key(action_name):
+ raise "Bjam action %s is already defined" % action_name
+ engine.actions[action_name] = SetupAction(setup_function, function)
+
+
+engine.register_action('compile-c-c++',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)''',
+bound_list=['PDB_NAME'])
+
+def setup_compile_c_cpp_action(targets, sources, properties):
+ sources += bjam.call('get-target-variable',targets,'PCH_FILE')
+ sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
+ return 'compile-c-c++'
+
+
+register_setup_action(
'msvc.compile.c',
- compile_action,
- function=compile_c,
- bound_list=['PDB_NAME'])
+ setup_compile_c_cpp_action,
+ function=compile_c)
-engine.register_action(
+register_setup_action(
'msvc.compile.c++',
- compile_action,
- function=compile_cpp,
- bound_list=['PDB_NAME'])
+ setup_compile_c_cpp_action,
+ function=compile_cpp)
-preprocess_action = '$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -E $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" >"$(<[1]:W)"'
+engine.register_action('preprocess-c-c++',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -E $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" >"$(<[1]:W)"',
+bound_list=['PDB_NAME'])
-engine.register_action(
+def setup_preprocess_c_cpp_action(targets, sources, properties):
+ sources += bjam.call('get-target-variable',targets,'PCH_FILE')
+ sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
+ return 'preprocess-c-c++'
+
+register_setup_action(
'msvc.preprocess.c',
- preprocess_action,
- function=compile_c_preprocess,
- bound_list=['PDB_NAME'])
+ setup_preprocess_c_cpp_action,
+ function=compile_c_preprocess)
-engine.register_action(
+register_setup_action(
'msvc.preprocess.c++',
- preprocess_action,
- function=compile_cpp_preprocess,
- bound_list=['PDB_NAME'])
+ setup_preprocess_c_cpp_action,
+ function=compile_cpp_preprocess)
def compile_c_cpp(targets,sources=None):
pch_header = bjam.call('get-target-variable',targets[0],'PCH_HEADER')
@@ -400,14 +404,30 @@ def preprocess_c_cpp(targets,sources=None):
# to whatever else it needs to compile, this action also adds a temporary source
# .cpp file used to compile the precompiled headers themselves.
-engine.register_action(
+
+engine.register_action('compile-c-c++-pch',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include "$(>[1]:D=)"\n)" $(.CC.FILTER)')
+
+engine.register_action('compile-c-c++-pch-s',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)')
+
+def setup_c_cpp_pch(targets, sources, properties):
+ pch_source = bjam.call('get-target-variable', targets, 'PCH_SOURCE')
+ if pch_source:
+ sources += pch_source
+ get_manager().engine().add_dependency(targets,pch_source)
+ return 'compile-c-c++-pch-s'
+ else:
+ return 'compile-c-c++-pch'
+
+register_setup_action(
'msvc.compile.c.pch',
- None, # action set by the function
+ setup_c_cpp_pch,
function=compile_c_pch)
-engine.register_action(
+register_setup_action(
'msvc.compile.c++.pch',
- None, # action set by the function
+ setup_c_cpp_pch,
function=compile_cpp_pch)
@@ -537,7 +557,6 @@ $(LIBRARIES)
class MsvcPchGenerator(pch.PchGenerator):
# Inherit the __init__ method
-
def run_pch(self, project, name, prop_set, sources):
# Find the header in sources. Ignore any CPP sources.
pch_header = None
@@ -548,18 +567,30 @@ class MsvcPchGenerator(pch.PchGenerator):
elif type.is_derived(s.type(), 'CPP') or type.is_derived(s.type(), 'C'):
pch_source = s
- if not pch-header:
+ if not pch_header:
raise RuntimeError( "can not build pch without pch-header" )
# If we do not have the PCH source - that is fine. We will just create a
# temporary .cpp file in the action.
- temp_prop_set = property_set.create([Property('pch-source',pch_source)]+prop_set.all())
- generated = Generator.run(project,name,temp_prop_set,pch_header)
+ properties = prop_set.all()
+ # Passing of <pch-source> is a dirty trick, needed because
+ # non-composing generators with multiple inputs are subtly
+ # broken. For more detailed information see:
+ # https://zigzag.cs.msu.su:7813/boost.build/ticket/111
+ if pch_source:
+ properties.append(Property('pch-source',pch_source))
+ generated = Generator.run(self,project,name,property_set.create(properties),[pch_header])
pch_file = None
for g in generated:
if type.is_derived(g.type(), 'PCH'):
pch_file = g
- return property_set.create([Property('pch-header',pch_header),Property('pch-file',pch_file)]+generated)
+ result_props = []
+ if pch_header:
+ result_props.append(Property('pch-header', pch_header))
+ if pch_file:
+ result_props.append(Property('pch-file', pch_file))
+
+ return property_set.PropertySet(result_props), generated
################################################################################
@@ -577,9 +608,9 @@ def auto_detect_toolset_versions():
versionVarName = '__version_{}_reg'.format(version.replace('.','_'))
if versionVarName in globals():
vc_path = None
- for x in [ '', 'Wow6432Node\\' ]:
+ for x64elt in [ '', 'Wow6432Node\\' ]:
try:
- with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\{}{}'.format(x, globals()[versionVarName])) as reg_key:
+ with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\{}Microsoft\\{}'.format(x64elt, globals()[versionVarName])) as reg_key:
vc_path = _winreg.QueryValueEx(reg_key, "ProductDir")[0]
except:
pass
@@ -645,9 +676,13 @@ def configure_really(version=None, options=[]):
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
- if re.search("Microsoft Visual Studio 11", command):
+ if re.search("Microsoft Visual Studio 14", command):
+ version = '14.0'
+ elif re.search("Microsoft Visual Studio 12", command):
+ version = '12.0'
+ elif re.search("Microsoft Visual Studio 11", command):
version = '11.0'
- if re.search("Microsoft Visual Studio 10", command):
+ elif re.search("Microsoft Visual Studio 10", command):
version = '10.0'
elif re.search("Microsoft Visual Studio 9", command):
version = '9.0'
@@ -828,12 +863,12 @@ def configure_really(version=None, options=[]):
cpu_assembler = locals()['default_assembler_{}'.format(c)]
toolset.flags('msvc.compile', '.CC' , cpu_conditions, ['{}{} /Zm800 -nologo' .format(setup_script, compiler)])
- toolset.flags('msvc.compile', '.RC' , cpu_conditions, ['{}{} -nologo' .format(setup_script, resource_compiler)])
- toolset.flags('msvc.compile', '.ASM', cpu_conditions, ['{}{} ' .format(setup_script, cpu_assembler)])
+ toolset.flags('msvc.compile', '.RC' , cpu_conditions, ['{}{}' .format(setup_script, resource_compiler)])
+ toolset.flags('msvc.compile', '.ASM', cpu_conditions, ['{}{} -nologo' .format(setup_script, cpu_assembler)])
toolset.flags('msvc.link' , '.LD' , cpu_conditions, ['{}{} /NOLOGO /INCREMENTAL:NO'.format(setup_script, linker)])
toolset.flags('msvc.archive', '.LD' , cpu_conditions, ['{}{} /lib /NOLOGO' .format(setup_script, linker)])
- toolset.flags('msvc.compile', '.IDL', cpu_conditions, ['{}{} ' .format(setup_script, idl_compiler)])
- toolset.flags('msvc.compile', '.MC' , cpu_conditions, ['{}{} ' .format(setup_script, mc_compiler)])
+ toolset.flags('msvc.compile', '.IDL', cpu_conditions, ['{}{}' .format(setup_script, idl_compiler)])
+ toolset.flags('msvc.compile', '.MC' , cpu_conditions, ['{}{}' .format(setup_script, mc_compiler)])
toolset.flags('msvc.link' , '.MT' , cpu_conditions, ['{}{} -nologo' .format(setup_script, manifest_tool)])
if cc_filter:
@@ -1059,10 +1094,10 @@ def register_toolset_really():
toolset.flags('msvc.link', 'OPTIONS', [], ['<linkflags>'])
toolset.flags('msvc.link', 'LINKPATH', [], ['<library-path>'])
- toolset.flags('msvc.link', 'FINDLIBS_ST', ['<find-static-library>'])
- toolset.flags('msvc.link', 'FINDLIBS_SA', ['<find-shared-library>'])
- toolset.flags('msvc.link', 'LIBRARY_OPTION', ['<toolset>msvc'])
- toolset.flags('msvc.link', 'LIBRARIES_MENTIONED_BY_FILE', ['<library-file>'])
+ toolset.flags('msvc.link', 'FINDLIBS_ST', [], ['<find-static-library>'])
+ toolset.flags('msvc.link', 'FINDLIBS_SA', [], ['<find-shared-library>'])
+ toolset.flags('msvc.link', 'LIBRARY_OPTION', ['<toolset>msvc'], [''])
+ toolset.flags('msvc.link', 'LIBRARIES_MENTIONED_BY_FILE', [], ['<library-file>'])
toolset.flags('msvc.archive', 'AROPTIONS', [], ['<archiveflags>'])
@@ -1156,7 +1191,7 @@ __cpu_type_itanium2 = ['itanium2', 'mckinley']
# Known toolset versions, in order of preference.
-_known_versions = ['11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
+_known_versions = ['14.0', '12.0', '11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
# Version aliases.
__version_alias_6 = '6.0'
@@ -1166,6 +1201,8 @@ __version_alias_8 = '8.0'
__version_alias_9 = '9.0'
__version_alias_10 = '10.0'
__version_alias_11 = '11.0'
+__version_alias_12 = '12.0'
+__version_alias_14 = '14.0'
# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1179,6 +1216,8 @@ __version_9_0express_reg = "VCExpress\\9.0\\Setup\\VC"
__version_10_0_reg = "VisualStudio\\10.0\\Setup\\VC"
__version_10_0express_reg = "VCExpress\\10.0\\Setup\\VC"
__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
+__version_12_0_reg = "VisualStudio\\12.0\\Setup\\VC"
+__version_14_0_reg = "VisualStudio\\14.0\\Setup\\VC"
# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
diff --git a/tools/build/v2/tools/notfile.jam b/tools/build/src/tools/notfile.jam
index 7d0985b45..7d0985b45 100644
--- a/tools/build/v2/tools/notfile.jam
+++ b/tools/build/src/tools/notfile.jam
diff --git a/tools/build/v2/tools/notfile.py b/tools/build/src/tools/notfile.py
index afbf68fb0..afbf68fb0 100644
--- a/tools/build/v2/tools/notfile.py
+++ b/tools/build/src/tools/notfile.py
diff --git a/tools/build/v2/tools/package.jam b/tools/build/src/tools/package.jam
index 198c22315..198c22315 100644
--- a/tools/build/v2/tools/package.jam
+++ b/tools/build/src/tools/package.jam
diff --git a/tools/build/v2/tools/package.py b/tools/build/src/tools/package.py
index aa081b4f4..aa081b4f4 100644
--- a/tools/build/v2/tools/package.py
+++ b/tools/build/src/tools/package.py
diff --git a/tools/build/v2/tools/pathscale.jam b/tools/build/src/tools/pathscale.jam
index 94abcf1c8..94abcf1c8 100644
--- a/tools/build/v2/tools/pathscale.jam
+++ b/tools/build/src/tools/pathscale.jam
diff --git a/tools/build/v2/tools/pch.jam b/tools/build/src/tools/pch.jam
index 0c6e98fac..0c6e98fac 100644
--- a/tools/build/v2/tools/pch.jam
+++ b/tools/build/src/tools/pch.jam
diff --git a/tools/build/v2/tools/pch.py b/tools/build/src/tools/pch.py
index 71cb7166e..71cb7166e 100644
--- a/tools/build/v2/tools/pch.py
+++ b/tools/build/src/tools/pch.py
diff --git a/tools/build/v2/tools/pgi.jam b/tools/build/src/tools/pgi.jam
index 90e827d5c..90e827d5c 100644
--- a/tools/build/v2/tools/pgi.jam
+++ b/tools/build/src/tools/pgi.jam
diff --git a/tools/build/v2/tools/python-config.jam b/tools/build/src/tools/python-config.jam
index 40aa825bc..40aa825bc 100644
--- a/tools/build/v2/tools/python-config.jam
+++ b/tools/build/src/tools/python-config.jam
diff --git a/tools/build/v2/tools/python.jam b/tools/build/src/tools/python.jam
index d48bb7838..dfb17ed8d 100644
--- a/tools/build/v2/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -388,12 +388,12 @@ local rule split-version ( version )
}
-# Build a list of versions from 3.0 down to 1.5. Because bjam can not enumerate
+# Build a list of versions from 3.4 down to 1.5. Because bjam can not enumerate
# registry sub-keys, we have no way of finding a version with a 2-digit minor
# version, e.g. 2.10 -- let us hope that never happens.
#
.version-countdown = ;
-for local v in [ numbers.range 15 30 ]
+for local v in [ numbers.range 15 34 ]
{
.version-countdown = [ SUBST $(v) (.)(.*) $1.$2 ] $(.version-countdown) ;
}
@@ -1234,7 +1234,7 @@ rule capture-output ( target : sources * : properties * )
# Oddly, host-os is not in properties, so grab the default value.
local host-os = [ feature.defaults host-os ] ;
host-os = $(host-os:G=) ;
- if $(target-os) != $(host-os)
+ if $(target-os) != $(host-os) && $(target-os) in windows cygwin && $(host-os) in windows cygwin
{
PYTHONPATH = [ sequence.transform $(host-os)-to-$(target-os)-path :
$(PYTHONPATH) ] ;
diff --git a/tools/build/v2/tools/qcc.jam b/tools/build/src/tools/qcc.jam
index 3b3557894..3b3557894 100644
--- a/tools/build/v2/tools/qcc.jam
+++ b/tools/build/src/tools/qcc.jam
diff --git a/tools/build/v2/tools/qt.jam b/tools/build/src/tools/qt.jam
index 8aa7ca266..8aa7ca266 100644
--- a/tools/build/v2/tools/qt.jam
+++ b/tools/build/src/tools/qt.jam
diff --git a/tools/build/v2/tools/qt3.jam b/tools/build/src/tools/qt3.jam
index f82cf0ac3..f82cf0ac3 100644
--- a/tools/build/v2/tools/qt3.jam
+++ b/tools/build/src/tools/qt3.jam
diff --git a/tools/build/v2/tools/qt4.jam b/tools/build/src/tools/qt4.jam
index a3aac61b4..a3aac61b4 100644
--- a/tools/build/v2/tools/qt4.jam
+++ b/tools/build/src/tools/qt4.jam
diff --git a/tools/build/v2/tools/qt5.jam b/tools/build/src/tools/qt5.jam
index a5fdf717c..46a753019 100644
--- a/tools/build/v2/tools/qt5.jam
+++ b/tools/build/src/tools/qt5.jam
@@ -312,6 +312,7 @@ rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin
if $(link) in shared
{
usage-requirements += <dll-path>$(.libprefix) ;
+ usage-requirements += <target-os>windows:<dll-path>$(.binprefix) ;
}
local suffix ;
@@ -399,10 +400,34 @@ rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin
}
}
+ if [ glob $(.incprefix)/QtAngle ]
+ {
+ # Setup support of ANGLE builds.
+ alias QtAngle
+ : # sources
+ : # requirements
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_OPENGL_ES_2
+ <define>QT_OPENGL_ES_2_ANGLE
+ <include>$(.incprefix)/QtAngle
+ $(usage-requirements)
+ ;
+ }
+ else
+ {
+ alias QtAngle
+ : # sources
+ : # requirements
+ $(target-requirements)
+ ;
+ }
+
# Initialising the remaining libraries is canonical
# parameters 'module' : 'depends-on' : 'usage-define' : 'requirements' : 'include'
# 'include' only for non-canonical include paths.
- add-shared-library QtGui : QtCore : QT_GUI_LIB : $(target-requirements) ;
+ add-shared-library QtGui : QtCore QtAngle : QT_GUI_LIB : $(target-requirements) ;
add-shared-library QtWidgets : QtGui : QT_WIDGETS_LIB : $(target-requirements) ;
add-shared-library QtNetwork : QtCore : QT_NETWORK_LIB : $(target-requirements) ;
add-shared-library QtSql : QtCore : QT_SQL_LIB : $(target-requirements) ;
@@ -435,7 +460,7 @@ rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin
add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
add-shared-library QtMultimediaWidgets : QtMultimedia : QT_MULTIMEDIAWIDGETS_LIB : $(target-requirements) ;
- #
+ #
add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
# Help-Engine
@@ -680,7 +705,7 @@ flags qt5.moc DEFINES <define> ;
#
actions moc
{
- $(.BINPREFIX[-1])/moc -f $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
+ $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
}
# When moccing files for include only, we don't need -f, otherwise the generated
diff --git a/tools/build/v2/tools/quickbook-config.jam b/tools/build/src/tools/quickbook-config.jam
index e983a78a8..e983a78a8 100644
--- a/tools/build/v2/tools/quickbook-config.jam
+++ b/tools/build/src/tools/quickbook-config.jam
diff --git a/tools/build/v2/tools/quickbook.jam b/tools/build/src/tools/quickbook.jam
index 6de2d42f8..6de2d42f8 100644
--- a/tools/build/v2/tools/quickbook.jam
+++ b/tools/build/src/tools/quickbook.jam
diff --git a/tools/build/v2/tools/rc.jam b/tools/build/src/tools/rc.jam
index de4071f29..de4071f29 100644
--- a/tools/build/v2/tools/rc.jam
+++ b/tools/build/src/tools/rc.jam
diff --git a/tools/build/v2/tools/rc.py b/tools/build/src/tools/rc.py
index 0b82d231d..bacd3260a 100644
--- a/tools/build/v2/tools/rc.py
+++ b/tools/build/src/tools/rc.py
@@ -21,11 +21,17 @@
##import scanner ;
##import toolset : flags ;
+import os.path
+import re
+
+import bjam
+
from b2.build import type, toolset, generators, scanner, feature
from b2.tools import builtin
from b2.util import regex
from b2.build.toolset import flags
from b2.manager import get_manager
+from b2.util import utility
__debug = None
@@ -135,7 +141,7 @@ class ResScanner(scanner.Scanner):
"[ ]+([^ \"]+|\"[^\"]+\"))|(#include[ ]*(<[^<]+>|\"[^\"]+\")))" ;
def process(self, target, matches, binding):
-
+ binding = binding[0]
angle = regex.transform(matches, "#include[ ]*<([^<]+)>")
quoted = regex.transform(matches, "#include[ ]*\"([^\"]+)\"")
res = regex.transform(matches,
@@ -147,11 +153,11 @@ class ResScanner(scanner.Scanner):
# IDR_MAINFRAME ICON "res\\icon.ico"
#
# so we have to replace double backslashes to single ones.
- res = [ re.sub(r'\\\\', '/', match) for match in res ]
+ res = [ re.sub(r'\\\\', '/', match) for match in res if match is not None ]
# CONSIDER: the new scoping rule seem to defeat "on target" variables.
- g = bjam.call('get-target-variable', target, 'HDRGRIST')
- b = os.path.normalize_path(os.path.dirname(binding))
+ g = bjam.call('get-target-variable', target, 'HDRGRIST')[0]
+ b = os.path.normpath(os.path.dirname(binding))
# Attach binding of including file to included targets.
# When target is directly created from virtual target
@@ -177,9 +183,9 @@ class ResScanner(scanner.Scanner):
engine.add_dependency(target, res)
bjam.call('NOCARE', all + res)
- engine.set_target_variable(angle, 'SEARCH', ungrist(self.includes))
- engine.set_target_variable(quoted, 'SEARCH', b + ungrist(self.includes))
- engine.set_target_variable(res, 'SEARCH', b + ungrist(self.includes)) ;
+ engine.set_target_variable(angle, 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(quoted, 'SEARCH', [b + utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(res, 'SEARCH', [b + utility.get_value(inc) for inc in self.includes])
# Just propagate current scanner to includes, in a hope
# that includes do not change scanners.
diff --git a/tools/build/v2/tools/stage.jam b/tools/build/src/tools/stage.jam
index 8d005ae02..8d005ae02 100644
--- a/tools/build/v2/tools/stage.jam
+++ b/tools/build/src/tools/stage.jam
diff --git a/tools/build/v2/tools/stage.py b/tools/build/src/tools/stage.py
index 90d3c0f97..8eda4e258 100644
--- a/tools/build/v2/tools/stage.py
+++ b/tools/build/src/tools/stage.py
@@ -170,7 +170,7 @@ class InstallTargetClass(targets.BasicTarget):
def collect_targets(self, targets):
s = [t.creating_subvariant() for t in targets]
- s = unique(s)
+ s = unique(filter(lambda l: l != None,s))
result = set(targets)
for i in s:
@@ -251,7 +251,7 @@ class InstalledExeGenerator(generators.Generator):
else:
# See if the dll-path properties are not changed during
# install. If so, copy, don't relink.
- need_relink = ps.get('dll-path') != source[0].action().properties().get('dll-path')
+ need_relink = source[0].action() and ps.get('dll-path') != source[0].action().properties().get('dll-path')
if need_relink:
return [relink_file(project, source, ps)]
@@ -280,7 +280,7 @@ class InstalledSharedLibGenerator(generators.Generator):
a = source.action()
if not a:
# Non-derived file, just copy.
- copied = copy_file(project, source, ps)
+ copied = copy_file(project, None, source, ps)
else:
need_relink = ps.get('dll-path') != source.action().properties().get('dll-path')
diff --git a/tools/build/v2/tools/stlport.jam b/tools/build/src/tools/stlport.jam
index ed0947ca5..ed0947ca5 100644
--- a/tools/build/v2/tools/stlport.jam
+++ b/tools/build/src/tools/stlport.jam
diff --git a/tools/build/v2/tools/sun.jam b/tools/build/src/tools/sun.jam
index 0ca927d3e..0ca927d3e 100644
--- a/tools/build/v2/tools/sun.jam
+++ b/tools/build/src/tools/sun.jam
diff --git a/tools/build/v2/tools/symlink.jam b/tools/build/src/tools/symlink.jam
index b33e8260c..b33e8260c 100644
--- a/tools/build/v2/tools/symlink.jam
+++ b/tools/build/src/tools/symlink.jam
diff --git a/tools/build/v2/tools/symlink.py b/tools/build/src/tools/symlink.py
index 6345ded6d..6345ded6d 100644
--- a/tools/build/v2/tools/symlink.py
+++ b/tools/build/src/tools/symlink.py
diff --git a/tools/build/v2/tools/testing-aux.jam b/tools/build/src/tools/testing-aux.jam
index 64ba00387..64ba00387 100644
--- a/tools/build/v2/tools/testing-aux.jam
+++ b/tools/build/src/tools/testing-aux.jam
diff --git a/tools/build/v2/tools/testing.jam b/tools/build/src/tools/testing.jam
index 21e1bd159..e62c378ab 100644
--- a/tools/build/v2/tools/testing.jam
+++ b/tools/build/src/tools/testing.jam
@@ -1,5 +1,7 @@
# Copyright 2005 Dave Abrahams
# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
+# Copyright 2014 Rene Rivera
+# Copyright 2014 Microsoft Corporation
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -55,7 +57,7 @@ rule init ( )
}
-# Feature controling the command used to lanch test programs.
+# Feature controlling the command used to launch test programs.
feature.feature testing.launcher : : free optional ;
feature.feature test-info : : free incidental ;
@@ -64,6 +66,11 @@ feature.feature testing.input-file : : free dependency ;
feature.feature preserve-test-targets : on off : incidental propagated ;
+# Feature to control whether executable binaries are run as part of test.
+# This can be used to just compile test cases in cross compilation situations.
+feature.feature testing.execute : on off : incidental propagated ;
+feature.set-default testing.execute : on ;
+
# Register target types.
type.register TEST : test ;
type.register COMPILE : : TEST ;
@@ -318,7 +325,7 @@ generators.register-standard testing.unit-test : EXE : UNIT_TEST ;
#
rule expect-success ( target : dependency + : requirements * )
{
- **passed** $(target) : $(sources) ;
+ **passed** $(target) : $(dependency) ;
}
@@ -343,6 +350,8 @@ rule expect-failure ( target : dependency + : properties * )
#
rule **passed**
{
+ remove-test-targets $(<) ;
+
# Dump all the tests, if needed. We do it here, since dump should happen
# only after all Jamfiles have been read, and there is no such place
# currently defined (but there should be).
@@ -399,6 +408,12 @@ toolset.flags testing.capture-output ARGS <testing.arg> ;
toolset.flags testing.capture-output INPUT_FILES <testing.input-file> ;
toolset.flags testing.capture-output LAUNCHER <testing.launcher> ;
+.preserve-test-targets = on ;
+if --remove-test-targets in [ modules.peek : ARGV ]
+{
+ .preserve-test-targets = off ;
+}
+
# Runs executable 'sources' and stores stdout in file 'target'. Unless
# --preserve-test-targets command line option has been specified, removes the
@@ -436,9 +451,68 @@ rule capture-output ( target : source : properties * : targets-to-remove * )
run-path-setup $(target) : $(source) : $(properties) ;
+ DISABLE_TEST_EXECUTION on $(target) = 0 ;
+ if [ feature.get-values testing.execute : $(properties) ] = off
+ {
+ DISABLE_TEST_EXECUTION on $(target) = 1 ;
+ }
+
if [ feature.get-values preserve-test-targets : $(properties) ] = off
+ || $(.preserve-test-targets) = off
+ {
+ rmtemp-sources $(target) : $(targets-to-remove) ;
+ for local to-remove in $(targets-to-remove)
+ {
+ rmtemp-all-sources $(to-remove) ;
+ }
+ }
+}
+
+.types-to-remove = EXE OBJ ;
+
+local rule remove-test-targets ( targets + )
+{
+ if $(.preserve-test-targets) = off
{
- TEMPORARY $(targets-to-remove) ;
+ rmtemp-all-sources $(target) ;
+ }
+}
+
+local rule rmtemp-all-sources ( target )
+{
+ local sources ;
+ local action = [ on $(target) return $(.action) ] ;
+ if $(action)
+ {
+ local action-sources = [ $(action).sources ] ;
+ for local source in $(action-sources)
+ {
+ local source-type = [ $(source).type ] ;
+ if $(source-type) in $(.types-to-remove)
+ {
+ sources += [ $(source).actual-name ] ;
+ }
+ else
+ {
+ # ECHO IGNORED: $(source) :: $(source-type) ;
+ }
+ }
+ if $(sources)
+ {
+ rmtemp-sources $(target) : $(sources) ;
+ for local source in $(sources)
+ {
+ rmtemp-all-sources $(source) ;
+ }
+ }
+ }
+}
+
+local rule rmtemp-sources ( target : sources * )
+{
+ if $(sources)
+ {
+ TEMPORARY $(sources) ;
# Set a second action on target that will be executed after capture
# output action. The 'RmTemps' rule has the 'ignore' modifier so it is
# always considered succeeded. This is needed for 'run-fail' test. For
@@ -446,7 +520,7 @@ rule capture-output ( target : source : properties * : targets-to-remove * )
# 'ignore' successful execution will be negated and be reported as
# failure. With 'ignore' we do not detect a case where removing files
# fails, but it is not likely to happen.
- RmTemps $(target) : $(targets-to-remove) ;
+ RmTemps $(target) : $(sources) ;
}
}
@@ -492,6 +566,11 @@ if --verbose-test in [ modules.peek : ARGV ]
actions capture-output bind INPUT_FILES output-file
{
$(PATH_SETUP)
+ $(.SHELL_SET)status=$(DISABLE_TEST_EXECUTION)
+ if $(.STATUS_NOT_0)
+ echo Skipping test execution due to testing.execute=off
+ exit 0
+ $(.ENDIF)
$(LAUNCHER) "$(>)" $(ARGS) "$(INPUT_FILES)" > "$(output-file)" 2>&1
$(.SET_STATUS)
$(.RUN_OUTPUT_NL) >> "$(output-file)"
diff --git a/tools/build/v2/tools/testing.py b/tools/build/src/tools/testing.py
index 360f07aed..360f07aed 100644
--- a/tools/build/v2/tools/testing.py
+++ b/tools/build/src/tools/testing.py
diff --git a/tools/build/v2/tools/types/__init__.py b/tools/build/src/tools/types/__init__.py
index 9ee31d13a..9ee31d13a 100644
--- a/tools/build/v2/tools/types/__init__.py
+++ b/tools/build/src/tools/types/__init__.py
diff --git a/tools/build/v2/tools/types/asm.jam b/tools/build/src/tools/types/asm.jam
index a340db36a..a340db36a 100644
--- a/tools/build/v2/tools/types/asm.jam
+++ b/tools/build/src/tools/types/asm.jam
diff --git a/tools/build/v2/tools/types/asm.py b/tools/build/src/tools/types/asm.py
index b4e1c30e7..b4e1c30e7 100644
--- a/tools/build/v2/tools/types/asm.py
+++ b/tools/build/src/tools/types/asm.py
diff --git a/tools/build/v2/tools/types/cpp.jam b/tools/build/src/tools/types/cpp.jam
index 29d8faaa8..3fcf449a2 100644
--- a/tools/build/v2/tools/types/cpp.jam
+++ b/tools/build/src/tools/types/cpp.jam
@@ -15,22 +15,22 @@ class c-scanner : scanner
import regex ;
import scanner ;
import sequence ;
+ import toolset ;
import virtual-target ;
rule __init__ ( includes * )
{
scanner.__init__ ;
- for local i in $(includes)
- {
- self.includes += [ sequence.transform path.native : [ regex.split
- $(i:G=) "&&" ] ] ;
- }
+ # toolset.handle-flag-value is a bit of overkill, but it
+ # does correctly handle the topological sort of && separated
+ # include paths
+ self.includes = [ toolset.handle-flag-value <include> : $(includes) ] ;
}
rule pattern ( )
{
- return "#[ \t]*include[ ]*(<(.*)>|\"(.*)\")" ;
+ return "#[ \t]*include[ \t]*(<(.*)>|\"(.*)\")" ;
}
rule process ( target : matches * : binding )
diff --git a/tools/build/v2/tools/types/cpp.py b/tools/build/src/tools/types/cpp.py
index a6703255c..a6703255c 100644
--- a/tools/build/v2/tools/types/cpp.py
+++ b/tools/build/src/tools/types/cpp.py
diff --git a/tools/build/v2/tools/types/exe.jam b/tools/build/src/tools/types/exe.jam
index 47109513a..47109513a 100644
--- a/tools/build/v2/tools/types/exe.jam
+++ b/tools/build/src/tools/types/exe.jam
diff --git a/tools/build/v2/tools/types/exe.py b/tools/build/src/tools/types/exe.py
index a4935e24e..a4935e24e 100644
--- a/tools/build/v2/tools/types/exe.py
+++ b/tools/build/src/tools/types/exe.py
diff --git a/tools/build/v2/tools/types/html.jam b/tools/build/src/tools/types/html.jam
index 5cd337d09..5cd337d09 100644
--- a/tools/build/v2/tools/types/html.jam
+++ b/tools/build/src/tools/types/html.jam
diff --git a/tools/build/v2/tools/types/html.py b/tools/build/src/tools/types/html.py
index 63af4d907..63af4d907 100644
--- a/tools/build/v2/tools/types/html.py
+++ b/tools/build/src/tools/types/html.py
diff --git a/tools/build/v2/tools/types/lib.jam b/tools/build/src/tools/types/lib.jam
index 854ab8fd5..854ab8fd5 100644
--- a/tools/build/v2/tools/types/lib.jam
+++ b/tools/build/src/tools/types/lib.jam
diff --git a/tools/build/v2/tools/types/lib.py b/tools/build/src/tools/types/lib.py
index d0ec1fb52..d0ec1fb52 100644
--- a/tools/build/v2/tools/types/lib.py
+++ b/tools/build/src/tools/types/lib.py
diff --git a/tools/build/v2/tools/types/obj.jam b/tools/build/src/tools/types/obj.jam
index 6afbcaa6f..6afbcaa6f 100644
--- a/tools/build/v2/tools/types/obj.jam
+++ b/tools/build/src/tools/types/obj.jam
diff --git a/tools/build/v2/tools/types/obj.py b/tools/build/src/tools/types/obj.py
index e61e99a81..e61e99a81 100644
--- a/tools/build/v2/tools/types/obj.py
+++ b/tools/build/src/tools/types/obj.py
diff --git a/tools/build/v2/tools/types/objc.jam b/tools/build/src/tools/types/objc.jam
index 709cbd0c7..709cbd0c7 100644
--- a/tools/build/v2/tools/types/objc.jam
+++ b/tools/build/src/tools/types/objc.jam
diff --git a/tools/build/v2/tools/types/preprocessed.jam b/tools/build/src/tools/types/preprocessed.jam
index c9187ba67..c9187ba67 100644
--- a/tools/build/v2/tools/types/preprocessed.jam
+++ b/tools/build/src/tools/types/preprocessed.jam
diff --git a/tools/build/v2/tools/types/preprocessed.py b/tools/build/src/tools/types/preprocessed.py
index f59104334..f59104334 100644
--- a/tools/build/v2/tools/types/preprocessed.py
+++ b/tools/build/src/tools/types/preprocessed.py
diff --git a/tools/build/v2/tools/types/qt.jam b/tools/build/src/tools/types/qt.jam
index 4951063e3..4951063e3 100644
--- a/tools/build/v2/tools/types/qt.jam
+++ b/tools/build/src/tools/types/qt.jam
diff --git a/tools/build/v2/tools/types/register.jam b/tools/build/src/tools/types/register.jam
index 203992ca9..203992ca9 100644
--- a/tools/build/v2/tools/types/register.jam
+++ b/tools/build/src/tools/types/register.jam
diff --git a/tools/build/v2/tools/types/rsp.jam b/tools/build/src/tools/types/rsp.jam
index bdf8a7c98..bdf8a7c98 100644
--- a/tools/build/v2/tools/types/rsp.jam
+++ b/tools/build/src/tools/types/rsp.jam
diff --git a/tools/build/v2/tools/types/rsp.py b/tools/build/src/tools/types/rsp.py
index ccb379e95..ccb379e95 100644
--- a/tools/build/v2/tools/types/rsp.py
+++ b/tools/build/src/tools/types/rsp.py
diff --git a/tools/build/v2/tools/unix.jam b/tools/build/src/tools/unix.jam
index 75949851a..75949851a 100644
--- a/tools/build/v2/tools/unix.jam
+++ b/tools/build/src/tools/unix.jam
diff --git a/tools/build/v2/tools/unix.py b/tools/build/src/tools/unix.py
index 34758f57b..34758f57b 100644
--- a/tools/build/v2/tools/unix.py
+++ b/tools/build/src/tools/unix.py
diff --git a/tools/build/v2/tools/vacpp.jam b/tools/build/src/tools/vacpp.jam
index f4080fc04..f4080fc04 100644
--- a/tools/build/v2/tools/vacpp.jam
+++ b/tools/build/src/tools/vacpp.jam
diff --git a/tools/build/v2/tools/whale.jam b/tools/build/src/tools/whale.jam
index 9335ff0c0..9335ff0c0 100644
--- a/tools/build/v2/tools/whale.jam
+++ b/tools/build/src/tools/whale.jam
diff --git a/tools/build/v2/tools/xlf.jam b/tools/build/src/tools/xlf.jam
index e7fcc6086..e7fcc6086 100644
--- a/tools/build/v2/tools/xlf.jam
+++ b/tools/build/src/tools/xlf.jam
diff --git a/tools/build/v2/tools/xsltproc-config.jam b/tools/build/src/tools/xsltproc-config.jam
index d1be25fa8..d1be25fa8 100644
--- a/tools/build/v2/tools/xsltproc-config.jam
+++ b/tools/build/src/tools/xsltproc-config.jam
diff --git a/tools/build/v2/tools/xsltproc.jam b/tools/build/src/tools/xsltproc.jam
index d8476461c..d8476461c 100644
--- a/tools/build/v2/tools/xsltproc.jam
+++ b/tools/build/src/tools/xsltproc.jam
diff --git a/tools/build/v2/tools/xsltproc/included.xsl b/tools/build/src/tools/xsltproc/included.xsl
index ef86394a9..ef86394a9 100644
--- a/tools/build/v2/tools/xsltproc/included.xsl
+++ b/tools/build/src/tools/xsltproc/included.xsl
diff --git a/tools/build/v2/tools/xsltproc/test.xml b/tools/build/src/tools/xsltproc/test.xml
index 57c8ba187..57c8ba187 100644
--- a/tools/build/v2/tools/xsltproc/test.xml
+++ b/tools/build/src/tools/xsltproc/test.xml
diff --git a/tools/build/v2/tools/xsltproc/test.xsl b/tools/build/src/tools/xsltproc/test.xsl
index a142c91dd..a142c91dd 100644
--- a/tools/build/v2/tools/xsltproc/test.xsl
+++ b/tools/build/src/tools/xsltproc/test.xsl
diff --git a/tools/build/v2/tools/zlib.jam b/tools/build/src/tools/zlib.jam
index 8095eeeee..8095eeeee 100644
--- a/tools/build/v2/tools/zlib.jam
+++ b/tools/build/src/tools/zlib.jam
diff --git a/tools/build/v2/util/__init__.py b/tools/build/src/util/__init__.py
index f80fe70e9..f80fe70e9 100644
--- a/tools/build/v2/util/__init__.py
+++ b/tools/build/src/util/__init__.py
diff --git a/tools/build/v2/util/assert.jam b/tools/build/src/util/assert.jam
index 65e880f43..65e880f43 100644
--- a/tools/build/v2/util/assert.jam
+++ b/tools/build/src/util/assert.jam
diff --git a/tools/build/v2/util/container.jam b/tools/build/src/util/container.jam
index dd4963938..dd4963938 100644
--- a/tools/build/v2/util/container.jam
+++ b/tools/build/src/util/container.jam
diff --git a/tools/build/v2/util/doc.jam b/tools/build/src/util/doc.jam
index 7ff2df406..801aff4eb 100644
--- a/tools/build/v2/util/doc.jam
+++ b/tools/build/src/util/doc.jam
@@ -745,7 +745,7 @@ local rule scan-rule (
# Scan within this rules scope.
local scope-level = [ extract-token $(var) ] ;
local scope-name = $(rule-name) ;
- while $(scope-level)
+ while $(scope-level) && $($(var))
{
local comment-block = [ extract-comment $(var) ] ;
local syntax-block = [ extract-syntax $(var) ] ;
diff --git a/tools/build/v2/util/indirect.jam b/tools/build/src/util/indirect.jam
index 40884da96..40884da96 100644
--- a/tools/build/v2/util/indirect.jam
+++ b/tools/build/src/util/indirect.jam
diff --git a/tools/build/v2/util/indirect.py b/tools/build/src/util/indirect.py
index 78fa89946..78fa89946 100644
--- a/tools/build/v2/util/indirect.py
+++ b/tools/build/src/util/indirect.py
diff --git a/tools/build/v2/util/logger.py b/tools/build/src/util/logger.py
index de6521290..de6521290 100644
--- a/tools/build/v2/util/logger.py
+++ b/tools/build/src/util/logger.py
diff --git a/tools/build/v2/util/numbers.jam b/tools/build/src/util/numbers.jam
index 665347d31..665347d31 100644
--- a/tools/build/v2/util/numbers.jam
+++ b/tools/build/src/util/numbers.jam
diff --git a/tools/build/v2/util/option.jam b/tools/build/src/util/option.jam
index f6dc37522..f6dc37522 100644
--- a/tools/build/v2/util/option.jam
+++ b/tools/build/src/util/option.jam
diff --git a/tools/build/v2/util/option.py b/tools/build/src/util/option.py
index 47d6abdff..47d6abdff 100644
--- a/tools/build/v2/util/option.py
+++ b/tools/build/src/util/option.py
diff --git a/tools/build/v2/util/order.jam b/tools/build/src/util/order.jam
index a74fc8c84..a74fc8c84 100644
--- a/tools/build/v2/util/order.jam
+++ b/tools/build/src/util/order.jam
diff --git a/tools/build/v2/util/order.py b/tools/build/src/util/order.py
index 4e67b3f1a..4e67b3f1a 100644
--- a/tools/build/v2/util/order.py
+++ b/tools/build/src/util/order.py
diff --git a/tools/build/v2/util/os.jam b/tools/build/src/util/os.jam
index daef27f77..daef27f77 100644
--- a/tools/build/v2/util/os.jam
+++ b/tools/build/src/util/os.jam
diff --git a/tools/build/v2/util/os_j.py b/tools/build/src/util/os_j.py
index f44cca620..f44cca620 100644
--- a/tools/build/v2/util/os_j.py
+++ b/tools/build/src/util/os_j.py
diff --git a/tools/build/v2/util/path.jam b/tools/build/src/util/path.jam
index 545d83c84..545d83c84 100644
--- a/tools/build/v2/util/path.jam
+++ b/tools/build/src/util/path.jam
diff --git a/tools/build/v2/util/path.py b/tools/build/src/util/path.py
index 222b96bfe..222b96bfe 100644
--- a/tools/build/v2/util/path.py
+++ b/tools/build/src/util/path.py
diff --git a/tools/build/v2/util/print.jam b/tools/build/src/util/print.jam
index c867e4e1b..c867e4e1b 100644
--- a/tools/build/v2/util/print.jam
+++ b/tools/build/src/util/print.jam
diff --git a/tools/build/v2/util/regex.jam b/tools/build/src/util/regex.jam
index be8b3cfd1..be8b3cfd1 100644
--- a/tools/build/v2/util/regex.jam
+++ b/tools/build/src/util/regex.jam
diff --git a/tools/build/v2/util/regex.py b/tools/build/src/util/regex.py
index 29e26ecf4..29e26ecf4 100644
--- a/tools/build/v2/util/regex.py
+++ b/tools/build/src/util/regex.py
diff --git a/tools/build/v2/util/sequence.jam b/tools/build/src/util/sequence.jam
index a87eb4d04..97ddfe153 100644
--- a/tools/build/v2/util/sequence.jam
+++ b/tools/build/src/util/sequence.jam
@@ -55,6 +55,7 @@ if [ HAS_NATIVE_RULE sequence : transform : 1 ]
NATIVE_RULE sequence : transform ;
}
+# Returns the elements of 's' in reverse order
rule reverse ( s * )
{
local r ;
@@ -178,7 +179,9 @@ rule length ( s * )
return $(result) ;
}
-
+# Removes duplicates from 'list'. If 'stable' is
+# passed, then the order of the elements will
+# be unchanged.
rule unique ( list * : stable ? )
{
local result ;
diff --git a/tools/build/v2/util/sequence.py b/tools/build/src/util/sequence.py
index 1d32efd2e..1d32efd2e 100644
--- a/tools/build/v2/util/sequence.py
+++ b/tools/build/src/util/sequence.py
diff --git a/tools/build/v2/util/set.jam b/tools/build/src/util/set.jam
index fc179134f..fc179134f 100644
--- a/tools/build/v2/util/set.jam
+++ b/tools/build/src/util/set.jam
diff --git a/tools/build/v2/util/set.py b/tools/build/src/util/set.py
index dc7cf3282..dc7cf3282 100644
--- a/tools/build/v2/util/set.py
+++ b/tools/build/src/util/set.py
diff --git a/tools/build/v2/util/string.jam b/tools/build/src/util/string.jam
index a39ed119e..a39ed119e 100644
--- a/tools/build/v2/util/string.jam
+++ b/tools/build/src/util/string.jam
diff --git a/tools/build/v2/util/utility.jam b/tools/build/src/util/utility.jam
index 26981c548..26981c548 100644
--- a/tools/build/v2/util/utility.jam
+++ b/tools/build/src/util/utility.jam
diff --git a/tools/build/v2/util/utility.py b/tools/build/src/util/utility.py
index afea765b9..afea765b9 100644
--- a/tools/build/v2/util/utility.py
+++ b/tools/build/src/util/utility.py
diff --git a/tools/build/v2/test/BoostBuild.py b/tools/build/test/BoostBuild.py
index 2aa146d1f..540830e34 100644
--- a/tools/build/v2/test/BoostBuild.py
+++ b/tools/build/test/BoostBuild.py
@@ -272,8 +272,8 @@ class Tester(TestCmd.TestCmd):
# Find where jam_src is located. Try for the debug version if it is
# lying around.
- dirs = [os.path.join("..", "engine", jam_build_dir + ".debug"),
- os.path.join("..", "engine", jam_build_dir)]
+ dirs = [os.path.join("..", "src", "engine", jam_build_dir + ".debug"),
+ os.path.join("..", "src", "engine", jam_build_dir)]
for d in dirs:
if os.path.exists(d):
jam_build_dir = d
diff --git a/tools/build/v2/test/MockToolset.py b/tools/build/test/MockToolset.py
index 741959e50..741959e50 100755
--- a/tools/build/v2/test/MockToolset.py
+++ b/tools/build/test/MockToolset.py
diff --git a/tools/build/v2/test/TestCmd.py b/tools/build/test/TestCmd.py
index 5993df7ff..5993df7ff 100644
--- a/tools/build/v2/test/TestCmd.py
+++ b/tools/build/test/TestCmd.py
diff --git a/tools/build/v2/test/abs_workdir.py b/tools/build/test/abs_workdir.py
index fa6aadc58..fa6aadc58 100644
--- a/tools/build/v2/test/abs_workdir.py
+++ b/tools/build/test/abs_workdir.py
diff --git a/tools/build/v2/test/absolute_sources.py b/tools/build/test/absolute_sources.py
index 64cd770e1..64cd770e1 100644
--- a/tools/build/v2/test/absolute_sources.py
+++ b/tools/build/test/absolute_sources.py
diff --git a/tools/build/v2/test/alias.py b/tools/build/test/alias.py
index 4ff4d74d5..4ff4d74d5 100644
--- a/tools/build/v2/test/alias.py
+++ b/tools/build/test/alias.py
diff --git a/tools/build/v2/test/alternatives.py b/tools/build/test/alternatives.py
index 645927304..645927304 100644
--- a/tools/build/v2/test/alternatives.py
+++ b/tools/build/test/alternatives.py
diff --git a/tools/build/v2/test/bad_dirname.py b/tools/build/test/bad_dirname.py
index 961a45a48..961a45a48 100644
--- a/tools/build/v2/test/bad_dirname.py
+++ b/tools/build/test/bad_dirname.py
diff --git a/tools/build/v2/test/boost-build.jam b/tools/build/test/boost-build.jam
index ad68a288e..668452daf 100644
--- a/tools/build/v2/test/boost-build.jam
+++ b/tools/build/test/boost-build.jam
@@ -11,4 +11,4 @@
BOOST_BUILD_PATH = $(BOOST_BUILD_PATH)/.. $(BOOST_BUILD_PATH) ;
# Find the boost build system in the ../kernel directory.
-boost-build ../kernel ;
+boost-build ../src/kernel ;
diff --git a/tools/build/v2/test/boostbook.py b/tools/build/test/boostbook.py
index 78eab87d0..78eab87d0 100644
--- a/tools/build/v2/test/boostbook.py
+++ b/tools/build/test/boostbook.py
diff --git a/tools/build/v2/test/boostbook/a.hpp b/tools/build/test/boostbook/a.hpp
index 5fab129a9..5fab129a9 100644
--- a/tools/build/v2/test/boostbook/a.hpp
+++ b/tools/build/test/boostbook/a.hpp
diff --git a/tools/build/v2/test/boostbook/docs.xml b/tools/build/test/boostbook/docs.xml
index c2d9b1f88..c2d9b1f88 100644
--- a/tools/build/v2/test/boostbook/docs.xml
+++ b/tools/build/test/boostbook/docs.xml
diff --git a/tools/build/v2/test/boostbook/jamroot.jam b/tools/build/test/boostbook/jamroot.jam
index 94564ca29..94564ca29 100644
--- a/tools/build/v2/test/boostbook/jamroot.jam
+++ b/tools/build/test/boostbook/jamroot.jam
diff --git a/tools/build/v2/test/build_dir.py b/tools/build/test/build_dir.py
index 50c2a906c..50c2a906c 100644
--- a/tools/build/v2/test/build_dir.py
+++ b/tools/build/test/build_dir.py
diff --git a/tools/build/v2/test/build_file.py b/tools/build/test/build_file.py
index d670af428..d670af428 100644
--- a/tools/build/v2/test/build_file.py
+++ b/tools/build/test/build_file.py
diff --git a/tools/build/v2/test/build_no.py b/tools/build/test/build_no.py
index 07b45804e..07b45804e 100644
--- a/tools/build/v2/test/build_no.py
+++ b/tools/build/test/build_no.py
diff --git a/tools/build/v2/test/builtin_echo.py b/tools/build/test/builtin_echo.py
index 309236173..309236173 100755
--- a/tools/build/v2/test/builtin_echo.py
+++ b/tools/build/test/builtin_echo.py
diff --git a/tools/build/v2/test/builtin_exit.py b/tools/build/test/builtin_exit.py
index 1db869366..1db869366 100755
--- a/tools/build/v2/test/builtin_exit.py
+++ b/tools/build/test/builtin_exit.py
diff --git a/tools/build/test/builtin_glob.py b/tools/build/test/builtin_glob.py
new file mode 100755
index 000000000..6f55a4d9c
--- /dev/null
+++ b/tools/build/test/builtin_glob.py
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# This tests the GLOB rule.
+
+import os
+import BoostBuild
+
+def test_glob(files, glob, expected, setup=""):
+ t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+ t.write("file.jam", setup + """
+ for local p in [ SORT %s ]
+ {
+ ECHO $(p) ;
+ }
+ UPDATE ;
+ """ % glob)
+ for f in files:
+ t.write(f, "")
+ # convert / into \ on windows
+ expected = [os.path.join(*p.split("/")) for p in expected]
+ expected.sort()
+ t.run_build_system(stdout="\n".join(expected + [""]))
+ t.cleanup()
+
+# one or both arguments empty
+test_glob([], "[ GLOB : ]", [])
+test_glob([], "[ GLOB . : ]", [])
+test_glob([], "[ GLOB : * ]", [])
+
+# a single result
+test_glob([], "[ GLOB . : * ]", ["./file.jam"])
+
+# * can match any number of characters
+test_glob([], "[ GLOB . : file*.jam ]", ["./file.jam"])
+test_glob([], "[ GLOB . : f*am ]", ["./file.jam"])
+# ? should match a single character, but not more than one
+test_glob([], "[ GLOB . : fi?e.?am ]", ["./file.jam"])
+test_glob([], "[ GLOB . : fi?.jam ]", [])
+# [abc-fh-j] matches a set of characters
+test_glob([], "[ GLOB . : [f][i][l][e].jam ]", ["./file.jam"])
+test_glob([], "[ GLOB . : [fghau][^usdrwe][k-o][^f-s].jam ]", ["./file.jam"])
+# \x matches x
+test_glob([], "[ GLOB . : \\f\\i\\l\\e.jam ]", ["./file.jam"])
+
+# multiple results
+test_glob(["test.txt"], "[ GLOB . : * ]", ["./file.jam", "./test.txt"])
+
+# directories
+test_glob(["dir1/dir2/test.txt"], "[ GLOB dir1 : * ]", ["dir1/dir2"]);
+
+# non-existent directory
+test_glob([], "[ GLOB dir1 : * ] ", [])
+
+# multiple directories and patterns
+test_glob(["dir1/file1.txt", "dir2/file1.txt",
+ "dir2/file2.txt"],
+ "[ GLOB dir1 dir2 : file1* file2* ]",
+ ["dir1/file1.txt", "dir2/file1.txt",
+ "dir2/file2.txt"])
+
+# The directory can contain . and ..
+test_glob(["dir/test.txt"], "[ GLOB dir/. : test.txt ]", ["dir/./test.txt"])
+test_glob(["dir/test.txt"], "[ GLOB dir/.. : file.jam ]", ["dir/../file.jam"])
+
+# On case insensitive filesystems, the result should
+# be normalized. It should NOT be downcased.
+test_glob(["TEST.TXT"], "[ GLOB . : TEST.TXT ]", ["./TEST.TXT"])
+
+case_insensitive = (os.path.normcase("FILE") == "file")
+
+if case_insensitive:
+ test_glob(["TEST.TXT"], "[ GLOB . : test.txt ]", ["./TEST.TXT"])
+ # This used to fail because the caching routines incorrectly
+ # reported that . and .. do not exist.
+ test_glob(["D1/D2/TEST.TXT"], "[ GLOB D1/./D2 : test.txt ]",
+ ["D1/./D2/TEST.TXT"])
+ test_glob(["D1/TEST.TXT", "TEST.TXT"], "[ GLOB D1/../D1 : test.txt ]",
+ ["D1/../D1/TEST.TXT"])
+ # This also failed because directories that were first found
+ # by GLOB were recorded as non-existent.
+ test_glob(["D1/D2/TEST.TXT"], "[ GLOB d1/d2 : test.txt ]",
+ ["D1/D2/TEST.TXT"],
+ "GLOB . : * ;")
diff --git a/tools/build/test/builtin_readlink.py b/tools/build/test/builtin_readlink.py
new file mode 100755
index 000000000..e57d7286a
--- /dev/null
+++ b/tools/build/test/builtin_readlink.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+import os
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("link-target", "")
+os.symlink("link-target", "link")
+
+t.write("file.jam", """
+ECHO [ READLINK link ] ;
+EXIT [ READLINK link-target ] : 0 ;
+""")
+
+t.run_build_system(["-ffile.jam"], stdout="""link-target
+
+""")
+
+t.cleanup()
diff --git a/tools/build/v2/test/builtin_split_by_characters.py b/tools/build/test/builtin_split_by_characters.py
index 4a0a0e061..4a0a0e061 100755
--- a/tools/build/v2/test/builtin_split_by_characters.py
+++ b/tools/build/test/builtin_split_by_characters.py
diff --git a/tools/build/v2/test/c_file.py b/tools/build/test/c_file.py
index 672fd4802..672fd4802 100644
--- a/tools/build/v2/test/c_file.py
+++ b/tools/build/test/c_file.py
diff --git a/tools/build/v2/test/chain.py b/tools/build/test/chain.py
index 4a39f520e..4a39f520e 100644
--- a/tools/build/v2/test/chain.py
+++ b/tools/build/test/chain.py
diff --git a/tools/build/v2/test/clean.py b/tools/build/test/clean.py
index b10644aac..b10644aac 100644
--- a/tools/build/v2/test/clean.py
+++ b/tools/build/test/clean.py
diff --git a/tools/build/v2/test/collect_debug_info.py b/tools/build/test/collect_debug_info.py
index b25c15cc3..b25c15cc3 100755
--- a/tools/build/v2/test/collect_debug_info.py
+++ b/tools/build/test/collect_debug_info.py
diff --git a/tools/build/v2/test/composite.py b/tools/build/test/composite.py
index 064c4087d..064c4087d 100644
--- a/tools/build/v2/test/composite.py
+++ b/tools/build/test/composite.py
diff --git a/tools/build/v2/test/conditionals.py b/tools/build/test/conditionals.py
index 7a9848b36..7a9848b36 100644
--- a/tools/build/v2/test/conditionals.py
+++ b/tools/build/test/conditionals.py
diff --git a/tools/build/v2/test/conditionals2.py b/tools/build/test/conditionals2.py
index 585e5ca77..585e5ca77 100644
--- a/tools/build/v2/test/conditionals2.py
+++ b/tools/build/test/conditionals2.py
diff --git a/tools/build/v2/test/conditionals3.py b/tools/build/test/conditionals3.py
index 028fad621..028fad621 100644
--- a/tools/build/v2/test/conditionals3.py
+++ b/tools/build/test/conditionals3.py
diff --git a/tools/build/v2/test/conditionals_multiple.py b/tools/build/test/conditionals_multiple.py
index 91b8f30d7..91b8f30d7 100755
--- a/tools/build/v2/test/conditionals_multiple.py
+++ b/tools/build/test/conditionals_multiple.py
diff --git a/tools/build/v2/test/configuration.py b/tools/build/test/configuration.py
index 724ecd7c9..724ecd7c9 100755
--- a/tools/build/v2/test/configuration.py
+++ b/tools/build/test/configuration.py
diff --git a/tools/build/v2/test/copy_time.py b/tools/build/test/copy_time.py
index 4bdaa88f7..4bdaa88f7 100755
--- a/tools/build/v2/test/copy_time.py
+++ b/tools/build/test/copy_time.py
diff --git a/tools/build/v2/test/core-language/test.jam b/tools/build/test/core-language/test.jam
index 4198dd720..4198dd720 100644
--- a/tools/build/v2/test/core-language/test.jam
+++ b/tools/build/test/core-language/test.jam
diff --git a/tools/build/v2/test/core_action_output.py b/tools/build/test/core_action_output.py
index b26f0e0bd..b26f0e0bd 100755
--- a/tools/build/v2/test/core_action_output.py
+++ b/tools/build/test/core_action_output.py
diff --git a/tools/build/v2/test/core_action_status.py b/tools/build/test/core_action_status.py
index 7ebd43869..7ebd43869 100755
--- a/tools/build/v2/test/core_action_status.py
+++ b/tools/build/test/core_action_status.py
diff --git a/tools/build/v2/test/core_actions_quietly.py b/tools/build/test/core_actions_quietly.py
index c020846d5..c020846d5 100755
--- a/tools/build/v2/test/core_actions_quietly.py
+++ b/tools/build/test/core_actions_quietly.py
diff --git a/tools/build/v2/test/core_arguments.py b/tools/build/test/core_arguments.py
index a6e886ff6..a6e886ff6 100755
--- a/tools/build/v2/test/core_arguments.py
+++ b/tools/build/test/core_arguments.py
diff --git a/tools/build/v2/test/core_at_file.py b/tools/build/test/core_at_file.py
index 1bcdcab55..1bcdcab55 100755
--- a/tools/build/v2/test/core_at_file.py
+++ b/tools/build/test/core_at_file.py
diff --git a/tools/build/v2/test/core_bindrule.py b/tools/build/test/core_bindrule.py
index 3a6916afa..3a6916afa 100755
--- a/tools/build/v2/test/core_bindrule.py
+++ b/tools/build/test/core_bindrule.py
diff --git a/tools/build/v2/test/core_d12.py b/tools/build/test/core_d12.py
index 5488973d2..5488973d2 100644
--- a/tools/build/v2/test/core_d12.py
+++ b/tools/build/test/core_d12.py
diff --git a/tools/build/v2/test/core_delete_module.py b/tools/build/test/core_delete_module.py
index d56ffe6e7..d56ffe6e7 100644
--- a/tools/build/v2/test/core_delete_module.py
+++ b/tools/build/test/core_delete_module.py
diff --git a/tools/build/v2/test/core_dependencies.py b/tools/build/test/core_dependencies.py
index 2b2ef368d..2b2ef368d 100644
--- a/tools/build/v2/test/core_dependencies.py
+++ b/tools/build/test/core_dependencies.py
diff --git a/tools/build/v2/test/core_import_module.py b/tools/build/test/core_import_module.py
index c5bbd3e63..c5bbd3e63 100644
--- a/tools/build/v2/test/core_import_module.py
+++ b/tools/build/test/core_import_module.py
diff --git a/tools/build/test/core_jamshell.py b/tools/build/test/core_jamshell.py
new file mode 100644
index 000000000..0344a5792
--- /dev/null
+++ b/tools/build/test/core_jamshell.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+import sys
+
+t = BoostBuild.Tester(pass_toolset=False, pass_d0=False)
+
+t.write("file.jam", """
+actions run {
+ $(ACTION)
+}
+
+# Raw commands only work on Windows
+if $(OS) = NT
+{
+ JAMSHELL on test-raw = % ;
+ JAMSHELL on test-raw-fail = % ;
+}
+ACTION on test-raw = "\"$(PYTHON)\" -V" ;
+run test-raw ;
+
+ACTION on test-raw-fail = missing-executable ;
+run test-raw-fail ;
+
+# On Windows, the command is stored in a temporary
+# file. On other systems it is passed directly.
+if $(OS) = NT
+{
+ JAMSHELL on test-py = $(PYTHON) ;
+}
+else
+{
+ JAMSHELL on test-py = $(PYTHON) -c ;
+}
+ACTION on test-py = "
+print \\\",\\\".join([str(x) for x in range(3)])
+" ;
+run test-py ;
+
+DEPENDS all : test-raw test-raw-fail test-py ;
+""")
+
+t.run_build_system(["-ffile.jam", "-d1", "-sPYTHON=" + sys.executable], status=1)
+t.expect_output_lines([
+ "...failed run test-raw-fail...",
+ "0,1,2",
+ "...failed updating 1 target...",
+ "...updated 2 targets..."])
+
+t.cleanup()
diff --git a/tools/build/v2/test/core_language.py b/tools/build/test/core_language.py
index 717e91ada..717e91ada 100755
--- a/tools/build/v2/test/core_language.py
+++ b/tools/build/test/core_language.py
diff --git a/tools/build/v2/test/core_modifiers.py b/tools/build/test/core_modifiers.py
index fb95cbfbd..fb95cbfbd 100644
--- a/tools/build/v2/test/core_modifiers.py
+++ b/tools/build/test/core_modifiers.py
diff --git a/tools/build/test/core_multifile_actions.py b/tools/build/test/core_multifile_actions.py
new file mode 100755
index 000000000..50bfe8339
--- /dev/null
+++ b/tools/build/test/core_multifile_actions.py
@@ -0,0 +1,202 @@
+#!/usr/bin/python
+
+# Copyright 2013 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Tests that actions that produce multiple targets are handled
+# correctly. The rules are as follows:
+#
+# - If any action that updates a target is run, then the target
+# is considered to be out-of-date and all of its updating actions
+# are run in order.
+# - A target is considered updated when all of its updating actions
+# have completed successfully.
+# - If any updating action for a target fails, then the remaining
+# actions are skipped and the target is marked as failed.
+#
+# Note that this is a more thorough test case for the same
+# problem that core_parallel_multifile_actions_N.py checks for.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0, pass_d0=False)
+
+t.write("file.jam", """
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 x2 ;
+update x2 x3 ;
+""")
+
+# Updating x1 should force x2 to update as well.
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1 x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# If x1 is up-to-date, we don't need to update x2,
+# even though x2 is missing.
+t.write("x1", "")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 1 target...
+""")
+
+# Building x3 should update x1 and x2, even though
+# x1 would be considered up-to-date, taken alone.
+t.run_build_system(["-ffile.jam", "x3"], stdout="""\
+...found 3 targets...
+...updating 2 targets...
+update x1
+updating x1 x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# Updating x2 should succeed, but x3 should be skipped
+t.rm("x1")
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+actions fail
+{
+ echo failed $(<)
+ exit 1
+}
+
+update x1 x2 ;
+fail x1 ;
+update x1 x3 ;
+update x2 ;
+update x3 ;
+""")
+
+t.run_build_system(["-ffile.jam", "x3"], status=1, stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1 x2
+fail x1
+failed x1
+
+ echo failed x1
+ exit 1
+
+...failed fail x1...
+update x2
+updating x2
+...failed updating 2 targets...
+...updated 1 target...
+""")
+
+# Make sure that dependencies of targets that are
+# updated as a result of a multifile action are
+# processed correctly.
+t.rm("x1")
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 ;
+update x2 ;
+DEPENDS x2 : x1 ;
+update x2 x3 ;
+""")
+t.run_build_system(["-ffile.jam", "x3"], stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1
+update x2
+updating x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# JAM_SEMAPHORE rules:
+#
+# - if two updating actions have targets that share a semaphore,
+# these actions cannot be run in parallel.
+#
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+targets = x1 x2 ;
+JAM_SEMAPHORE on $(targets) = <s>update_sem ;
+update x1 x2 ;
+""")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 2 targets...
+...updating 2 targets...
+update x1
+updating x1 x2
+...updated 2 targets...
+""")
+
+# A target can appear multiple times in an action
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 x1 ;
+""")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 1 target...
+...updating 1 target...
+update x1
+updating x1 x1
+...updated 1 target...
+""")
+
+# Together actions should check that all the targets are the same
+# before combining.
+t.write("file.jam", """\
+actions together update
+{
+ echo updating $(<) : $(>)
+}
+
+update x1 x2 : s1 ;
+update x1 x2 : s2 ;
+
+update x3 : s3 ;
+update x3 x4 : s4 ;
+update x4 x3 : s5 ;
+DEPENDS all : x1 x2 x3 x4 ;
+""")
+t.run_build_system(["-ffile.jam"], stdout="""\
+...found 5 targets...
+...updating 4 targets...
+update x1
+updating x1 x2 : s1 s2
+update x3
+updating x3 : s3
+update x3
+updating x3 x4 : s4
+update x4
+updating x4 x3 : s5
+...updated 4 targets...
+""")
+
+
+
+t.cleanup()
diff --git a/tools/build/v2/test/core_nt_cmd_line.py b/tools/build/test/core_nt_cmd_line.py
index 579242d24..579242d24 100755
--- a/tools/build/v2/test/core_nt_cmd_line.py
+++ b/tools/build/test/core_nt_cmd_line.py
diff --git a/tools/build/v2/test/core_option_d2.py b/tools/build/test/core_option_d2.py
index bf809aa85..bf809aa85 100755
--- a/tools/build/v2/test/core_option_d2.py
+++ b/tools/build/test/core_option_d2.py
diff --git a/tools/build/v2/test/core_option_l.py b/tools/build/test/core_option_l.py
index e237dcf63..e237dcf63 100755
--- a/tools/build/v2/test/core_option_l.py
+++ b/tools/build/test/core_option_l.py
diff --git a/tools/build/v2/test/core_option_n.py b/tools/build/test/core_option_n.py
index 4dab3bf99..4dab3bf99 100755
--- a/tools/build/v2/test/core_option_n.py
+++ b/tools/build/test/core_option_n.py
diff --git a/tools/build/v2/test/core_parallel_actions.py b/tools/build/test/core_parallel_actions.py
index 0d44149b7..0d44149b7 100755
--- a/tools/build/v2/test/core_parallel_actions.py
+++ b/tools/build/test/core_parallel_actions.py
diff --git a/tools/build/v2/test/core_parallel_multifile_actions_1.py b/tools/build/test/core_parallel_multifile_actions_1.py
index 8d9448e0c..8d9448e0c 100755
--- a/tools/build/v2/test/core_parallel_multifile_actions_1.py
+++ b/tools/build/test/core_parallel_multifile_actions_1.py
diff --git a/tools/build/v2/test/core_parallel_multifile_actions_2.py b/tools/build/test/core_parallel_multifile_actions_2.py
index ea4034af0..ea4034af0 100755
--- a/tools/build/v2/test/core_parallel_multifile_actions_2.py
+++ b/tools/build/test/core_parallel_multifile_actions_2.py
diff --git a/tools/build/v2/test/core_source_line_tracking.py b/tools/build/test/core_source_line_tracking.py
index 61526a2c5..61526a2c5 100755
--- a/tools/build/v2/test/core_source_line_tracking.py
+++ b/tools/build/test/core_source_line_tracking.py
diff --git a/tools/build/v2/test/core_typecheck.py b/tools/build/test/core_typecheck.py
index 225ea7a4b..225ea7a4b 100644
--- a/tools/build/v2/test/core_typecheck.py
+++ b/tools/build/test/core_typecheck.py
diff --git a/tools/build/v2/test/core_update_now.py b/tools/build/test/core_update_now.py
index 819309a73..819309a73 100755
--- a/tools/build/v2/test/core_update_now.py
+++ b/tools/build/test/core_update_now.py
diff --git a/tools/build/v2/test/core_variables_in_actions.py b/tools/build/test/core_variables_in_actions.py
index e3a7177e2..e3a7177e2 100755
--- a/tools/build/v2/test/core_variables_in_actions.py
+++ b/tools/build/test/core_variables_in_actions.py
diff --git a/tools/build/v2/test/core_varnames.py b/tools/build/test/core_varnames.py
index 6b61ffcd3..6b61ffcd3 100644
--- a/tools/build/v2/test/core_varnames.py
+++ b/tools/build/test/core_varnames.py
diff --git a/tools/build/v2/test/custom_generator.py b/tools/build/test/custom_generator.py
index 9a1188a03..9a1188a03 100644
--- a/tools/build/v2/test/custom_generator.py
+++ b/tools/build/test/custom_generator.py
diff --git a/tools/build/v2/test/default_build.py b/tools/build/test/default_build.py
index 6ad696ef0..6ad696ef0 100644
--- a/tools/build/v2/test/default_build.py
+++ b/tools/build/test/default_build.py
diff --git a/tools/build/v2/test/default_features.py b/tools/build/test/default_features.py
index 0d285a3f9..0d285a3f9 100644
--- a/tools/build/v2/test/default_features.py
+++ b/tools/build/test/default_features.py
diff --git a/tools/build/v2/test/default_toolset.py b/tools/build/test/default_toolset.py
index 682e7fcc1..682e7fcc1 100755
--- a/tools/build/v2/test/default_toolset.py
+++ b/tools/build/test/default_toolset.py
diff --git a/tools/build/v2/test/dependency_property.py b/tools/build/test/dependency_property.py
index e5c78b60a..e5c78b60a 100644
--- a/tools/build/v2/test/dependency_property.py
+++ b/tools/build/test/dependency_property.py
diff --git a/tools/build/v2/test/dependency_test.py b/tools/build/test/dependency_test.py
index d53ce69a7..d53ce69a7 100644
--- a/tools/build/v2/test/dependency_test.py
+++ b/tools/build/test/dependency_test.py
diff --git a/tools/build/v2/test/direct_request_test.py b/tools/build/test/direct_request_test.py
index 49a083202..49a083202 100644
--- a/tools/build/v2/test/direct_request_test.py
+++ b/tools/build/test/direct_request_test.py
diff --git a/tools/build/v2/test/disambiguation.py b/tools/build/test/disambiguation.py
index 72867e0a1..72867e0a1 100644
--- a/tools/build/v2/test/disambiguation.py
+++ b/tools/build/test/disambiguation.py
diff --git a/tools/build/v2/test/dll_path.py b/tools/build/test/dll_path.py
index 60acf6a49..60acf6a49 100644
--- a/tools/build/v2/test/dll_path.py
+++ b/tools/build/test/dll_path.py
diff --git a/tools/build/v2/test/double_loading.py b/tools/build/test/double_loading.py
index c708b00f7..c708b00f7 100644
--- a/tools/build/v2/test/double_loading.py
+++ b/tools/build/test/double_loading.py
diff --git a/tools/build/v2/test/duplicate.py b/tools/build/test/duplicate.py
index 1d0d5f7f2..1d0d5f7f2 100644
--- a/tools/build/v2/test/duplicate.py
+++ b/tools/build/test/duplicate.py
diff --git a/tools/build/v2/test/example_customization.py b/tools/build/test/example_customization.py
index f8fe15cc2..f8fe15cc2 100644
--- a/tools/build/v2/test/example_customization.py
+++ b/tools/build/test/example_customization.py
diff --git a/tools/build/v2/test/example_gettext.py b/tools/build/test/example_gettext.py
index e7cfa8eb7..e7cfa8eb7 100644
--- a/tools/build/v2/test/example_gettext.py
+++ b/tools/build/test/example_gettext.py
diff --git a/tools/build/v2/test/example_libraries.py b/tools/build/test/example_libraries.py
index 3097bd952..3097bd952 100644
--- a/tools/build/v2/test/example_libraries.py
+++ b/tools/build/test/example_libraries.py
diff --git a/tools/build/v2/test/example_make.py b/tools/build/test/example_make.py
index 270541829..270541829 100644
--- a/tools/build/v2/test/example_make.py
+++ b/tools/build/test/example_make.py
diff --git a/tools/build/v2/test/example_qt4.py b/tools/build/test/example_qt4.py
index 1b0dc27bd..1b0dc27bd 100644
--- a/tools/build/v2/test/example_qt4.py
+++ b/tools/build/test/example_qt4.py
diff --git a/tools/build/v2/test/exit_status.py b/tools/build/test/exit_status.py
index 11c4abf76..11c4abf76 100755
--- a/tools/build/v2/test/exit_status.py
+++ b/tools/build/test/exit_status.py
diff --git a/tools/build/v2/test/expansion.py b/tools/build/test/expansion.py
index f49cbd833..f49cbd833 100644
--- a/tools/build/v2/test/expansion.py
+++ b/tools/build/test/expansion.py
diff --git a/tools/build/v2/test/explicit.py b/tools/build/test/explicit.py
index 387f3646c..387f3646c 100644
--- a/tools/build/v2/test/explicit.py
+++ b/tools/build/test/explicit.py
diff --git a/tools/build/test/feature_cxxflags.py b/tools/build/test/feature_cxxflags.py
new file mode 100755
index 000000000..76e8b20d7
--- /dev/null
+++ b/tools/build/test/feature_cxxflags.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Tests the cxxflags feature
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# cxxflags should be applied to C++ compilation,
+# but not to C.
+t.write("Jamroot.jam", """
+obj test-cpp : test.cpp : <cxxflags>-DOKAY ;
+obj test-c : test.c : <cxxflags>-DBAD ;
+""")
+
+t.write("test.cpp", """
+#ifndef OKAY
+#error Cannot compile without OKAY
+#endif
+""")
+
+t.write("test.c", """
+#ifdef BAD
+#error Cannot compile with BAD
+#endif
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug/test-cpp.obj")
+t.expect_addition("bin/$toolset/debug/test-c.obj")
+
+t.cleanup()
diff --git a/tools/build/v2/test/free_features_request.py b/tools/build/test/free_features_request.py
index e7949d145..e7949d145 100644
--- a/tools/build/v2/test/free_features_request.py
+++ b/tools/build/test/free_features_request.py
diff --git a/tools/build/v2/test/gcc_runtime.py b/tools/build/test/gcc_runtime.py
index bc56eae9f..bc56eae9f 100644
--- a/tools/build/v2/test/gcc_runtime.py
+++ b/tools/build/test/gcc_runtime.py
diff --git a/tools/build/v2/test/generator_selection.py b/tools/build/test/generator_selection.py
index 87f0df33a..87f0df33a 100755
--- a/tools/build/v2/test/generator_selection.py
+++ b/tools/build/test/generator_selection.py
diff --git a/tools/build/v2/test/generators_test.py b/tools/build/test/generators_test.py
index 755a391c3..755a391c3 100644
--- a/tools/build/v2/test/generators_test.py
+++ b/tools/build/test/generators_test.py
diff --git a/tools/build/v2/test/implicit_dependency.py b/tools/build/test/implicit_dependency.py
index d6392c93a..d6392c93a 100644
--- a/tools/build/v2/test/implicit_dependency.py
+++ b/tools/build/test/implicit_dependency.py
diff --git a/tools/build/v2/test/indirect_conditional.py b/tools/build/test/indirect_conditional.py
index b466910b3..b466910b3 100644
--- a/tools/build/v2/test/indirect_conditional.py
+++ b/tools/build/test/indirect_conditional.py
diff --git a/tools/build/v2/test/inherit_toolset.py b/tools/build/test/inherit_toolset.py
index af1878003..af1878003 100644
--- a/tools/build/v2/test/inherit_toolset.py
+++ b/tools/build/test/inherit_toolset.py
diff --git a/tools/build/v2/test/inherited_dependency.py b/tools/build/test/inherited_dependency.py
index 69eefeb8d..69eefeb8d 100755
--- a/tools/build/v2/test/inherited_dependency.py
+++ b/tools/build/test/inherited_dependency.py
diff --git a/tools/build/v2/test/inline.py b/tools/build/test/inline.py
index f076fde6f..f076fde6f 100644
--- a/tools/build/v2/test/inline.py
+++ b/tools/build/test/inline.py
diff --git a/tools/build/v2/test/lib_source_property.py b/tools/build/test/lib_source_property.py
index 826729398..826729398 100644
--- a/tools/build/v2/test/lib_source_property.py
+++ b/tools/build/test/lib_source_property.py
diff --git a/tools/build/test/libjpeg.py b/tools/build/test/libjpeg.py
new file mode 100755
index 000000000..dcf81c9b0
--- /dev/null
+++ b/tools/build/test/libjpeg.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libjpeg/jpeg.h", 'libjpeg')
+t.write("libjpeg/jpeg.c", 'jpeg')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <source>$(here)/libjpeg ;
+alias libjpeg : /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('jpeg.c', 'jpeg')
+action('-c -x c -I./libjpeg -o $jpeg.o $jpeg.c')
+action('--dll $jpeg.o -o $jpeg.so')
+action('--archive $jpeg.o -o $jpeg.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libjpeg/mock/debug/jpeg.dll')
+t.expect_addition('bin/standalone/libjpeg/mock/debug/link-static/jpeg.lib')
+
+t.rm('libjpeg')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('jpeg.h.cpp', '#include <jpeg.h>')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=jpeg -o $config.exe')
+action('-c -x c++ $jpeg.h.cpp -o $jpeg.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=jpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=jpeg -o $config.exe')
+action('-c -x c++ $jpeg.h.cpp -o $jpeg.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=jpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <name>mylibjpeg <include>$(here)/libjpeg <search>$(here)/libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+t.write('libjpeg/jpeg.h', 'libjpeg')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libjpeg --static-lib=mylibjpeg -o $config.exe')
+action('-c -x c++ $test.cpp -I./libjpeg -o $test.o')
+action('$test.o -L./libjpeg --static-lib=mylibjpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <name>mylibjpeg <include>$(here)/libjpeg <search>$(here)/libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libjpeg --shared-lib=mylibjpeg -o $config.exe')
+action('-c -x c++ $test.cpp -I./libjpeg -o $test.o')
+action('$test.o -L./libjpeg --shared-lib=mylibjpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/tools/build/test/libpng.py b/tools/build/test/libpng.py
new file mode 100755
index 000000000..3e7e5cd2d
--- /dev/null
+++ b/tools/build/test/libpng.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libpng/png.h", 'libpng')
+t.write("libpng/png.c", 'png')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <source>$(here)/libpng ;
+alias libpng : /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('png.c', 'png')
+action('-c -x c -I./libpng -o $png.o $png.c')
+action('--dll $png.o -o $png.so')
+action('--archive $png.o -o $png.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libpng/mock/debug/png.dll')
+t.expect_addition('bin/standalone/libpng/mock/debug/link-static/png.lib')
+
+t.rm('libpng')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('png.h.cpp', '#include <png.h>')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=png -o $config.exe')
+action('-c -x c++ $png.h.cpp -o $png.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=png -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=png -o $config.exe')
+action('-c -x c++ $png.h.cpp -o $png.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=png -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <name>mylibpng <include>$(here)/libpng <search>$(here)/libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+t.write('libpng/png.h', 'libpng')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libpng --static-lib=mylibpng -o $config.exe')
+action('-c -x c++ $test.cpp -I./libpng -o $test.o')
+action('$test.o -L./libpng --static-lib=mylibpng -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <name>mylibpng <include>$(here)/libpng <search>$(here)/libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libpng --shared-lib=mylibpng -o $config.exe')
+action('-c -x c++ $test.cpp -I./libpng -o $test.o')
+action('$test.o -L./libpng --shared-lib=mylibpng -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/tools/build/v2/test/library_chain.py b/tools/build/test/library_chain.py
index e7c3dcd92..e7c3dcd92 100644
--- a/tools/build/v2/test/library_chain.py
+++ b/tools/build/test/library_chain.py
diff --git a/tools/build/v2/test/library_order.py b/tools/build/test/library_order.py
index 188f533ab..188f533ab 100644
--- a/tools/build/v2/test/library_order.py
+++ b/tools/build/test/library_order.py
diff --git a/tools/build/v2/test/library_property.py b/tools/build/test/library_property.py
index b7c24c83b..b7c24c83b 100644
--- a/tools/build/v2/test/library_property.py
+++ b/tools/build/test/library_property.py
diff --git a/tools/build/test/libtiff.py b/tools/build/test/libtiff.py
new file mode 100755
index 000000000..cb0d07b0f
--- /dev/null
+++ b/tools/build/test/libtiff.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libtiff/tiff.h", 'libtiff')
+t.write("libtiff/tiff.c", 'tiff')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <source>$(here)/libtiff ;
+alias libtiff : /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('tiff.c', 'tiff')
+action('-c -x c -I./libtiff -o $tiff.o $tiff.c')
+action('--dll $tiff.o -o $tiff.so')
+action('--archive $tiff.o -o $tiff.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libtiff/mock/debug/tiff.dll')
+t.expect_addition('bin/standalone/libtiff/mock/debug/link-static/tiff.lib')
+
+t.rm('libtiff')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('tiff.h.cpp', '#include <tiff.h>')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=tiff -o $config.exe')
+action('-c -x c++ $tiff.h.cpp -o $tiff.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=tiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=tiff -o $config.exe')
+action('-c -x c++ $tiff.h.cpp -o $tiff.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=tiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <name>mylibtiff <include>$(here)/libtiff <search>$(here)/libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+t.write('libtiff/tiff.h', 'libtiff')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libtiff --static-lib=mylibtiff -o $config.exe')
+action('-c -x c++ $test.cpp -I./libtiff -o $test.o')
+action('$test.o -L./libtiff --static-lib=mylibtiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <name>mylibtiff <include>$(here)/libtiff <search>$(here)/libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libtiff --shared-lib=mylibtiff -o $config.exe')
+action('-c -x c++ $test.cpp -I./libtiff -o $test.o')
+action('$test.o -L./libtiff --shared-lib=mylibtiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/tools/build/test/link.py b/tools/build/test/link.py
new file mode 100755
index 000000000..0d63615b7
--- /dev/null
+++ b/tools/build/test/link.py
@@ -0,0 +1,154 @@
+#!/usr/bin/python
+
+# Copyright 2004 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Tests the link-directory rule used to create the
+# common boost/ directory in the new git layout.
+
+import BoostBuild
+
+def ignore_config(t):
+ """These files are created by the configuration logic in link.jam
+ They may or may not exist, depending on the system."""
+ t.ignore("bin/symlink/test-hardlink")
+ t.ignore("bin/test-hardlink-source")
+ t.ignore("bin/test-symlink")
+ t.ignore("bin/test-symlink-source")
+
+def test_basic():
+ """Test creation of a single link"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ ignore_config(t)
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_merge_two():
+ """Test merging two directories"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ ignore_config(t)
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_merge_existing():
+ """Test adding a link when a different symlink already exists"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+
+ t.run_build_system(["dir1-link"])
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.run_build_system(["dir2-link"])
+
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ # If include is a symlink to src/dir1/include, then
+ # we have to delete it and add a directory.
+ t.ignore_removal("include/file1.h")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_merge_recursive():
+ "Test merging several directories including common prefixes"
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ link-directory dir3-link : src/dir3/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+ t.write("src/dir2/include/nested/file3.h", "file3")
+ t.write("src/dir3/include/nested/file4.h", "file4")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ t.expect_addition("include/nested/file3.h")
+ t.expect_content("include/nested/file3.h", "file3")
+ t.expect_addition("include/nested/file4.h")
+ t.expect_content("include/nested/file4.h", "file4")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_include_scan():
+ """Make sure that the #include scanner finds the headers"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ obj test : test.cpp :
+ <include>include
+ <implicit-dependency>dir1-link
+ <implicit-dependency>dir2-link ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "#include <file2.h>\n")
+ t.write("src/dir2/include/file2.h", "int f();\n")
+ t.write("test.cpp", """\
+ #include <file1.h>
+ int main() { f(); }
+ """);
+
+ t.run_build_system(["test"])
+
+ t.expect_addition("bin/$toolset/debug/test.obj")
+
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+test_basic()
+test_merge_two()
+test_merge_existing()
+test_merge_recursive()
+test_include_scan()
diff --git a/tools/build/v2/test/load_dir.py b/tools/build/test/load_dir.py
index 09a59f951..09a59f951 100644
--- a/tools/build/v2/test/load_dir.py
+++ b/tools/build/test/load_dir.py
diff --git a/tools/build/v2/test/load_order.py b/tools/build/test/load_order.py
index c35ca8da3..c35ca8da3 100644
--- a/tools/build/v2/test/load_order.py
+++ b/tools/build/test/load_order.py
diff --git a/tools/build/v2/test/loop.py b/tools/build/test/loop.py
index 30b069001..30b069001 100644
--- a/tools/build/v2/test/loop.py
+++ b/tools/build/test/loop.py
diff --git a/tools/build/v2/test/make_rule.py b/tools/build/test/make_rule.py
index f13bdb4cd..f13bdb4cd 100644
--- a/tools/build/v2/test/make_rule.py
+++ b/tools/build/test/make_rule.py
diff --git a/tools/build/v2/test/message.py b/tools/build/test/message.py
index f0f0d3152..f0f0d3152 100755
--- a/tools/build/v2/test/message.py
+++ b/tools/build/test/message.py
diff --git a/tools/build/v2/test/module_actions.py b/tools/build/test/module_actions.py
index 33c563526..33c563526 100644
--- a/tools/build/v2/test/module_actions.py
+++ b/tools/build/test/module_actions.py
diff --git a/tools/build/v2/test/ndebug.py b/tools/build/test/ndebug.py
index 87fbc6c6d..87fbc6c6d 100644
--- a/tools/build/v2/test/ndebug.py
+++ b/tools/build/test/ndebug.py
diff --git a/tools/build/v2/test/no_type.py b/tools/build/test/no_type.py
index 0384ec604..0384ec604 100644
--- a/tools/build/v2/test/no_type.py
+++ b/tools/build/test/no_type.py
diff --git a/tools/build/v2/test/notfile.py b/tools/build/test/notfile.py
index 10205f6ad..10205f6ad 100644
--- a/tools/build/v2/test/notfile.py
+++ b/tools/build/test/notfile.py
diff --git a/tools/build/test/ordered_include.py b/tools/build/test/ordered_include.py
new file mode 100644
index 000000000..2ce955c0d
--- /dev/null
+++ b/tools/build/test/ordered_include.py
@@ -0,0 +1,173 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt) or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import BoostBuild
+
+def test_basic():
+ tester = BoostBuild.Tester(use_test_config=False)
+ tester.write("jamroot.jam", """
+ obj test : test.cpp : <include>a&&b ;
+ """)
+
+ tester.write("test.cpp", """
+ #include <test1.hpp>
+ #include <test2.hpp>
+ int main() {}
+ """)
+
+ tester.write("a/test1.hpp", """
+ """)
+
+ tester.write("b/test2.hpp", """
+ """)
+
+ tester.run_build_system()
+
+ tester.expect_addition("bin/$toolset/debug/test.obj")
+
+ # Check that the dependencies are correct
+ tester.touch("a/test1.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug/test.obj")
+
+ tester.touch("b/test2.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug/test.obj")
+
+ tester.cleanup()
+
+def test_order1():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp : <include>a&&b ;
+ """)
+ t.write("test.cpp", """
+ #include <test.h>
+ int main() {}
+ """)
+ t.write("a/test.h", """
+ """)
+ t.write("b/test.h", """
+ #error should find a/test.h
+ """)
+ t.run_build_system()
+
+ t.touch("a/test.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_order2():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp : <include>b&&a ;
+ """)
+ t.write("test.cpp", """
+ #include <test.h>
+ int main() {}
+ """)
+ t.write("a/test.h", """
+ #error should find b/test.h
+ """)
+ t.write("b/test.h", """
+ """)
+ t.run_build_system()
+
+ t.touch("a/test.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("b/test.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_order_graph():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp :
+ <include>b&&a
+ <include>c&&b
+ <include>a
+ <include>c
+ <include>b
+ <include>e&&b&&d
+ ;
+ """)
+ t.write("test.cpp", """
+ #include <test1.h>
+ #include <test2.h>
+ #include <test3.h>
+ #include <test4.h>
+ int main() {}
+ """)
+ t.write("b/test1.h", "")
+ t.write("a/test1.h", "#error should find b/test1.h\n")
+
+ t.write("c/test2.h", "")
+ t.write("b/test2.h", "#error should find c/test2.h\n")
+
+ t.write("e/test3.h", "")
+ t.write("b/test3.h", "#error should find e/test3.h\n")
+
+ t.write("b/test4.h", "")
+ t.write("d/test4.h", "#error should find b/test4.h\n")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug/test.obj")
+
+ t.touch("b/test1.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("a/test1.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("c/test2.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test2.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("e/test3.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test3.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("b/test4.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("d/test4.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+test_basic()
+test_order1()
+test_order2()
+test_order_graph()
diff --git a/tools/build/v2/test/ordered_properties.py b/tools/build/test/ordered_properties.py
index 58ea5a9f1..58ea5a9f1 100644
--- a/tools/build/v2/test/ordered_properties.py
+++ b/tools/build/test/ordered_properties.py
diff --git a/tools/build/v2/test/out_of_tree.py b/tools/build/test/out_of_tree.py
index b65529151..b65529151 100644
--- a/tools/build/v2/test/out_of_tree.py
+++ b/tools/build/test/out_of_tree.py
diff --git a/tools/build/v2/test/path_features.py b/tools/build/test/path_features.py
index 774c16196..774c16196 100644
--- a/tools/build/v2/test/path_features.py
+++ b/tools/build/test/path_features.py
diff --git a/tools/build/v2/test/pch.py b/tools/build/test/pch.py
index d36260a55..d36260a55 100644
--- a/tools/build/v2/test/pch.py
+++ b/tools/build/test/pch.py
diff --git a/tools/build/v2/test/prebuilt.py b/tools/build/test/prebuilt.py
index 5fe46f465..5fe46f465 100644
--- a/tools/build/v2/test/prebuilt.py
+++ b/tools/build/test/prebuilt.py
diff --git a/tools/build/v2/test/prebuilt/ext/a.cpp b/tools/build/test/prebuilt/ext/a.cpp
index c49a04153..c49a04153 100644
--- a/tools/build/v2/test/prebuilt/ext/a.cpp
+++ b/tools/build/test/prebuilt/ext/a.cpp
diff --git a/tools/build/v2/test/prebuilt/ext/debug/a.h b/tools/build/test/prebuilt/ext/debug/a.h
index 31b318226..31b318226 100644
--- a/tools/build/v2/test/prebuilt/ext/debug/a.h
+++ b/tools/build/test/prebuilt/ext/debug/a.h
diff --git a/tools/build/v2/test/prebuilt/ext/jamfile.jam b/tools/build/test/prebuilt/ext/jamfile.jam
index e563f0d74..e563f0d74 100644
--- a/tools/build/v2/test/prebuilt/ext/jamfile.jam
+++ b/tools/build/test/prebuilt/ext/jamfile.jam
diff --git a/tools/build/v2/test/prebuilt/ext/jamfile2.jam b/tools/build/test/prebuilt/ext/jamfile2.jam
index cd59663d6..a38bfa765 100644
--- a/tools/build/v2/test/prebuilt/ext/jamfile2.jam
+++ b/tools/build/test/prebuilt/ext/jamfile2.jam
@@ -18,7 +18,7 @@ else
{
prefix = "lib" ;
}
-if [ MATCH ^(darwin) : $toolset ]
+if [ MATCH ^(clang-)?(darwin) : $toolset ]
{
dll-suffix = dylib ;
}
diff --git a/tools/build/v2/test/prebuilt/ext/jamfile3.jam b/tools/build/test/prebuilt/ext/jamfile3.jam
index a373a5fb2..1731f1743 100644
--- a/tools/build/v2/test/prebuilt/ext/jamfile3.jam
+++ b/tools/build/test/prebuilt/ext/jamfile3.jam
@@ -22,7 +22,7 @@ else
{
prefix = "lib" ;
}
-if [ MATCH ^(darwin) : $toolset ]
+if [ MATCH ^(clang-)?(darwin) : $toolset ]
{
dll-suffix = dylib ;
}
diff --git a/tools/build/v2/test/prebuilt/ext/jamroot.jam b/tools/build/test/prebuilt/ext/jamroot.jam
index c7617d5d3..c7617d5d3 100644
--- a/tools/build/v2/test/prebuilt/ext/jamroot.jam
+++ b/tools/build/test/prebuilt/ext/jamroot.jam
diff --git a/tools/build/v2/test/prebuilt/ext/release/a.h b/tools/build/test/prebuilt/ext/release/a.h
index 9ab71d88c..9ab71d88c 100644
--- a/tools/build/v2/test/prebuilt/ext/release/a.h
+++ b/tools/build/test/prebuilt/ext/release/a.h
diff --git a/tools/build/v2/test/prebuilt/hello.cpp b/tools/build/test/prebuilt/hello.cpp
index 4c1ab7036..4c1ab7036 100644
--- a/tools/build/v2/test/prebuilt/hello.cpp
+++ b/tools/build/test/prebuilt/hello.cpp
diff --git a/tools/build/v2/test/prebuilt/jamfile.jam b/tools/build/test/prebuilt/jamfile.jam
index 18b731ae1..18b731ae1 100644
--- a/tools/build/v2/test/prebuilt/jamfile.jam
+++ b/tools/build/test/prebuilt/jamfile.jam
diff --git a/tools/build/v2/test/prebuilt/jamroot.jam b/tools/build/test/prebuilt/jamroot.jam
index f022c0d64..f022c0d64 100644
--- a/tools/build/v2/test/prebuilt/jamroot.jam
+++ b/tools/build/test/prebuilt/jamroot.jam
diff --git a/tools/build/v2/test/preprocessor.py b/tools/build/test/preprocessor.py
index 9faa711b7..9faa711b7 100755
--- a/tools/build/v2/test/preprocessor.py
+++ b/tools/build/test/preprocessor.py
diff --git a/tools/build/v2/test/print.py b/tools/build/test/print.py
index 65caf95e1..65caf95e1 100644
--- a/tools/build/v2/test/print.py
+++ b/tools/build/test/print.py
diff --git a/tools/build/v2/test/project-test3/a.cpp b/tools/build/test/project-test3/a.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/a.cpp
+++ b/tools/build/test/project-test3/a.cpp
diff --git a/tools/build/v2/test/project-test3/jamfile.jam b/tools/build/test/project-test3/jamfile.jam
index f07960770..f07960770 100644
--- a/tools/build/v2/test/project-test3/jamfile.jam
+++ b/tools/build/test/project-test3/jamfile.jam
diff --git a/tools/build/v2/test/project-test3/jamroot.jam b/tools/build/test/project-test3/jamroot.jam
index 8de43be51..8de43be51 100644
--- a/tools/build/v2/test/project-test3/jamroot.jam
+++ b/tools/build/test/project-test3/jamroot.jam
diff --git a/tools/build/v2/test/project-test3/lib/b.cpp b/tools/build/test/project-test3/lib/b.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/lib/b.cpp
+++ b/tools/build/test/project-test3/lib/b.cpp
diff --git a/tools/build/v2/test/project-test3/lib/jamfile.jam b/tools/build/test/project-test3/lib/jamfile.jam
index 76b0829a9..76b0829a9 100644
--- a/tools/build/v2/test/project-test3/lib/jamfile.jam
+++ b/tools/build/test/project-test3/lib/jamfile.jam
diff --git a/tools/build/v2/test/project-test3/lib2/c.cpp b/tools/build/test/project-test3/lib2/c.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/lib2/c.cpp
+++ b/tools/build/test/project-test3/lib2/c.cpp
diff --git a/tools/build/v2/test/project-test3/lib2/d.cpp b/tools/build/test/project-test3/lib2/d.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/lib2/d.cpp
+++ b/tools/build/test/project-test3/lib2/d.cpp
diff --git a/tools/build/v2/test/project-test3/lib2/helper/e.cpp b/tools/build/test/project-test3/lib2/helper/e.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/lib2/helper/e.cpp
+++ b/tools/build/test/project-test3/lib2/helper/e.cpp
diff --git a/tools/build/v2/test/project-test3/lib2/helper/jamfile.jam b/tools/build/test/project-test3/lib2/helper/jamfile.jam
index 0c82f9248..0c82f9248 100644
--- a/tools/build/v2/test/project-test3/lib2/helper/jamfile.jam
+++ b/tools/build/test/project-test3/lib2/helper/jamfile.jam
diff --git a/tools/build/v2/test/project-test3/lib2/jamfile.jam b/tools/build/test/project-test3/lib2/jamfile.jam
index b6b0abc44..b6b0abc44 100644
--- a/tools/build/v2/test/project-test3/lib2/jamfile.jam
+++ b/tools/build/test/project-test3/lib2/jamfile.jam
diff --git a/tools/build/v2/test/project-test3/lib3/f.cpp b/tools/build/test/project-test3/lib3/f.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test3/lib3/f.cpp
+++ b/tools/build/test/project-test3/lib3/f.cpp
diff --git a/tools/build/v2/test/project-test3/lib3/jamfile.jam b/tools/build/test/project-test3/lib3/jamfile.jam
index 0d457817e..0d457817e 100644
--- a/tools/build/v2/test/project-test3/lib3/jamfile.jam
+++ b/tools/build/test/project-test3/lib3/jamfile.jam
diff --git a/tools/build/v2/test/project-test3/lib3/jamroot.jam b/tools/build/test/project-test3/lib3/jamroot.jam
index 971f03096..971f03096 100644
--- a/tools/build/v2/test/project-test3/lib3/jamroot.jam
+++ b/tools/build/test/project-test3/lib3/jamroot.jam
diff --git a/tools/build/v2/test/project-test3/readme.txt b/tools/build/test/project-test3/readme.txt
index da27e54b2..da27e54b2 100644
--- a/tools/build/v2/test/project-test3/readme.txt
+++ b/tools/build/test/project-test3/readme.txt
diff --git a/tools/build/v2/test/project-test4/a.cpp b/tools/build/test/project-test4/a.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test4/a.cpp
+++ b/tools/build/test/project-test4/a.cpp
diff --git a/tools/build/v2/test/project-test4/a_gcc.cpp b/tools/build/test/project-test4/a_gcc.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test4/a_gcc.cpp
+++ b/tools/build/test/project-test4/a_gcc.cpp
diff --git a/tools/build/v2/test/project-test4/jamfile.jam b/tools/build/test/project-test4/jamfile.jam
index a34d5f2db..a34d5f2db 100644
--- a/tools/build/v2/test/project-test4/jamfile.jam
+++ b/tools/build/test/project-test4/jamfile.jam
diff --git a/tools/build/v2/test/project-test4/jamfile3.jam b/tools/build/test/project-test4/jamfile3.jam
index 9770362d7..9770362d7 100644
--- a/tools/build/v2/test/project-test4/jamfile3.jam
+++ b/tools/build/test/project-test4/jamfile3.jam
diff --git a/tools/build/v2/test/project-test4/jamfile4.jam b/tools/build/test/project-test4/jamfile4.jam
index e3257801a..e3257801a 100644
--- a/tools/build/v2/test/project-test4/jamfile4.jam
+++ b/tools/build/test/project-test4/jamfile4.jam
diff --git a/tools/build/v2/test/project-test4/jamfile5.jam b/tools/build/test/project-test4/jamfile5.jam
index 1010be5e4..1010be5e4 100644
--- a/tools/build/v2/test/project-test4/jamfile5.jam
+++ b/tools/build/test/project-test4/jamfile5.jam
diff --git a/tools/build/v2/test/project-test4/jamroot.jam b/tools/build/test/project-test4/jamroot.jam
index 801f0afb2..801f0afb2 100644
--- a/tools/build/v2/test/project-test4/jamroot.jam
+++ b/tools/build/test/project-test4/jamroot.jam
diff --git a/tools/build/v2/test/project-test4/lib/b.cpp b/tools/build/test/project-test4/lib/b.cpp
index ccecbb414..ccecbb414 100644
--- a/tools/build/v2/test/project-test4/lib/b.cpp
+++ b/tools/build/test/project-test4/lib/b.cpp
diff --git a/tools/build/v2/test/project-test4/lib/jamfile.jam b/tools/build/test/project-test4/lib/jamfile.jam
index 1bdb7c122..1bdb7c122 100644
--- a/tools/build/v2/test/project-test4/lib/jamfile.jam
+++ b/tools/build/test/project-test4/lib/jamfile.jam
diff --git a/tools/build/v2/test/project-test4/lib/jamfile1.jam b/tools/build/test/project-test4/lib/jamfile1.jam
index be2c3649a..be2c3649a 100644
--- a/tools/build/v2/test/project-test4/lib/jamfile1.jam
+++ b/tools/build/test/project-test4/lib/jamfile1.jam
diff --git a/tools/build/v2/test/project-test4/lib/jamfile2.jam b/tools/build/test/project-test4/lib/jamfile2.jam
index d47274bdf..d47274bdf 100644
--- a/tools/build/v2/test/project-test4/lib/jamfile2.jam
+++ b/tools/build/test/project-test4/lib/jamfile2.jam
diff --git a/tools/build/v2/test/project-test4/lib/jamfile3.jam b/tools/build/test/project-test4/lib/jamfile3.jam
index 73a78324b..73a78324b 100644
--- a/tools/build/v2/test/project-test4/lib/jamfile3.jam
+++ b/tools/build/test/project-test4/lib/jamfile3.jam
diff --git a/tools/build/v2/test/project-test4/lib2/jamfile.jam b/tools/build/test/project-test4/lib2/jamfile.jam
index 389492bf0..389492bf0 100644
--- a/tools/build/v2/test/project-test4/lib2/jamfile.jam
+++ b/tools/build/test/project-test4/lib2/jamfile.jam
diff --git a/tools/build/v2/test/project-test4/lib2/jamfile2.jam b/tools/build/test/project-test4/lib2/jamfile2.jam
index 94b144d06..94b144d06 100644
--- a/tools/build/v2/test/project-test4/lib2/jamfile2.jam
+++ b/tools/build/test/project-test4/lib2/jamfile2.jam
diff --git a/tools/build/v2/test/project-test4/readme.txt b/tools/build/test/project-test4/readme.txt
index 0c0ba2ca4..0c0ba2ca4 100644
--- a/tools/build/v2/test/project-test4/readme.txt
+++ b/tools/build/test/project-test4/readme.txt
diff --git a/tools/build/v2/test/project_dependencies.py b/tools/build/test/project_dependencies.py
index 2e439d291..2e439d291 100644
--- a/tools/build/v2/test/project_dependencies.py
+++ b/tools/build/test/project_dependencies.py
diff --git a/tools/build/v2/test/project_glob.py b/tools/build/test/project_glob.py
index 95e3f30cf..95e3f30cf 100644
--- a/tools/build/v2/test/project_glob.py
+++ b/tools/build/test/project_glob.py
diff --git a/tools/build/v2/test/project_id.py b/tools/build/test/project_id.py
index f6846af5f..f6846af5f 100755
--- a/tools/build/v2/test/project_id.py
+++ b/tools/build/test/project_id.py
diff --git a/tools/build/v2/test/project_root_constants.py b/tools/build/test/project_root_constants.py
index b3bdcbb25..b3bdcbb25 100644
--- a/tools/build/v2/test/project_root_constants.py
+++ b/tools/build/test/project_root_constants.py
diff --git a/tools/build/v2/test/project_root_rule.py b/tools/build/test/project_root_rule.py
index 9f5ca47f8..9f5ca47f8 100644
--- a/tools/build/v2/test/project_root_rule.py
+++ b/tools/build/test/project_root_rule.py
diff --git a/tools/build/v2/test/project_test3.py b/tools/build/test/project_test3.py
index 4f6cda2a7..4f6cda2a7 100644
--- a/tools/build/v2/test/project_test3.py
+++ b/tools/build/test/project_test3.py
diff --git a/tools/build/v2/test/project_test4.py b/tools/build/test/project_test4.py
index fc4115017..fc4115017 100644
--- a/tools/build/v2/test/project_test4.py
+++ b/tools/build/test/project_test4.py
diff --git a/tools/build/v2/test/property_expansion.py b/tools/build/test/property_expansion.py
index 53fc13616..53fc13616 100644
--- a/tools/build/v2/test/property_expansion.py
+++ b/tools/build/test/property_expansion.py
diff --git a/tools/build/v2/test/qt4.py b/tools/build/test/qt4.py
index abb9594d5..abb9594d5 100755
--- a/tools/build/v2/test/qt4.py
+++ b/tools/build/test/qt4.py
diff --git a/tools/build/v2/test/qt4/jamroot.jam b/tools/build/test/qt4/jamroot.jam
index 9bcefefe0..3d8e7d73b 100644
--- a/tools/build/v2/test/qt4/jamroot.jam
+++ b/tools/build/test/qt4/jamroot.jam
@@ -11,7 +11,7 @@ import cast ;
if [ qt4.initialized ]
{
- use-project /boost : ../../../../.. ;
+ use-project /boost : ../../../.. ;
project qttest
: requirements
diff --git a/tools/build/v2/test/qt4/mock.cpp b/tools/build/test/qt4/mock.cpp
index 8f7a35c2d..8f7a35c2d 100644
--- a/tools/build/v2/test/qt4/mock.cpp
+++ b/tools/build/test/qt4/mock.cpp
diff --git a/tools/build/v2/test/qt4/mock.h b/tools/build/test/qt4/mock.h
index 1cc95b057..1cc95b057 100644
--- a/tools/build/v2/test/qt4/mock.h
+++ b/tools/build/test/qt4/mock.h
diff --git a/tools/build/v2/test/qt4/phonon.cpp b/tools/build/test/qt4/phonon.cpp
index 3151f5911..3151f5911 100644
--- a/tools/build/v2/test/qt4/phonon.cpp
+++ b/tools/build/test/qt4/phonon.cpp
diff --git a/tools/build/v2/test/qt4/qt3support.cpp b/tools/build/test/qt4/qt3support.cpp
index 35d8c73b9..35d8c73b9 100644
--- a/tools/build/v2/test/qt4/qt3support.cpp
+++ b/tools/build/test/qt4/qt3support.cpp
diff --git a/tools/build/v2/test/qt4/qtassistant.cpp b/tools/build/test/qt4/qtassistant.cpp
index e2a6ed7bd..e2a6ed7bd 100644
--- a/tools/build/v2/test/qt4/qtassistant.cpp
+++ b/tools/build/test/qt4/qtassistant.cpp
diff --git a/tools/build/v2/test/qt4/qtcore.cpp b/tools/build/test/qt4/qtcore.cpp
index f3c09039b..f3c09039b 100644
--- a/tools/build/v2/test/qt4/qtcore.cpp
+++ b/tools/build/test/qt4/qtcore.cpp
diff --git a/tools/build/v2/test/qt4/qtcorefail.cpp b/tools/build/test/qt4/qtcorefail.cpp
index 15fd36aef..15fd36aef 100644
--- a/tools/build/v2/test/qt4/qtcorefail.cpp
+++ b/tools/build/test/qt4/qtcorefail.cpp
diff --git a/tools/build/v2/test/qt4/qtdeclarative.cpp b/tools/build/test/qt4/qtdeclarative.cpp
index 817855bad..817855bad 100644
--- a/tools/build/v2/test/qt4/qtdeclarative.cpp
+++ b/tools/build/test/qt4/qtdeclarative.cpp
diff --git a/tools/build/v2/test/qt4/qtgui.cpp b/tools/build/test/qt4/qtgui.cpp
index 478e07a2a..478e07a2a 100644
--- a/tools/build/v2/test/qt4/qtgui.cpp
+++ b/tools/build/test/qt4/qtgui.cpp
diff --git a/tools/build/v2/test/qt4/qthelp.cpp b/tools/build/test/qt4/qthelp.cpp
index 32327de58..32327de58 100644
--- a/tools/build/v2/test/qt4/qthelp.cpp
+++ b/tools/build/test/qt4/qthelp.cpp
diff --git a/tools/build/v2/test/qt4/qtmultimedia.cpp b/tools/build/test/qt4/qtmultimedia.cpp
index dc5914aff..dc5914aff 100644
--- a/tools/build/v2/test/qt4/qtmultimedia.cpp
+++ b/tools/build/test/qt4/qtmultimedia.cpp
diff --git a/tools/build/v2/test/qt4/qtnetwork.cpp b/tools/build/test/qt4/qtnetwork.cpp
index 3f628d880..3f628d880 100644
--- a/tools/build/v2/test/qt4/qtnetwork.cpp
+++ b/tools/build/test/qt4/qtnetwork.cpp
diff --git a/tools/build/v2/test/qt4/qtscript.cpp b/tools/build/test/qt4/qtscript.cpp
index 65353daec..65353daec 100644
--- a/tools/build/v2/test/qt4/qtscript.cpp
+++ b/tools/build/test/qt4/qtscript.cpp
diff --git a/tools/build/v2/test/qt4/qtscripttools.cpp b/tools/build/test/qt4/qtscripttools.cpp
index 4d0b7f256..4d0b7f256 100644
--- a/tools/build/v2/test/qt4/qtscripttools.cpp
+++ b/tools/build/test/qt4/qtscripttools.cpp
diff --git a/tools/build/v2/test/qt4/qtsql.cpp b/tools/build/test/qt4/qtsql.cpp
index aa506b1c7..aa506b1c7 100644
--- a/tools/build/v2/test/qt4/qtsql.cpp
+++ b/tools/build/test/qt4/qtsql.cpp
diff --git a/tools/build/v2/test/qt4/qtsvg.cpp b/tools/build/test/qt4/qtsvg.cpp
index 8a1394380..8a1394380 100644
--- a/tools/build/v2/test/qt4/qtsvg.cpp
+++ b/tools/build/test/qt4/qtsvg.cpp
diff --git a/tools/build/v2/test/qt4/qttest.cpp b/tools/build/test/qt4/qttest.cpp
index a2744cdc7..a2744cdc7 100644
--- a/tools/build/v2/test/qt4/qttest.cpp
+++ b/tools/build/test/qt4/qttest.cpp
diff --git a/tools/build/v2/test/qt4/qtwebkit.cpp b/tools/build/test/qt4/qtwebkit.cpp
index 7d85f1473..7d85f1473 100644
--- a/tools/build/v2/test/qt4/qtwebkit.cpp
+++ b/tools/build/test/qt4/qtwebkit.cpp
diff --git a/tools/build/v2/test/qt4/qtxml.cpp b/tools/build/test/qt4/qtxml.cpp
index 8002c2658..8002c2658 100644
--- a/tools/build/v2/test/qt4/qtxml.cpp
+++ b/tools/build/test/qt4/qtxml.cpp
diff --git a/tools/build/v2/test/qt4/qtxmlpatterns.cpp b/tools/build/test/qt4/qtxmlpatterns.cpp
index dcec92fd3..dcec92fd3 100644
--- a/tools/build/v2/test/qt4/qtxmlpatterns.cpp
+++ b/tools/build/test/qt4/qtxmlpatterns.cpp
diff --git a/tools/build/v2/test/qt4/rcc.cpp b/tools/build/test/qt4/rcc.cpp
index cae553bb1..cae553bb1 100644
--- a/tools/build/v2/test/qt4/rcc.cpp
+++ b/tools/build/test/qt4/rcc.cpp
diff --git a/tools/build/v2/test/qt4/rcc.qrc b/tools/build/test/qt4/rcc.qrc
index 13ca38a5d..13ca38a5d 100644
--- a/tools/build/v2/test/qt4/rcc.qrc
+++ b/tools/build/test/qt4/rcc.qrc
diff --git a/tools/build/v2/test/qt5.py b/tools/build/test/qt5.py
index 75c4e670f..75c4e670f 100755
--- a/tools/build/v2/test/qt5.py
+++ b/tools/build/test/qt5.py
diff --git a/tools/build/v2/test/qt5/jamroot.jam b/tools/build/test/qt5/jamroot.jam
index b9585e3ef..90da392ed 100644
--- a/tools/build/v2/test/qt5/jamroot.jam
+++ b/tools/build/test/qt5/jamroot.jam
@@ -12,7 +12,7 @@ path-constant CWD : . ;
if [ qt5.initialized ]
{
- use-project /boost : ../../../../.. ;
+ use-project /boost : ../../../.. ;
project qttest
: requirements
@@ -44,7 +44,7 @@ if [ qt5.initialized ]
[ link qtdeclarative.cpp /qt5//QtDeclarative ]
# QtQuick version2
- [ run qtquick.cpp /qt5//QtQuick : : $(CWD)/qtquick.qml ]
+ [ run qtquick.cpp /qt5//QtQuick : -platform offscreen : $(CWD)/qtquick.qml ]
# Help systems.
[ link qthelp.cpp /qt5//QtHelp ]
@@ -57,7 +57,7 @@ if [ qt5.initialized ]
[ run mock.cpp mock.h /qt5//QtCore : : : <define>TEST_MOCK ]
# Test resource compiler
- [ run rcc.cpp rcc.qrc /qt//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
+ [ run rcc.cpp rcc.qrc /qt5//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
: # requirements
: # default-build
diff --git a/tools/build/v2/test/qt5/mock.cpp b/tools/build/test/qt5/mock.cpp
index 82fc608dc..82fc608dc 100644
--- a/tools/build/v2/test/qt5/mock.cpp
+++ b/tools/build/test/qt5/mock.cpp
diff --git a/tools/build/v2/test/qt5/mock.h b/tools/build/test/qt5/mock.h
index eac177d4d..eac177d4d 100644
--- a/tools/build/v2/test/qt5/mock.h
+++ b/tools/build/test/qt5/mock.h
diff --git a/tools/build/v2/test/qt5/qtassistant.cpp b/tools/build/test/qt5/qtassistant.cpp
index c15ee4eca..c15ee4eca 100644
--- a/tools/build/v2/test/qt5/qtassistant.cpp
+++ b/tools/build/test/qt5/qtassistant.cpp
diff --git a/tools/build/v2/test/qt5/qtcore.cpp b/tools/build/test/qt5/qtcore.cpp
index 6a2c62c8d..6a2c62c8d 100644
--- a/tools/build/v2/test/qt5/qtcore.cpp
+++ b/tools/build/test/qt5/qtcore.cpp
diff --git a/tools/build/v2/test/qt5/qtcorefail.cpp b/tools/build/test/qt5/qtcorefail.cpp
index 8032d47cd..8032d47cd 100644
--- a/tools/build/v2/test/qt5/qtcorefail.cpp
+++ b/tools/build/test/qt5/qtcorefail.cpp
diff --git a/tools/build/v2/test/qt5/qtdeclarative.cpp b/tools/build/test/qt5/qtdeclarative.cpp
index df70f5e46..df70f5e46 100644
--- a/tools/build/v2/test/qt5/qtdeclarative.cpp
+++ b/tools/build/test/qt5/qtdeclarative.cpp
diff --git a/tools/build/v2/test/qt5/qthelp.cpp b/tools/build/test/qt5/qthelp.cpp
index b0e877a6a..b0e877a6a 100644
--- a/tools/build/v2/test/qt5/qthelp.cpp
+++ b/tools/build/test/qt5/qthelp.cpp
diff --git a/tools/build/v2/test/qt5/qtmultimedia.cpp b/tools/build/test/qt5/qtmultimedia.cpp
index dc5914aff..dc5914aff 100644
--- a/tools/build/v2/test/qt5/qtmultimedia.cpp
+++ b/tools/build/test/qt5/qtmultimedia.cpp
diff --git a/tools/build/v2/test/qt5/qtnetwork.cpp b/tools/build/test/qt5/qtnetwork.cpp
index d34246689..d34246689 100644
--- a/tools/build/v2/test/qt5/qtnetwork.cpp
+++ b/tools/build/test/qt5/qtnetwork.cpp
diff --git a/tools/build/v2/test/qt5/qtquick.cpp b/tools/build/test/qt5/qtquick.cpp
index bec0d809c..bec0d809c 100644
--- a/tools/build/v2/test/qt5/qtquick.cpp
+++ b/tools/build/test/qt5/qtquick.cpp
diff --git a/tools/build/v2/test/qt5/qtquick.qml b/tools/build/test/qt5/qtquick.qml
index 8defc0503..8defc0503 100644
--- a/tools/build/v2/test/qt5/qtquick.qml
+++ b/tools/build/test/qt5/qtquick.qml
diff --git a/tools/build/v2/test/qt5/qtscript.cpp b/tools/build/test/qt5/qtscript.cpp
index d48c073eb..d48c073eb 100644
--- a/tools/build/v2/test/qt5/qtscript.cpp
+++ b/tools/build/test/qt5/qtscript.cpp
diff --git a/tools/build/v2/test/qt5/qtscripttools.cpp b/tools/build/test/qt5/qtscripttools.cpp
index 002056a0f..002056a0f 100644
--- a/tools/build/v2/test/qt5/qtscripttools.cpp
+++ b/tools/build/test/qt5/qtscripttools.cpp
diff --git a/tools/build/v2/test/qt5/qtsql.cpp b/tools/build/test/qt5/qtsql.cpp
index 127c5a3f4..127c5a3f4 100644
--- a/tools/build/v2/test/qt5/qtsql.cpp
+++ b/tools/build/test/qt5/qtsql.cpp
diff --git a/tools/build/v2/test/qt5/qtsvg.cpp b/tools/build/test/qt5/qtsvg.cpp
index ccfd6b4d1..ccfd6b4d1 100644
--- a/tools/build/v2/test/qt5/qtsvg.cpp
+++ b/tools/build/test/qt5/qtsvg.cpp
diff --git a/tools/build/v2/test/qt5/qttest.cpp b/tools/build/test/qt5/qttest.cpp
index ddc8f686a..ddc8f686a 100644
--- a/tools/build/v2/test/qt5/qttest.cpp
+++ b/tools/build/test/qt5/qttest.cpp
diff --git a/tools/build/v2/test/qt5/qtwebkit.cpp b/tools/build/test/qt5/qtwebkit.cpp
index aa6fdc92f..aa6fdc92f 100644
--- a/tools/build/v2/test/qt5/qtwebkit.cpp
+++ b/tools/build/test/qt5/qtwebkit.cpp
diff --git a/tools/build/v2/test/qt5/qtwebkitwidgets.cpp b/tools/build/test/qt5/qtwebkitwidgets.cpp
index 52c05c9a9..52c05c9a9 100644
--- a/tools/build/v2/test/qt5/qtwebkitwidgets.cpp
+++ b/tools/build/test/qt5/qtwebkitwidgets.cpp
diff --git a/tools/build/v2/test/qt5/qtwidgets.cpp b/tools/build/test/qt5/qtwidgets.cpp
index 002003448..002003448 100644
--- a/tools/build/v2/test/qt5/qtwidgets.cpp
+++ b/tools/build/test/qt5/qtwidgets.cpp
diff --git a/tools/build/v2/test/qt5/qtxml.cpp b/tools/build/test/qt5/qtxml.cpp
index 3df6dd2c1..3df6dd2c1 100644
--- a/tools/build/v2/test/qt5/qtxml.cpp
+++ b/tools/build/test/qt5/qtxml.cpp
diff --git a/tools/build/v2/test/qt5/qtxmlpatterns.cpp b/tools/build/test/qt5/qtxmlpatterns.cpp
index 9a9b85430..9a9b85430 100644
--- a/tools/build/v2/test/qt5/qtxmlpatterns.cpp
+++ b/tools/build/test/qt5/qtxmlpatterns.cpp
diff --git a/tools/build/v2/test/qt5/rcc.cpp b/tools/build/test/qt5/rcc.cpp
index cae553bb1..cae553bb1 100644
--- a/tools/build/v2/test/qt5/rcc.cpp
+++ b/tools/build/test/qt5/rcc.cpp
diff --git a/tools/build/v2/test/qt5/rcc.qrc b/tools/build/test/qt5/rcc.qrc
index 13ca38a5d..13ca38a5d 100644
--- a/tools/build/v2/test/qt5/rcc.qrc
+++ b/tools/build/test/qt5/rcc.qrc
diff --git a/tools/build/v2/test/railsys.py b/tools/build/test/railsys.py
index 7b7f8bd0b..7b7f8bd0b 100644
--- a/tools/build/v2/test/railsys.py
+++ b/tools/build/test/railsys.py
diff --git a/tools/build/v2/test/railsys/libx/include/test_libx.h b/tools/build/test/railsys/libx/include/test_libx.h
index fe573fc16..fe573fc16 100644
--- a/tools/build/v2/test/railsys/libx/include/test_libx.h
+++ b/tools/build/test/railsys/libx/include/test_libx.h
diff --git a/tools/build/v2/test/railsys/libx/jamroot.jam b/tools/build/test/railsys/libx/jamroot.jam
index d09982dd1..d09982dd1 100644
--- a/tools/build/v2/test/railsys/libx/jamroot.jam
+++ b/tools/build/test/railsys/libx/jamroot.jam
diff --git a/tools/build/v2/test/railsys/libx/src/jamfile.jam b/tools/build/test/railsys/libx/src/jamfile.jam
index 639e0cc90..639e0cc90 100644
--- a/tools/build/v2/test/railsys/libx/src/jamfile.jam
+++ b/tools/build/test/railsys/libx/src/jamfile.jam
diff --git a/tools/build/v2/test/railsys/libx/src/test_libx.cpp b/tools/build/test/railsys/libx/src/test_libx.cpp
index be1fbc27f..be1fbc27f 100644
--- a/tools/build/v2/test/railsys/libx/src/test_libx.cpp
+++ b/tools/build/test/railsys/libx/src/test_libx.cpp
diff --git a/tools/build/v2/test/railsys/program/include/test_a.h b/tools/build/test/railsys/program/include/test_a.h
index 8002859e1..8002859e1 100644
--- a/tools/build/v2/test/railsys/program/include/test_a.h
+++ b/tools/build/test/railsys/program/include/test_a.h
diff --git a/tools/build/v2/test/railsys/program/jamfile.jam b/tools/build/test/railsys/program/jamfile.jam
index 9d66f2dbb..9e36f408f 100644
--- a/tools/build/v2/test/railsys/program/jamfile.jam
+++ b/tools/build/test/railsys/program/jamfile.jam
@@ -14,7 +14,7 @@
#
# 02/21/02! Jürgen Hunold
#
-# $Id: jamfile.jam 55188 2009-07-26 20:11:03Z danieljames $
+# $Id$
#
# ================================================================
diff --git a/tools/build/v2/test/railsys/program/jamroot.jam b/tools/build/test/railsys/program/jamroot.jam
index 23d42195f..23d42195f 100644
--- a/tools/build/v2/test/railsys/program/jamroot.jam
+++ b/tools/build/test/railsys/program/jamroot.jam
diff --git a/tools/build/v2/test/railsys/program/liba/jamfile.jam b/tools/build/test/railsys/program/liba/jamfile.jam
index f74311d0d..f74311d0d 100644
--- a/tools/build/v2/test/railsys/program/liba/jamfile.jam
+++ b/tools/build/test/railsys/program/liba/jamfile.jam
diff --git a/tools/build/v2/test/railsys/program/liba/test_a.cpp b/tools/build/test/railsys/program/liba/test_a.cpp
index f9e538857..f9e538857 100644
--- a/tools/build/v2/test/railsys/program/liba/test_a.cpp
+++ b/tools/build/test/railsys/program/liba/test_a.cpp
diff --git a/tools/build/v2/test/railsys/program/main/jamfile.jam b/tools/build/test/railsys/program/main/jamfile.jam
index 095978eaf..095978eaf 100644
--- a/tools/build/v2/test/railsys/program/main/jamfile.jam
+++ b/tools/build/test/railsys/program/main/jamfile.jam
diff --git a/tools/build/v2/test/railsys/program/main/main.cpp b/tools/build/test/railsys/program/main/main.cpp
index 3f13f4bfc..3f13f4bfc 100644
--- a/tools/build/v2/test/railsys/program/main/main.cpp
+++ b/tools/build/test/railsys/program/main/main.cpp
diff --git a/tools/build/v2/test/readme.txt b/tools/build/test/readme.txt
index 48459f805..48459f805 100644
--- a/tools/build/v2/test/readme.txt
+++ b/tools/build/test/readme.txt
diff --git a/tools/build/v2/test/rebuilds.py b/tools/build/test/rebuilds.py
index 89ad4d84f..89ad4d84f 100644
--- a/tools/build/v2/test/rebuilds.py
+++ b/tools/build/test/rebuilds.py
diff --git a/tools/build/v2/test/regression.py b/tools/build/test/regression.py
index dde4d8151..dde4d8151 100644
--- a/tools/build/v2/test/regression.py
+++ b/tools/build/test/regression.py
diff --git a/tools/build/v2/test/relative_sources.py b/tools/build/test/relative_sources.py
index bd4620fc6..bd4620fc6 100644
--- a/tools/build/v2/test/relative_sources.py
+++ b/tools/build/test/relative_sources.py
diff --git a/tools/build/v2/test/remove_requirement.py b/tools/build/test/remove_requirement.py
index fa820c869..fa820c869 100644
--- a/tools/build/v2/test/remove_requirement.py
+++ b/tools/build/test/remove_requirement.py
diff --git a/tools/build/v2/test/rescan_header.py b/tools/build/test/rescan_header.py
index 1f07acaa8..1f07acaa8 100755
--- a/tools/build/v2/test/rescan_header.py
+++ b/tools/build/test/rescan_header.py
diff --git a/tools/build/v2/test/resolution.py b/tools/build/test/resolution.py
index a97085732..a97085732 100644
--- a/tools/build/v2/test/resolution.py
+++ b/tools/build/test/resolution.py
diff --git a/tools/build/test/results-python.txt b/tools/build/test/results-python.txt
new file mode 100644
index 000000000..83b351b2c
--- /dev/null
+++ b/tools/build/test/results-python.txt
@@ -0,0 +1,132 @@
+Note: skipping extra tests
+unit_tests : FAILED
+module_actions : PASSED
+startup_v2 : PASSED
+core_d12 : PASSED
+core_typecheck : PASSED
+core_delete_module : PASSED
+core_language : PASSED
+core_arguments : PASSED
+core_varnames : PASSED
+core_import_module : PASSED
+absolute_sources : PASSED
+alias : PASSED
+alternatives : PASSED
+bad_dirname : PASSED
+build_dir : PASSED
+build_file : PASSED
+build_no : PASSED
+builtin_echo : PASSED
+builtin_exit : PASSED
+builtin_split_by_characters : FAILED
+c_file : PASSED
+chain : PASSED
+clean : PASSED
+composite : PASSED
+conditionals : PASSED
+conditionals2 : PASSED
+conditionals3 : PASSED
+conditionals_multiple : PASSED
+configuration : FAILED
+copy_time : PASSED
+core_action_output : PASSED
+core_action_status : PASSED
+core_actions_quietly : PASSED
+core_at_file : PASSED
+core_bindrule : PASSED
+core_multifile_actions : PASSED
+core_nt_cmd_line : PASSED
+core_option_d2 : PASSED
+core_option_l : PASSED
+core_option_n : PASSED
+core_parallel_actions : PASSED
+core_parallel_multifile_actions_1 : PASSED
+core_parallel_multifile_actions_2 : PASSED
+core_source_line_tracking : PASSED
+core_update_now : PASSED
+core_variables_in_actions : PASSED
+custom_generator : PASSED
+default_build : PASSED
+default_features : PASSED
+dependency_property : PASSED
+dependency_test : FAILED
+direct_request_test : PASSED
+disambiguation : PASSED
+dll_path : PASSED
+double_loading : PASSED
+duplicate : PASSED
+example_libraries : PASSED
+example_make : PASSED
+exit_status : PASSED
+expansion : PASSED
+explicit : PASSED
+free_features_request : PASSED
+generator_selection : FAILED
+generators_test : FAILED
+implicit_dependency : PASSED
+indirect_conditional : FAILED
+inherit_toolset : FAILED
+inherited_dependency : PASSED
+inline : PASSED
+lib_source_property : PASSED
+library_chain : PASSED
+library_property : PASSED
+link : FAILED
+load_order : FAILED
+loop : PASSED
+make_rule : PASSED
+message : FAILED
+ndebug : PASSED
+no_type : PASSED
+notfile : PASSED
+ordered_include : PASSED
+out_of_tree : PASSED
+path_features : FAILED
+prebuilt : PASSED
+print : FAILED
+project_dependencies : PASSED
+project_glob : PASSED
+project_id : FAILED
+project_root_constants : PASSED
+project_root_rule : PASSED
+project_test3 : FAILED
+project_test4 : FAILED
+property_expansion : PASSED
+rebuilds : PASSED
+regression : PASSED
+relative_sources : PASSED
+remove_requirement : PASSED
+rescan_header : PASSED
+resolution : PASSED
+scanner_causing_rebuilds : FAILED
+searched_lib : PASSED
+skipping : PASSED
+sort_rule : PASSED
+source_locations : PASSED
+source_order : FAILED
+space_in_path : PASSED
+stage : PASSED
+standalone : PASSED
+static_and_shared_library : PASSED
+suffix : PASSED
+tag : PASSED
+test_result_dumping : PASSED
+test_rc : FAILED
+testing_support : PASSED
+timedata : FAILED
+unit_test : PASSED
+unused : FAILED
+use_requirements : PASSED
+using : PASSED
+wrapper : PASSED
+wrong_project : PASSED
+zlib : PASSED
+symlink : PASSED
+library_order : FAILED
+gcc_runtime : FAILED
+pch : PASSED
+
+ === Test summary ===
+ PASS: 103
+ FAIL: 23
+
diff --git a/tools/build/v2/test/scanner_causing_rebuilds.py b/tools/build/test/scanner_causing_rebuilds.py
index 2b5fc501c..2b5fc501c 100755
--- a/tools/build/v2/test/scanner_causing_rebuilds.py
+++ b/tools/build/test/scanner_causing_rebuilds.py
diff --git a/tools/build/v2/test/searched_lib.py b/tools/build/test/searched_lib.py
index c9ad5852d..c9ad5852d 100644
--- a/tools/build/v2/test/searched_lib.py
+++ b/tools/build/test/searched_lib.py
diff --git a/tools/build/v2/test/skipping.py b/tools/build/test/skipping.py
index a187a4bed..a187a4bed 100644
--- a/tools/build/v2/test/skipping.py
+++ b/tools/build/test/skipping.py
diff --git a/tools/build/v2/test/sort_rule.py b/tools/build/test/sort_rule.py
index 31db77156..31db77156 100755
--- a/tools/build/v2/test/sort_rule.py
+++ b/tools/build/test/sort_rule.py
diff --git a/tools/build/v2/test/source_locations.py b/tools/build/test/source_locations.py
index 8123a1864..8123a1864 100644
--- a/tools/build/v2/test/source_locations.py
+++ b/tools/build/test/source_locations.py
diff --git a/tools/build/test/source_order.py b/tools/build/test/source_order.py
new file mode 100755
index 000000000..f42f4ccae
--- /dev/null
+++ b/tools/build/test/source_order.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+# Copyright 2013 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Tests that action sources are not reordered
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("check-order.jam", """\
+import type ;
+import generators ;
+
+type.register ORDER_TEST : order-test ;
+
+SPACE = " " ;
+nl = "\n" ;
+actions check-order
+{
+ echo$(SPACE)$(>[1])>$(<[1])
+ echo$(SPACE)$(>[2-])>>$(<[1])$(nl)
+}
+
+generators.register-composing check-order.check-order : C : ORDER_TEST ;
+""")
+
+# The aliases are necessary for this test, since
+# the targets were sorted by virtual target
+# id, not by file name.
+t.write("jamroot.jam", """\
+import check-order ;
+alias file1 : file1.c ;
+alias file2 : file2.c ;
+alias file3 : file3.c ;
+order-test check : file2 file1 file3 ;
+""")
+
+t.write("file1.c", "")
+t.write("file2.c", "")
+t.write("file3.c", "")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug/check.order-test")
+t.expect_content("bin/$toolset/debug/check.order-test", """\
+file2.c
+file1.c
+file3.c
+""", True)
+
+t.cleanup()
diff --git a/tools/build/v2/test/space_in_path.py b/tools/build/test/space_in_path.py
index 4cd320c5b..4cd320c5b 100755
--- a/tools/build/v2/test/space_in_path.py
+++ b/tools/build/test/space_in_path.py
diff --git a/tools/build/v2/test/stage.py b/tools/build/test/stage.py
index 4dd4e2f94..4dd4e2f94 100644
--- a/tools/build/v2/test/stage.py
+++ b/tools/build/test/stage.py
diff --git a/tools/build/v2/test/standalone.py b/tools/build/test/standalone.py
index 6d9e9e862..6d9e9e862 100644
--- a/tools/build/v2/test/standalone.py
+++ b/tools/build/test/standalone.py
diff --git a/tools/build/v2/test/startup/boost-root/boost-build.jam b/tools/build/test/startup/boost-root/boost-build.jam
index 098889f7b..098889f7b 100644
--- a/tools/build/v2/test/startup/boost-root/boost-build.jam
+++ b/tools/build/test/startup/boost-root/boost-build.jam
diff --git a/tools/build/v2/test/startup/boost-root/build/boost-build.jam b/tools/build/test/startup/boost-root/build/boost-build.jam
index 610ec79ee..610ec79ee 100644
--- a/tools/build/v2/test/startup/boost-root/build/boost-build.jam
+++ b/tools/build/test/startup/boost-root/build/boost-build.jam
diff --git a/tools/build/v2/test/startup/boost-root/build/bootstrap.jam b/tools/build/test/startup/boost-root/build/bootstrap.jam
index 2ee3507c3..2ee3507c3 100644
--- a/tools/build/v2/test/startup/boost-root/build/bootstrap.jam
+++ b/tools/build/test/startup/boost-root/build/bootstrap.jam
diff --git a/tools/build/v2/test/startup/bootstrap-env/boost-build.jam b/tools/build/test/startup/bootstrap-env/boost-build.jam
index 67a285e7c..67a285e7c 100644
--- a/tools/build/v2/test/startup/bootstrap-env/boost-build.jam
+++ b/tools/build/test/startup/bootstrap-env/boost-build.jam
diff --git a/tools/build/v2/test/startup/bootstrap-explicit/boost-build.jam b/tools/build/test/startup/bootstrap-explicit/boost-build.jam
index 27d9108b7..27d9108b7 100644
--- a/tools/build/v2/test/startup/bootstrap-explicit/boost-build.jam
+++ b/tools/build/test/startup/bootstrap-explicit/boost-build.jam
diff --git a/tools/build/v2/test/startup/bootstrap-implicit/readme.txt b/tools/build/test/startup/bootstrap-implicit/readme.txt
index 0278716e5..0278716e5 100644
--- a/tools/build/v2/test/startup/bootstrap-implicit/readme.txt
+++ b/tools/build/test/startup/bootstrap-implicit/readme.txt
diff --git a/tools/build/v2/test/startup/no-bootstrap1/boost-build.jam b/tools/build/test/startup/no-bootstrap1/boost-build.jam
index b1b4dc696..b1b4dc696 100644
--- a/tools/build/v2/test/startup/no-bootstrap1/boost-build.jam
+++ b/tools/build/test/startup/no-bootstrap1/boost-build.jam
diff --git a/tools/build/v2/test/startup/no-bootstrap1/subdir/readme.txt b/tools/build/test/startup/no-bootstrap1/subdir/readme.txt
index 00f428d44..00f428d44 100644
--- a/tools/build/v2/test/startup/no-bootstrap1/subdir/readme.txt
+++ b/tools/build/test/startup/no-bootstrap1/subdir/readme.txt
diff --git a/tools/build/v2/test/startup/no-bootstrap2/boost-build.jam b/tools/build/test/startup/no-bootstrap2/boost-build.jam
index 505dcd775..505dcd775 100644
--- a/tools/build/v2/test/startup/no-bootstrap2/boost-build.jam
+++ b/tools/build/test/startup/no-bootstrap2/boost-build.jam
diff --git a/tools/build/v2/test/startup/no-bootstrap3/boost-build.jam b/tools/build/test/startup/no-bootstrap3/boost-build.jam
index 252a3993c..252a3993c 100644
--- a/tools/build/v2/test/startup/no-bootstrap3/boost-build.jam
+++ b/tools/build/test/startup/no-bootstrap3/boost-build.jam
diff --git a/tools/build/v2/test/startup_v2.py b/tools/build/test/startup_v2.py
index 2dd867a1d..2dd867a1d 100644
--- a/tools/build/v2/test/startup_v2.py
+++ b/tools/build/test/startup_v2.py
diff --git a/tools/build/v2/test/static_and_shared_library.py b/tools/build/test/static_and_shared_library.py
index ca50e26ad..ca50e26ad 100755
--- a/tools/build/v2/test/static_and_shared_library.py
+++ b/tools/build/test/static_and_shared_library.py
diff --git a/tools/build/v2/test/suffix.py b/tools/build/test/suffix.py
index 386e36a9d..386e36a9d 100644
--- a/tools/build/v2/test/suffix.py
+++ b/tools/build/test/suffix.py
diff --git a/tools/build/v2/test/symlink.py b/tools/build/test/symlink.py
index a4a7f3435..a4a7f3435 100644
--- a/tools/build/v2/test/symlink.py
+++ b/tools/build/test/symlink.py
diff --git a/tools/build/v2/test/tag.py b/tools/build/test/tag.py
index 09b4308a5..09b4308a5 100644
--- a/tools/build/v2/test/tag.py
+++ b/tools/build/test/tag.py
diff --git a/tools/build/v2/test/template.py b/tools/build/test/template.py
index 1fbef07b8..1fbef07b8 100644
--- a/tools/build/v2/test/template.py
+++ b/tools/build/test/template.py
diff --git a/tools/build/v2/test/test-config-example.jam b/tools/build/test/test-config-example.jam
index 6cb813fa0..6cb813fa0 100644
--- a/tools/build/v2/test/test-config-example.jam
+++ b/tools/build/test/test-config-example.jam
diff --git a/tools/build/v2/test/test.jam b/tools/build/test/test.jam
index 1ae1a2059..1ae1a2059 100644
--- a/tools/build/v2/test/test.jam
+++ b/tools/build/test/test.jam
diff --git a/tools/build/v2/test/test1.py b/tools/build/test/test1.py
index 05b396648..05b396648 100644
--- a/tools/build/v2/test/test1.py
+++ b/tools/build/test/test1.py
diff --git a/tools/build/v2/test/test2.py b/tools/build/test/test2.py
index 938b36545..938b36545 100644
--- a/tools/build/v2/test/test2.py
+++ b/tools/build/test/test2.py
diff --git a/tools/build/v2/test/test2/foo.cpp b/tools/build/test/test2/foo.cpp
index 135fa90f6..135fa90f6 100644
--- a/tools/build/v2/test/test2/foo.cpp
+++ b/tools/build/test/test2/foo.cpp
diff --git a/tools/build/v2/test/test2/jamroot.jam b/tools/build/test/test2/jamroot.jam
index 4fb3f2886..4fb3f2886 100644
--- a/tools/build/v2/test/test2/jamroot.jam
+++ b/tools/build/test/test2/jamroot.jam
diff --git a/tools/build/v2/test/test_all.py b/tools/build/test/test_all.py
index cddd48263..fd72b6651 100644
--- a/tools/build/v2/test/test_all.py
+++ b/tools/build/test/test_all.py
@@ -166,6 +166,7 @@ tests = ["absolute_sources",
"build_no",
"builtin_echo",
"builtin_exit",
+ "builtin_glob",
"builtin_split_by_characters",
"c_file",
"chain",
@@ -182,6 +183,8 @@ tests = ["absolute_sources",
"core_actions_quietly",
"core_at_file",
"core_bindrule",
+ "core_jamshell",
+ "core_multifile_actions",
"core_nt_cmd_line",
"core_option_d2",
"core_option_l",
@@ -209,6 +212,7 @@ tests = ["absolute_sources",
"exit_status",
"expansion",
"explicit",
+ "feature_cxxflags",
"free_features_request",
"generator_selection",
"generators_test",
@@ -220,6 +224,7 @@ tests = ["absolute_sources",
"lib_source_property",
"library_chain",
"library_property",
+ "link",
"load_order",
"loop",
"make_rule",
@@ -251,6 +256,7 @@ tests = ["absolute_sources",
"skipping",
"sort_rule",
"source_locations",
+ "source_order",
"space_in_path",
"stage",
"standalone",
@@ -261,6 +267,7 @@ tests = ["absolute_sources",
"test_rc",
"testing_support",
"timedata",
+ "toolset_requirements",
"unit_test",
"unused",
"use_requirements",
diff --git a/tools/build/v2/test/test_rc.py b/tools/build/test/test_rc.py
index 510b47275..510b47275 100755
--- a/tools/build/v2/test/test_rc.py
+++ b/tools/build/test/test_rc.py
diff --git a/tools/build/v2/test/test_result_dumping.py b/tools/build/test/test_result_dumping.py
index bdfc41ee2..bdfc41ee2 100755
--- a/tools/build/v2/test/test_result_dumping.py
+++ b/tools/build/test/test_result_dumping.py
diff --git a/tools/build/v2/test/test_system.html b/tools/build/test/test_system.html
index e425ee103..e425ee103 100644
--- a/tools/build/v2/test/test_system.html
+++ b/tools/build/test/test_system.html
diff --git a/tools/build/v2/test/testing_support.py b/tools/build/test/testing_support.py
index 01a7c4826..01a7c4826 100755
--- a/tools/build/v2/test/testing_support.py
+++ b/tools/build/test/testing_support.py
diff --git a/tools/build/v2/test/timedata.py b/tools/build/test/timedata.py
index 20a95c2a2..20a95c2a2 100644
--- a/tools/build/v2/test/timedata.py
+++ b/tools/build/test/timedata.py
diff --git a/tools/build/test/toolset_requirements.py b/tools/build/test/toolset_requirements.py
new file mode 100644
index 000000000..c9a8fa8ee
--- /dev/null
+++ b/tools/build/test/toolset_requirements.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Test the handling of toolset.add-requirements
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0, ignore_toolset_requirements=False)
+
+t.write('jamroot.jam', '''
+import toolset ;
+import errors ;
+
+rule test-rule ( properties * )
+{
+ return <define>TEST_INDIRECT_CONDITIONAL ;
+}
+
+toolset.add-requirements
+ <define>TEST_MACRO
+ <conditional>@test-rule
+ <link>shared:<define>TEST_CONDITIONAL
+;
+
+rule check-requirements ( target : sources * : properties * )
+{
+ local macros = TEST_MACRO TEST_CONDITIONAL TEST_INDIRECT_CONDITIONAL ;
+ for local m in $(macros)
+ {
+ if ! <define>$(m) in $(properties)
+ {
+ errors.error $(m) not defined ;
+ }
+ }
+}
+make test : : @check-requirements ;
+''')
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/tools/build/v2/test/tree.py b/tools/build/test/tree.py
index 70c66a3db..70c66a3db 100644
--- a/tools/build/v2/test/tree.py
+++ b/tools/build/test/tree.py
diff --git a/tools/build/v2/test/unit_test.py b/tools/build/test/unit_test.py
index 5b2c5dbc9..5b2c5dbc9 100644
--- a/tools/build/v2/test/unit_test.py
+++ b/tools/build/test/unit_test.py
diff --git a/tools/build/v2/test/unit_tests.py b/tools/build/test/unit_tests.py
index 705764b6b..705764b6b 100644
--- a/tools/build/v2/test/unit_tests.py
+++ b/tools/build/test/unit_tests.py
diff --git a/tools/build/v2/test/unused.py b/tools/build/test/unused.py
index d7595547c..d7595547c 100644
--- a/tools/build/v2/test/unused.py
+++ b/tools/build/test/unused.py
diff --git a/tools/build/v2/test/use_requirements.py b/tools/build/test/use_requirements.py
index 7fe829c0b..7fe829c0b 100644
--- a/tools/build/v2/test/use_requirements.py
+++ b/tools/build/test/use_requirements.py
diff --git a/tools/build/v2/test/using.py b/tools/build/test/using.py
index 31a07eb7b..31a07eb7b 100644
--- a/tools/build/v2/test/using.py
+++ b/tools/build/test/using.py
diff --git a/tools/build/v2/test/wrapper.py b/tools/build/test/wrapper.py
index 8501a7340..8501a7340 100644
--- a/tools/build/v2/test/wrapper.py
+++ b/tools/build/test/wrapper.py
diff --git a/tools/build/v2/test/wrong_project.py b/tools/build/test/wrong_project.py
index 273ff5c97..273ff5c97 100644
--- a/tools/build/v2/test/wrong_project.py
+++ b/tools/build/test/wrong_project.py
diff --git a/tools/build/v2/test/zlib.py b/tools/build/test/zlib.py
index 2821bd744..2821bd744 100755
--- a/tools/build/v2/test/zlib.py
+++ b/tools/build/test/zlib.py
diff --git a/tools/build/v2/test/ordered_include.py b/tools/build/v2/test/ordered_include.py
deleted file mode 100644
index 1fe5e9613..000000000
--- a/tools/build/v2/test/ordered_include.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Steven Watanabe
-#
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt) or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import BoostBuild
-
-tester = BoostBuild.Tester(use_test_config=False)
-
-tester.write("jamroot.jam", """
-obj test : test.cpp : <include>a&&b ;
-""")
-
-tester.write("test.cpp", """
-#include <test1.hpp>
-#include <test2.hpp>
-int main() {}
-""")
-
-tester.write("a/test1.hpp", """
-""")
-
-tester.write("b/test2.hpp", """
-""")
-
-tester.run_build_system()
-
-tester.expect_addition("bin/$toolset/debug/test.obj")
-
-tester.touch("a/test1.hpp")
-tester.run_build_system()
-tester.expect_touch("bin/$toolset/debug/test.obj")
-
-tester.touch("b/test2.hpp")
-tester.run_build_system()
-tester.expect_touch("bin/$toolset/debug/test.obj")
-
-tester.cleanup()
diff --git a/tools/build/v2/tools/intel-win.jam b/tools/build/v2/tools/intel-win.jam
deleted file mode 100644
index c9adac0d9..000000000
--- a/tools/build/v2/tools/intel-win.jam
+++ /dev/null
@@ -1,184 +0,0 @@
-# Copyright Vladimir Prus 2004.
-# 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)
-
-# Importing common is needed because the rules we inherit here depend on it.
-# That is nasty.
-import common ;
-import errors ;
-import feature ;
-import intel ;
-import msvc ;
-import os ;
-import toolset ;
-import generators ;
-import type ;
-
-feature.extend-subfeature toolset intel : platform : win ;
-
-toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
-toolset.inherit-flags intel-win : msvc : : YLOPTION ;
-toolset.inherit-rules intel-win : msvc ;
-
-# Override default do-nothing generators.
-generators.override intel-win.compile.c.pch : pch.default-c-pch-generator ;
-generators.override intel-win.compile.c++.pch : pch.default-cpp-pch-generator ;
-generators.override intel-win.compile.rc : rc.compile.resource ;
-generators.override intel-win.compile.mc : mc.compile ;
-
-toolset.flags intel-win.compile PCH_SOURCE <pch>on : <pch-source> ;
-
-toolset.add-requirements <toolset>intel-win,<runtime-link>shared:<threading>multi ;
-
-# Initializes the intel toolset for windows
-rule init ( version ? : # the compiler version
- command * : # the command to invoke the compiler itself
- options * # Additional option: <compatibility>
- # either 'vc6', 'vc7', 'vc7.1'
- # or 'native'(default).
- )
-{
- local compatibility =
- [ feature.get-values <compatibility> : $(options) ] ;
- local condition = [ common.check-init-parameters intel-win
- : version $(version) : compatibility $(compatibility) ] ;
-
- command = [ common.get-invocation-command intel-win : icl.exe :
- $(command) ] ;
-
- common.handle-options intel-win : $(condition) : $(command) : $(options) ;
-
- local root ;
- if $(command)
- {
- root = [ common.get-absolute-tool-path $(command[-1]) ] ;
- root = $(root)/ ;
- }
-
- local setup ;
- setup = [ GLOB $(root) : iclvars_*.bat ] ;
- if ! $(setup)
- {
- setup = $(root)/iclvars.bat ;
- }
- setup = "call \""$(setup)"\" > nul " ;
-
- if [ os.name ] = NT
- {
- setup = $(setup)"
-" ;
- }
- else
- {
- setup = "cmd /S /C "$(setup)" \"&&\" " ;
- }
-
- toolset.flags intel-win.compile .CC $(condition) : $(setup)icl ;
- toolset.flags intel-win.link .LD $(condition) : $(setup)xilink ;
- toolset.flags intel-win.archive .LD $(condition) : $(setup)xilink /lib ;
- toolset.flags intel-win.link .MT $(condition) : $(setup)mt -nologo ;
- toolset.flags intel-win.compile .MC $(condition) : $(setup)mc ;
- toolset.flags intel-win.compile .RC $(condition) : $(setup)rc ;
-
- local m = [ MATCH (.).* : $(version) ] ;
- local major = $(m[1]) ;
-
- local C++FLAGS ;
-
- C++FLAGS += /nologo ;
-
- # Reduce the number of spurious error messages
- C++FLAGS += /Qwn5 /Qwd985 ;
-
- # Enable ADL
- C++FLAGS += -Qoption,c,--arg_dep_lookup ; #"c" works for C++, too
-
- # Disable Microsoft "secure" overloads in Dinkumware libraries since they
- # cause compile errors with Intel versions 9 and 10.
- C++FLAGS += -D_SECURE_SCL=0 ;
-
- if $(major) > 5
- {
- C++FLAGS += /Zc:forScope ; # Add support for correct for loop scoping.
- }
-
- # Add options recognized only by intel7 and above.
- if $(major) >= 7
- {
- C++FLAGS += /Qansi_alias ;
- }
-
- if $(compatibility) = vc6
- {
- C++FLAGS +=
- # Emulate VC6
- /Qvc6
-
- # No wchar_t support in vc6 dinkum library. Furthermore, in vc6
- # compatibility-mode, wchar_t is not a distinct type from unsigned
- # short.
- -DBOOST_NO_INTRINSIC_WCHAR_T
- ;
- }
- else
- {
- if $(major) > 5
- {
- # Add support for wchar_t
- C++FLAGS += /Zc:wchar_t
- # Tell the dinkumware library about it.
- -D_NATIVE_WCHAR_T_DEFINED
- ;
- }
- }
-
- if $(compatibility) && $(compatibility) != native
- {
- C++FLAGS += /Q$(base-vc) ;
- }
- else
- {
- C++FLAGS +=
- -Qoption,cpp,--arg_dep_lookup
- # The following options were intended to disable the Intel compiler's
- # 'bug-emulation' mode, but were later reported to be causing ICE with
- # Intel-Win 9.0. It is not yet clear which options can be safely used.
- # -Qoption,cpp,--const_string_literals
- # -Qoption,cpp,--new_for_init
- # -Qoption,cpp,--no_implicit_typename
- # -Qoption,cpp,--no_friend_injection
- # -Qoption,cpp,--no_microsoft_bugs
- ;
- }
-
- toolset.flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
- # By default, when creating PCH, intel adds 'i' to the explicitly
- # specified name of the PCH file. Of course, Boost.Build is not
- # happy when compiler produces not the file it was asked for.
- # The option below stops this behaviour.
- toolset.flags intel-win CFLAGS : -Qpchi- ;
-
- if ! $(compatibility)
- {
- # If there's no backend version, assume 10.
- compatibility = vc10 ;
- }
-
- local extract-version = [ MATCH ^vc(.*) : $(compatibility) ] ;
- if ! $(extract-version)
- {
- errors.user-error "Invalid value for compatibility option:"
- $(compatibility) ;
- }
-
- # Depending on the settings, running of tests require some runtime DLLs.
- toolset.flags intel-win RUN_PATH $(condition) : $(root) ;
-
- msvc.configure-version-specific intel-win : $(extract-version[1]) : $(condition) ;
-}
-
-toolset.flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;
-
-toolset.flags intel-win YLOPTION ;
-
diff --git a/tools/build/v2/boost.css b/tools/build/website/boost.css
index 8401b29c3..8401b29c3 100644
--- a/tools/build/v2/boost.css
+++ b/tools/build/website/boost.css
diff --git a/tools/build/v2/boost_build.png b/tools/build/website/boost_build.png
index 3a9e64df2..3a9e64df2 100644
--- a/tools/build/v2/boost_build.png
+++ b/tools/build/website/boost_build.png
Binary files differ
diff --git a/tools/build/v2/boost_build.svg b/tools/build/website/boost_build.svg
index ba4ccc77b..ba4ccc77b 100644
--- a/tools/build/v2/boost_build.svg
+++ b/tools/build/website/boost_build.svg
diff --git a/tools/build/v2/index.html b/tools/build/website/index.html
index 63df93fec..63df93fec 100644
--- a/tools/build/v2/index.html
+++ b/tools/build/website/index.html
diff --git a/tools/inspect/apple_macro_check.cpp b/tools/inspect/apple_macro_check.cpp
index ce917e0d8..7afb8f9fd 100644
--- a/tools/inspect/apple_macro_check.cpp
+++ b/tools/inspect/apple_macro_check.cpp
@@ -64,7 +64,7 @@ namespace boost
// Only check files in the boost directory, as we can avoid including the
// apple test headers elsewhere.
- path relative( relative_to( full_path, fs::initial_path() ) );
+ path relative( relative_to( full_path, search_root_path() ) );
if ( relative.empty() || *relative.begin() != "boost") return;
boost::sregex_iterator cur(contents.begin(), contents.end(), apple_macro_regex), end;
diff --git a/tools/inspect/ascii_check.hpp b/tools/inspect/ascii_check.hpp
index 878909e31..6094ce856 100644
--- a/tools/inspect/ascii_check.hpp
+++ b/tools/inspect/ascii_check.hpp
@@ -35,4 +35,4 @@ namespace boost
}
}
-#endif // BOOST_TAB_CHECK_HPP
+#endif // BOOST_ASCII_CHECK_HPP
diff --git a/tools/inspect/assert_macro_check.cpp b/tools/inspect/assert_macro_check.cpp
index a91cb8a9f..340a9f5ba 100644
--- a/tools/inspect/assert_macro_check.cpp
+++ b/tools/inspect/assert_macro_check.cpp
@@ -47,8 +47,8 @@ namespace boost
assert_macro_check::assert_macro_check()
: m_files_with_errors(0)
, m_from_boost_root(
- fs::exists(fs::initial_path() / "boost") &&
- fs::exists(fs::initial_path() / "libs"))
+ fs::exists(search_root_path() / "boost") &&
+ fs::exists(search_root_path() / "libs"))
{
register_signature( ".c" );
register_signature( ".cpp" );
@@ -70,7 +70,7 @@ namespace boost
// Check files iff (a) they are in the boost directory, or (b) they
// are in the src directory under libs.
if (m_from_boost_root) {
- path relative( relative_to( full_path, fs::initial_path() ) );
+ path relative( relative_to( full_path, search_root_path() ) );
path::const_iterator pbeg = relative.begin(), pend = relative.end();
if (pbeg != std::find(pbeg, pend, "boost") &&
!(pbeg == std::find(pbeg, pend, "libs") && pend != std::find(pbeg, pend, "src")))
diff --git a/tools/inspect/build/msvc/boost_inspect.vcxproj b/tools/inspect/build/msvc/boost_inspect.vcxproj
index c0ed45ad8..3c35c22b8 100644
--- a/tools/inspect/build/msvc/boost_inspect.vcxproj
+++ b/tools/inspect/build/msvc/boost_inspect.vcxproj
@@ -65,6 +65,12 @@
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
+ <PostBuildEvent>
+ <Command>"$(TargetDir)\$(TargetName).exe" ../.. -text -brief</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>Executing test $(TargetName).exe...</Message>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -95,6 +101,7 @@
<ClCompile Include="..\..\assert_macro_check.cpp" />
<ClCompile Include="..\..\copyright_check.cpp" />
<ClCompile Include="..\..\crlf_check.cpp" />
+ <ClCompile Include="..\..\deprecated_macro_check.cpp" />
<ClCompile Include="..\..\end_check.cpp" />
<ClCompile Include="..\..\inspect.cpp" />
<ClCompile Include="..\..\license_check.cpp" />
diff --git a/tools/inspect/build/msvc/readme.txt b/tools/inspect/build/msvc/readme.txt
index ba5e38377..a549811ad 100644
--- a/tools/inspect/build/msvc/readme.txt
+++ b/tools/inspect/build/msvc/readme.txt
@@ -1,8 +1,8 @@
The provided Microsoft VC++ 10 solution assumes the following commands have been run
in the root directory:
- bjam --toolset=msvc-10.0express --build-type=complete --with-filesystem stage
- bjam --toolset=msvc-10.0express --build-type=complete --with-regex stage
+ b2 --toolset=msvc-10.0express --build-type=complete --with-filesystem stage
+ b2 --toolset=msvc-10.0express --build-type=complete --with-regex stage
boost-no-inspect
diff --git a/tools/inspect/deprecated_macro_check.cpp b/tools/inspect/deprecated_macro_check.cpp
index 8d9543cbd..f98598233 100644
--- a/tools/inspect/deprecated_macro_check.cpp
+++ b/tools/inspect/deprecated_macro_check.cpp
@@ -77,8 +77,8 @@ namespace
"BOOST_HAS_STATIC_ASSERT",
"BOOST_HAS_RVALUE_REFS",
"BOOST_HAS_VARIADIC_TMPL",
- "BOOST_HAS_CHAR_16_T",
- "BOOST_HAS_CHAR_32_T",
+ "BOOST_HAS_CHAR16_T",
+ "BOOST_HAS_CHAR32_T",
NULL
};
} // unnamed namespace
@@ -91,8 +91,8 @@ namespace boost
deprecated_macro_check::deprecated_macro_check()
: m_files_with_errors(0)
, m_from_boost_root(
- fs::exists(fs::initial_path() / "boost") &&
- fs::exists(fs::initial_path() / "libs"))
+ fs::exists(search_root_path() / "boost") &&
+ fs::exists(search_root_path() / "libs"))
{
register_signature( ".c" );
register_signature( ".cpp" );
diff --git a/tools/inspect/doc/inspect.qbk b/tools/inspect/doc/inspect.qbk
index 87f95e69a..a16968f37 100644
--- a/tools/inspect/doc/inspect.qbk
+++ b/tools/inspect/doc/inspect.qbk
@@ -48,8 +48,8 @@ The program is run in the directory to be scanned for errors. Sub-directories ar
If the first program argument is -help, a usage message is displayed, showing all available program options:
[pre
-Usage: inspect \[-cvs\] \[-text\] \[-brief\] \[options...\]
-
+Usage: inspect \[search-root\] \[-cvs\] \[-text\] \[-brief\] \[options...\]
+ search-root default is the current directory
Options:
-license
-copyright
@@ -61,6 +61,7 @@ Usage: inspect \[-cvs\] \[-text\] \[-brief\] \[options...\]
-ascii
-apple_macro
-assert_macro
+ -deprecated_macro
-minmax
-unnamed
default is all checks on; otherwise options specify desired checks
diff --git a/tools/inspect/inspect.cpp b/tools/inspect/inspect.cpp
index 466408bfd..9aa93809b 100644
--- a/tools/inspect/inspect.cpp
+++ b/tools/inspect/inspect.cpp
@@ -59,7 +59,7 @@ const char* boost_no_inspect = "boost-" "no-inspect";
#include "minmax_check.hpp"
#include "unnamed_namespace_check.hpp"
-#include "cvs_iterator.hpp"
+//#include "cvs_iterator.hpp"
#if !defined(INSPECT_USE_BOOST_TEST)
#define INSPECT_USE_BOOST_TEST 0
@@ -75,6 +75,8 @@ using namespace boost::inspect;
namespace
{
+ fs::path search_root = fs::initial_path();
+
class inspector_element
{
typedef boost::shared_ptr< boost::inspect::inspector > inspector_ptr;
@@ -221,10 +223,13 @@ namespace
bool visit_predicate( const path & pth )
{
- string local( boost::inspect::relative_to( pth, fs::initial_path() ) );
+ string local( boost::inspect::relative_to( pth, search_root_path() ) );
string leaf( pth.leaf().string() );
+ if (leaf[0] == '.') // ignore hidden by convention directories such as
+ return false; // .htaccess, .git, .svn, .bzr, .DS_Store, etc.
+
return
- // so we can inspect a checkout
+ // so we can inspect a CVS checkout
leaf != "CVS"
// don't look at binaries
&& leaf != "bin"
@@ -232,15 +237,6 @@ namespace
// no point in checking doxygen xml output
&& local.find("doc/xml") != 0
&& local.find("doc\\xml") != 0
- // ignore some web files
- && leaf != ".htaccess"
- // ignore svn files:
- && leaf != ".svn"
- // ignore other version control files
- && leaf != ".git"
- && leaf != ".bzr"
- // ignore OS X directory info files:
- && leaf != ".DS_Store"
// ignore if tag file present
&& !boost::filesystem::exists(pth / boost_no_inspect)
;
@@ -330,7 +326,6 @@ namespace
for ( DirectoryIterator itr( dir_path ); itr != end_itr; ++itr )
{
-
if ( fs::is_directory( *itr ) )
{
if ( visit_predicate( *itr ) )
@@ -340,7 +335,7 @@ namespace
visit_all<DirectoryIterator>( cur_lib, *itr, insps );
}
}
- else
+ else if (itr->path().leaf().string()[0] != '.') // ignore if hidden
{
++file_count;
string content;
@@ -370,7 +365,7 @@ namespace
void display_summary_helper( const string & current_library, int err_count )
{
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout << " " << current_library << " (" << err_count << ")\n";
}
@@ -389,7 +384,7 @@ namespace
void display_summary()
{
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout << "Summary:\n";
}
@@ -416,7 +411,7 @@ namespace
}
display_summary_helper( current_library, err_count );
- if (display_text == display_format)
+ if (display_format == display_text)
std::cout << "\n";
else
std::cout << "</blockquote>\n";
@@ -453,7 +448,7 @@ namespace
void display_details()
{
- if (display_text == display_format)
+ if (display_format == display_text)
{
// display error messages with group indication
error_msg current;
@@ -592,7 +587,9 @@ namespace
void display_worst_offenders()
{
- if (display_text == display_format)
+ if (display_mode == display_brief)
+ return;
+ if (display_format == display_text)
{
std::cout << "Worst Offenders:\n";
}
@@ -612,7 +609,7 @@ namespace
|| itr->error_count == last_error_count);
++itr, ++display_count )
{
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout << itr->library << " " << itr->error_count << "\n";
}
@@ -628,7 +625,7 @@ namespace
last_error_count = itr->error_count;
}
- if (display_text == display_format)
+ if (display_format == display_text)
std::cout << "\n";
else
std::cout << "</blockquote>\n";
@@ -687,6 +684,12 @@ namespace boost
return display_format ? "\n" : "<br>\n";
}
+// search_root_path --------------------------------------------------------//
+
+ path search_root_path()
+ {
+ return search_root;
+ }
// register_signature ------------------------------------------------------//
@@ -704,7 +707,7 @@ namespace boost
++error_count;
error_msg err_msg;
err_msg.library = library_name;
- err_msg.rel_path = relative_to( full_path, fs::initial_path() );
+ err_msg.rel_path = relative_to( full_path, search_root_path() );
err_msg.msg = msg;
err_msg.line_number = line_number;
msgs.push_back( err_msg );
@@ -775,7 +778,7 @@ namespace boost
// may return an empty string [gps]
string impute_library( const path & full_dir_path )
{
- path relative( relative_to( full_dir_path, fs::initial_path() ) );
+ path relative( relative_to( full_dir_path, search_root_path() ) );
if ( relative.empty() ) return "boost-root";
string first( (*relative.begin()).string() );
string second = // borland 5.61 requires op=
@@ -809,7 +812,9 @@ int cpp_main( int argc_param, char * argv_param[] )
if ( argc > 1 && (std::strcmp( argv[1], "-help" ) == 0
|| std::strcmp( argv[1], "--help" ) == 0 ) )
{
- std::clog << "Usage: inspect [-cvs] [-text] [-brief] [options...]\n\n"
+ //std::clog << "Usage: inspect [search-root] [-cvs] [-text] [-brief] [options...]\n\n"
+ std::clog << "Usage: inspect [search-root] [-text] [-brief] [options...]\n\n"
+ " search-root default is the current directory (i.e. '.')\n\n"
" Options:\n"
<< options() << '\n';
return 0;
@@ -828,14 +833,20 @@ int cpp_main( int argc_param, char * argv_param[] )
bool deprecated_ck = true;
bool minmax_ck = true;
bool unnamed_ck = true;
- bool cvs = false;
+ //bool cvs = false;
- if ( argc > 1 && std::strcmp( argv[1], "-cvs" ) == 0 )
+ if ( argc > 1 && *argv[1] != '-' )
{
- cvs = true;
+ search_root = fs::canonical(fs::absolute(argv[1], fs::initial_path()));
--argc; ++argv;
}
+ //if ( argc > 1 && std::strcmp( argv[1], "-cvs" ) == 0 )
+ //{
+ // cvs = true;
+ // --argc; ++argv;
+ //}
+
if ( argc > 1 && std::strcmp( argv[1], "-text" ) == 0 )
{
display_format = display_text;
@@ -907,8 +918,6 @@ int cpp_main( int argc_param, char * argv_param[] )
}
string inspector_keys;
- fs::initial_path();
-
{ // begin reporting block
@@ -944,13 +953,13 @@ int cpp_main( int argc_param, char * argv_param[] )
if ( unnamed_ck )
inspectors.push_back( inspector_element( new boost::inspect::unnamed_namespace_check ) );
- // perform the actual inspection, using the requested type of iteration
- if ( cvs )
- visit_all<hack::cvs_iterator>( "boost-root",
- fs::initial_path(), inspectors );
- else
- visit_all<fs::directory_iterator>( "boost-root",
- fs::initial_path(), inspectors );
+ //// perform the actual inspection, using the requested type of iteration
+ //if ( cvs )
+ // visit_all<hack::cvs_iterator>( search_root.leaf().string(),
+ // search_root, inspectors );
+ //else
+ visit_all<fs::directory_iterator>( search_root.leaf().string(),
+ search_root, inspectors );
// close
for ( inspector_list::iterator itr = inspectors.begin();
@@ -962,17 +971,13 @@ int cpp_main( int argc_param, char * argv_param[] )
string run_date ( "n/a" );
boost::time_string( run_date );
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout
<<
"Boost Inspection Report\n"
"Run Date: " << run_date << "\n"
"\n"
- "An inspection program <http://www.boost.org/tools/inspect/index.html>\n"
- "checks each file in the current Boost CVS for various problems,\n"
- "generating an HTML page as output.\n"
- "\n"
;
std::cout
@@ -1014,7 +1019,7 @@ int cpp_main( int argc_param, char * argv_param[] )
;
std::cout
<< "<p>The files checked were from "
- << info( fs::initial_path() )
+ << info( search_root_path() )
<< ".</p>\n";
@@ -1036,14 +1041,14 @@ int cpp_main( int argc_param, char * argv_param[] )
;
}
- if (display_text == display_format)
+ if (display_format == display_text)
std::cout << "\nProblem counts:\n";
else
std::cout << "\n<h2>Problem counts</h2>\n<blockquote><p>\n" ;
} // end of block: starts reporting
- if (display_text == display_format)
+ if (display_format == display_text)
std::cout << "\n" ;
else
std::cout << "</blockquote>\n";
@@ -1053,14 +1058,14 @@ int cpp_main( int argc_param, char * argv_param[] )
worst_offenders_count();
std::stable_sort( libs.begin(), libs.end() );
- if ( !libs.empty() )
+ if ( !libs.empty() && display_mode != display_brief)
display_worst_offenders();
if ( !msgs.empty() )
{
display_summary();
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout << "Details:\n" << inspector_keys;
std::cout << "\nDirectories with a file named \"" << boost_no_inspect << "\" will not be inspected.\n"
@@ -1075,7 +1080,7 @@ int cpp_main( int argc_param, char * argv_param[] )
display_details();
}
- if (display_text == display_format)
+ if (display_format == display_text)
{
std::cout << "\n\n" ;
}
@@ -1086,5 +1091,5 @@ int cpp_main( int argc_param, char * argv_param[] )
"</html>\n";
}
- return 0;
+ return error_count ? 1 : 0;
}
diff --git a/tools/inspect/inspector.hpp b/tools/inspect/inspector.hpp
index ad9fdd01f..408a4f868 100644
--- a/tools/inspect/inspector.hpp
+++ b/tools/inspect/inspector.hpp
@@ -28,6 +28,8 @@ namespace boost
const char * line_break();
+ path search_root_path();
+
class inspector
{
protected:
diff --git a/tools/inspect/link_check.cpp b/tools/inspect/link_check.cpp
index ca692bdfb..182af3bf7 100644
--- a/tools/inspect/link_check.cpp
+++ b/tools/inspect/link_check.cpp
@@ -123,7 +123,7 @@ namespace boost
{
// keep track of paths already encountered to reduce disk activity
if ( !fs::is_directory( full_path ) )
- m_paths[ relative_to( full_path, fs::initial_path() ) ] |= m_present;
+ m_paths[ relative_to( full_path, search_root_path() ) ] |= m_present;
}
// inspect ( .htm, .html, .shtml, .css ) -----------------------------------//
@@ -134,7 +134,7 @@ namespace boost
const string & contents ) // contents of file to be inspected
{
if (contents.find( "boostinspect:" "nounlinked" ) != string::npos)
- m_paths[ relative_to( full_path, fs::initial_path() ) ] |= m_nounlinked_errors;
+ m_paths[ relative_to( full_path, search_root_path() ) ] |= m_nounlinked_errors;
bool no_link_errors =
(contents.find( "boostinspect:" "nolink" ) != string::npos);
@@ -438,7 +438,7 @@ namespace boost
// create a m_paths entry if necessary
std::pair< const string, int > entry(
- relative_to( target_path, fs::initial_path() ), 0 );
+ relative_to( target_path, search_root_path() ), 0 );
m_path_map::iterator itr( m_paths.find( entry.first ) );
if ( itr == m_paths.end() )
{
@@ -476,7 +476,7 @@ namespace boost
&& itr->first.rfind( "index.htm" ) == string::npos )
{
++m_unlinked_errors;
- path full_path( fs::initial_path() / path(itr->first) );
+ path full_path( search_root_path() / path(itr->first) );
error( impute_library( full_path ), full_path, "Unlinked file" );
}
}
diff --git a/tools/inspect/link_check.hpp b/tools/inspect/link_check.hpp
index 2878c4db0..726cd91f4 100644
--- a/tools/inspect/link_check.hpp
+++ b/tools/inspect/link_check.hpp
@@ -30,7 +30,7 @@ namespace boost
long m_duplicate_bookmark_errors;
typedef std::map< string, int > m_path_map;
- m_path_map m_paths; // first() is relative initial_path()
+ m_path_map m_paths; // first() is relative to search_root_path()
void do_url( const string & url, const string & library_name,
const path & full_source_path, bool no_link_errors,
diff --git a/tools/inspect/path_name_check.cpp b/tools/inspect/path_name_check.cpp
index 87bc6842c..0714e20c0 100644
--- a/tools/inspect/path_name_check.cpp
+++ b/tools/inspect/path_name_check.cpp
@@ -82,7 +82,7 @@ namespace boost
//}
// the path, including a presumed root, does not exceed the maximum size
- path const relative_path( relative_to( full_path, filesystem::initial_path() ) );
+ path const relative_path( relative_to( full_path, search_root_path() ) );
const unsigned max_relative_path = 207; // ISO 9660:1999 sets this limit
const string generic_root( "boost_X_XX_X/" );
if ( relative_path.string().size() >
diff --git a/tools/inspect/tab_check.hpp b/tools/inspect/tab_check.hpp
index 9cc4cc3f9..fb7f617ba 100644
--- a/tools/inspect/tab_check.hpp
+++ b/tools/inspect/tab_check.hpp
@@ -20,7 +20,7 @@ namespace boost
public:
tab_check();
- virtual const char * name() const { return "*Tab*"; }
+ virtual const char * name() const { return "*Tabs*"; }
virtual const char * desc() const { return "tabs in file"; }
virtual void inspect(
diff --git a/tools/inspect/time_string.hpp b/tools/inspect/time_string.hpp
index fc005dddd..72ca43968 100644
--- a/tools/inspect/time_string.hpp
+++ b/tools/inspect/time_string.hpp
@@ -8,7 +8,7 @@
//
// ------------------------------------------------------------------
//
-// $Id: time_string.hpp 47222 2008-07-08 14:29:03Z bemandawes $
+// $Id$
#ifndef BOOST_TIME_STRING_HPP_GP_20060731
#define BOOST_TIME_STRING_HPP_GP_20060731
diff --git a/tools/inspect/unnamed_namespace_check.cpp b/tools/inspect/unnamed_namespace_check.cpp
index 3850e3af6..92431a171 100644
--- a/tools/inspect/unnamed_namespace_check.cpp
+++ b/tools/inspect/unnamed_namespace_check.cpp
@@ -15,7 +15,7 @@ namespace
{
boost::regex unnamed_namespace_regex(
- "\\<namespace\\s(\\?\\?<|\\{)" // trigraph ??< or {
+ "\\<namespace\\s*(\\?\\?<|\\{)" // trigraph ??< or {
);
} // unnamed namespace (ironical? :-)
diff --git a/tools/quickbook/doc/1_6.qbk b/tools/quickbook/doc/1_6.qbk
index 05eb90231..7a10cb129 100644
--- a/tools/quickbook/doc/1_6.qbk
+++ b/tools/quickbook/doc/1_6.qbk
@@ -1,50 +1,54 @@
[/
Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
- Copyright 2010-2011 Daniel James
+ Copyright 2010-2013 Daniel James
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)
]
-[chapter Language Versions
- [quickbook 1.6]
- [compatibility-mode 1.5]
- [id quickbook.versions]
- [source-mode teletype]
-]
-
-[section:stable Stable Versions]
-
-Since quickbook 1.3 the `quickbook` attribute in the document block selects
-which version of the language to use. Not all changes to quickbook are
-implemented using a version switch, it's mainly just the changes that change
-the way a document is interpreted or would break existing documentation.
-
-[heading Quickbook 1.3 and later]
-
-* Introduced quickbook language versioning.
-* In the documentation info, allow phrase markup in license and purpose
- attributes.
-* Fully qualified section and headers. Subsection names are concatenated to the
- ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`.
+[section:1_6 Quickbook 1.6]
-[heading Quickbook 1.5 and later]
+Upgrading a document from an earlier version of quickbook shouldn't be too
+hard. The first thing to do is update the version in the docinfo block.
+For example, if you were updating the Xpressive documentation, the existing
+docinfo block looks like:
-* Ignore template argument separators inside square brackets.
-* Don't separate the final template argument if the `..` separator was
- used. i.e. never mix `..` and whitespace separators.
-* Statically scope templates and their arguments rather than dynamically
- scope them.
-* Give table ids, and let you set them.
-* Allow spaces between the `:` character and ids in elements which can
- have ids.
+ [library Boost.Xpressive
+ [quickbook 1.3]
+ ...
+ ]
-[endsect]
+Change this to:
-[section:1_6 Quickbook 1.6]
+ [library Boost.Xpressive
+ [quickbook 1.6]
+ [compatibility-mode 1.3]
+ ...
+ ]
-Everything described in here may change depending on the feedback received.
+The =compatibility-mode= tag ensures that automatically generated links
+won't change. It might turn out that it isn't required, but in Xpressive's
+case if it isn't included it will break a lot of links.
+
+Then try building it. You might need to fix some stray square brackets. The
+new version has a stricter parser which will have an error for brackets
+which don't pair up. They might be there by mistake, in which case they
+should probably be deleted, or if they're intentional escaped. For example,
+to write out the half-open range \[a,b), use: `\[a,b)`.
+
+Next, you might need to reconsider how templates and macros are defined.
+If you `include` a file to use its templates, you'll now need to `import` it
+instead as templates are now scoped by included files. Also, if you define
+templates and macros in your main quickbook file, you might want to put them
+into a separate file and `import` that, which allows the main documentation
+files to concentrate on the structure and contents of the document, making them
+easier to read.
+
+Now that headings can have ids, it can be a good idea to add ids to existing
+headings. This means that the headings will have more predictable ids which
+don't change when the text of the heading changes. In order to preserve
+links you can use the existing generated id as the heading.
[section:docinfo Includes with docinfo]
@@ -246,187 +250,38 @@ if you're totally sure that you will need it.
[endsect] [/xmlbase]
-[section:elements New Elements]
+[section:template_parser Improved template parser]
-[section:block `block`]
+There's a new parser for template declarations and parameters which does
+a better job of understanding escaped and bracketed text. Unfortunately
+it does not understand element names so there are some cases where it
+could go wrong. For example:
-`block` is a block element that just marks its contents as a block,
-so that they aren't wrapped in paragraph tags. The main use is
-for escaped docbook block tags, such as:
-
- [template chapter[title]
- [block'''<chapter><title>'''[title]'''</title>''']
+ [template doesnt_work[]
+ [ordered_list
+ [`code phrase`]
]
-
- [template chapterend
- [block'''</chapter>''']
]
- [chapter An example chapter]
+In this case it will think the `[\`` is a template call and give a parse
+error. To work around this put an escaped space before the code phrase:
- Content
-
- [chapterend]
-
-Without the `block` element, the `chapter` and `chapterend` templates
-would be wrapped in paragraph tags.
-
-[note In this example, the template body has to start with a newline so that
-the template will be interpreted in block mode.]
-
-[endsect]
-
-[section:lists `ordered_list` and `itemized_list`]
-
-These are used as an alternative to the normal wiki-style markup for
-lists. They make it easier to nest lists inside other elements, and
-nest elements inside lists. The markup is similar to a single level
-table:
-
- [ordered_list [item1][item2]]
-
-is equivalent to:
-
- # item1
- # item2
-
-[endsect]
-
-[section:role `role`]
-
-`role` is a phrase element used to mark up the text in the eventual html
-with an a class. For example:
-
- [role red Text content]
-
-Will generate the docbook:
-
- <phrase role="red">Text content</phrase>
-
-Which will generate html along the lines of:
-
- <span class="red">Text content</span>
-
-And then you can use css to style this however you wish.
-
-[endsect]
+ [template works[]
+ [ordered_list
+ [\ `code phrase`]
+ ]
+ ]
[endsect]
-[section:listparagraphs Pargraphs in lists]
-
-I'm still refining this, but paragraphs and block elements can now be used
-in lists:
-
-[pre
-* Para 1
-
- Para 2
- * Nested Para 1
-
- Nested Para 2
-
- Code block
- Para 3
-]
-
-generates:
-
-* Para 1
-
- Para 2
- * Nested Para 1
-
- Nested Para 2
+[section:elements New Elements]
- Code block
- Para 3
+New elements added in quickbook 1.6:
-The docbook markup that this generates is pretty bad, but seems to create okay
-html.
+* [link quickbook.ref.block `block`]
+* [link quickbook.ref.list_tags `ordered_list` and `itemized_list`]
+* [link quickbook.ref.role `role`]
-[endsect]
+[endsect] [/ elements]
[endsect] [/ Quickbok 1.6]
-
-[section:1_7 Quickbook 1.7]
-
-[section:source_mode Source mode for single entities]
-
-1.7 introduces a new `!` element type for setting the source mode of a single
-entity without changing the source mode otherwise. This can be used for
-code blocks and other elements. For example:
-
-```
-[!c++]
- void foo() {};
-
-[!python]``\`\`\`\ ``def foo():``\`\`\`\ ``
-```
-
-It can also be used to set the source mode for elements:
-
-```
-[!teletype][table
- [[code][meaning]]
- [[`+`][addition]]
-]
-```
-
-When used a section, it's only set for the section element, not the
-whole section.
-
-Currently it does support other syntactic entities such as paragraphs
-and lists. I'm not sure if it would be a good idea.
-
-[endsect]
-
-[section:callouts Callouts in code block]
-
-Currently callouts can only be used in code snippets. 1.7 add
-support in normal code blocks. The same syntax is used as in
-code snippets, the callout descriptions appear immediately
-after the code block.
-
-[endsect]
-
-[section:escaped_docinfo_attributes Escaped docbook in docinfo blocks]
-
-Quickbook docinfo attributes will probably never be as rich as docbook
-attributes so to allow more flexible markup, not supported by quickbook
-escaped docbook can be included in the docinfo block:
-
-```
-[article Some article
-[quickbook 1.7]
-'''<author>
- <firstname>John</firstname>
- <surname>Doe</surname>
- <email>john.doe@example.com</email>
-</author>'''
-]
-```
-
-The escaped docbook is always placed at the end of the docinfo block,
-so it shouldn't be assumed that it will interleave the markup. A mixture
-of quickbook and docbook attributes for the same information will not work
-well.
-
-[endsect] [/escaped_docinfo_attributes]
-
-[section:templates_in_link_values Templates in link values]
-
-There's very premilinary support for calling templates in link values. A lot
-more work needs to be done, including:
-
-* Considering other places where templates could be called (e.g. images are
- quite tricky, as templates could get confused with attributes, should
- templates be callable from something like an element's id?).
-* Trimming spaces from the body of the template (which can cause surprising
- results).
-* Checking that the contents of the template are appropriate for the context.
- Possibly even using a different grammar.
-
-[endsect] [/templates_in_link_values]
-
-[endsect] [/ Quickbok 1.7]
diff --git a/tools/quickbook/doc/1_7.qbk b/tools/quickbook/doc/1_7.qbk
new file mode 100644
index 000000000..745247fe4
--- /dev/null
+++ b/tools/quickbook/doc/1_7.qbk
@@ -0,0 +1,191 @@
+[/
+ Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
+ Copyright 2012-2013 Daniel James
+
+ 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)
+]
+
+[section:1_7 Quickbook 1.7]
+
+[section:context_error Error for elements used in incorrect context]
+
+Previously if you used an element in the wrong context it would just be
+unprocessed, which was surprising. People often didn't realise that their
+element hadn't been processed. So now it's an error.
+
+[endsect]
+
+[section:phrase_parse_error Error for invalid phrase elements]
+
+If the body of a phrase element didn't parse, it would be just used
+unprocessed. Now change it to be a hard error.
+
+[endsect]
+
+[section:source_mode Source mode for single entities]
+
+1.7 introduces a new `!` element type for setting the source mode of a single
+entity without changing the source mode otherwise. This can be used for
+code blocks and other elements. For example:
+
+```
+[!c++]
+ void foo() {};
+
+[!python]``\`\`\`\ ``def foo():``\`\`\`\ ``
+```
+
+It can also be used to set the source mode for elements:
+
+```
+[!teletype][table
+ [[code][meaning]]
+ [[`+`][addition]]
+]
+```
+
+When used before a section, it sets the source mode for the whole section.
+
+If it appears at the beginning of a paragraph, it will be used for the
+whole paragraph only if there's a newline, eg.
+
+```
+[!c++]
+A declaration `void foo();` and a definition `void foo() {}`.
+```
+
+[endsect]
+
+[section:callouts Callouts in code blocks]
+
+Currently callouts can only be used in code snippets. 1.7 adds
+support in normal code blocks. The same syntax is used as in
+code snippets, the callout descriptions appear immediately
+after the code block.
+
+[endsect]
+
+[section:escaped_docinfo_attributes Escaped docbook in docinfo blocks]
+
+Quickbook docinfo attributes will probably never be as rich as docbook
+attributes. To allow more flexible markup that is not supported by quickbook,
+escaped docbook can be included in the docinfo block:
+
+```
+[article Some article
+[quickbook 1.7]
+'''<author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>'''
+]
+```
+
+The escaped docbook is always placed at the end of the docinfo block,
+so it shouldn't be assumed that it will interleave with markup generated from
+quickbook. A mixture
+of quickbook and docbook attributes for the same information will not work
+well.
+
+[endsect] [/escaped_docinfo_attributes]
+
+[section:listparagraphs Pargraphs in lists]
+
+Paragraphs and block elements can now be used in lists:
+
+[pre
+* Para 1
+
+ Para 2
+ * Nested Para 1
+
+ Nested Para 2
+
+ Code block
+ Para 3
+]
+
+generates:
+
+* Para 1
+
+ Para 2
+ * Nested Para 1
+
+ Nested Para 2
+
+ Code block
+ Para 3
+
+[endsect]
+
+[section:templates_in_attributes Templates in some attributes]
+
+There's support for calling templates in link values, anchors, roles and
+includes. This is sometimes a bit of a change, especially in places where
+spaces are currently allowed, so I might try using a slightly different
+grammar where required. I think I also need to add some validation, since
+the parser can allow more symbols than some of the old ones.
+
+[endsect] [/templates_in_attributes]
+
+[section:list_markup_in_tables List Markup in Nested Blocks]
+
+Can now place list markup in nested blocks, e.g in tables, variables lists etc.
+Unfortunately indented code blocks are more tricky, because the contents of
+these blocks are often indented already. It seemed easier to just not support
+indented code blocks in this context than to try to work out sensible actions
+for the edges cases. If you want to use code blocks in this context, you should
+still be able to use explicit markup.
+
+[endsect]
+
+[section:phrase_block_templates Allow block elements in phrase templates]
+
+Block elements can now be used in phrase templates, but paragraphs breaks aren't
+allowed, so this is an error:
+
+ [template paras[] Something or other.
+
+ Second paragraph.]
+
+If a phrase template only contains block elements, then it's practically
+indistinguishable from a block template. So you'll get the same output from:
+
+ [template foo[] [blurb Blah, blah, blah]]
+
+as:
+
+ [template foo[]
+ [blurb Blah, blah, blah]
+ ]
+
+If a phrase template has phrase content mixed with block elements, it'll generate
+output as if it was expanded inline.
+
+[endsect]
+
+[section:glob Including multiple files with Globs]
+
+One can now include multiple files at once using a glob pattern for the
+file reference:
+
+ [include sub/*/*.qbk]
+ [include include/*.h]
+
+All the matching files, and intermediate irectories, will match and be
+included. The glob pattern can be "\*" for matching zero or more characters,
+"?" for matching a single character, "\[<c>-<c>\]" to match a character class,
+"\[\^<char>-<char>\]" to exclusive match a character class, "\\\\" to escape
+a glob special character which is then matched, and anything else is matched
+to the character.
+
+[note Because of the escaping in file references the "\\\\" glob escape is
+a double "\\"; i.e. and escaped back-slash.]
+
+[endsect]
+
+[endsect] [/ Quickbok 1.7]
diff --git a/tools/quickbook/doc/Jamfile.v2 b/tools/quickbook/doc/Jamfile.v2
index f2f11f09e..bfa759157 100644
--- a/tools/quickbook/doc/Jamfile.v2
+++ b/tools/quickbook/doc/Jamfile.v2
@@ -8,7 +8,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#==============================================================================
-project boost/quickbook/doc ;
+project quickbook/doc ;
using boostbook ;
using quickbook ;
@@ -21,7 +21,11 @@ boostbook standalone
:
quickbook
:
- <xsl:param>boost.root=../../../..
+ <format>html:<xsl:param>boost.root=../../../..
+ <format>html:<xsl:param>img.src.path=../../../../doc/html/
+ <format>xhtml:<xsl:param>boost.root=../../../..
+ <format>xhtml:<xsl:param>img.src.path=../../../../doc/html/
+
#<xsl:param>callout.graphics.path=../../images/callouts//
<format>pdf:<xsl:param>img.src.path=$(images)/
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
diff --git a/tools/quickbook/doc/block.qbk b/tools/quickbook/doc/block.qbk
index c6765131f..1be2041b3 100644
--- a/tools/quickbook/doc/block.qbk
+++ b/tools/quickbook/doc/block.qbk
@@ -26,6 +26,38 @@ You can include another XML file with:
This is useful when file.xml has been generated by Doxygen and contains your
reference section.
+=xinclude= paths are normally used unchanged in the generated documentation,
+which will not work if you wish them to be relative to the current quickbook
+file. Quickbook can add a =xml:base= attribute to the boostbook documentation
+to specify where =xinclude= files should be found. For example, if you wish
+them to be relative to the current quickbook file:
+
+ [article Article with xincludes
+ [quickbook 1.6]
+ [xmlbase .]
+ ]
+
+ [xinclude file.xml]
+
+Now the xinclude should work if =file.xml= is in the same directory as the
+quickbook file. Although it might not work if you distribute the generated
+files (as their relative directories can change).
+
+Say the article is generated in a sub-directory, by running something like:
+
+ quickbook article.qbk --output-file=output/article.xml
+
+This will generate a boostbook root tag:
+
+ <article id="article_with_xincludes"
+ last-revision="$Date: 2013/08/20 08:26:48 $"
+ xml:base=".."
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+Because =xml:base= is set to =..=, the xml processor will know to look in
+the parent directory to find =file.xml=, which it comes across the
+=xi:include= tag.
+
[endsect] [/xinclude]
[#quickbook.ref.paragraphs]
@@ -190,6 +222,31 @@ will generate:
* 2.b.2.b
[endsect] [/mixed_lists]
+
+[#quickbook.ref.list_tags]
+[section:list_tags Explicit list tags]
+
+Sometimes the wiki-style list markup can be tricky to use, especially
+if you wish to include more complicated markup with the list. So in
+quickbook 1.6, an alternative way to mark up lists introduced:
+
+ [ordered_list [item1][item2]]
+
+is equivalent to:
+
+ # item1
+ # item2
+
+And:
+
+ [itemized_list [item1][item2]]
+
+is equivalent to:
+
+ * item1
+ * item2
+
+[endsect] [/list_tags]
[endsect] [/lists]
[#quickbook.ref.code]
@@ -356,8 +413,23 @@ to produce the desired effect.
[h5 Heading 5]
[h6 Heading 6]
-Headings 1-3 \[h1 h2 and h3\] will automatically have anchors with
-normalized names with
+You can specify an id for a heading:
+
+```
+[h1:heading_id A heading to link to]
+```
+
+To link to it, you'll need to include the enclosing section's id:
+
+```
+[link document_id.section_id.heading_id The link text]
+```
+
+Although you can preceed a heading by an [link quickbook.ref.anchors anchor]
+if you wish to use a location independent link.
+
+If a heading doesn't have an id, one will be automatically generated
+with a normalized name with
[^name="document_id.section_id.normalized_header_text"] (i.e. valid
characters are =a-z=, =A-Z=, =0-9= and =_=. All non-valid characters are
converted to underscore and all upper-case are converted to lower-case.
@@ -370,6 +442,9 @@ For example: Heading 1 in section Section 2 will be normalized to
to link to them. See __anchor_links__ and __section__ for more info.
+[note Specifying heading ids is a quickbook 1.6 feature, earlier
+ versions don't support them.]
+
[endsect] [/headings]
[#quickbook.ref.generic_heading]
@@ -393,7 +468,7 @@ however, headings in a particular section is just flat. Example:
```
[section A]
[h2 X]
-[h2 Y]
+[h2:link_id Y]
[h2 Z]
[endsect]
```
@@ -965,17 +1040,25 @@ You can include one QuickBook file from another. The syntax is simply:
[include someother.qbk]
```
-The included file will be processed as if it had been cut and pasted
+In quickbook 1.6 and later, if the included file has a
+[link quickbook.ref.docinfo docinfo block] then it will create a nested
+document. This will be processed as a standalone document, although any macros
+or templates from the enclosing file will still be defined.
+
+Otherwise the included file will be processed as if it had been cut and pasted
into the current document, with the following exceptions:
* The '''__FILENAME__''' predefined macro will reflect the name of the
file currently being processed.
-* Any macros defined in the included file are scoped to that file.
+* Any macros or templates defined in the included file are scoped to that file,
+ i.e. they are not added to the enclosing file.
+
+[note In quickbook 1.5 and earlier templates weren't scoped in included files.
+If you want to use templates or macros from a file in quickbook 1.6,
+use [link quickbook.ref.import import] instead.]
The [^\[include\]] directive lets you specify a document id to use for the
-included file. When this id is not explicitly specified, the id defaults to
-the filename ("someother", in the example above). You can specify the id
-like this:
+included file. You can specify the id like this:
```
[include:someid someother.qbk]
@@ -986,11 +1069,70 @@ for instance, if there is a top section in someother.qbk named "Intro", the
named anchor for that section will be "someid.intro", and you can link to
it with [^\[link someid.intro The Intro\]].
+If the included file has a docinfo block, an id specified in an [^\[include\]]
+directive will overwrite it.
+
+You can also include C, C++ and python source files. This will include any
+quickbook blocks in the file that aren't inside of named code snippets. See
+the [link quickbook.ref.import Import section] for syntax details. For example,
+say you included this file:
+
+ /**
+ * Hello world example
+ */
+
+ // In this comment, the backtick indicates that this is a
+ // quickbook source block that will be included.
+
+ /*`
+ First include the appropriate header: [hello_includes]
+ Then write your main function: [hello_main]
+ */
+
+ // This defines a code snippet, the syntax is
+ // described in the import section. It's available
+ // in the whole of this source file, not just after
+ // its definition.
+
+ //[hello_includes
+ #include <iostream>
+ //]
+
+ //[hello_main
+ int main() {
+ std::cout << "Hello, trivial example" << std::endl;
+ }
+ //]
+
+It will generate:
+
+ First include the appropriate header:
+
+ #include <iostream>
+
+ Then write your main function:
+
+ int main() {
+ std::cout << "Hello, trivial example" << std::endl;
+ }
+
[endsect] [/include]
[#quickbook.ref.import]
[section:import Import]
+In quickbook 1.6 and later if you wish to use a template, macro or code
+snippet from a file, you need to import it. This will not include any
+of the content from that file, but will pull templates, macros and code
+snippets into the current file's scope.
+
+With quickbook files, this allows you to create template and macro
+libraries. For python (indicated by the `.py` extension), C or
+C++ files this allows you to include code snippets from source files,
+so that your code examples can be kept up to date and fully tested.
+
+[/ Old justification text, might move this into a new section:
+
When documenting code, you'd surely need to present code from actual source
files. While it is possible to copy some code and paste them in your QuickBook
file, doing so is error prone and the extracted code in the documentation tends
@@ -999,6 +1141,7 @@ always, is that once documentation is written, the tendency is for the docs to
languish in the archives without maintenance.
QuickBook's import facility provides a nice solution.
+]
[heading Example]
@@ -1132,6 +1275,36 @@ Example:
[class_]
-See the actual code here: [@boost:/tools/quickbook/test/stub.cpp]
+See the actual code here:
+[@boost:/tools/quickbook/test/stub.cpp tools/quickbook/test/stub.cpp]
[endsect] [/import]
+
+[#quickbook.ref.block]
+[section:block Plain blocks]
+
+`block` is a plain block element, that doesn't wrap its contents
+in any docbook or boostbook tags. This can be useful when using
+escaped docbook block tags, such as:
+
+ [template chapter[title]
+ [block'''<chapter><title>'''[title]'''</title>''']
+ ]
+
+ [template chapterend
+ [block'''</chapter>''']
+ ]
+
+ [chapter An example chapter]
+
+ Content
+
+ [chapterend]
+
+Without the `block` element, the `chapter` and `chapterend` templates
+would be wrapped in paragraph tags.
+
+[note In this example, the template body has to start with a newline so that
+the template will be interpreted in block mode.]
+
+[endsect] [/block]
diff --git a/tools/quickbook/doc/change_log.qbk b/tools/quickbook/doc/change_log.qbk
index 77413eb72..a4942c263 100644
--- a/tools/quickbook/doc/change_log.qbk
+++ b/tools/quickbook/doc/change_log.qbk
@@ -296,3 +296,38 @@ Boost 1.46.1:
* Convert to use `boost::string_ref`.
* Clean up the source map implementation (used to get the correct
location for error messages in things like templates and snippets).
+
+[heading Version 1.6.0 - Boost 1.55]
+
+* Remove nested blocks in lists from 1.6, move to 1.7.
+ (Can still nest block elements in lists though).
+* Don't break out of lists after a nested block element.
+* Check for errors when writing dependency files.
+* Improved markup for lists.
+* Make escaping templates with a punctuation identifier illegal.
+ Escaping templates with an alphanumeric identifier is still fine.
+* Fix detection of code blocks at the start of a file.
+* XML encode the contents of the `__FILENAME__` macro.
+* 1.7 changes:
+ * Make it an error to use an element in the wrong context.
+ * Error if the body of a phrase element doesn't parse.
+ * List markup in nested blocks.
+ * Allow block elements in phrase templates.
+ * Make it an error to put a paragraph break (i.e. a blank line)
+ in a phrase template.
+* Internal changes:
+ * Clean up the id manager implementation.
+
+[heading Version 1.6.1]
+
+* Better URI encoding of links.
+* Extra validation of attribute values.
+* 1.7 changes:
+ * Improved source mode tagging:
+ * Works for lists and paragraphs.
+ * If the source mode is changed inside a tagged element, that change
+ will now persist after the element.
+ * Tagged sections will now use the source mode for the whole section.
+ * Template calls from anchor, role and include elements.
+ * Stricter handling of templates called in attribute values.
+ * Glob support.
diff --git a/tools/quickbook/doc/language_versions.qbk b/tools/quickbook/doc/language_versions.qbk
new file mode 100644
index 000000000..df9089dc5
--- /dev/null
+++ b/tools/quickbook/doc/language_versions.qbk
@@ -0,0 +1,46 @@
+[/
+ Copyright 2002,2004,2006 Joel de Guzman, Eric Niebler
+ Copyright 2010-2013 Daniel James
+
+ 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)
+]
+
+[chapter Language Versions
+ [quickbook 1.7]
+ [compatibility-mode 1.5]
+ [id quickbook.versions]
+ [source-mode teletype]
+]
+
+[section:stable Stable Versions]
+
+Since quickbook 1.3 the `quickbook` attribute in the document block selects
+which version of the language to use. Not all changes to quickbook are
+implemented using a version switch, it's mainly just the changes that change
+the way a document is interpreted or would break existing documentation.
+
+[heading Quickbook 1.3 and later]
+
+* Introduced quickbook language versioning.
+* In the documentation info, allow phrase markup in license and purpose
+ attributes.
+* Fully qualified section and headers. Subsection names are concatenated to the
+ ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`.
+
+[heading Quickbook 1.5 and later]
+
+* Ignore template argument separators inside square brackets.
+* Don't separate the final template argument if the `..` separator was
+ used. i.e. never mix `..` and whitespace separators.
+* Statically scope templates and their arguments rather than dynamically
+ scope them.
+* Give table ids, and let you set them.
+* Allow spaces between the `:` character and ids in elements which can
+ have ids.
+
+[endsect]
+
+[include 1_6.qbk]
+[include 1_7.qbk]
diff --git a/tools/quickbook/doc/phrase.qbk b/tools/quickbook/doc/phrase.qbk
index f6f885979..2cdf57b18 100644
--- a/tools/quickbook/doc/phrase.qbk
+++ b/tools/quickbook/doc/phrase.qbk
@@ -165,6 +165,42 @@ And one for the little boy who lives down the lane.
[endsect] [/simple_formatting]
+[#quickbook.ref.role]
+[section:role Role]
+
+This generates a docbook phrase with a `role` attribute, which can be used
+to classify the phrase. This can be used to mark text for a use that isn't
+covered elsewhere. The docbook `role` will generate a html class, which can
+be used to style text. And the xsl stylesheets can be customized to treat
+certain roles specially when generating pdfs.
+
+The boostbook css stylesheets, and xsl stylesheets
+contain support for a limited number of colours that can be used with
+`role`. For example if you write:
+
+ [role red Text content]
+
+You'll get red text if you're using the boostbook css (for html) or
+the boostbook xsl for generating pdfs.
+
+The full list of colours that will be available is:
+
+* [role red red]
+* [role green green]
+* [role lime lime]
+* [role blue blue]
+* [role navy navy]
+* [role yellow yellow]
+* [role magenta magenta]
+* [role indigo indigo]
+* [role cyan cyan]
+* [role purple purple]
+* [role gold gold]
+* [role silver silver]
+* [role gray gray]
+
+[endsect] [/role]
+
[#quickbook.ref.inline_code]
[section:inline_code Inline code]
diff --git a/tools/quickbook/doc/quickbook.qbk b/tools/quickbook/doc/quickbook.qbk
index ea988f9e2..2c8de9fb9 100644
--- a/tools/quickbook/doc/quickbook.qbk
+++ b/tools/quickbook/doc/quickbook.qbk
@@ -11,7 +11,7 @@
[quickbook 1.6]
[compatibility-mode 1.5]
[id quickbook]
- [version 1.5]
+ [version 1.6]
[authors [de Guzman, Joel], [Niebler, Eric]]
[copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
[copyright 2010-2011 Daniel James]
@@ -87,8 +87,8 @@
[include structure.qbk]
[include phrase.qbk]
[include block.qbk]
-[include 1_6.qbk]
+[include language_versions.qbk]
[include install.qbk]
[include editors.qbk]
[include faq.qbk]
-[include ref.qbk] \ No newline at end of file
+[include ref.qbk]
diff --git a/tools/quickbook/doc/structure.qbk b/tools/quickbook/doc/structure.qbk
index c9a4be9c3..4e9bfb4f0 100644
--- a/tools/quickbook/doc/structure.qbk
+++ b/tools/quickbook/doc/structure.qbk
@@ -82,13 +82,37 @@ They are all optional.
[heading Quickbook specific meta data]
```
- [quickbook 1.5]
+ [quickbook 1.6]
```
The `quickbook` attribute declares the version of quickbook
the document is written for.
In its absence, version 1.1 is assumed. It's recommended that
-you use `[quickbook 1.5]` which is the version described here.
+you use `[quickbook 1.6]` which is the version described here.
+
+[note
+
+The quickbook version also makes some changes to the markup
+that's generated. Most notably, the ids that are automatically
+for headers and sections are different in later versions. To
+minimise disruption, you can use the =compatibility-mode=
+attribute to generate similar markup to the old version:
+
+```
+[article Article that was original
+ written in quickbook 1.3
+[quickbook 1.6]
+[compatibility-mode 1.3]
+]
+```
+
+This feature shouldn't be used for new documents, just for
+porting old documents to the new version.
+]
+
+Both the =quickbook= and =compatibility-mode= tags can be used
+at the start of the file, before the document info block, and
+also in files that don't have a document info block.
```
[source-mode teletype]
@@ -144,6 +168,43 @@ that's just ignored by the style sheets.
[endsect] [/attributes]
+[section:nesting Nesting quickbook documents]
+
+Docinfo blocks can only appear at the beginning of a quickbook file, so to
+create a more complicated document you need to use several quickbook files and
+use the [link quickbook.ref.include include tag] to nest them. For example, say
+you wish to create a book with an introduction and a chapter, you first create
+a file for the book:
+
+ [book Simple example
+ [quickbook 1.6]
+ ]
+
+ [include introduction.qbk]
+ [include chapter.qbk]
+
+[note Structuring a document like this was introduced in quickbook 1.6, so the
+`[quickbook 1.6]` docinfo field is required.]
+
+The appropriate document type for an introduction is `preface`, so
+the contents of `introduction.qbk` should be something like:
+
+ [preface Introduction
+ [quickbook 1.6]
+ ]
+
+ Write the introduction to the book here....
+
+And `chapter.qbk`:
+
+ [chapter A chapter
+ [quickbook 1.6]
+ ]
+
+ Chapter contents....
+
+[endsect] [/nesting]
+
[endsect] [/docinfo]
[#quickbook.ref.section]
diff --git a/tools/quickbook/src/Jamfile.v2 b/tools/quickbook/src/Jamfile.v2
index e699cd901..8d847123e 100644
--- a/tools/quickbook/src/Jamfile.v2
+++ b/tools/quickbook/src/Jamfile.v2
@@ -15,8 +15,6 @@ project quickbook
<toolset>gcc:<cflags>-g0
<toolset>darwin:<cflags>-g0
<toolset>msvc:<cflags>/wd4709
- <toolset>gcc:<define>BOOST_DETAIL_CONTAINER_FWD
- <toolset>darwin:<define>BOOST_DETAIL_CONTAINER_FWD
;
lib shell32 ;
@@ -30,9 +28,13 @@ exe quickbook
dependency_tracker.cpp
utils.cpp
files.cpp
- input_path.cpp
+ native_text.cpp
+ glob.cpp
+ include_paths.cpp
values.cpp
- id_manager.cpp
+ document_state.cpp
+ id_generation.cpp
+ id_xml.cpp
post_process.cpp
collector.cpp
template_stack.cpp
diff --git a/tools/quickbook/src/actions.cpp b/tools/quickbook/src/actions.cpp
index fdfa5eb59..1ada17594 100644
--- a/tools/quickbook/src/actions.cpp
+++ b/tools/quickbook/src/actions.cpp
@@ -23,16 +23,18 @@
#include <boost/foreach.hpp>
#include "quickbook.hpp"
#include "actions.hpp"
+#include "syntax_highlight.hpp"
#include "utils.hpp"
#include "files.hpp"
#include "markups.hpp"
#include "state.hpp"
#include "state_save.hpp"
#include "grammar.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
#include "block_tags.hpp"
#include "phrase_tags.hpp"
-#include "id_manager.hpp"
+#include "document_state.hpp"
+#include "include_paths.hpp"
namespace quickbook
{
@@ -41,12 +43,12 @@ namespace quickbook
{
// TODO: This works but is a bit of an odd place to put it.
// Might need to redefine the purpose of this function.
- if (!state.source_mode_next.empty()) {
- detail::outwarn(state.source_mode_next.get_file(),
- state.source_mode_next.get_position())
+ if (state.source_mode_next) {
+ detail::outwarn(state.source_mode_next_pos.get_file(),
+ state.source_mode_next_pos.get_position())
<< "Temporary source mode unsupported here."
<< std::endl;
- state.source_mode_next = value();
+ state.source_mode_next = 0;
}
for(quickbook::state::string_list::iterator
@@ -67,10 +69,58 @@ namespace quickbook
id_category::categories category =
id_category::explicit_anchor_id)
{
- std::string placeholder = state.ids.add_anchor(id, category);
+ std::string placeholder = state.document.add_anchor(id, category);
state.anchors.push_back(placeholder);
return placeholder;
}
+
+ std::string get_attribute_value(quickbook::state& state,
+ quickbook::value const& value)
+ {
+ std::string x = value.is_encoded() ?
+ value.get_encoded() : detail::to_s(value.get_quickbook());
+
+ if (x.empty()) {
+ detail::outerr(value.get_file(), value.get_position())
+ << "Empty attribute value."
+ << std::endl;
+ ++state.error_count;
+ x = "xxx";
+ }
+
+ return x;
+ }
+
+ std::string validate_id(quickbook::state& state,
+ quickbook::value const& id_value)
+ {
+ bool valid = true;
+ std::string id = get_attribute_value(state, id_value);
+
+ // Special case since I use dollar ids for id placeholders.
+ if (id[0] == '$') { valid = false; id[0] = '_'; }
+
+ if (qbk_version_n >= 107u) {
+ char const* allowed_punctuation = "_.-";
+
+ BOOST_FOREACH(char c, id) {
+ if (!std::isalnum(c) &&
+ !std::strchr(allowed_punctuation, c))
+ valid = false;
+ }
+ }
+
+ if (!valid) {
+ detail::outerr(id_value.get_file(), id_value.get_position())
+ << "Invalid id: "
+ << (id_value.is_encoded() ? id_value.get_encoded() :
+ detail::to_s(id_value.get_quickbook()))
+ << std::endl;
+ ++state.error_count;
+ }
+
+ return id;
+ }
}
bool quickbook_range::in_range() const {
@@ -189,6 +239,7 @@ namespace quickbook
case code_tags::inline_code_block:
case code_tags::inline_code:
return code_action(state, v);
+ case template_tags::attribute_template:
case template_tags::template_:
return do_template_action(state, v, first.base());
default:
@@ -198,7 +249,7 @@ namespace quickbook
void break_action::operator()(parse_iterator first, parse_iterator) const
{
- write_anchors(state, phrase);
+ write_anchors(state, state.phrase);
if(*first == '\\')
{
@@ -216,7 +267,7 @@ namespace quickbook
state.warned_about_breaks = true;
}
- phrase << detail::get_markup(phrase_tags::break_mark).pre;
+ state.phrase << detail::get_markup(phrase_tags::break_mark).pre;
}
void error_message_action::operator()(parse_iterator first, parse_iterator last) const
@@ -273,19 +324,23 @@ namespace quickbook
values.finish();
}
- void role_action(quickbook::state& state, value role)
+ void role_action(quickbook::state& state, value role_list)
{
write_anchors(state, state.phrase);
- value_consumer values = role;
+ value_consumer values = role_list;
+ value role = values.consume();
+ value phrase = values.consume();
+ values.finish();
+
state.phrase
<< "<phrase role=\"";
- detail::print_string(values.consume().get_quickbook(), state.phrase.get());
+ detail::print_string(get_attribute_value(state, role),
+ state.phrase.get());
state.phrase
<< "\">"
- << values.consume().get_encoded()
+ << phrase.get_encoded()
<< "</phrase>";
- values.finish();
}
void footnote_action(quickbook::state& state, value phrase)
@@ -295,7 +350,7 @@ namespace quickbook
value_consumer values = phrase;
state.phrase
<< "<footnote id=\""
- << state.ids.add_id("f", id_category::numbered)
+ << state.document.add_id("f", id_category::numbered)
<< "\"><para>"
<< values.consume().get_encoded()
<< "</para></footnote>";
@@ -322,27 +377,18 @@ namespace quickbook
while(pos != end && cl::space_p.test(*pos)) ++pos;
if(pos != end) {
- detail::markup markup = detail::get_markup(block_tags::paragraph);
+ detail::markup markup = state.in_list ?
+ detail::get_markup(block_tags::paragraph_in_list) :
+ detail::get_markup(block_tags::paragraph);
state.out << markup.pre << str;
write_anchors(state, state.out);
state.out << markup.post;
}
}
- void list_item_action::operator()() const
+ void explicit_list_action::operator()() const
{
- // Be careful as this is sometimes called in the wrong place
- // for markup such as:
- //
- // * A
- // [endsect]
- //
- // This action is called before [endsect] (to end the list item)
- // and then also after it due to the way the parser works.
- std::string str;
- state.phrase.swap(str);
- state.out << str;
- write_anchors(state, state.out);
+ state.explicit_list = true;
}
void phrase_end_action::operator()() const
@@ -358,7 +404,7 @@ namespace quickbook
{
state.out << "<bridgehead renderas=\"sect" << level << "\"";
state.out << " id=\"";
- state.out << state.ids.add_id("h", id_category::numbered);
+ state.out << state.document.add_id("h", id_category::numbered);
state.out << "\">";
state.out << "<phrase id=\"" << id << "\"/>";
state.out << "<link linkend=\"" << id << "\">";
@@ -390,7 +436,7 @@ namespace quickbook
if (generic)
{
- level = state.ids.section_level() + 1;
+ level = state.document.section_level() + 1;
// We need to use a heading which is one greater
// than the current.
if (level > 6 ) // The max is h6, clip it if it goes
@@ -405,47 +451,63 @@ namespace quickbook
if (!element_id.empty())
{
- std::string anchor = state.ids.add_id(
- element_id.get_quickbook(),
+ // Use an explicit id.
+
+ std::string anchor = state.document.add_id(
+ validate_id(state, element_id),
id_category::explicit_id);
write_bridgehead(state, level,
content.get_encoded(), anchor, self_linked_headers);
}
- else if (!generic && state.ids.compatibility_version() < 103) // version 1.2 and below
+ else if (state.document.compatibility_version() >= 106u)
{
- // This generates the old id style if both the interpreting
- // version and the generation version are less then 103u.
+ // Generate ids for 1.6+
- std::string anchor = state.ids.old_style_id(
- detail::make_identifier(
- state.ids.replace_placeholders_with_unresolved_ids(
- content.get_encoded())),
+ std::string anchor = state.document.add_id(
+ detail::make_identifier(content.get_quickbook()),
id_category::generated_heading);
write_bridgehead(state, level,
- content.get_encoded(), anchor, false);
-
+ content.get_encoded(), anchor, self_linked_headers);
}
else
{
- std::string anchor = state.ids.add_id(
- detail::make_identifier(
- state.ids.compatibility_version() >= 106 ?
- content.get_quickbook() :
- state.ids.replace_placeholders_with_unresolved_ids(
- content.get_encoded())
- ),
- id_category::generated_heading);
+ // Generate ids that are compatible with older versions of quickbook.
- write_bridgehead(state, level,
- content.get_encoded(), anchor, self_linked_headers);
+ // Older versions of quickbook used the generated boostbook, but
+ // we only have an intermediate version which can contain id
+ // placeholders. So to generate the ids they must be replaced
+ // by the ids that the older versions would have used - i.e. the
+ // unresolved ids.
+ //
+ // Note that this doesn't affect the actual boostbook generated for
+ // the content, it's just used to generate this id.
+
+ std::string id = detail::make_identifier(
+ state.document.replace_placeholders_with_unresolved_ids(
+ content.get_encoded()));
+
+ if (generic || state.document.compatibility_version() >= 103) {
+ std::string anchor =
+ state.document.add_id(id, id_category::generated_heading);
+
+ write_bridgehead(state, level,
+ content.get_encoded(), anchor, self_linked_headers);
+ }
+ else {
+ std::string anchor =
+ state.document.old_style_id(id, id_category::generated_heading);
+
+ write_bridgehead(state, level,
+ content.get_encoded(), anchor, false);
+ }
}
}
void simple_phrase_action::operator()(char mark) const
{
- write_anchors(state, out);
+ write_anchors(state, state.phrase);
int tag =
mark == '*' ? phrase_tags::bold :
@@ -461,9 +523,9 @@ namespace quickbook
value content = values.consume();
values.finish();
- out << markup.pre;
- out << content.get_encoded();
- out << markup.post;
+ state.phrase << markup.pre;
+ state.phrase << content.get_encoded();
+ state.phrase << markup.post;
}
bool cond_phrase_push::start()
@@ -480,8 +542,7 @@ namespace quickbook
state.conditional = find(state.macro, macro.c_str());
if (!state.conditional) {
- state.phrase.push();
- state.out.push();
+ state.push_output();
state.anchors.swap(anchors);
}
}
@@ -493,38 +554,23 @@ namespace quickbook
{
if (saved_conditional && !state.conditional)
{
- state.phrase.pop();
- state.out.pop();
+ state.pop_output();
state.anchors.swap(anchors);
}
state.conditional = saved_conditional;
}
- namespace {
- int indent_length(std::string const& indent)
- {
- int length = 0;
- for(std::string::const_iterator
- first = indent.begin(), end = indent.end(); first != end; ++first)
- {
- switch(*first) {
- case ' ': ++length; break;
- // hardcoded tab to 4 for now
- case '\t': length = ((length + 4) / 4) * 4; break;
- default: BOOST_ASSERT(false);
- }
- }
-
- return length;
- }
- }
-
void state::start_list(char mark)
{
- write_anchors(*this, out);
+ push_tagged_source_mode(source_mode_next);
+ source_mode_next = 0;
+
+ write_anchors(*this, (in_list ? phrase : out));
assert(mark == '*' || mark == '#');
+ push_output();
out << ((mark == '#') ? "<orderedlist>\n" : "<itemizedlist>\n");
+ in_list = true;
}
void state::end_list(char mark)
@@ -532,23 +578,35 @@ namespace quickbook
write_anchors(*this, out);
assert(mark == '*' || mark == '#');
out << ((mark == '#') ? "\n</orderedlist>" : "\n</itemizedlist>");
+
+ std::string list_output;
+ out.swap(list_output);
+
+ pop_output();
+
+ (in_list ? phrase : out) << list_output;
+
+ pop_tagged_source_mode();
}
void state::start_list_item()
{
- out << "<listitem><simpara>";
- write_anchors(*this, out);
+ out << "<listitem>";
+ write_anchors(*this, phrase);
}
void state::end_list_item()
{
- write_anchors(*this, out);
- out << "</simpara></listitem>";
+ write_anchors(*this, phrase);
+ paragraph_action para(*this);
+ para();
+ out << "</listitem>";
}
namespace
{
- bool parse_template(value const&, quickbook::state& state);
+ bool parse_template(value const&, quickbook::state& state,
+ bool is_attribute_template = false);
}
void state::start_callouts()
@@ -558,8 +616,8 @@ namespace quickbook
std::string state::add_callout(value v)
{
- std::string callout_id1 = ids.add_id("c", id_category::numbered);
- std::string callout_id2 = ids.add_id("c", id_category::numbered);
+ std::string callout_id1 = document.add_id("c", id_category::numbered);
+ std::string callout_id2 = document.add_id("c", id_category::numbered);
callouts.insert(encoded_value(callout_id1));
callouts.insert(encoded_value(callout_id2));
@@ -593,7 +651,7 @@ namespace quickbook
std::string callout_value;
{
- template_state state(*this);
+ state_save save(*this, state_save::scope_all);
++template_depth;
bool r = parse_template(callout_body, *this);
@@ -647,53 +705,53 @@ namespace quickbook
value anchor_id = values.consume();
// Note: anchor_id is never encoded as boostbook. If it
// is encoded, it's just things like escapes.
- add_anchor(state, anchor_id.is_encoded() ?
- anchor_id.get_encoded() : anchor_id.get_quickbook());
+ add_anchor(state, validate_id(state, anchor_id));
values.finish();
}
void do_macro_action::operator()(std::string const& str) const
{
- write_anchors(state, phrase);
+ write_anchors(state, state.phrase);
if (str == quickbook_get_date)
{
char strdate[64];
strftime(strdate, sizeof(strdate), "%Y-%b-%d", current_time);
- phrase << strdate;
+ state.phrase << strdate;
}
else if (str == quickbook_get_time)
{
char strdate[64];
strftime(strdate, sizeof(strdate), "%I:%M:%S %p", current_time);
- phrase << strdate;
+ state.phrase << strdate;
}
else
{
- phrase << str;
+ state.phrase << str;
}
}
void raw_char_action::operator()(char ch) const
{
- out << ch;
+ state.phrase << ch;
}
void raw_char_action::operator()(parse_iterator first, parse_iterator last) const
{
while (first != last)
- out << *first++;
+ state.phrase << *first++;
}
void source_mode_action(quickbook::state& state, value source_mode)
{
- state.source_mode = source_mode_tags::name(source_mode.get_tag());
+ state.change_source_mode(source_mode.get_tag());
}
void next_source_mode_action(quickbook::state& state, value source_mode)
{
value_consumer values = source_mode;
- state.source_mode_next = values.consume();
+ state.source_mode_next_pos = values.consume();
+ state.source_mode_next = values.consume().get_int();
values.finish();
}
@@ -709,9 +767,9 @@ namespace quickbook
(code_tag == code_tags::inline_code_block && qbk_version_n < 106u);
bool block = code_tag != code_tags::inline_code;
- std::string source_mode = state.source_mode_next.empty() ?
- state.source_mode : detail::to_s(state.source_mode_next.get_quickbook());
- state.source_mode_next = value();
+ source_mode_type source_mode = state.source_mode_next ?
+ state.source_mode_next : state.current_source_mode().source_mode;
+ state.source_mode_next = 0;
if (inline_code) {
write_anchors(state, state.phrase);
@@ -742,52 +800,50 @@ namespace quickbook
boost::swap(state.current_file, saved_file);
// print the code with syntax coloring
- std::string str = syntax_highlight(first_, last_, state,
- source_mode, block);
+ //
+ // We must not place a \n after the <programlisting> tag
+ // otherwise PDF output starts code blocks with a blank line:
+ state.phrase << "<programlisting>";
+ syntax_highlight(first_, last_, state, source_mode, block);
+ state.phrase << "</programlisting>\n";
boost::swap(state.current_file, saved_file);
- collector& output = inline_code ? state.phrase : state.out;
+ if (qbk_version_n >= 107u) state.phrase << state.end_callouts();
- // We must not place a \n after the <programlisting> tag
- // otherwise PDF output starts code blocks with a blank line:
- //
- output << "<programlisting>";
- output << str;
- output << "</programlisting>\n";
-
- if (qbk_version_n >= 107u) output << state.end_callouts();
+ if (!inline_code) {
+ state.out << state.phrase.str();
+ state.phrase.clear();
+ }
}
else {
parse_iterator first_(code_value.begin());
parse_iterator last_(code_value.end());
- std::string str = syntax_highlight(first_, last_, state,
- source_mode, block);
state.phrase << "<code>";
- state.phrase << str;
+ syntax_highlight(first_, last_, state, source_mode, block);
state.phrase << "</code>";
}
}
void plain_char_action::operator()(char ch) const
{
- write_anchors(state, phrase);
+ write_anchors(state, state.phrase);
- detail::print_char(ch, phrase.get());
+ detail::print_char(ch, state.phrase.get());
}
void plain_char_action::operator()(parse_iterator first, parse_iterator last) const
{
- write_anchors(state, phrase);
+ write_anchors(state, state.phrase);
while (first != last)
- detail::print_char(*first++, phrase.get());
+ detail::print_char(*first++, state.phrase.get());
}
void escape_unicode_action::operator()(parse_iterator first, parse_iterator last) const
{
- write_anchors(state, phrase);
+ write_anchors(state, state.phrase);
while(first != last && *first == '0') ++first;
@@ -799,10 +855,11 @@ namespace quickbook
if(hex_digits.size() == 2 && *first > '0' && *first <= '7') {
using namespace std;
- detail::print_char(strtol(hex_digits.c_str(), 0, 16), phrase.get());
+ detail::print_char(strtol(hex_digits.c_str(), 0, 16),
+ state.phrase.get());
}
else {
- phrase << "&#x" << hex_digits << ";";
+ state.phrase << "&#x" << hex_digits << ";";
}
}
@@ -1204,6 +1261,7 @@ namespace quickbook
bool parse_template(
value const& content
, quickbook::state& state
+ , bool is_attribute_template
)
{
file_ptr saved_current_file = state.current_file;
@@ -1215,9 +1273,11 @@ namespace quickbook
parse_iterator last(source.end());
bool r = cl::parse(first, last,
+ is_attribute_template ?
+ state.grammar().attribute_template_body :
content.get_tag() == template_tags::phrase ?
state.grammar().inline_phrase :
- state.grammar().block
+ state.grammar().block_start
).full;
boost::swap(state.current_file, saved_current_file);
@@ -1229,26 +1289,23 @@ namespace quickbook
void call_template(quickbook::state& state,
template_symbol const* symbol,
std::vector<value> const& args,
- string_iterator first)
+ string_iterator first,
+ bool is_attribute_template = false)
{
bool is_block = symbol->content.get_tag() != template_tags::phrase;
+ assert(!(is_attribute_template && is_block));
+
+ quickbook::paragraph_action paragraph_action(state);
+
+ // Finish off any existing paragraphs.
+ if (is_block) paragraph_action();
// If this template contains already encoded text, then just
// write it out, without going through any of the rigamarole.
if (symbol->content.is_encoded())
{
- if (is_block)
- {
- paragraph_action para(state);
- para();
- state.out << symbol->content.get_encoded();
- }
- else
- {
- state.phrase << symbol->content.get_encoded();
- }
-
+ (is_block ? state.out : state.phrase) << symbol->content.get_encoded();
return;
}
@@ -1259,11 +1316,11 @@ namespace quickbook
// arguments are expanded.
template_scope const& call_scope = state.templates.top_scope();
- std::string block;
- std::string phrase;
-
{
- template_state save(state);
+ state_save save(state, state_save::scope_callables);
+ std::string save_block;
+ std::string save_phrase;
+
state.templates.start_template(symbol);
qbk_version_n = symbol->content.get_file()->version();
@@ -1279,7 +1336,7 @@ namespace quickbook
// Store the current section level so that we can ensure that
// [section] and [endsect] tags in the template are balanced.
- state.min_section_level = state.ids.section_level();
+ state.min_section_level = state.document.section_level();
///////////////////////////////////
// Prepare the arguments as local templates
@@ -1296,22 +1353,26 @@ namespace quickbook
///////////////////////////////////
// parse the template body:
- if (!parse_template(symbol->content, state))
+ if (symbol->content.get_file()->version() < 107u) {
+ state.out.swap(save_block);
+ state.phrase.swap(save_phrase);
+ }
+
+ if (!parse_template(symbol->content, state, is_attribute_template))
{
detail::outerr(state.current_file, first)
<< "Expanding "
<< (is_block ? "block" : "phrase")
- << " template: " << symbol->identifier << std::endl
- << std::endl
- << "------------------begin------------------" << std::endl
+ << " template: " << symbol->identifier << "\n\n"
+ << "------------------begin------------------\n"
<< symbol->content.get_quickbook()
- << "------------------end--------------------" << std::endl
+ << "------------------end--------------------\n"
<< std::endl;
++state.error_count;
return;
}
- if (state.ids.section_level() != state.min_section_level)
+ if (state.document.section_level() != state.min_section_level)
{
detail::outerr(state.current_file, first)
<< "Mismatched sections in template "
@@ -1321,19 +1382,24 @@ namespace quickbook
return;
}
- state.out.swap(block);
- state.phrase.swap(phrase);
- }
+ if (symbol->content.get_file()->version() < 107u) {
+ state.out.swap(save_block);
+ state.phrase.swap(save_phrase);
- if(is_block || !block.empty()) {
- paragraph_action para(state);
- para(); // For paragraphs before the template call.
- state.out << block;
- state.phrase << phrase;
- para();
- }
- else {
- state.phrase << phrase;
+ if(is_block || !save_block.empty()) {
+ paragraph_action();
+ state.out << save_block;
+ state.phrase << save_phrase;
+ paragraph_action();
+ }
+ else {
+ state.phrase << save_phrase;
+ }
+ }
+ else
+ {
+ if (is_block) paragraph_action();
+ }
}
}
@@ -1359,6 +1425,9 @@ namespace quickbook
void do_template_action(quickbook::state& state, value template_list,
string_iterator first)
{
+ bool const is_attribute_template =
+ template_list.get_tag() == template_tags::attribute_template;
+
// Get the arguments
value_consumer values = template_list;
@@ -1421,6 +1490,20 @@ namespace quickbook
}
///////////////////////////////////
+ // Check that attribute templates are phrase templates
+
+ if (is_attribute_template &&
+ symbol->content.get_tag() != template_tags::phrase)
+ {
+ detail::outerr(state.current_file, first)
+ << "Only phrase templates can be used in attribute values."
+ << std::endl;
+
+ ++state.error_count;
+ return;
+ }
+
+ ///////////////////////////////////
// Initialise the arguments
switch(symbol->content.get_tag())
@@ -1445,7 +1528,7 @@ namespace quickbook
return;
}
- call_template(state, symbol, args, first);
+ call_template(state, symbol, args, first, is_attribute_template);
break;
case template_tags::snippet:
@@ -1479,10 +1562,19 @@ namespace quickbook
value content = values.consume();
values.finish();
- // Note: dst is never actually encoded as boostbook, which
- // is why the result is called with 'print_string' later.
- std::string dst = dst_value.is_encoded() ?
- dst_value.get_encoded() : detail::to_s(dst_value.get_quickbook());
+ std::string dst;
+
+ if (link.get_tag() == phrase_tags::link) {
+ dst = validate_id(state, dst_value);
+ }
+ else {
+ dst = get_attribute_value(state, dst_value);
+
+ // TODO: Might be better to have an error for some invalid urls.
+ if (link.get_tag() == phrase_tags::url) {
+ dst = detail::partially_escape_uri(dst);
+ }
+ }
state.phrase << markup.pre;
detail::print_string(dst, state.phrase.get());
@@ -1539,8 +1631,9 @@ namespace quickbook
value_consumer values = table;
std::string element_id;
- if(values.check(general_tags::element_id))
- element_id = detail::to_s(values.consume().get_quickbook());
+ if(values.check(general_tags::element_id)) {
+ element_id = validate_id(state, values.consume());
+ }
value title = values.consume(table_tags::title);
bool has_title = !title.empty();
@@ -1548,14 +1641,14 @@ namespace quickbook
std::string table_id;
if (!element_id.empty()) {
- table_id = state.ids.add_id(element_id, id_category::explicit_id);
+ table_id = state.document.add_id(element_id, id_category::explicit_id);
}
else if (has_title) {
- if (state.ids.compatibility_version() >= 105) {
- table_id = state.ids.add_id(detail::make_identifier(title.get_quickbook()), id_category::generated);
+ if (state.document.compatibility_version() >= 105) {
+ table_id = state.document.add_id(detail::make_identifier(title.get_quickbook()), id_category::generated);
}
else {
- table_id = state.ids.add_id("t", id_category::numbered);
+ table_id = state.document.add_id("t", id_category::numbered);
}
}
@@ -1638,20 +1731,21 @@ namespace quickbook
value content = values.consume();
values.finish();
- std::string full_id = state.ids.begin_section(
- !element_id.empty() ?
- element_id.get_quickbook() :
- detail::make_identifier(content.get_quickbook()),
- !element_id.empty() ?
- id_category::explicit_section_id :
- id_category::generated_section);
+ std::string full_id = state.document.begin_section(
+ element_id.empty() ?
+ detail::make_identifier(content.get_quickbook()) :
+ validate_id(state, element_id),
+ element_id.empty() ?
+ id_category::generated_section :
+ id_category::explicit_section_id,
+ state.current_source_mode());
state.out << "\n<section id=\"" << full_id << "\">\n";
state.out << "<title>";
write_anchors(state, state.out);
- if (self_linked_headers && state.ids.compatibility_version() >= 103)
+ if (self_linked_headers && state.document.compatibility_version() >= 103)
{
state.out << "<link linkend=\"" << full_id << "\">"
<< content.get_encoded()
@@ -1670,7 +1764,7 @@ namespace quickbook
{
write_anchors(state, state.out);
- if (state.ids.section_level() <= state.min_section_level)
+ if (state.document.section_level() <= state.min_section_level)
{
file_position const pos = state.current_file->position_of(first);
@@ -1682,7 +1776,7 @@ namespace quickbook
}
state.out << "</section>";
- state.ids.end_section();
+ state.document.end_section();
}
void element_id_warning_action::operator()(parse_iterator first, parse_iterator) const
@@ -1765,71 +1859,49 @@ namespace quickbook
return result;
}
- struct path_details {
- // Will possibly add 'url' and 'glob' to this list later:
- enum path_type { path };
-
- std::string value;
- path_type type;
-
- path_details(std::string const& value, path_type type) :
- value(value), type(type)
- {
- }
- };
-
- path_details check_path(value const& path, quickbook::state& state)
+ xinclude_path calculate_xinclude_path(value const& p, quickbook::state& state)
{
- // Paths are encoded for quickbook 1.6+ and also xmlbase
- // values (technically xmlbase is a 1.6 feature, but that
- // isn't enforced as it's backwards compatible).
- //
- // Counter-intuitively: encoded == plain text here.
-
- std::string path_text = qbk_version_n >= 106u || path.is_encoded() ?
- path.get_encoded() : detail::to_s(path.get_quickbook());
-
- if(path_text.find('\\') != std::string::npos)
- {
- quickbook::detail::ostream* err;
-
- if (qbk_version_n >= 106u) {
- err = &detail::outerr(path.get_file(), path.get_position());
+ path_parameter parameter = check_path(p, state);
+
+ switch (parameter.type) {
+ case path_parameter::glob:
+ // TODO: Should know if this is an xinclude or an xmlbase.
+ // Would also help with implementation of 'check_path'.
+ detail::outerr(p.get_file(), p.get_position())
+ << "Glob used in xinclude/xmlbase."
+ << std::endl;
++state.error_count;
- }
- else {
- err = &detail::outwarn(path.get_file(), path.get_position());
- }
-
- *err << "Path isn't portable: '"
- << path_text
- << "'"
- << std::endl;
+ break;
- boost::replace(path_text, '\\', '/');
- }
+ case path_parameter::invalid:
+ // There should have already been an error message in this case.
+ break;
- return path_details(path_text, path_details::path);
- }
+ case path_parameter::path:
+ {
+ fs::path path = detail::generic_to_path(parameter.value);
+ fs::path full_path = path;
- xinclude_path calculate_xinclude_path(value const& p, quickbook::state& state)
- {
- path_details details = check_path(p, state);
+ // If the path is relative
+ if (!path.has_root_directory())
+ {
+ // Resolve the path from the current file
+ full_path = state.current_file->path.parent_path() / path;
- fs::path path = detail::generic_to_path(details.value);
- fs::path full_path = path;
+ // Then calculate relative to the current xinclude_base.
+ path = path_difference(state.xinclude_base, full_path);
+ }
- // If the path is relative
- if (!path.has_root_directory())
- {
- // Resolve the path from the current file
- full_path = state.current_file->path.parent_path() / path;
+ return xinclude_path(full_path,
+ detail::escape_uri(detail::path_to_generic(path)));
+ }
- // Then calculate relative to the current xinclude_base.
- path = path_difference(state.xinclude_base, full_path);
+ default:
+ assert(false);
}
- return xinclude_path(full_path, detail::escape_uri(detail::path_to_generic(path)));
+ // If we didn't find a path, just use this:
+ return xinclude_path(state.current_file->path.parent_path(), "");
}
void xinclude_action(quickbook::state& state, value xinclude)
@@ -1845,77 +1917,8 @@ namespace quickbook
state.out << "\" />\n";
}
- namespace
- {
- struct include_search_return
- {
- include_search_return(fs::path const& x, fs::path const& y)
- : filename(x), filename_relative(y) {}
-
- fs::path filename;
- fs::path filename_relative;
-
- bool operator < (include_search_return const & other) const
- {
- if (filename_relative < other.filename_relative) return true;
- else if (other.filename_relative < filename_relative) return false;
- else return filename < other.filename;
- }
- };
-
- std::set<include_search_return> include_search(path_details const& details,
- quickbook::state& state, string_iterator pos)
- {
- std::set<include_search_return> result;
-
- fs::path path = detail::generic_to_path(details.value);
-
- // If the path is relative, try and resolve it.
- if (!path.has_root_directory() && !path.has_root_name())
- {
- fs::path local_path =
- state.current_file->path.parent_path() / path;
-
- // See if it can be found locally first.
- if (state.dependencies.add_dependency(local_path))
- {
- result.insert(include_search_return(
- local_path,
- state.filename_relative.parent_path() / path));
- return result;
- }
-
- BOOST_FOREACH(fs::path full, include_path)
- {
- full /= path;
-
- if (state.dependencies.add_dependency(full))
- {
- result.insert(include_search_return(full, path));
- return result;
- }
- }
- }
- else
- {
- if (state.dependencies.add_dependency(path)) {
- result.insert(include_search_return(path, path));
- return result;
- }
- }
-
- detail::outerr(state.current_file, pos)
- << "Unable to find file: "
- << details.value
- << std::endl;
- ++state.error_count;
-
- return result;
- }
- }
-
void load_quickbook(quickbook::state& state,
- include_search_return const& paths,
+ quickbook_path const& path,
value::tag_type load_type,
value const& include_doc_id = value())
{
@@ -1933,18 +1936,17 @@ namespace quickbook
//
// For old versions of quickbook, templates aren't scoped by the
// file.
- file_state save(state,
- load_type == block_tags::import ? file_state::scope_output :
- qbk_version_n >= 106u ? file_state::scope_callables :
- file_state::scope_macros);
+ state_save save(state,
+ load_type == block_tags::import ? state_save::scope_output :
+ qbk_version_n >= 106u ? state_save::scope_callables :
+ state_save::scope_macros);
- state.current_file = load(paths.filename); // Throws load_error
- state.filename_relative = paths.filename_relative;
+ state.current_file = load(path.file_path); // Throws load_error
+ state.current_path = path;
state.imported = (load_type == block_tags::import);
// update the __FILENAME__ macro
- *boost::spirit::classic::find(state.macro, "__FILENAME__")
- = detail::path_to_generic(state.filename_relative);
+ state.update_filename_macro();
// parse the file
quickbook::parse_file(state, include_doc_id, true);
@@ -1954,12 +1956,11 @@ namespace quickbook
}
// restore the __FILENAME__ macro
- *boost::spirit::classic::find(state.macro, "__FILENAME__")
- = detail::path_to_generic(state.filename_relative);
+ state.update_filename_macro();
}
void load_source_file(quickbook::state& state,
- include_search_return const& paths,
+ quickbook_path const& path,
value::tag_type load_type,
string_iterator first,
value const& include_doc_id = value())
@@ -1967,11 +1968,11 @@ namespace quickbook
assert(load_type == block_tags::include ||
load_type == block_tags::import);
- std::string ext = paths.filename.extension().generic_string();
+ std::string ext = path.file_path.extension().generic_string();
std::vector<template_symbol> storage;
// Throws load_error
state.error_count +=
- load_snippets(paths.filename, storage, ext, load_type);
+ load_snippets(path.file_path, storage, ext, load_type);
if (load_type == block_tags::include)
{
@@ -2016,41 +2017,42 @@ namespace quickbook
value_consumer values = include;
value include_doc_id = values.optional_consume(general_tags::include_id);
- path_details details = check_path(values.consume(), state);
+ path_parameter parameter = check_path(values.consume(), state);
values.finish();
- std::set<include_search_return> search = include_search(details, state, first);
- std::set<include_search_return>::iterator i = search.begin();
- std::set<include_search_return>::iterator e = search.end();
+ std::set<quickbook_path> search =
+ include_search(parameter, state, first);
+ std::set<quickbook_path>::iterator i = search.begin();
+ std::set<quickbook_path>::iterator e = search.end();
for (; i != e; ++i)
{
- include_search_return const & paths = *i;
+ quickbook_path const & path = *i;
try {
if (qbk_version_n >= 106)
{
if (state.imported && include.get_tag() == block_tags::include)
return;
- std::string ext = paths.filename.extension().generic_string();
+ std::string ext = path.file_path.extension().generic_string();
if (ext == ".qbk" || ext == ".quickbook")
{
- load_quickbook(state, paths, include.get_tag(), include_doc_id);
+ load_quickbook(state, path, include.get_tag(), include_doc_id);
}
else
{
- load_source_file(state, paths, include.get_tag(), first, include_doc_id);
+ load_source_file(state, path, include.get_tag(), first, include_doc_id);
}
}
else
{
if (include.get_tag() == block_tags::include)
{
- load_quickbook(state, paths, include.get_tag(), include_doc_id);
+ load_quickbook(state, path, include.get_tag(), include_doc_id);
}
else
{
- load_source_file(state, paths, include.get_tag(), first, include_doc_id);
+ load_source_file(state, path, include.get_tag(), first, include_doc_id);
}
}
}
@@ -2059,7 +2061,7 @@ namespace quickbook
detail::outerr(state.current_file, first)
<< "Loading file "
- << paths.filename
+ << path.file_path
<< ": "
<< e.what()
<< std::endl;
@@ -2069,8 +2071,7 @@ namespace quickbook
bool to_value_scoped_action::start(value::tag_type t)
{
- state.out.push();
- state.phrase.push();
+ state.push_output();
state.anchors.swap(saved_anchors);
tag = t;
@@ -2101,8 +2102,7 @@ namespace quickbook
void to_value_scoped_action::cleanup()
{
- state.phrase.pop();
- state.out.pop();
+ state.pop_output();
state.anchors.swap(saved_anchors);
}
}
diff --git a/tools/quickbook/src/actions.hpp b/tools/quickbook/src/actions.hpp
index 5a93cf949..44b5a2770 100644
--- a/tools/quickbook/src/actions.hpp
+++ b/tools/quickbook/src/actions.hpp
@@ -46,12 +46,6 @@ namespace quickbook
int load_snippets(fs::path const& file, std::vector<template_symbol>& storage,
std::string const& extension, value::tag_type load_type);
- std::string syntax_highlight(
- parse_iterator first, parse_iterator last,
- quickbook::state& state,
- std::string const& source_mode,
- bool is_block);
-
struct xinclude_path {
xinclude_path(fs::path const& path, std::string const& uri) :
path(path), uri(uri) {}
@@ -119,12 +113,12 @@ namespace quickbook
quickbook::state& state;
};
- struct list_item_action
+ struct explicit_list_action
{
// implicit paragraphs
// doesn't output the paragraph if it's only whitespace.
- list_item_action(
+ explicit_list_action(
quickbook::state& state)
: state(state) {}
@@ -149,15 +143,11 @@ namespace quickbook
{
// Handles simple text formats
- simple_phrase_action(
- collector& out
- , quickbook::state& state)
- : out(out)
- , state(state) {}
+ simple_phrase_action(quickbook::state& state)
+ : state(state) {}
void operator()(char) const;
- collector& out;
quickbook::state& state;
};
@@ -178,12 +168,9 @@ namespace quickbook
{
// Handles macro substitutions
- do_macro_action(collector& phrase, quickbook::state& state)
- : phrase(phrase)
- , state(state) {}
+ do_macro_action(quickbook::state& state) : state(state) {}
void operator()(std::string const& str) const;
- collector& phrase;
quickbook::state& state;
};
@@ -191,13 +178,12 @@ namespace quickbook
{
// Prints a space
- raw_char_action(collector& out)
- : out(out) {}
+ raw_char_action(quickbook::state& state) : state(state) {}
void operator()(char ch) const;
void operator()(parse_iterator first, parse_iterator last) const;
- collector& out;
+ quickbook::state& state;
};
struct plain_char_action
@@ -205,36 +191,29 @@ namespace quickbook
// Prints a single plain char.
// Converts '<' to "&lt;"... etc See utils.hpp
- plain_char_action(collector& phrase, quickbook::state& state)
- : phrase(phrase)
- , state(state) {}
+ plain_char_action(quickbook::state& state) : state(state) {}
void operator()(char ch) const;
void operator()(parse_iterator first, parse_iterator last) const;
- collector& phrase;
quickbook::state& state;
};
struct escape_unicode_action
{
- escape_unicode_action(collector& phrase, quickbook::state& state)
- : phrase(phrase)
- , state(state) {}
+ escape_unicode_action(quickbook::state& state) : state(state) {}
+
void operator()(parse_iterator first, parse_iterator last) const;
- collector& phrase;
quickbook::state& state;
};
struct break_action
{
- break_action(collector& phrase, quickbook::state& state)
- : phrase(phrase), state(state) {}
+ break_action(quickbook::state& state) : state(state) {}
void operator()(parse_iterator f, parse_iterator) const;
- collector& phrase;
quickbook::state& state;
};
@@ -265,6 +244,101 @@ namespace quickbook
std::vector<std::string> saved_anchors;
value::tag_type tag;
};
+
+ // member_action
+ //
+ // Action for calling a member function taking two parse iterators.
+
+ template <typename T>
+ struct member_action
+ {
+ typedef void(T::*member_function)(parse_iterator, parse_iterator);
+
+ T& l;
+ member_function mf;
+
+ member_action(T& l, member_function mf) : l(l), mf(mf) {}
+
+ void operator()(parse_iterator first, parse_iterator last) const {
+ (l.*mf)(first, last);
+ }
+ };
+
+ // member_action1
+ //
+ // Action for calling a member function taking two parse iterators and a value.
+
+ template <typename T, typename Arg1>
+ struct member_action1
+ {
+ typedef void(T::*member_function)(parse_iterator, parse_iterator, Arg1);
+
+ T& l;
+ member_function mf;
+
+ member_action1(T& l, member_function mf) : l(l), mf(mf) {}
+
+ struct impl
+ {
+ member_action1 a;
+ Arg1 value;
+
+ impl(member_action1& a, Arg1 value) :
+ a(a), value(value)
+ {}
+
+ void operator()(parse_iterator first, parse_iterator last) const {
+ (a.l.*a.mf)(first, last, value);
+ }
+ };
+
+ impl operator()(Arg1 a1) {
+ return impl(*this, a1);
+ }
+ };
+
+ // member_action_value
+ //
+ // Action for calling a unary member function.
+
+ template <typename T, typename Value>
+ struct member_action_value
+ {
+ typedef void(T::*member_function)(Value);
+
+ T& l;
+ member_function mf;
+
+ member_action_value(T& l, member_function mf) : l(l), mf(mf) {}
+
+ void operator()(Value v) const {
+ (l.*mf)(v);
+ }
+ };
+
+ // member_action_value
+ //
+ // Action for calling a unary member function with a fixed value.
+
+ template <typename T, typename Value>
+ struct member_action_fixed_value
+ {
+ typedef void(T::*member_function)(Value);
+
+ T& l;
+ member_function mf;
+ Value v;
+
+ member_action_fixed_value(T& l, member_function mf, Value v) : l(l), mf(mf), v(v) {}
+
+ void operator()() const {
+ (l.*mf)(v);
+ }
+
+ void operator()(parse_iterator first, parse_iterator last) const {
+ (l.*mf)(v);
+ }
+ };
}
#endif // BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP
diff --git a/tools/quickbook/src/block_element_grammar.cpp b/tools/quickbook/src/block_element_grammar.cpp
index 1d998b9dd..04a320e9e 100644
--- a/tools/quickbook/src/block_element_grammar.cpp
+++ b/tools/quickbook/src/block_element_grammar.cpp
@@ -35,7 +35,7 @@ namespace quickbook
xinclude, include, include_filename,
template_, template_id, template_formal_arg,
template_body, identifier, import,
- element_id, element_id_1_5, element_id_1_6,
+ element_id,
same_line;
};
@@ -47,27 +47,25 @@ namespace quickbook
// Actions
error_action error(state);
element_id_warning_action element_id_warning(state);
- raw_char_action raw_char(state.phrase);
+ raw_char_action raw_char(state);
+ explicit_list_action explicit_list(state);
scoped_parser<to_value_scoped_action> to_value(state);
local.element_id =
!( ':'
- >> ( !(qbk_ver(105u) >> space)
+ >> ( qbk_ver(107u)
+ >> to_value(general_tags::element_id) [attribute_value_1_7]
+ | qbk_ver(0, 107u)
+ >> !(qbk_ver(105u) >> space)
>> (+(cl::alnum_p | '_')) [state.values.entry(ph::arg1, ph::arg2, general_tags::element_id)]
| cl::eps_p [element_id_warning]
)
)
;
- local.element_id_1_5 =
- !(qbk_ver(105u) >> local.element_id);
-
- local.element_id_1_6 =
- !(qbk_ver(106u) >> local.element_id);
-
elements.add
- ("section", element_info(element_info::block, &local.begin_section, block_tags::begin_section))
- ("endsect", element_info(element_info::block, &local.end_section, block_tags::end_section))
+ ("section", element_info(element_info::section_block, &local.begin_section, block_tags::begin_section))
+ ("endsect", element_info(element_info::section_block, &local.end_section, block_tags::end_section))
;
local.begin_section =
@@ -83,7 +81,7 @@ namespace quickbook
local.heading
= space
- >> local.element_id_1_6
+ >> !(qbk_ver(106u) >> local.element_id)
>> space
>> local.inner_phrase
;
@@ -222,7 +220,7 @@ namespace quickbook
local.table =
local.same_line
- >> local.element_id_1_5
+ >> !(qbk_ver(105u) >> local.element_id)
>> local.same_line
>> local.table_title
>> *local.table_row
@@ -261,7 +259,11 @@ namespace quickbook
("itemized_list", element_info(element_info::nested_block, &local.list, block_tags::itemized_list, 106))
;
- local.list = *local.cell;
+ local.list =
+ *( cl::eps_p [explicit_list]
+ >> local.cell
+ )
+ ;
local.cell =
space
@@ -304,13 +306,15 @@ namespace quickbook
local.include_filename =
qbk_ver(0, 106u)
>> (*(cl::anychar_p - phrase_end)) [state.values.entry(ph::arg1, ph::arg2)]
- | qbk_ver(106u)
+ | qbk_ver(106u, 107u)
>> to_value()
[ *( raw_escape
| (cl::anychar_p - phrase_end)
[raw_char]
)
]
+ | qbk_ver(107u)
+ >> to_value() [ attribute_value_1_7 ]
;
local.inner_block =
diff --git a/tools/quickbook/src/block_tags.hpp b/tools/quickbook/src/block_tags.hpp
index b01271fc0..3049b57c5 100644
--- a/tools/quickbook/src/block_tags.hpp
+++ b/tools/quickbook/src/block_tags.hpp
@@ -22,7 +22,7 @@ namespace quickbook
(macro_definition)(template_definition)
(variable_list)(table)
(xinclude)(import)(include)
- (paragraph)
+ (paragraph)(paragraph_in_list)
(ordered_list)(itemized_list)
(hr)
)
diff --git a/tools/quickbook/src/code_snippet.cpp b/tools/quickbook/src/code_snippet.cpp
index e8334ddcc..fe54f46ce 100644
--- a/tools/quickbook/src/code_snippet.cpp
+++ b/tools/quickbook/src/code_snippet.cpp
@@ -18,7 +18,7 @@
#include "state.hpp"
#include "values.hpp"
#include "files.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
namespace quickbook
{
diff --git a/tools/quickbook/src/dependency_tracker.cpp b/tools/quickbook/src/dependency_tracker.cpp
index ff28198c2..12b2a757a 100644
--- a/tools/quickbook/src/dependency_tracker.cpp
+++ b/tools/quickbook/src/dependency_tracker.cpp
@@ -7,8 +7,9 @@
=============================================================================*/
#include "dependency_tracker.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
namespace quickbook
@@ -90,7 +91,7 @@ namespace quickbook
static std::string get_path(fs::path const& path,
dependency_tracker::flags f)
{
- std::string generic = detail::path_to_generic(path);
+ std::string generic = quickbook::detail::path_to_generic(path);
if (f & dependency_tracker::escaped) {
generic = escaped_path(generic);
@@ -99,26 +100,85 @@ namespace quickbook
return generic;
}
+ dependency_tracker::dependency_tracker() :
+ dependencies(), glob_dependencies(),
+ last_glob(glob_dependencies.end()) {}
+
bool dependency_tracker::add_dependency(fs::path const& f) {
bool found = fs::exists(fs::status(f));
dependencies[normalize_path(f)] |= found;
return found;
}
+ void dependency_tracker::add_glob(fs::path const& f) {
+ std::pair<glob_list::iterator, bool> r = glob_dependencies.insert(
+ std::make_pair(normalize_path(f), glob_list::mapped_type()));
+ last_glob = r.first;
+ }
+
+ void dependency_tracker::add_glob_match(fs::path const& f) {
+ assert(last_glob != glob_dependencies.end());
+ last_glob->second.insert(normalize_path(f));
+ }
+
+ void dependency_tracker::write_dependencies(fs::path const& file_out,
+ flags f)
+ {
+ fs::ofstream out(file_out);
+
+ if (out.fail()) {
+ throw std::runtime_error(
+ "Error opening dependency file " +
+ quickbook::detail::path_to_generic(file_out));
+ }
+
+ out.exceptions(std::ios::badbit);
+ write_dependencies(out, f);
+ }
+
void dependency_tracker::write_dependencies(std::ostream& out,
flags f)
{
- BOOST_FOREACH(dependency_list::value_type const& d, dependencies)
- {
- if (f & checked) {
+ if (f & checked) {
+ BOOST_FOREACH(dependency_list::value_type const& d, dependencies)
+ {
out << (d.second ? "+ " : "- ")
<< get_path(d.first, f) << std::endl;
}
- else {
+
+ BOOST_FOREACH(glob_list::value_type const& g, glob_dependencies)
+ {
+ out << "g "
+ << get_path(g.first, f) << std::endl;
+
+ BOOST_FOREACH(fs::path const& p, g.second)
+ {
+ out << "+ " << get_path(p, f) << std::endl;
+ }
+ }
+ }
+ else {
+ std::set<std::string> paths;
+
+ BOOST_FOREACH(dependency_list::value_type const& d, dependencies)
+ {
if (d.second) {
- out << get_path(d.first, f) << std::endl;
+ paths.insert(get_path(d.first, f));
+ }
+ }
+
+ BOOST_FOREACH(glob_list::value_type const& g, glob_dependencies)
+ {
+ BOOST_FOREACH(fs::path const& p, g.second)
+ {
+ paths.insert(get_path(p, f));
}
}
+
+ BOOST_FOREACH(std::string const& p, paths)
+ {
+ out << p << std::endl;
+ }
}
}
}
diff --git a/tools/quickbook/src/dependency_tracker.hpp b/tools/quickbook/src/dependency_tracker.hpp
index 6b477b9f8..2da44f5c0 100644
--- a/tools/quickbook/src/dependency_tracker.hpp
+++ b/tools/quickbook/src/dependency_tracker.hpp
@@ -10,6 +10,7 @@
#define QUICKBOOK_DEPENDENCY_TRACKER_HPP
#include <map>
+#include <set>
#include <iosfwd>
#include <boost/filesystem/path.hpp>
@@ -21,7 +22,11 @@ namespace quickbook
private:
typedef std::map<fs::path, bool> dependency_list;
+ typedef std::map<fs::path, std::set<fs::path> > glob_list;
+
dependency_list dependencies;
+ glob_list glob_dependencies;
+ glob_list::iterator last_glob;
public:
@@ -31,10 +36,16 @@ namespace quickbook
escaped = 2
};
+ dependency_tracker();
+
// Call this before loading any file so that it will be included in the
// list of dependencies. Returns true if file exists.
bool add_dependency(fs::path const&);
+ void add_glob(fs::path const&);
+ void add_glob_match(fs::path const&);
+
+ void write_dependencies(fs::path const&, flags = default_);
void write_dependencies(std::ostream&, flags = default_);
};
}
diff --git a/tools/quickbook/src/doc_info_actions.cpp b/tools/quickbook/src/doc_info_actions.cpp
index 8ceac6cb9..4e60f5168 100644
--- a/tools/quickbook/src/doc_info_actions.cpp
+++ b/tools/quickbook/src/doc_info_actions.cpp
@@ -16,11 +16,11 @@
#include "quickbook.hpp"
#include "utils.hpp"
#include "files.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
#include "state.hpp"
#include "actions.hpp"
#include "doc_info_tags.hpp"
-#include "id_manager.hpp"
+#include "document_state.hpp"
namespace quickbook
{
@@ -208,12 +208,15 @@ namespace quickbook
unsigned new_version = get_version(state, use_doc_info, qbk_version);
- if (new_version != qbk_version_n && new_version >= 106)
+ if (new_version != qbk_version_n)
{
- detail::outwarn(state.current_file->path)
- << "Quickbook " << (new_version / 100) << "." << (new_version % 100)
- << " is still under development and is "
- "likely to change in the future." << std::endl;
+ if (new_version >= 107u)
+ {
+ detail::outwarn(state.current_file->path)
+ << "Quickbook " << (new_version / 100) << "." << (new_version % 100)
+ << " is still under development and is "
+ "likely to change in the future." << std::endl;
+ }
}
if (new_version) {
@@ -236,20 +239,20 @@ namespace quickbook
if (!compatibility_version) {
compatibility_version = use_doc_info ?
- qbk_version_n : state.ids.compatibility_version();
+ qbk_version_n : state.document.compatibility_version();
}
// Start file, finish here if not generating document info.
if (!use_doc_info)
{
- state.ids.start_file(compatibility_version, include_doc_id_, id_,
+ state.document.start_file(compatibility_version, include_doc_id_, id_,
doc_title);
return "";
}
std::string id_placeholder =
- state.ids.start_file_with_docinfo(
+ state.document.start_file_with_docinfo(
compatibility_version, include_doc_id_, id_, doc_title);
// Make sure we really did have a document info block.
@@ -460,7 +463,7 @@ namespace quickbook
if (!license.empty())
{
tmp << " <legalnotice id=\""
- << state.ids.add_id("legal", id_category::generated)
+ << state.document.add_id("legal", id_category::generated)
<< "\">\n"
<< " <para>\n"
<< " " << doc_info_output(license, 103) << "\n"
@@ -541,18 +544,18 @@ namespace quickbook
// *after* everything else.
// Close any open sections.
- if (!doc_type.empty() && state.ids.section_level() > 1) {
+ if (!doc_type.empty() && state.document.section_level() > 1) {
detail::outwarn(state.current_file->path)
<< "Missing [endsect] detected at end of file."
<< std::endl;
- while(state.ids.section_level() > 1) {
+ while(state.document.section_level() > 1) {
state.out << "</section>";
- state.ids.end_section();
+ state.document.end_section();
}
}
- state.ids.end_file();
+ state.document.end_file();
if (!doc_type.empty()) state.out << "\n</" << doc_type << ">\n\n";
}
diff --git a/tools/quickbook/src/doc_info_grammar.cpp b/tools/quickbook/src/doc_info_grammar.cpp
index 563efc34e..1d71e3b3e 100644
--- a/tools/quickbook/src/doc_info_grammar.cpp
+++ b/tools/quickbook/src/doc_info_grammar.cpp
@@ -11,7 +11,6 @@
#include <map>
#include <boost/foreach.hpp>
#include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/include/classic_actor.hpp>
#include <boost/spirit/include/classic_loops.hpp>
#include <boost/spirit/include/classic_symbols.hpp>
#include <boost/spirit/include/classic_chset.hpp>
@@ -118,16 +117,23 @@ namespace quickbook
// Actions
error_action error(state);
- plain_char_action plain_char(state.phrase, state);
- do_macro_action do_macro(state.phrase, state);
+ plain_char_action plain_char(state);
+ do_macro_action do_macro(state);
scoped_parser<to_value_scoped_action> to_value(state);
+ member_action_value<quickbook::state, source_mode_type> change_source_mode(
+ state, &state::change_source_mode);
+ member_action_fixed_value<quickbook::state, source_mode_type> default_source_mode(
+ state, &state::change_source_mode, source_mode_tags::cpp);
doc_info_details =
- space [ph::var(local.source_mode_unset) = true]
- >> *( local.doc_attribute
- >> space
+ cl::eps_p [ph::var(local.source_mode_unset) = true]
+ >> *( space
+ >> local.doc_attribute
+ )
+ >> !( space
+ >> local.doc_info_block
)
- >> !local.doc_info_block
+ >> *eol
;
local.doc_info_block =
@@ -146,7 +152,7 @@ namespace quickbook
]
>> space
>> !(qbk_ver(106u) >> cl::eps_p(ph::var(local.source_mode_unset))
- [cl::assign_a(state.source_mode, "c++")]
+ [default_source_mode]
)
>> ( *( ( local.doc_info_attribute
| local.doc_info_escaped_attributes
@@ -155,7 +161,7 @@ namespace quickbook
)
) [state.values.sort()]
>> ( ']'
- >> (+eol | cl::end_p)
+ >> (eol | cl::end_p)
| cl::eps_p [error]
)
;
@@ -219,12 +225,8 @@ namespace quickbook
local.attribute_rules[doc_attributes::compatibility_mode] = &local.doc_compatibility_mode;
- local.doc_source_mode =
- (
- cl::str_p("c++")
- | "python"
- | "teletype"
- ) [cl::assign_a(state.source_mode)]
+ local.doc_source_mode = source_modes
+ [change_source_mode]
[ph::var(local.source_mode_unset) = false]
;
diff --git a/tools/quickbook/src/document_state.cpp b/tools/quickbook/src/document_state.cpp
new file mode 100644
index 000000000..2841389ca
--- /dev/null
+++ b/tools/quickbook/src/document_state.cpp
@@ -0,0 +1,472 @@
+/*=============================================================================
+ Copyright (c) 2011, 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include "document_state_impl.hpp"
+#include "utils.hpp"
+#include <boost/make_shared.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/range/algorithm.hpp>
+#include <cctype>
+
+namespace quickbook
+{
+ struct file_info
+ {
+ boost::shared_ptr<file_info> const parent;
+ boost::shared_ptr<doc_info> const document;
+
+ unsigned const compatibility_version;
+ unsigned const depth;
+ unsigned const override_depth;
+ id_placeholder const* const override_id;
+
+ // The 1.1-1.5 document id would actually change per file due to
+ // explicit ids in includes and a bug which would sometimes use the
+ // document title instead of the id.
+ std::string const doc_id_1_1;
+
+ // Constructor for files that aren't the root of a document.
+ file_info(boost::shared_ptr<file_info> const& parent,
+ unsigned compatibility_version,
+ boost::string_ref doc_id_1_1,
+ id_placeholder const* override_id) :
+ parent(parent), document(parent->document),
+ compatibility_version(compatibility_version),
+ depth(parent->depth + 1),
+ override_depth(override_id ? depth : parent->override_depth),
+ override_id(override_id ? override_id : parent->override_id),
+ doc_id_1_1(detail::to_s(doc_id_1_1))
+ {}
+
+ // Constructor for files that are the root of a document.
+ file_info(boost::shared_ptr<file_info> const& parent,
+ boost::shared_ptr<doc_info> const& document,
+ unsigned compatibility_version,
+ boost::string_ref doc_id_1_1) :
+ parent(parent), document(document),
+ compatibility_version(compatibility_version),
+ depth(0), override_depth(0), override_id(0),
+ doc_id_1_1(detail::to_s(doc_id_1_1))
+ {}
+ };
+
+ struct doc_info
+ {
+ boost::shared_ptr<section_info> current_section;
+
+ // Note: these are mutable to remain bug compatible with old versions
+ // of quickbook. They would set these values at the start of new files
+ // and sections and then not restore them at the end.
+ std::string last_title_1_1;
+ std::string section_id_1_1;
+ };
+
+ struct section_info
+ {
+ boost::shared_ptr<section_info> const parent;
+ unsigned const compatibility_version;
+ unsigned const file_depth;
+ unsigned const level;
+ std::string const id_1_1;
+ id_placeholder const* const placeholder_1_6;
+ source_mode_info const source_mode;
+
+ section_info(boost::shared_ptr<section_info> const& parent,
+ file_info const* current_file, boost::string_ref id,
+ boost::string_ref id_1_1, id_placeholder const* placeholder_1_6,
+ source_mode_info const& source_mode) :
+ parent(parent),
+ compatibility_version(current_file->compatibility_version),
+ file_depth(current_file->depth),
+ level(parent ? parent->level + 1 : 1),
+ id_1_1(detail::to_s(id_1_1)),
+ placeholder_1_6(placeholder_1_6),
+ source_mode(source_mode) {}
+ };
+
+ //
+ // document_state
+ //
+
+ document_state::document_state()
+ : state(new document_state_impl)
+ {
+ }
+
+ document_state::~document_state() {}
+
+ void document_state::start_file(
+ unsigned compatibility_version,
+ boost::string_ref include_doc_id,
+ boost::string_ref id,
+ value const& title)
+ {
+ state->start_file(compatibility_version, false, include_doc_id, id, title);
+ }
+
+ std::string document_state::start_file_with_docinfo(
+ unsigned compatibility_version,
+ boost::string_ref include_doc_id,
+ boost::string_ref id,
+ value const& title)
+ {
+ return state->start_file(compatibility_version, true, include_doc_id,
+ id, title)->to_string();
+ }
+
+ void document_state::end_file()
+ {
+ state->end_file();
+ }
+
+ std::string document_state::begin_section(boost::string_ref id,
+ id_category category, source_mode_info const& source_mode)
+ {
+ return state->begin_section(id, category, source_mode)->to_string();
+ }
+
+ void document_state::end_section()
+ {
+ return state->end_section();
+ }
+
+ int document_state::section_level() const
+ {
+ return state->current_file->document->current_section->level;
+ }
+
+ source_mode_info document_state::section_source_mode() const
+ {
+ return state->current_file ?
+ state->current_file->document->current_section->source_mode :
+ source_mode_info();
+ }
+
+ std::string document_state::old_style_id(boost::string_ref id, id_category category)
+ {
+ return state->old_style_id(id, category)->to_string();
+ }
+
+ std::string document_state::add_id(boost::string_ref id, id_category category)
+ {
+ return state->add_id(id, category)->to_string();
+ }
+
+ std::string document_state::add_anchor(boost::string_ref id, id_category category)
+ {
+ return state->add_placeholder(id, category)->to_string();
+ }
+
+ std::string document_state::replace_placeholders_with_unresolved_ids(
+ boost::string_ref xml) const
+ {
+ return replace_ids(*state, xml);
+ }
+
+ std::string document_state::replace_placeholders(boost::string_ref xml) const
+ {
+ assert(!state->current_file);
+ std::vector<std::string> ids = generate_ids(*state, xml);
+ return replace_ids(*state, xml, &ids);
+ }
+
+ unsigned document_state::compatibility_version() const
+ {
+ return state->current_file->compatibility_version;
+ }
+
+ //
+ // id_placeholder
+ //
+
+ id_placeholder::id_placeholder(
+ unsigned index,
+ boost::string_ref id,
+ id_category category,
+ id_placeholder const* parent_)
+ : index(index),
+ unresolved_id(parent_ ?
+ parent_->unresolved_id + '.' + detail::to_s(id) :
+ detail::to_s(id)),
+ id(id.begin(), id.end()),
+ parent(parent_),
+ category(category),
+ num_dots(boost::range::count(id, '.') +
+ (parent_ ? parent_->num_dots + 1 : 0))
+ {
+ }
+
+ std::string id_placeholder::to_string() const
+ {
+ return '$' + boost::lexical_cast<std::string>(index);
+ }
+
+ //
+ // document_state_impl
+ //
+
+ id_placeholder const* document_state_impl::add_placeholder(
+ boost::string_ref id, id_category category,
+ id_placeholder const* parent)
+ {
+ placeholders.push_back(id_placeholder(
+ placeholders.size(), id, category, parent));
+ return &placeholders.back();
+ }
+
+ id_placeholder const* document_state_impl::get_placeholder(boost::string_ref value) const
+ {
+ // If this isn't a placeholder id.
+ if (value.size() <= 1 || *value.begin() != '$')
+ return 0;
+
+ unsigned index = boost::lexical_cast<int>(std::string(
+ value.begin() + 1, value.end()));
+
+ return &placeholders.at(index);
+ }
+
+ id_placeholder const* document_state_impl::get_id_placeholder(
+ boost::shared_ptr<section_info> const& section) const
+ {
+ return !section ? 0 :
+ section->file_depth < current_file->override_depth ?
+ current_file->override_id : section->placeholder_1_6;
+ }
+
+ id_placeholder const* document_state_impl::start_file(
+ unsigned compatibility_version,
+ bool document_root,
+ boost::string_ref include_doc_id,
+ boost::string_ref id,
+ value const& title)
+ {
+ boost::shared_ptr<file_info> parent = current_file;
+ assert(parent || document_root);
+
+ boost::shared_ptr<doc_info> document =
+ document_root ? boost::make_shared<doc_info>() : parent->document;
+
+ // Choose specified id to use. Prefer 'include_doc_id' (the id
+ // specified in an 'include' element) unless backwards compatibility
+ // is required.
+
+ boost::string_ref initial_doc_id;
+
+ if (document_root ||
+ compatibility_version >= 106u ||
+ parent->compatibility_version >= 106u)
+ {
+ initial_doc_id = !include_doc_id.empty() ? include_doc_id : id;
+ }
+ else {
+ initial_doc_id = !id.empty() ? id : include_doc_id;
+ }
+
+ // Work out this file's doc_id for older versions of quickbook.
+ // A bug meant that this need to be done per file, not per
+ // document.
+
+ std::string doc_id_1_1;
+
+ if (document_root || compatibility_version < 106u) {
+ if (title.check())
+ document->last_title_1_1 = detail::to_s(title.get_quickbook());
+
+ doc_id_1_1 = !initial_doc_id.empty() ? detail::to_s(initial_doc_id) :
+ detail::make_identifier(document->last_title_1_1);
+ }
+ else if (parent) {
+ doc_id_1_1 = parent->doc_id_1_1;
+ }
+
+ if (document_root) {
+ // Create new file
+
+ current_file = boost::make_shared<file_info>(parent,
+ document, compatibility_version, doc_id_1_1);
+
+ // Create a section for the new document.
+
+ source_mode_info default_source_mode;
+
+ if (!initial_doc_id.empty()) {
+ return create_new_section(id, id_category::explicit_section_id,
+ default_source_mode);
+ }
+ else if (!title.empty()) {
+ return create_new_section(
+ detail::make_identifier(title.get_quickbook()),
+ id_category::generated_doc,
+ default_source_mode);
+ }
+ else if (compatibility_version >= 106u) {
+ return create_new_section("doc", id_category::numbered, default_source_mode);
+ }
+ else {
+ return create_new_section("", id_category::generated_doc, default_source_mode);
+ }
+ }
+ else {
+ // If an id was set for the file, then the file overrides the
+ // current section's id with this id.
+ //
+ // Don't do this for document_root as it will create a section
+ // for the document.
+ //
+ // Don't do this for older versions, as they use a different
+ // backwards compatible mechanism to handle file ids.
+
+ id_placeholder const* override_id = 0;
+
+ if (!initial_doc_id.empty() && compatibility_version >= 106u)
+ {
+ boost::shared_ptr<section_info> null_section;
+
+ override_id = add_id_to_section(initial_doc_id,
+ id_category::explicit_section_id, null_section);
+ }
+
+ // Create new file
+
+ current_file =
+ boost::make_shared<file_info>(parent, compatibility_version,
+ doc_id_1_1, override_id);
+
+ return 0;
+ }
+ }
+
+ void document_state_impl::end_file()
+ {
+ current_file = current_file->parent;
+ }
+
+ id_placeholder const* document_state_impl::add_id(
+ boost::string_ref id,
+ id_category category)
+ {
+ return add_id_to_section(id, category,
+ current_file->document->current_section);
+ }
+
+ id_placeholder const* document_state_impl::add_id_to_section(
+ boost::string_ref id,
+ id_category category,
+ boost::shared_ptr<section_info> const& section)
+ {
+ std::string id_part(id.begin(), id.end());
+
+ // Note: Normalizing id according to file compatibility version, but
+ // adding to section according to section compatibility version.
+
+ if (current_file->compatibility_version >= 106u &&
+ category.c < id_category::explicit_id) {
+ id_part = normalize_id(id);
+ }
+
+ id_placeholder const* placeholder_1_6 = get_id_placeholder(section);
+
+ if(!section || section->compatibility_version >= 106u) {
+ return add_placeholder(id_part, category, placeholder_1_6);
+ }
+ else {
+ std::string const& qualified_id = section->id_1_1;
+
+ std::string new_id;
+ if (!placeholder_1_6)
+ new_id = current_file->doc_id_1_1;
+ if (!new_id.empty() && !qualified_id.empty()) new_id += '.';
+ new_id += qualified_id;
+ if (!new_id.empty() && !id_part.empty()) new_id += '.';
+ new_id += id_part;
+
+ return add_placeholder(new_id, category, placeholder_1_6);
+ }
+ }
+
+ id_placeholder const* document_state_impl::old_style_id(
+ boost::string_ref id,
+ id_category category)
+ {
+ return current_file->compatibility_version < 103u ?
+ add_placeholder(
+ current_file->document->section_id_1_1 + "." + detail::to_s(id), category) :
+ add_id(id, category);
+ }
+
+ id_placeholder const* document_state_impl::begin_section(
+ boost::string_ref id,
+ id_category category,
+ source_mode_info const& source_mode)
+ {
+ current_file->document->section_id_1_1 = detail::to_s(id);
+ return create_new_section(id, category, source_mode);
+ }
+
+ id_placeholder const* document_state_impl::create_new_section(
+ boost::string_ref id,
+ id_category category,
+ source_mode_info const& source_mode)
+ {
+ boost::shared_ptr<section_info> parent =
+ current_file->document->current_section;
+
+ id_placeholder const* p = 0;
+ id_placeholder const* placeholder_1_6 = 0;
+
+ std::string id_1_1;
+
+ if (parent && current_file->compatibility_version < 106u) {
+ id_1_1 = parent->id_1_1;
+ if (!id_1_1.empty() && !id.empty())
+ id_1_1 += ".";
+ id_1_1.append(id.begin(), id.end());
+ }
+
+ if (current_file->compatibility_version >= 106u) {
+ p = placeholder_1_6 = add_id_to_section(id, category, parent);
+ }
+ else if (current_file->compatibility_version >= 103u) {
+ placeholder_1_6 = get_id_placeholder(parent);
+
+ std::string new_id;
+ if (!placeholder_1_6) {
+ new_id = current_file->doc_id_1_1;
+ if (!id_1_1.empty()) new_id += '.';
+ }
+ new_id += id_1_1;
+
+ p = add_placeholder(new_id, category, placeholder_1_6);
+ }
+ else {
+ placeholder_1_6 = get_id_placeholder(parent);
+
+ std::string new_id;
+ if (parent && !placeholder_1_6)
+ new_id = current_file->doc_id_1_1 + '.';
+
+ new_id += detail::to_s(id);
+
+ p = add_placeholder(new_id, category, placeholder_1_6);
+ }
+
+ current_file->document->current_section =
+ boost::make_shared<section_info>(parent,
+ current_file.get(), id, id_1_1, placeholder_1_6,
+ source_mode);
+
+ return p;
+ }
+
+ void document_state_impl::end_section()
+ {
+ current_file->document->current_section =
+ current_file->document->current_section->parent;
+ }
+}
diff --git a/tools/quickbook/src/id_manager.hpp b/tools/quickbook/src/document_state.hpp
index 9410d2380..2210c4173 100644
--- a/tools/quickbook/src/id_manager.hpp
+++ b/tools/quickbook/src/document_state.hpp
@@ -1,18 +1,19 @@
/*=============================================================================
- Copyright (c) 2011 Daniel James
+ Copyright (c) 2011,2013 Daniel James
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)
=============================================================================*/
-#if !defined(BOOST_QUICKBOOK_ID_MANAGER_HPP)
-#define BOOST_QUICKBOOK_ID_MANAGER_HPP
+#if !defined(BOOST_QUICKBOOK_DOCUMENT_STATE_HPP)
+#define BOOST_QUICKBOOK_DOCUMENT_STATE_HPP
#include <boost/scoped_ptr.hpp>
#include <boost/utility/string_ref.hpp>
#include <string>
#include "values.hpp"
+#include "syntax_highlight.hpp"
namespace quickbook
{
@@ -44,13 +45,12 @@ namespace quickbook
categories c;
};
- struct id_state;
- struct section_manager;
+ struct document_state_impl;
- struct id_manager
+ struct document_state
{
- id_manager();
- ~id_manager();
+ document_state();
+ ~document_state();
std::string start_file_with_docinfo(
unsigned compatibility_version,
@@ -66,9 +66,11 @@ namespace quickbook
void end_file();
- std::string begin_section(boost::string_ref, id_category);
+ std::string begin_section(boost::string_ref, id_category,
+ source_mode_info const&);
void end_section();
int section_level() const;
+ source_mode_info section_source_mode() const;
std::string old_style_id(boost::string_ref, id_category);
std::string add_id(boost::string_ref, id_category);
@@ -77,10 +79,10 @@ namespace quickbook
std::string replace_placeholders_with_unresolved_ids(
boost::string_ref) const;
std::string replace_placeholders(boost::string_ref) const;
-
+
unsigned compatibility_version() const;
private:
- boost::scoped_ptr<id_state> state;
+ boost::scoped_ptr<document_state_impl> state;
};
}
diff --git a/tools/quickbook/src/document_state_impl.hpp b/tools/quickbook/src/document_state_impl.hpp
new file mode 100644
index 000000000..e9258e3b1
--- /dev/null
+++ b/tools/quickbook/src/document_state_impl.hpp
@@ -0,0 +1,147 @@
+/*=============================================================================
+ Copyright (c) 2011-2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#if !defined(BOOST_QUICKBOOK_DOCUMENT_STATE_IMPL_HPP)
+#define BOOST_QUICKBOOK_DOCUMENT_STATE_IMPL_HPP
+
+#include "document_state.hpp"
+#include "phrase_tags.hpp"
+#include "utils.hpp"
+#include <boost/utility/string_ref.hpp>
+#include <boost/shared_ptr.hpp>
+#include <deque>
+#include <string>
+#include <vector>
+
+namespace quickbook
+{
+ //
+ // id_placeholder
+ //
+ // When generating the xml, quickbook can't allocate the identifiers until
+ // the end, so it stores in the intermedia xml a placeholder string,
+ // e.g. id="$1". This represents one of these placeholders.
+ //
+
+ struct id_placeholder
+ {
+ unsigned index; // The index in document_state_impl::placeholders.
+ // Use for the dollar identifiers in
+ // intermediate xml.
+ std::string unresolved_id;
+ // The id that would be generated
+ // without any duplicate handling.
+ // Used for generating old style header anchors.
+ std::string id; // The node id.
+ id_placeholder const* parent;
+ // Placeholder of the parent id.
+ id_category category;
+ unsigned num_dots; // Number of dots in the id.
+ // Normally equal to the section level
+ // but not when an explicit id contains
+ // dots.
+
+ id_placeholder(unsigned index, boost::string_ref id,
+ id_category category, id_placeholder const* parent_);
+
+ std::string to_string() const;
+ };
+
+ //
+ // document_state_impl
+ //
+ // Contains all the data tracked by document_state.
+ //
+
+ struct file_info;
+ struct doc_info;
+ struct section_info;
+
+ struct document_state_impl
+ {
+ boost::shared_ptr<file_info> current_file;
+ std::deque<id_placeholder> placeholders;
+
+ // Placeholder methods
+
+ id_placeholder const* add_placeholder(boost::string_ref, id_category,
+ id_placeholder const* parent = 0);
+
+ id_placeholder const* get_placeholder(boost::string_ref) const;
+
+ id_placeholder const* get_id_placeholder(
+ boost::shared_ptr<section_info> const& section) const;
+
+ // Events
+
+ id_placeholder const* start_file(
+ unsigned compatibility_version,
+ bool document_root,
+ boost::string_ref include_doc_id,
+ boost::string_ref id,
+ value const& title);
+
+ void end_file();
+
+ id_placeholder const* add_id(
+ boost::string_ref id,
+ id_category category);
+ id_placeholder const* old_style_id(
+ boost::string_ref id,
+ id_category category);
+ id_placeholder const* begin_section(
+ boost::string_ref id,
+ id_category category,
+ source_mode_info const&);
+ void end_section();
+
+ private:
+ id_placeholder const* add_id_to_section(
+ boost::string_ref id,
+ id_category category,
+ boost::shared_ptr<section_info> const& section);
+ id_placeholder const* create_new_section(
+ boost::string_ref id,
+ id_category category,
+ source_mode_info const&);
+ };
+
+ std::string replace_ids(document_state_impl const& state, boost::string_ref xml,
+ std::vector<std::string> const* = 0);
+ std::vector<std::string> generate_ids(document_state_impl const&, boost::string_ref);
+
+ std::string normalize_id(boost::string_ref src_id);
+ std::string normalize_id(boost::string_ref src_id, std::size_t);
+
+ //
+ // Xml subset parser used for finding id values.
+ //
+ // I originally tried to integrate this into the post processor
+ // but that proved tricky. Alternatively it could use a proper
+ // xml parser, but I want this to be able to survive badly
+ // marked up escapes.
+ //
+
+ struct xml_processor
+ {
+ xml_processor();
+
+ std::vector<std::string> id_attributes;
+
+ struct callback {
+ virtual void start(boost::string_ref) {}
+ virtual void id_value(boost::string_ref) {}
+ virtual void finish(boost::string_ref) {}
+ virtual ~callback() {}
+ };
+
+ void parse(boost::string_ref, callback&);
+ };
+}
+
+#endif
diff --git a/tools/quickbook/src/files.cpp b/tools/quickbook/src/files.cpp
index 97c67c26b..9999b0f22 100644
--- a/tools/quickbook/src/files.cpp
+++ b/tools/quickbook/src/files.cpp
@@ -15,6 +15,7 @@
#include <boost/foreach.hpp>
#include <fstream>
#include <iterator>
+#include <vector>
namespace quickbook
{
diff --git a/tools/quickbook/src/fwd.hpp b/tools/quickbook/src/fwd.hpp
index 2fce3ee1d..5dec2d68a 100644
--- a/tools/quickbook/src/fwd.hpp
+++ b/tools/quickbook/src/fwd.hpp
@@ -20,11 +20,12 @@ namespace quickbook
struct state;
struct quickbook_grammar;
struct collector;
- struct id_manager;
+ struct document_state;
struct section_info;
struct file;
struct template_symbol;
typedef boost::intrusive_ptr<file> file_ptr;
+ typedef unsigned source_mode_type;
typedef boost::string_ref::const_iterator string_iterator;
typedef lookback_iterator<string_iterator> parse_iterator;
diff --git a/tools/quickbook/src/glob.cpp b/tools/quickbook/src/glob.cpp
new file mode 100644
index 000000000..474bdeb07
--- /dev/null
+++ b/tools/quickbook/src/glob.cpp
@@ -0,0 +1,301 @@
+/*=============================================================================
+ Copyright (c) 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include "glob.hpp"
+#include <cassert>
+
+namespace quickbook
+{
+ typedef boost::string_ref::const_iterator glob_iterator;
+
+ void check_glob_range(glob_iterator&, glob_iterator);
+ void check_glob_escape(glob_iterator&, glob_iterator);
+
+ bool match_section(glob_iterator& pattern_begin, glob_iterator pattern_end,
+ glob_iterator& filename_begin, glob_iterator& filename_end);
+ bool match_range(glob_iterator& pattern_begin, glob_iterator pattern_end,
+ unsigned char x);
+
+ bool check_glob(boost::string_ref pattern)
+ {
+ bool is_glob = false;
+ bool is_ascii = true;
+
+ glob_iterator begin = pattern.begin();
+ glob_iterator end = pattern.end();
+
+ while (begin != end) {
+ if (*begin < 32 || *begin > 127)
+ is_ascii = false;
+
+ switch(*begin) {
+ case '\\':
+ check_glob_escape(begin, end);
+ break;
+
+ case '[':
+ check_glob_range(begin, end);
+ is_glob = true;
+ break;
+
+ case ']':
+ throw glob_error("uneven square brackets");
+
+ case '?':
+ is_glob = true;
+ ++begin;
+ break;
+
+ case '*':
+ is_glob = true;
+ ++begin;
+
+ if (begin != end && *begin == '*') {
+ throw glob_error("'**' not supported");
+ }
+ break;
+
+ default:
+ ++begin;
+ }
+ }
+
+ if (is_glob && !is_ascii)
+ throw glob_error("invalid character, globs are ascii only");
+
+ return is_glob;
+ }
+
+ void check_glob_range(glob_iterator& begin, glob_iterator end)
+ {
+ assert(begin != end && *begin == '[');
+ ++begin;
+
+ if (*begin == ']')
+ throw glob_error("empty range");
+
+ while (begin != end) {
+ switch (*begin) {
+ case '\\':
+ ++begin;
+
+ if (begin == end) {
+ throw glob_error("trailing escape");
+ }
+ else if (*begin == '\\' || *begin == '/') {
+ throw glob_error("contains escaped slash");
+ }
+
+ ++begin;
+ break;
+ case '[':
+ // TODO: Allow?
+ throw glob_error("nested square brackets");
+ case ']':
+ ++begin;
+ return;
+ case '/':
+ throw glob_error("slash in square brackets");
+ default:
+ ++begin;
+ }
+ }
+
+ throw glob_error("uneven square brackets");
+ }
+
+ void check_glob_escape(glob_iterator& begin, glob_iterator end)
+ {
+ assert(begin != end && *begin == '\\');
+
+ ++begin;
+
+ if (begin == end) {
+ throw glob_error("trailing escape");
+ }
+ else if (*begin == '\\' || *begin == '/') {
+ throw glob_error("contains escaped slash");
+ }
+
+ ++begin;
+ }
+
+ bool glob(boost::string_ref const& pattern,
+ boost::string_ref const& filename)
+ {
+ // If there wasn't this special case then '*' would match an
+ // empty string.
+ if (filename.empty()) return pattern.empty();
+
+ glob_iterator pattern_it = pattern.begin();
+ glob_iterator pattern_end = pattern.end();
+
+ glob_iterator filename_it = filename.begin();
+ glob_iterator filename_end = filename.end();
+
+ if (!match_section(pattern_it, pattern_end, filename_it, filename_end))
+ return false;
+
+ while (pattern_it != pattern_end) {
+ assert(*pattern_it == '*');
+ ++pattern_it;
+
+ if (pattern_it == pattern_end) return true;
+
+ // TODO: Error?
+ if (*pattern_it == '*') return false;
+
+ while (true) {
+ if (filename_it == filename_end) return false;
+ if (match_section(pattern_it, pattern_end, filename_it, filename_end))
+ break;
+ ++filename_it;
+ }
+ }
+
+ return filename_it == filename_end;
+ }
+
+ bool match_section(glob_iterator& pattern_begin, glob_iterator pattern_end,
+ glob_iterator& filename_begin, glob_iterator& filename_end)
+ {
+ glob_iterator pattern_it = pattern_begin;
+ glob_iterator filename_it = filename_begin;
+
+ while (pattern_it != pattern_end && *pattern_it != '*') {
+ if (filename_it == filename_end) return false;
+
+ switch(*pattern_it) {
+ case '*':
+ assert(false);
+ return false;
+ case '[':
+ if (!match_range(pattern_it, pattern_end, *filename_it))
+ return false;
+ ++filename_it;
+ break;
+ case '?':
+ ++pattern_it;
+ ++filename_it;
+ break;
+ case '\\':
+ ++pattern_it;
+ if (pattern_it == pattern_end) return false;
+ BOOST_FALLTHROUGH;
+ default:
+ if (*pattern_it != *filename_it) return false;
+ ++pattern_it;
+ ++filename_it;
+ }
+ }
+
+ if (pattern_it == pattern_end && filename_it != filename_end)
+ return false;
+
+ pattern_begin = pattern_it;
+ filename_begin = filename_it;
+ return true;
+ }
+
+ bool match_range(glob_iterator& pattern_begin, glob_iterator pattern_end,
+ unsigned char x)
+ {
+ assert(pattern_begin != pattern_end && *pattern_begin == '[');
+ ++pattern_begin;
+ if (pattern_begin == pattern_end) return false;
+
+ bool invert_match = false;
+ bool matched = false;
+
+ if (*pattern_begin == '^') {
+ invert_match = true;
+ ++pattern_begin;
+ if (pattern_begin == pattern_end) return false;
+ }
+
+ // Search for a match
+ while (true) {
+ unsigned char first = *pattern_begin;
+ ++pattern_begin;
+ if (first == ']') break;
+ if (pattern_begin == pattern_end) return false;
+
+ if (first == '\\') {
+ first = *pattern_begin;
+ ++pattern_begin;
+ if (pattern_begin == pattern_end) return false;
+ }
+
+ if (*pattern_begin != '-') {
+ matched = matched || (first == x);
+ }
+ else {
+ ++pattern_begin;
+ if (pattern_begin == pattern_end) return false;
+
+ unsigned char second = *pattern_begin;
+ ++pattern_begin;
+ if (second == ']') {
+ matched = matched || (first == x) || (x == '-');
+ break;
+ }
+ if (pattern_begin == pattern_end) return false;
+
+ if (second == '\\') {
+ second = *pattern_begin;
+ ++pattern_begin;
+ if (pattern_begin == pattern_end) return false;
+ }
+
+ // TODO: What if second < first?
+ matched = matched || (first <= x && x <= second);
+ }
+ }
+
+ return invert_match != matched;
+ }
+
+ std::size_t find_glob_char(boost::string_ref pattern,
+ std::size_t pos)
+ {
+ // Weird style is because boost::string_ref's find_first_of
+ // doesn't take a position argument.
+ std::size_t removed = 0;
+
+ while (true) {
+ pos = pattern.find_first_of("[]?*\\");
+ if (pos == boost::string_ref::npos) return pos;
+ if (pattern[pos] != '\\') return pos + removed;
+ pattern.remove_prefix(pos + 2);
+ removed += pos + 2;
+ }
+ }
+
+ std::string glob_unescape(boost::string_ref pattern)
+ {
+ std::string result;
+
+ while (true) {
+ std::size_t pos = pattern.find("\\");
+ if (pos == boost::string_ref::npos) {
+ result.append(pattern.data(), pattern.size());
+ break;
+ }
+
+ result.append(pattern.data(), pos);
+ ++pos;
+ if (pos < pattern.size()) {
+ result += pattern[pos];
+ ++pos;
+ }
+ pattern.remove_prefix(pos);
+ }
+
+ return result;
+ }
+}
diff --git a/tools/quickbook/src/glob.hpp b/tools/quickbook/src/glob.hpp
new file mode 100644
index 000000000..8e8458961
--- /dev/null
+++ b/tools/quickbook/src/glob.hpp
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include <boost/utility/string_ref.hpp>
+#include <stdexcept>
+
+namespace quickbook
+{
+ struct glob_error : std::runtime_error
+ {
+ explicit glob_error(char const* error) :
+ std::runtime_error(error) {}
+ };
+
+ // Is this path a glob? Throws glob_error if glob is invalid.
+ bool check_glob(boost::string_ref);
+
+ // pre: glob is valid (call check_glob first on user data).
+ bool glob(boost::string_ref const& pattern,
+ boost::string_ref const& filename);
+
+ std::size_t find_glob_char(boost::string_ref,
+ std::size_t start = 0);
+ std::string glob_unescape(boost::string_ref);
+}
diff --git a/tools/quickbook/src/grammar.cpp b/tools/quickbook/src/grammar.cpp
index 8f244f18a..54ed64aa0 100644
--- a/tools/quickbook/src/grammar.cpp
+++ b/tools/quickbook/src/grammar.cpp
@@ -17,8 +17,10 @@ namespace quickbook
: impl_(new impl(s))
, command_line_macro(impl_->command_line, "command_line_macro")
, inline_phrase(impl_->inline_phrase, "inline_phrase")
- , phrase(impl_->phrase_start, "phrase")
- , block(impl_->block_start, "block")
+ , phrase_start(impl_->phrase_start, "phrase")
+ , block_start(impl_->block_start, "block")
+ , attribute_template_body(impl_->attribute_template_body,
+ "attribute_template_body")
, doc_info(impl_->doc_info_details, "doc_info")
{
}
diff --git a/tools/quickbook/src/grammar.hpp b/tools/quickbook/src/grammar.hpp
index 54aaf2b3e..01d634c90 100644
--- a/tools/quickbook/src/grammar.hpp
+++ b/tools/quickbook/src/grammar.hpp
@@ -58,8 +58,9 @@ namespace quickbook
public:
grammar command_line_macro;
grammar inline_phrase;
- grammar phrase;
- grammar block;
+ grammar phrase_start;
+ grammar block_start;
+ grammar attribute_template_body;
grammar doc_info;
quickbook_grammar(quickbook::state&);
diff --git a/tools/quickbook/src/grammar_impl.hpp b/tools/quickbook/src/grammar_impl.hpp
index 800e9f830..8d37d351f 100644
--- a/tools/quickbook/src/grammar_impl.hpp
+++ b/tools/quickbook/src/grammar_impl.hpp
@@ -20,26 +20,81 @@ namespace quickbook
{
namespace cl = boost::spirit::classic;
+ // Information about a square bracket element (e.g. [* word]).
+ //
+ // TODO: The naming is a bit confused as element is also sometimes used for
+ // syntactic/implicit elements (such as lists and horizontal rules). Maybe
+ // should use entity as a more general name instead of element. Or it might
+ // be better to use 'tag' for square bracket elements, although that is
+ // currently used for the type of entities.
struct element_info
{
+ // Types of elements.
+ //
+ // Used to determine:
+ //
+ // - where they can be used.
+ // - whether they end a paragraph
+ // - how following newlines are interpreted by the grammar.
+ // - and possibly other things.....
enum type_enum {
+ // Used when there's no element.
nothing = 0,
- block = 1,
+
+ // A section tag. These can't be nested.
+ section_block = 1,
+
+ // Block elements that can be used in conditional phrases and lists,
+ // but not nested. (TODO: not a good name).
conditional_or_block = 2,
+
+ // Block elements that can be nested in other elements.
nested_block = 4,
+
+ // Phrase elements.
phrase = 8,
+
+ // Depending on the context this can be a block or phrase.
+ //
+ // Currently this is only used for elements that don't actually
+ // generate output (e.g. anchors, source mode tags). The main
+ // reason is so that lists can be preceeded by the element, e.g.
+ //
+ // [#anchor]
+ // * list item.
+ //
+ // If the anchor was considered to be a phrase element, then the
+ // list wouldn't be recognised.
maybe_block = 16
};
+ // Masks to determine which context elements can be used in (in_*), and
+ // whether they are consided to be a block element (is_*).
enum context {
- in_phrase = phrase | maybe_block,
+ // At the top level we allow everything.
+ in_top_level = phrase | maybe_block | nested_block |
+ conditional_or_block | section_block,
+
+ // In conditional phrases and list blocks we everything but section
+ // elements.
+ in_conditional = phrase | maybe_block | nested_block |
+ conditional_or_block,
+ in_list_block = phrase | maybe_block | nested_block |
+ conditional_or_block,
+
+ // In nested blocks we allow a more limited range of elements.
in_nested_block = phrase | maybe_block | nested_block,
- in_conditional = phrase | maybe_block | nested_block | conditional_or_block,
- in_block = phrase | maybe_block | nested_block | conditional_or_block | block,
- only_nested_block = nested_block,
- only_block = nested_block | conditional_or_block | block,
- only_list_block = nested_block | conditional_or_block,
- only_contextual_block = maybe_block | nested_block | conditional_or_block | block
+
+ // In a phrase we only allow phrase elements, ('maybe_block'
+ // elements are treated as phrase elements in this context)
+ in_phrase = phrase | maybe_block,
+
+ // At the start of a block these are all block elements.
+ is_contextual_block = maybe_block | nested_block |
+ conditional_or_block | section_block,
+
+ // These are all block elements in all other contexts.
+ is_block = nested_block | conditional_or_block | section_block,
};
element_info()
@@ -74,6 +129,7 @@ namespace quickbook
cl::rule<scanner> inside_preformatted;
cl::rule<scanner> inside_paragraph;
cl::rule<scanner> command_line;
+ cl::rule<scanner> attribute_template_body;
cl::rule<scanner> attribute_value_1_7;
cl::rule<scanner> escape;
cl::rule<scanner> raw_escape;
@@ -91,6 +147,9 @@ namespace quickbook
// Element Symbols
cl::symbols<element_info> elements;
+
+ // Source mode
+ cl::symbols<source_mode_type> source_modes;
// Doc Info
cl::rule<scanner> doc_info_details;
diff --git a/tools/quickbook/src/id_generation.cpp b/tools/quickbook/src/id_generation.cpp
new file mode 100644
index 000000000..b6445a581
--- /dev/null
+++ b/tools/quickbook/src/id_generation.cpp
@@ -0,0 +1,379 @@
+/*=============================================================================
+ Copyright (c) 2011, 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include <cctype>
+#include "document_state_impl.hpp"
+#include <boost/make_shared.hpp>
+#include <boost/unordered_map.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/foreach.hpp>
+#include <boost/range/algorithm.hpp>
+
+// TODO: This should possibly try to always generate valid XML ids:
+// http://www.w3.org/TR/REC-xml/#NT-NameStartChar
+
+namespace quickbook {
+ //
+ // The maximum size of a generated part of an id.
+ //
+ // Not a strict maximum, sometimes broken because the user
+ // explicitly uses a longer id, or for backwards compatibility.
+
+ static const std::size_t max_size = 32;
+
+ typedef std::vector<id_placeholder const*> placeholder_index;
+ placeholder_index index_placeholders(document_state_impl const&, boost::string_ref);
+
+ void generate_id_block(
+ placeholder_index::iterator, placeholder_index::iterator,
+ std::vector<std::string>& generated_ids);
+
+ std::vector<std::string> generate_ids(document_state_impl const& state, boost::string_ref xml)
+ {
+ std::vector<std::string> generated_ids(state.placeholders.size());
+
+ // Get a list of the placeholders in the order that we wish to
+ // process them.
+ placeholder_index placeholders = index_placeholders(state, xml);
+
+ typedef std::vector<id_placeholder const*>::iterator iterator;
+ iterator it = placeholders.begin(), end = placeholders.end();
+
+ while (it != end) {
+ // We process all the ids that have the same number of dots
+ // together. Note that ids with different parents can clash, e.g.
+ // because of old fashioned id generation or anchors containing
+ // multiple dots.
+ //
+ // So find the group of placeholders with the same number of dots.
+ iterator group_begin = it, group_end = it;
+ while (group_end != end && (*group_end)->num_dots == (*it)->num_dots)
+ ++group_end;
+
+ generate_id_block(group_begin, group_end, generated_ids);
+ it = group_end;
+ }
+
+ return generated_ids;
+ }
+
+ //
+ // index_placeholders
+ //
+ // Create a sorted index of the placeholders, in order
+ // to make numbering duplicates easy. A total order.
+ //
+
+ struct placeholder_compare
+ {
+ std::vector<unsigned>& order;
+
+ placeholder_compare(std::vector<unsigned>& order) : order(order) {}
+
+ bool operator()(id_placeholder const* x, id_placeholder const* y) const
+ {
+ bool x_explicit = x->category.c >= id_category::explicit_id;
+ bool y_explicit = y->category.c >= id_category::explicit_id;
+
+ return
+ x->num_dots < y->num_dots ? true :
+ x->num_dots > y->num_dots ? false :
+ x_explicit > y_explicit ? true :
+ x_explicit < y_explicit ? false :
+ order[x->index] < order[y->index];
+ }
+ };
+
+ struct get_placeholder_order_callback : xml_processor::callback
+ {
+ document_state_impl const& state;
+ std::vector<unsigned>& order;
+ unsigned count;
+
+ get_placeholder_order_callback(document_state_impl const& state,
+ std::vector<unsigned>& order)
+ : state(state),
+ order(order),
+ count(0)
+ {}
+
+ void id_value(boost::string_ref value)
+ {
+ set_placeholder_order(state.get_placeholder(value));
+ }
+
+ void set_placeholder_order(id_placeholder const* p)
+ {
+ if (p && !order[p->index]) {
+ set_placeholder_order(p->parent);
+ order[p->index] = ++count;
+ }
+ }
+ };
+
+ placeholder_index index_placeholders(
+ document_state_impl const& state,
+ boost::string_ref xml)
+ {
+ // The order that the placeholder appear in the xml source.
+ std::vector<unsigned> order(state.placeholders.size());
+
+ xml_processor processor;
+ get_placeholder_order_callback callback(state, order);
+ processor.parse(xml, callback);
+
+ placeholder_index sorted_placeholders;
+ sorted_placeholders.reserve(state.placeholders.size());
+ BOOST_FOREACH(id_placeholder const& p, state.placeholders)
+ if (order[p.index]) sorted_placeholders.push_back(&p);
+ boost::sort(sorted_placeholders, placeholder_compare(order));
+
+ return sorted_placeholders;
+ }
+
+ // Resolve and generate ids.
+
+ struct generate_id_block_type
+ {
+ // The ids which won't require duplicate handling.
+ typedef boost::unordered_map<std::string, id_placeholder const*>
+ chosen_id_map;
+ chosen_id_map chosen_ids;
+ std::vector<std::string>& generated_ids;
+
+ generate_id_block_type(std::vector<std::string>& generated_ids) :
+ generated_ids(generated_ids) {}
+
+ void generate(placeholder_index::iterator begin,
+ placeholder_index::iterator end);
+
+ std::string resolve_id(id_placeholder const*);
+ std::string generate_id(id_placeholder const*, std::string const&);
+ };
+
+ void generate_id_block(placeholder_index::iterator begin,
+ placeholder_index::iterator end,
+ std::vector<std::string>& generated_ids)
+ {
+ generate_id_block_type impl(generated_ids);
+ impl.generate(begin, end);
+ }
+
+ void generate_id_block_type::generate(placeholder_index::iterator begin,
+ placeholder_index::iterator end)
+ {
+ std::vector<std::string> resolved_ids;
+
+ for (placeholder_index::iterator i = begin; i != end; ++i)
+ resolved_ids.push_back(resolve_id(*i));
+
+ unsigned index = 0;
+ for (placeholder_index::iterator i = begin; i != end; ++i, ++index)
+ {
+ generated_ids[(**i).index] =
+ generate_id(*i, resolved_ids[index]);
+ }
+ }
+
+ std::string generate_id_block_type::resolve_id(id_placeholder const* p)
+ {
+ std::string id = p->parent ?
+ generated_ids[p->parent->index] + "." + p->id :
+ p->id;
+
+ if (p->category.c > id_category::numbered) {
+ // Reserve the id if it isn't already reserved.
+ chosen_id_map::iterator pos = chosen_ids.emplace(id, p).first;
+
+ // If it was reserved by a placeholder with a lower category,
+ // then overwrite it.
+ if (p->category.c > pos->second->category.c)
+ pos->second = p;
+ }
+
+ return id;
+ }
+
+ std::string generate_id_block_type::generate_id(id_placeholder const* p,
+ std::string const& resolved_id)
+ {
+ if (p->category.c > id_category::numbered &&
+ chosen_ids.at(resolved_id) == p)
+ {
+ return resolved_id;
+ }
+
+ // Split the id into its parent part and child part.
+ //
+ // Note: can't just use the placeholder's parent, as the
+ // placeholder id might contain dots.
+ std::size_t child_start = resolved_id.rfind('.');
+ std::string parent_id, base_id;
+
+ if (child_start == std::string::npos) {
+ base_id = normalize_id(resolved_id, max_size - 1);
+ }
+ else {
+ parent_id = resolved_id.substr(0, child_start + 1);
+ base_id = normalize_id(resolved_id.substr(child_start + 1),
+ max_size - 1);
+ }
+
+ // Since we're adding digits, don't want an id that ends in
+ // a digit.
+
+ unsigned int length = base_id.size();
+
+ if (length > 0 && std::isdigit(base_id[length - 1])) {
+ if (length < max_size - 1) {
+ base_id += '_';
+ ++length;
+ }
+ else {
+ while (length > 0 && std::isdigit(base_id[length -1]))
+ --length;
+ base_id.erase(length);
+ }
+ }
+
+ unsigned count = 0;
+
+ while (true)
+ {
+ std::string postfix =
+ boost::lexical_cast<std::string>(count++);
+
+ if ((base_id.size() + postfix.size()) > max_size) {
+ // The id is now too long, so reduce the length and
+ // start again.
+
+ // Would need a lot of ids to get this far....
+ if (length == 0) throw std::runtime_error("Too many ids");
+
+ // Trim a character.
+ --length;
+
+ // Trim any trailing digits.
+ while (length > 0 && std::isdigit(base_id[length -1]))
+ --length;
+
+ base_id.erase(length);
+ count = 0;
+ }
+ else {
+ // Try to reserve this id.
+ std::string generated_id = parent_id + base_id + postfix;
+
+ if (chosen_ids.emplace(generated_id, p).second) {
+ return generated_id;
+ }
+ }
+ }
+ }
+
+ //
+ // replace_ids
+ //
+ // Return a copy of the xml with all the placeholders replaced by
+ // generated_ids.
+ //
+
+ struct replace_ids_callback : xml_processor::callback
+ {
+ document_state_impl const& state;
+ std::vector<std::string> const* ids;
+ boost::string_ref::const_iterator source_pos;
+ std::string result;
+
+ replace_ids_callback(document_state_impl const& state,
+ std::vector<std::string> const* ids)
+ : state(state),
+ ids(ids),
+ source_pos(),
+ result()
+ {}
+
+ void start(boost::string_ref xml)
+ {
+ source_pos = xml.begin();
+ }
+
+ void id_value(boost::string_ref value)
+ {
+ if (id_placeholder const* p = state.get_placeholder(value))
+ {
+ boost::string_ref id = ids ?
+ (*ids)[p->index] : p->unresolved_id;
+
+ result.append(source_pos, value.begin());
+ result.append(id.begin(), id.end());
+ source_pos = value.end();
+ }
+ }
+
+ void finish(boost::string_ref xml)
+ {
+ result.append(source_pos, xml.end());
+ source_pos = xml.end();
+ }
+ };
+
+ std::string replace_ids(document_state_impl const& state, boost::string_ref xml,
+ std::vector<std::string> const* ids)
+ {
+ xml_processor processor;
+ replace_ids_callback callback(state, ids);
+ processor.parse(xml, callback);
+ return callback.result;
+ }
+
+ //
+ // normalize_id
+ //
+ // Normalizes generated ids.
+ //
+
+ std::string normalize_id(boost::string_ref src_id)
+ {
+ return normalize_id(src_id, max_size);
+ }
+
+ std::string normalize_id(boost::string_ref src_id, std::size_t size)
+ {
+ std::string id(src_id.begin(), src_id.end());
+
+ std::size_t src = 0;
+ std::size_t dst = 0;
+
+ while (src < id.length() && id[src] == '_') {
+ ++src;
+ }
+
+ if (src == id.length()) {
+ id = "_";
+ }
+ else {
+ while (src < id.length() && dst < size) {
+ if (id[src] == '_') {
+ do {
+ ++src;
+ } while(src < id.length() && id[src] == '_');
+
+ if (src < id.length()) id[dst++] = '_';
+ }
+ else {
+ id[dst++] = id[src++];
+ }
+ }
+
+ id.erase(dst);
+ }
+
+ return id;
+ }
+}
diff --git a/tools/quickbook/src/id_manager.cpp b/tools/quickbook/src/id_manager.cpp
deleted file mode 100644
index 1f84ad173..000000000
--- a/tools/quickbook/src/id_manager.cpp
+++ /dev/null
@@ -1,1143 +0,0 @@
-/*=============================================================================
- Copyright (c) 2011 Daniel James
-
- 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)
-=============================================================================*/
-
-#include "id_manager.hpp"
-#include "utils.hpp"
-#include <boost/utility/string_ref.hpp>
-#include <boost/make_shared.hpp>
-#include <boost/unordered_map.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/range/algorithm.hpp>
-#include <boost/foreach.hpp>
-#include <deque>
-#include <vector>
-#include <cctype>
-
-namespace quickbook
-{
- // TODO: This should possibly try to make ids are generated:
- // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
-
- //
- // Forward declarations
- //
-
- struct id_placeholder;
- struct id_data;
- std::string replace_ids(id_state& state, boost::string_ref xml,
- bool use_resolved_ids = true);
- std::string process_ids(id_state&, boost::string_ref);
-
- static const std::size_t max_size = 32;
-
- //
- // id_placeholder
- //
-
- struct id_placeholder
- {
- enum state_enum { child, unresolved, resolved, generated };
-
- unsigned index; // The poisition in the placeholder deque.
- state_enum generation_state;
- // Placeholder's position in generation
- // process.
- std::string unresolved_id;
- // The id that would be generated without any
- // duplicate handling.
- std::string id; // The id so far.
- id_placeholder* parent; // Placeholder of the parent id.
- // Only when generation_state == child
- id_category category;
- unsigned num_dots; // Number of dots in the id.
- // Normally equal to the section level.
- unsigned order; // Order of the placeholders in the generated
- // xml. Stored because it can be slightly
- // different to the order they're generated
- // in. e.g. for nested tables the cells
- // are processed before the title id.
- // Only set when processing ids.
- id_data* data; // Assigned data shared by duplicate ids
- // used to detect them. Only when
- // generation_state == resolved
-
- id_placeholder(
- unsigned index,
- boost::string_ref id,
- id_category category,
- id_placeholder* parent_ = 0)
- : index(index),
- generation_state(parent_ ? child : unresolved),
- unresolved_id(parent_ ?
- parent_->unresolved_id + '.' + detail::to_s(id) :
- detail::to_s(id)),
- id(id.begin(), id.end()),
- parent(parent_),
- category(category),
- num_dots(boost::range::count(id, '.') +
- (parent_ ? parent_->num_dots + 1 : 0)),
- order(0),
- data(0)
- {
- }
-
- std::string to_string()
- {
- return '$' + boost::lexical_cast<std::string>(index);
- }
-
- bool check_state() const
- {
- return (
- (generation_state == child) == (bool) parent &&
- (generation_state == resolved) == (bool) data);
- }
-
- bool check_state(state_enum s) const
- {
- return s == generation_state && check_state();
- }
- };
-
- //
- // id_state
- //
-
- struct file_info;
- struct doc_info;
- struct section_info;
-
- struct id_state
- {
- boost::shared_ptr<file_info> current_file;
- std::deque<id_placeholder> placeholders;
-
- // Placeholder methods
-
- id_placeholder* add_placeholder(
- boost::string_ref, id_category, id_placeholder* parent = 0);
-
- id_placeholder* get_placeholder(boost::string_ref);
-
- // Events
-
- id_placeholder* start_file(
- unsigned compatibility_version,
- bool document_root,
- boost::string_ref include_doc_id,
- boost::string_ref id,
- value const& title);
-
- void end_file();
-
- id_placeholder* add_id(
- boost::string_ref id,
- id_category category);
- id_placeholder* old_style_id(
- boost::string_ref id,
- id_category category);
- id_placeholder* begin_section(
- boost::string_ref id,
- id_category category);
- void end_section();
-
-private:
- id_placeholder* add_id_to_section(
- boost::string_ref id,
- id_category category,
- boost::shared_ptr<section_info> const& section);
- id_placeholder* create_new_section(
- boost::string_ref id,
- id_category category);
-
- void switch_section(id_placeholder*);
- void reswitch_sections(boost::shared_ptr<section_info> const&,
- boost::shared_ptr<section_info> const&);
- void restore_section();
- };
-
- struct file_info
- {
- boost::shared_ptr<file_info> parent;
- boost::shared_ptr<doc_info> document;
-
- bool document_root; // !parent || document != parent->document
- unsigned compatibility_version;
- boost::shared_ptr<section_info> switched_section;
- id_placeholder* original_placeholder;
-
- // The 1.1-1.5 document id would actually change per file due to
- // explicit ids in includes and a bug which would sometimes use the
- // document title instead of the id.
- std::string doc_id_1_1;
-
- file_info(boost::shared_ptr<file_info> const& parent,
- unsigned compatibility_version) :
- parent(parent), document(parent->document), document_root(false),
- compatibility_version(compatibility_version),
- switched_section(), original_placeholder()
- {}
-
- file_info(boost::shared_ptr<file_info> const& parent,
- boost::shared_ptr<doc_info> const& document,
- unsigned compatibility_version) :
- parent(parent), document(document), document_root(true),
- compatibility_version(compatibility_version),
- switched_section(), original_placeholder()
- {}
- };
-
- struct doc_info
- {
- boost::shared_ptr<section_info> current_section;
- std::string last_title_1_1;
- std::string section_id_1_1;
-
- doc_info() :
- current_section(), last_title_1_1(), section_id_1_1()
- {}
- };
-
- struct section_info
- {
- boost::shared_ptr<section_info> parent;
- unsigned compatibility_version;
- unsigned level;
- std::string id_1_1;
- id_placeholder* placeholder_1_6;
-
- section_info(boost::shared_ptr<section_info> const& parent,
- unsigned compatibility_version, boost::string_ref id) :
- parent(parent), compatibility_version(compatibility_version),
- level(parent ? parent->level + 1 : 1),
- id_1_1(), placeholder_1_6(0)
- {
- if (parent && compatibility_version < 106u) {
- id_1_1 = parent->id_1_1;
- if (!id_1_1.empty() && !id.empty())
- id_1_1 += ".";
- id_1_1.append(id.begin(), id.end());
- }
- }
- };
-
- //
- // id_manager
- //
-
- id_manager::id_manager()
- : state(new id_state)
- {
- }
-
- id_manager::~id_manager() {}
-
- void id_manager::start_file(
- unsigned compatibility_version,
- boost::string_ref include_doc_id,
- boost::string_ref id,
- value const& title)
- {
- state->start_file(compatibility_version, false, include_doc_id, id, title);
- }
-
- std::string id_manager::start_file_with_docinfo(
- unsigned compatibility_version,
- boost::string_ref include_doc_id,
- boost::string_ref id,
- value const& title)
- {
- return state->start_file(compatibility_version, true, include_doc_id,
- id, title)->to_string();
- }
-
- void id_manager::end_file()
- {
- state->end_file();
- }
-
- std::string id_manager::begin_section(boost::string_ref id,
- id_category category)
- {
- return state->begin_section(id, category)->to_string();
- }
-
- void id_manager::end_section()
- {
- return state->end_section();
- }
-
- int id_manager::section_level() const
- {
- return state->current_file->document->current_section->level;
- }
-
- std::string id_manager::old_style_id(boost::string_ref id, id_category category)
- {
- return state->old_style_id(id, category)->to_string();
- }
-
- std::string id_manager::add_id(boost::string_ref id, id_category category)
- {
- return state->add_id(id, category)->to_string();
- }
-
- std::string id_manager::add_anchor(boost::string_ref id, id_category category)
- {
- return state->add_placeholder(id, category)->to_string();
- }
-
- std::string id_manager::replace_placeholders_with_unresolved_ids(
- boost::string_ref xml) const
- {
- return replace_ids(*state, xml, false);
- }
-
- std::string id_manager::replace_placeholders(boost::string_ref xml) const
- {
- assert(!state->current_file);
- return process_ids(*state, xml);
- }
-
- unsigned id_manager::compatibility_version() const
- {
- return state->current_file->compatibility_version;
- }
-
- //
- // normalize_id
- //
- // Normalizes generated ids.
- //
-
- namespace
- {
- std::string normalize_id(
- boost::string_ref src_id,
- std::size_t prefix = 0,
- std::size_t size = max_size)
- {
- std::string id(src_id.begin(), src_id.end());
-
- std::size_t src = prefix;
- std::size_t dst = prefix;
- size += prefix;
-
- if (src >= id.length()) {
- return id;
- }
-
- while (src < id.length() && id[src] == '_') {
- ++src;
- }
-
- if (src >= id.length()) {
- id += '_';
- return id;
- }
-
- while (src < id.length() && dst < size) {
- if (id[src] == '_') {
- do {
- ++src;
- } while(src < id.length() && id[src] == '_');
-
- if (src < id.length()) id[dst++] = '_';
- }
- else {
- id[dst++] = id[src++];
- }
- }
-
- id.erase(dst);
-
- return id;
- }
- }
-
- //
- // id_state
- //
-
- id_placeholder* id_state::add_placeholder(
- boost::string_ref id, id_category category,
- id_placeholder* parent)
- {
- placeholders.push_back(id_placeholder(
- placeholders.size(), id, category, parent));
- return &placeholders.back();
- }
-
- id_placeholder* id_state::get_placeholder(boost::string_ref value)
- {
- // If this isn't a placeholder id.
- if (value.size() <= 1 || *value.begin() != '$')
- return 0;
-
- unsigned index = boost::lexical_cast<int>(std::string(
- value.begin() + 1, value.end()));
-
- return &placeholders.at(index);
- }
-
- void id_state::switch_section(id_placeholder* p)
- {
- assert(!current_file->original_placeholder);
- current_file->switched_section = current_file->document->current_section;
- current_file->original_placeholder = current_file->switched_section->placeholder_1_6;
- current_file->switched_section->placeholder_1_6 = p;
- }
-
- void id_state::reswitch_sections(
- boost::shared_ptr<section_info> const& popped_section,
- boost::shared_ptr<section_info> const& parent_section)
- {
- boost::shared_ptr<file_info> file = current_file;
- boost::shared_ptr<file_info> first_switched_file;
-
- for (;;) {
- if (file->switched_section == popped_section)
- {
- first_switched_file = file;
- file->switched_section = parent_section;
- }
-
- if (file->document_root) break;
- file = file->parent;
- }
-
- if (first_switched_file) {
- first_switched_file->original_placeholder =
- parent_section->placeholder_1_6;
- parent_section->placeholder_1_6 =
- popped_section->placeholder_1_6;
- }
- }
-
- void id_state::restore_section()
- {
- if (current_file->original_placeholder) {
- current_file->switched_section->placeholder_1_6 =
- current_file->original_placeholder;
- }
- }
-
- id_placeholder* id_state::start_file(
- unsigned compatibility_version,
- bool document_root,
- boost::string_ref include_doc_id,
- boost::string_ref id,
- value const& title)
- {
- // Create new file
-
- boost::shared_ptr<file_info> parent = current_file;
-
- if (document_root) {
- current_file = boost::make_shared<file_info>(parent,
- boost::make_shared<doc_info>(),
- compatibility_version);
- }
- else {
- current_file =
- boost::make_shared<file_info>(parent, compatibility_version);
- }
-
- // Choose specified id to use. Prefer 'include_doc_id' (the id
- // specified in an 'include' element) unless backwards compatibility
- // is required.
-
- boost::string_ref initial_doc_id;
-
- if (document_root ||
- compatibility_version >= 106u ||
- (parent && parent->compatibility_version >= 106u)) {
- initial_doc_id = !include_doc_id.empty() ? include_doc_id : id;
- }
- else {
- initial_doc_id = !id.empty() ? id : include_doc_id;
- }
-
- // Set variables used for backwards compatible id generation.
- // They're a bit odd because of old bugs.
-
- if (document_root || compatibility_version < 106u) {
- // Note: this is done for older versions even if docinfo is
- // otherwise ignored.
-
- if (title.check())
- current_file->document->last_title_1_1 =
- detail::to_s(title.get_quickbook());
-
- current_file->doc_id_1_1 = !initial_doc_id.empty() ? detail::to_s(initial_doc_id) :
- detail::make_identifier(current_file->document->last_title_1_1);
- }
- else if (parent) {
- current_file->doc_id_1_1 = parent->doc_id_1_1;
- }
-
- if (document_root) {
- if (!initial_doc_id.empty()) {
- return create_new_section(id, id_category::explicit_section_id);
- }
- else if (!title.empty()) {
- return create_new_section(
- detail::make_identifier(title.get_quickbook()),
- id_category::generated_doc);
- }
- else if (compatibility_version >= 106u) {
- return create_new_section("doc", id_category::numbered);
- }
- else {
- return create_new_section("", id_category::generated_doc);
- }
- }
- else {
- // If an id was set for the file, then switch the current section
- // with a new section with this id. This will be maintained in
- // 'end_section' if the current section ends, and then the original
- // section restored in 'end_file'
-
- if (compatibility_version >= 106u && !initial_doc_id.empty()) {
- switch_section(add_id_to_section(initial_doc_id,
- id_category::explicit_section_id,
- boost::shared_ptr<section_info>()));
- }
-
- return 0;
- }
- }
-
- void id_state::end_file()
- {
- restore_section();
- current_file = current_file->parent;
- }
-
- id_placeholder* id_state::add_id(
- boost::string_ref id,
- id_category category)
- {
- return add_id_to_section(id, category,
- current_file->document->current_section);
- }
-
- id_placeholder* id_state::add_id_to_section(
- boost::string_ref id,
- id_category category,
- boost::shared_ptr<section_info> const& section)
- {
- std::string id_part(id.begin(), id.end());
-
- // Note: Normalizing id according to file compatibility version, but
- // adding to section according to section compatibility version.
-
- if (current_file->compatibility_version >= 106u &&
- category.c < id_category::explicit_id) {
- id_part = normalize_id(id);
- }
-
- if(!section || section->compatibility_version >= 106u) {
- return add_placeholder(id_part, category,
- section ? section->placeholder_1_6 : 0);
- }
- else {
- std::string const& qualified_id = section->id_1_1;
-
- std::string new_id;
- if (!section->placeholder_1_6)
- new_id = current_file->doc_id_1_1;
- if (!new_id.empty() && !qualified_id.empty()) new_id += '.';
- new_id += qualified_id;
- if (!new_id.empty() && !id_part.empty()) new_id += '.';
- new_id += id_part;
-
- return add_placeholder(new_id, category,
- section->placeholder_1_6);
- }
- }
-
- id_placeholder* id_state::old_style_id(
- boost::string_ref id,
- id_category category)
- {
- return current_file->compatibility_version < 103u ?
- add_placeholder(
- current_file->document->section_id_1_1 + "." + detail::to_s(id), category) :
- add_id(id, category);
- }
-
- id_placeholder* id_state::begin_section(
- boost::string_ref id,
- id_category category)
- {
- current_file->document->section_id_1_1 = detail::to_s(id);
- return create_new_section(id, category);
- }
-
- id_placeholder* id_state::create_new_section(
- boost::string_ref id,
- id_category category)
- {
- boost::shared_ptr<section_info> parent =
- current_file->document->current_section;
-
- boost::shared_ptr<section_info> new_section =
- boost::make_shared<section_info>(parent,
- current_file->compatibility_version, id);
-
- id_placeholder* p;
-
- if (new_section->compatibility_version >= 106u) {
- p = add_id_to_section(id, category, parent);
- new_section->placeholder_1_6 = p;
- }
- else if (new_section->compatibility_version >= 103u) {
- if (parent)
- new_section->placeholder_1_6 = parent->placeholder_1_6;
-
- std::string new_id;
- if (!new_section->placeholder_1_6) {
- new_id = current_file->doc_id_1_1;
- if (!new_section->id_1_1.empty()) new_id += '.';
- }
- new_id += new_section->id_1_1;
-
- p = add_placeholder(new_id, category,
- new_section->placeholder_1_6);
- }
- else {
- if (parent)
- new_section->placeholder_1_6 = parent->placeholder_1_6;
-
- std::string new_id;
- if (parent && !new_section->placeholder_1_6)
- new_id = current_file->doc_id_1_1 + '.';
-
- new_id += detail::to_s(id);
-
- p = add_placeholder(new_id, category,
- new_section->placeholder_1_6);
- }
-
- current_file->document->current_section = new_section;
-
- return p;
- }
-
- void id_state::end_section()
- {
- boost::shared_ptr<section_info> popped_section =
- current_file->document->current_section;
- current_file->document->current_section = popped_section->parent;
-
- reswitch_sections(popped_section, popped_section->parent);
- }
-
- //
- // Xml subset parser used for finding id values.
- //
- // I originally tried to integrate this into the post processor
- // but that proved tricky. Alternatively it could use a proper
- // xml parser, but I want this to be able to survive badly
- // marked up escapes.
- //
-
- struct xml_processor
- {
- xml_processor();
-
- std::vector<std::string> id_attributes;
-
- struct callback {
- virtual void start(boost::string_ref) {}
- virtual void id_value(boost::string_ref) {}
- virtual void finish(boost::string_ref) {}
- virtual ~callback() {}
- };
-
- void parse(boost::string_ref, callback&);
- };
-
- namespace
- {
- char const* id_attributes_[] =
- {
- "id",
- "linkend",
- "linkends",
- "arearefs"
- };
- }
-
- xml_processor::xml_processor()
- {
- static int const n_id_attributes = sizeof(id_attributes_)/sizeof(char const*);
- for (int i = 0; i != n_id_attributes; ++i)
- {
- id_attributes.push_back(id_attributes_[i]);
- }
-
- boost::sort(id_attributes);
- }
-
- template <typename Iterator>
- bool read(Iterator& it, Iterator end, char const* text)
- {
- for(Iterator it2 = it;; ++it2, ++text) {
- if (!*text) {
- it = it2;
- return true;
- }
-
- if (it2 == end || *it2 != *text)
- return false;
- }
- }
-
- template <typename Iterator>
- void read_past(Iterator& it, Iterator end, char const* text)
- {
- while (it != end && !read(it, end, text)) ++it;
- }
-
- bool find_char(char const* text, char c)
- {
- for(;*text; ++text)
- if (c == *text) return true;
- return false;
- }
-
- template <typename Iterator>
- void read_some_of(Iterator& it, Iterator end, char const* text)
- {
- while(it != end && find_char(text, *it)) ++it;
- }
-
- template <typename Iterator>
- void read_to_one_of(Iterator& it, Iterator end, char const* text)
- {
- while(it != end && !find_char(text, *it)) ++it;
- }
-
- void xml_processor::parse(boost::string_ref source, callback& c)
- {
- typedef boost::string_ref::const_iterator iterator;
-
- c.start(source);
-
- iterator it = source.begin(), end = source.end();
-
- for(;;)
- {
- read_past(it, end, "<");
- if (it == end) break;
-
- if (read(it, end, "!--quickbook-escape-prefix-->"))
- {
- read_past(it, end, "<!--quickbook-escape-postfix-->");
- continue;
- }
-
- switch(*it)
- {
- case '?':
- ++it;
- read_past(it, end, "?>");
- break;
-
- case '!':
- if (read(it, end, "!--"))
- read_past(it, end, "-->");
- else
- read_past(it, end, ">");
- break;
-
- default:
- if ((*it >= 'a' && *it <= 'z') ||
- (*it >= 'A' && *it <= 'Z') ||
- *it == '_' || *it == ':')
- {
- read_to_one_of(it, end, " \t\n\r>");
-
- for (;;) {
- read_some_of(it, end, " \t\n\r");
- iterator name_start = it;
- read_to_one_of(it, end, "= \t\n\r>");
- if (it == end || *it == '>') break;
- boost::string_ref name(name_start, it - name_start);
- ++it;
-
- read_some_of(it, end, "= \t\n\r");
- if (it == end || (*it != '"' && *it != '\'')) break;
-
- char delim = *it;
- ++it;
-
- iterator value_start = it;
-
- it = std::find(it, end, delim);
- if (it == end) break;
- boost::string_ref value(value_start, it - value_start);
- ++it;
-
- if (boost::find(id_attributes, detail::to_s(name))
- != id_attributes.end())
- {
- c.id_value(value);
- }
- }
- }
- else
- {
- read_past(it, end, ">");
- }
- }
- }
-
- c.finish(source);
- }
-
- //
- // process_ids
- //
-
- //
- // Data used for generating placeholders that have duplicates.
- //
-
- struct id_generation_data
- {
- id_generation_data(boost::string_ref src_id)
- : child_start(src_id.rfind('.') + 1),
- id(normalize_id(src_id, child_start, max_size - 1)),
- // 'max_size - 1' leaves a character to append
- // a number.
- count(0)
- {
- if (std::isdigit(id[id.length() - 1]))
- {
- if (child_length() < max_size - 1)
- id += '_';
- else
- reduce_id();
- }
- }
-
- void reduce_id()
- {
- assert(id.length() > child_start);
- std::size_t length = id.length() - 1;
- while(length > child_start && std::isdigit(id[length - 1])) --length;
- id.erase(length);
- count = 0;
- }
-
- std::size_t child_length() const
- {
- return id.length() - child_start;
- }
-
- std::size_t child_start;
- std::string id;
- int count;
- };
-
- // Created for all desired ids, either when resolving an id or due to
- // generating a new id to avoid duplicates.
- struct id_data
- {
- id_data()
- : category(id_category::numbered),
- used(false),
- generation_data()
- {}
-
- void update_category(id_category c)
- {
- if (c.c > category.c) category = c;
- }
-
- id_category category; // The highest priority category of the
- // placeholders that want to use this id.
- bool used; // Whether this id has been used.
- boost::shared_ptr<id_generation_data> generation_data;
- // If a duplicates are found, this is
- // created to generate new ids.
- //
- // Many to one relationship, because truncation
- // can lead to different ids contending for the
- // same id prefix.
- };
-
- typedef boost::unordered_map<std::string, id_data> allocated_ids;
- typedef std::vector<id_placeholder*> placeholder_index;
-
- placeholder_index index_placeholders(id_state&, boost::string_ref xml);
- void resolve_id(id_placeholder&, allocated_ids&);
- void generate_id(id_placeholder&, allocated_ids&);
-
- std::string process_ids(id_state& state, boost::string_ref xml)
- {
- placeholder_index placeholders = index_placeholders(state, xml);
-
- typedef std::vector<id_placeholder*>::iterator iterator;
-
- iterator it = placeholders.begin(),
- end = placeholders.end();
-
- // Placeholder ids are processed in blocks of ids with
- // an equal number of dots.
- while (it != end) {
- unsigned num_dots = (*it)->num_dots;
-
- // ids can't clash with ids at a different num_dots, so
- // this only needs to track the id generation data
- // for a single num_dots at a time.
- allocated_ids ids;
-
- iterator it2 = it;
- do {
- resolve_id(**it2++, ids);
- } while(it2 != end && (*it2)->num_dots == num_dots);
-
- do {
- generate_id(**it++, ids);
- } while(it != it2);
- }
-
- return replace_ids(state, xml);
- }
-
- //
- // index_placeholders
- //
- // Create a sorted index of the placeholders, in order
- // to make numbering duplicates easy. A total order.
- //
-
- struct placeholder_compare
- {
- bool operator()(id_placeholder* x, id_placeholder* y) const
- {
- bool x_explicit = x->category.c >= id_category::explicit_id;
- bool y_explicit = y->category.c >= id_category::explicit_id;
-
- return
- x->num_dots < y->num_dots ? true :
- x->num_dots > y->num_dots ? false :
- x_explicit > y_explicit ? true :
- x_explicit < y_explicit ? false :
- x->order < y->order;
- }
- };
-
- struct number_placeholders_callback : xml_processor::callback
- {
- id_state& state;
- unsigned count;
-
- number_placeholders_callback(id_state& state)
- : state(state),
- count(0)
- {}
-
- void id_value(boost::string_ref value)
- {
- id_placeholder* p = state.get_placeholder(value);
- number(p);
- }
-
- void number(id_placeholder* p)
- {
- if (p && !p->order) {
- number(p->parent);
- p->order = ++count;
- }
- }
- };
-
- placeholder_index index_placeholders(
- id_state& state,
- boost::string_ref xml)
- {
- xml_processor processor;
- number_placeholders_callback callback(state);
- processor.parse(xml, callback);
-
- placeholder_index sorted_placeholders;
- sorted_placeholders.reserve(state.placeholders.size());
- BOOST_FOREACH(id_placeholder& p, state.placeholders)
- if (p.order) sorted_placeholders.push_back(&p);
- boost::sort(sorted_placeholders, placeholder_compare());
-
- return sorted_placeholders;
- }
-
- //
- // resolve_id
- //
- // Convert child ids to full ids, and add to the
- // allocated ids (although not yet set in stone because
- // there might be duplicates).
- //
- // Note that the parent ids has to be generated before resolving
- // the child id.
- //
-
- void resolve_id(id_placeholder& p, allocated_ids& ids)
- {
- if (p.generation_state == id_placeholder::child)
- {
- assert(p.check_state());
-
- assert(p.parent->check_state(id_placeholder::generated));
-
- p.id = p.parent->id + "." + p.id;
- p.generation_state = id_placeholder::unresolved;
- p.parent = 0;
- }
-
- assert(p.check_state(id_placeholder::unresolved));
-
- id_data& data = ids.emplace(p.id, id_data()).first->second;
- data.update_category(p.category);
-
- p.data = &data;
- p.generation_state = id_placeholder::resolved;
- }
-
- //
- // generate_id
- //
- // Finally generate the final id.
- //
-
- void register_generation_data(id_placeholder&, allocated_ids&);
-
- void generate_id(id_placeholder& p, allocated_ids& ids)
- {
- assert(p.check_state(id_placeholder::resolved));
-
- // If the placeholder id is available, then update data
- // and return.
- if (p.category == p.data->category && !p.data->used &&
- p.category.c != id_category::numbered)
- {
- p.data->used = true;
- p.generation_state = id_placeholder::generated;
- p.data = 0;
- return;
- }
-
- if (!p.data->generation_data)
- {
- p.data->generation_data =
- boost::make_shared<id_generation_data>(p.id);
- register_generation_data(p, ids);
- }
-
- // Loop until an available id is found.
- for(;;)
- {
- id_generation_data& generation_data = *p.data->generation_data;
-
- std::string postfix =
- boost::lexical_cast<std::string>(generation_data.count++);
-
- if (generation_data.child_length() + postfix.length() > max_size) {
- // The resulting id is too long, so move to a shorter id.
- generation_data.reduce_id();
- register_generation_data(p, ids);
- }
- else {
- std::string id = generation_data.id + postfix;
-
- if (ids.find(id) == ids.end()) {
- p.id.swap(id);
- p.generation_state = id_placeholder::generated;
- p.data = 0;
- return;
- }
- }
- }
- }
-
- // Every time the generation id is changed, this is called to
- // check if that id is already in use.
- void register_generation_data(id_placeholder& p, allocated_ids& ids)
- {
- std::string const& id = p.data->generation_data->id;
-
- id_data& new_data = ids.emplace(id, id_data()).first->second;
-
- // If there is already generation_data for the new id then use that.
- // Otherwise use the placeholder's existing generation_data.
- if (new_data.generation_data)
- p.data->generation_data = new_data.generation_data;
- else
- new_data.generation_data = p.data->generation_data;
- }
-
- //
- // replace_ids
- //
- // Return a copy of the xml with all the placeholders replaced by
- // generated_ids.
- //
-
- struct replace_ids_callback : xml_processor::callback
- {
- id_state& state;
- bool use_resolved_ids;
- boost::string_ref::const_iterator source_pos;
- std::string result;
-
- replace_ids_callback(id_state& state, bool resolved)
- : state(state),
- use_resolved_ids(resolved),
- source_pos(),
- result()
- {}
-
- void start(boost::string_ref xml)
- {
- source_pos = xml.begin();
- }
-
- void id_value(boost::string_ref value)
- {
- if (id_placeholder* p = state.get_placeholder(value))
- {
- assert(!use_resolved_ids ||
- p->check_state(id_placeholder::generated));
- boost::string_ref id = use_resolved_ids ?
- p->id : p->unresolved_id;
-
- result.append(source_pos, value.begin());
- result.append(id.begin(), id.end());
- source_pos = value.end();
- }
- }
-
- void finish(boost::string_ref xml)
- {
- result.append(source_pos, xml.end());
- source_pos = xml.end();
- }
- };
-
- std::string replace_ids(id_state& state, boost::string_ref xml,
- bool use_unresolved_ids)
- {
- xml_processor processor;
- replace_ids_callback callback(state, use_unresolved_ids);
- processor.parse(xml, callback);
- return callback.result;
- }
-}
diff --git a/tools/quickbook/src/id_xml.cpp b/tools/quickbook/src/id_xml.cpp
new file mode 100644
index 000000000..d69336b78
--- /dev/null
+++ b/tools/quickbook/src/id_xml.cpp
@@ -0,0 +1,153 @@
+/*=============================================================================
+ Copyright (c) 2011-2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include "document_state_impl.hpp"
+#include "utils.hpp"
+#include <boost/range/algorithm.hpp>
+
+namespace quickbook
+{
+ namespace
+ {
+ char const* id_attributes_[] =
+ {
+ "id",
+ "linkend",
+ "linkends",
+ "arearefs"
+ };
+ }
+
+ xml_processor::xml_processor()
+ {
+ static int const n_id_attributes = sizeof(id_attributes_)/sizeof(char const*);
+ for (int i = 0; i != n_id_attributes; ++i)
+ {
+ id_attributes.push_back(id_attributes_[i]);
+ }
+
+ boost::sort(id_attributes);
+ }
+
+ template <typename Iterator>
+ bool read(Iterator& it, Iterator end, char const* text)
+ {
+ for(Iterator it2 = it;; ++it2, ++text) {
+ if (!*text) {
+ it = it2;
+ return true;
+ }
+
+ if (it2 == end || *it2 != *text)
+ return false;
+ }
+ }
+
+ template <typename Iterator>
+ void read_past(Iterator& it, Iterator end, char const* text)
+ {
+ while (it != end && !read(it, end, text)) ++it;
+ }
+
+ bool find_char(char const* text, char c)
+ {
+ for(;*text; ++text)
+ if (c == *text) return true;
+ return false;
+ }
+
+ template <typename Iterator>
+ void read_some_of(Iterator& it, Iterator end, char const* text)
+ {
+ while(it != end && find_char(text, *it)) ++it;
+ }
+
+ template <typename Iterator>
+ void read_to_one_of(Iterator& it, Iterator end, char const* text)
+ {
+ while(it != end && !find_char(text, *it)) ++it;
+ }
+
+ void xml_processor::parse(boost::string_ref source, callback& c)
+ {
+ typedef boost::string_ref::const_iterator iterator;
+
+ c.start(source);
+
+ iterator it = source.begin(), end = source.end();
+
+ for(;;)
+ {
+ read_past(it, end, "<");
+ if (it == end) break;
+
+ if (read(it, end, "!--quickbook-escape-prefix-->"))
+ {
+ read_past(it, end, "<!--quickbook-escape-postfix-->");
+ continue;
+ }
+
+ switch(*it)
+ {
+ case '?':
+ ++it;
+ read_past(it, end, "?>");
+ break;
+
+ case '!':
+ if (read(it, end, "!--"))
+ read_past(it, end, "-->");
+ else
+ read_past(it, end, ">");
+ break;
+
+ default:
+ if ((*it >= 'a' && *it <= 'z') ||
+ (*it >= 'A' && *it <= 'Z') ||
+ *it == '_' || *it == ':')
+ {
+ read_to_one_of(it, end, " \t\n\r>");
+
+ for (;;) {
+ read_some_of(it, end, " \t\n\r");
+ iterator name_start = it;
+ read_to_one_of(it, end, "= \t\n\r>");
+ if (it == end || *it == '>') break;
+ boost::string_ref name(name_start, it - name_start);
+ ++it;
+
+ read_some_of(it, end, "= \t\n\r");
+ if (it == end || (*it != '"' && *it != '\'')) break;
+
+ char delim = *it;
+ ++it;
+
+ iterator value_start = it;
+
+ it = std::find(it, end, delim);
+ if (it == end) break;
+ boost::string_ref value(value_start, it - value_start);
+ ++it;
+
+ if (boost::find(id_attributes, detail::to_s(name))
+ != id_attributes.end())
+ {
+ c.id_value(value);
+ }
+ }
+ }
+ else
+ {
+ read_past(it, end, ">");
+ }
+ }
+ }
+
+ c.finish(source);
+ }
+}
diff --git a/tools/quickbook/src/include_paths.cpp b/tools/quickbook/src/include_paths.cpp
new file mode 100644
index 000000000..de910dcba
--- /dev/null
+++ b/tools/quickbook/src/include_paths.cpp
@@ -0,0 +1,291 @@
+/*=============================================================================
+ Copyright (c) 2002 2004 2006 Joel de Guzman
+ Copyright (c) 2004 Eric Niebler
+ Copyright (c) 2005 Thomas Guest
+ Copyright (c) 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include "native_text.hpp"
+#include "glob.hpp"
+#include "include_paths.hpp"
+#include "state.hpp"
+#include "utils.hpp"
+#include "quickbook.hpp" // For the include_path global (yuck)
+#include <boost/foreach.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <cassert>
+
+namespace quickbook
+{
+ //
+ // check_path
+ //
+
+ path_parameter check_path(value const& path, quickbook::state& state)
+ {
+ if (qbk_version_n >= 107u) {
+ std::string path_text = path.get_encoded();
+
+ try {
+ if (check_glob(path_text)) {
+ return path_parameter(path_text, path_parameter::glob);
+ }
+ else {
+ return path_parameter(glob_unescape(path_text),
+ path_parameter::path);
+ }
+ } catch(glob_error& e) {
+ detail::outerr(path.get_file(), path.get_position())
+ << "Invalid path (" << e.what() << "): "
+ << path_text
+ << std::endl;
+ ++state.error_count;
+ return path_parameter(path_text, path_parameter::invalid);
+ }
+ }
+ else {
+ // Paths are encoded for quickbook 1.6+ and also xmlbase
+ // values (technically xmlbase is a 1.6 feature, but that
+ // isn't enforced as it's backwards compatible).
+ //
+ // Counter-intuitively: encoded == plain text here.
+
+ std::string path_text = qbk_version_n >= 106u || path.is_encoded() ?
+ path.get_encoded() : detail::to_s(path.get_quickbook());
+
+ if (path_text.find('\\') != std::string::npos)
+ {
+ quickbook::detail::ostream* err;
+
+ if (qbk_version_n >= 106u) {
+ err = &detail::outerr(path.get_file(), path.get_position());
+ ++state.error_count;
+ }
+ else {
+ err = &detail::outwarn(path.get_file(), path.get_position());
+ }
+
+ *err << "Path isn't portable: '"
+ << path_text
+ << "'"
+ << std::endl;
+
+ boost::replace(path_text, '\\', '/');
+ }
+
+ return path_parameter(path_text, path_parameter::path);
+ }
+ }
+
+ //
+ // Search include path
+ //
+
+ void include_search_glob(std::set<quickbook_path> & result,
+ quickbook_path const& location,
+ std::string path, quickbook::state& state)
+ {
+ std::size_t glob_pos = find_glob_char(path);
+
+ if (glob_pos == std::string::npos)
+ {
+ quickbook_path complete_path = location / glob_unescape(path);
+
+ if (fs::exists(complete_path.file_path))
+ {
+ state.dependencies.add_glob_match(complete_path.file_path);
+ result.insert(complete_path);
+ }
+ return;
+ }
+
+ std::size_t prev = path.rfind('/', glob_pos);
+ std::size_t next = path.find('/', glob_pos);
+
+ std::size_t glob_begin = prev == std::string::npos ? 0 : prev + 1;
+ std::size_t glob_end = next == std::string::npos ? path.size() : next;
+
+ quickbook_path new_location = location;
+
+ if (prev != std::string::npos) {
+ new_location /= glob_unescape(path.substr(0, prev));
+ }
+
+ if (next != std::string::npos) ++next;
+
+ boost::string_ref glob(
+ path.data() + glob_begin,
+ glob_end - glob_begin);
+
+ fs::path base_dir = new_location.file_path.empty() ?
+ fs::path(".") : new_location.file_path;
+ if (!fs::is_directory(base_dir)) return;
+
+ // Walk through the dir for matches.
+ for (fs::directory_iterator dir_i(base_dir), dir_e;
+ dir_i != dir_e; ++dir_i)
+ {
+ fs::path f = dir_i->path().filename();
+ std::string generic_path = detail::path_to_generic(f);
+
+ // Skip if the dir item doesn't match.
+ if (!quickbook::glob(glob, generic_path)) continue;
+
+ // If it's a file we add it to the results.
+ if (next == std::string::npos)
+ {
+ if (fs::is_regular_file(dir_i->status()))
+ {
+ quickbook_path r = new_location / generic_path;
+ state.dependencies.add_glob_match(r.file_path);
+ result.insert(r);
+ }
+ }
+ // If it's a matching dir, we recurse looking for more files.
+ else
+ {
+ if (!fs::is_regular_file(dir_i->status()))
+ {
+ include_search_glob(result, new_location / generic_path,
+ path.substr(next), state);
+ }
+ }
+ }
+ }
+
+ std::set<quickbook_path> include_search(path_parameter const& parameter,
+ quickbook::state& state, string_iterator pos)
+ {
+ std::set<quickbook_path> result;
+
+ switch (parameter.type) {
+ case path_parameter::glob:
+ // If the path has some glob match characters
+ // we do a discovery of all the matches..
+ {
+ fs::path current = state.current_file->path.parent_path();
+
+ // Search for the current dir accumulating to the result.
+ state.dependencies.add_glob(current / parameter.value);
+ include_search_glob(result, state.current_path.parent_path(),
+ parameter.value, state);
+
+ // Search the include path dirs accumulating to the result.
+ unsigned count = 0;
+ BOOST_FOREACH(fs::path dir, include_path)
+ {
+ ++count;
+ state.dependencies.add_glob(dir / parameter.value);
+ include_search_glob(result,
+ quickbook_path(dir, count, fs::path()),
+ parameter.value, state);
+ }
+
+ // Done.
+ return result;
+ }
+
+ case path_parameter::path:
+ {
+ fs::path path = detail::generic_to_path(parameter.value);
+
+ // If the path is relative, try and resolve it.
+ if (!path.has_root_directory() && !path.has_root_name())
+ {
+ quickbook_path path2 =
+ state.current_path.parent_path() / parameter.value;
+
+ // See if it can be found locally first.
+ if (state.dependencies.add_dependency(path2.file_path))
+ {
+ result.insert(path2);
+ return result;
+ }
+
+ // Search in each of the include path locations.
+ unsigned count = 0;
+ BOOST_FOREACH(fs::path full, include_path)
+ {
+ ++count;
+ full /= path;
+
+ if (state.dependencies.add_dependency(full))
+ {
+ result.insert(quickbook_path(full, count, path));
+ return result;
+ }
+ }
+ }
+ else
+ {
+ if (state.dependencies.add_dependency(path)) {
+ result.insert(quickbook_path(path, 0, path));
+ return result;
+ }
+ }
+
+ detail::outerr(state.current_file, pos)
+ << "Unable to find file: "
+ << parameter.value
+ << std::endl;
+ ++state.error_count;
+
+ return result;
+ }
+
+ case path_parameter::invalid:
+ return result;
+
+ default:
+ assert(0);
+ return result;
+ }
+ }
+
+ //
+ // quickbook_path
+ //
+
+ void swap(quickbook_path& x, quickbook_path& y) {
+ boost::swap(x.file_path, y.file_path);
+ boost::swap(x.include_path_offset, y.include_path_offset);
+ boost::swap(x.abstract_file_path, y.abstract_file_path);
+ }
+
+ bool quickbook_path::operator<(quickbook_path const& other) const
+ {
+ // TODO: Is comparing file_path redundant? Surely if quickbook_path
+ // and abstract_file_path are equal, it must also be.
+ // (but not vice-versa)
+ return
+ abstract_file_path != other.abstract_file_path ?
+ abstract_file_path < other.abstract_file_path :
+ include_path_offset != other.include_path_offset ?
+ include_path_offset < other.include_path_offset :
+ file_path < other.file_path;
+ }
+
+ quickbook_path quickbook_path::operator/(boost::string_ref x) const
+ {
+ return quickbook_path(*this) /= x;
+ }
+
+ quickbook_path& quickbook_path::operator/=(boost::string_ref x)
+ {
+ fs::path x2 = detail::generic_to_path(x);
+ file_path /= x2;
+ abstract_file_path /= x2;
+ return *this;
+ }
+
+ quickbook_path quickbook_path::parent_path() const
+ {
+ return quickbook_path(file_path.parent_path(), include_path_offset,
+ abstract_file_path.parent_path());
+ }
+}
diff --git a/tools/quickbook/src/include_paths.hpp b/tools/quickbook/src/include_paths.hpp
new file mode 100644
index 000000000..2139f9c99
--- /dev/null
+++ b/tools/quickbook/src/include_paths.hpp
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2002 2004 2006 Joel de Guzman
+ Copyright (c) 2004 Eric Niebler
+ Copyright (c) 2005 Thomas Guest
+ Copyright (c) 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#if !defined(BOOST_QUICKBOOK_INCLUDE_PATHS_HPP)
+#define BOOST_QUICKBOOK_INCLUDE_PATHS_HPP
+
+// Classes and functions for dealing with the values from include, import and
+// xinclude elements.
+
+#include "fwd.hpp"
+#include "values.hpp"
+#include <set>
+#include <string>
+#include <boost/filesystem/path.hpp>
+
+namespace quickbook
+{
+ struct path_parameter {
+ // Will possibly add 'url' to this list later:
+ enum path_type { invalid, path, glob };
+
+ std::string value;
+ path_type type;
+
+ path_parameter(std::string const& value, path_type type) :
+ value(value), type(type) {}
+ };
+
+ path_parameter check_path(value const& path, quickbook::state& state);
+
+ struct quickbook_path
+ {
+ quickbook_path(fs::path const& x, unsigned offset, fs::path const& y)
+ : file_path(x), include_path_offset(offset), abstract_file_path(y) {}
+
+ friend void swap(quickbook_path&, quickbook_path&);
+
+ quickbook_path parent_path() const;
+
+ bool operator<(quickbook_path const& other) const;
+ quickbook_path operator/(boost::string_ref) const;
+ quickbook_path& operator/=(boost::string_ref);
+
+ // The actual location of the file.
+ fs::path file_path;
+
+ // The member of the include path that this file is relative to.
+ // (1-indexed, 0 == original quickbook file)
+ unsigned include_path_offset;
+
+ // A machine independent representation of the file's
+ // path - not unique per-file
+ fs::path abstract_file_path;
+ };
+
+ std::set<quickbook_path> include_search(path_parameter const&,
+ quickbook::state& state, string_iterator pos);
+}
+
+#endif
diff --git a/tools/quickbook/src/main_grammar.cpp b/tools/quickbook/src/main_grammar.cpp
index a01c00a83..b01f4a0b8 100644
--- a/tools/quickbook/src/main_grammar.cpp
+++ b/tools/quickbook/src/main_grammar.cpp
@@ -17,7 +17,7 @@
#include "phrase_tags.hpp"
#include "parsers.hpp"
#include "scoped.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_chset.hpp>
#include <boost/spirit/include/classic_if.hpp>
@@ -33,8 +33,15 @@ namespace quickbook
namespace cl = boost::spirit::classic;
struct list_stack_item {
- bool root; // Is this the root of the context
- // (e.g. top, template, table cell etc.)
+ // Is this the root of the context
+ // (e.g. top, template, table cell etc.)
+ enum list_item_type {
+ syntactic_list, // In a list marked up '*' or '#'
+ top_level, // At the top level of a parse
+ // (might be a template body)
+ nested_block // Nested in a block element.
+ } type;
+
unsigned int indent; // Indent of list marker
// (or paragraph if not in a list)
unsigned int indent2; // Indent of paragraph
@@ -46,11 +53,11 @@ namespace quickbook
// * List item
// |indent2
- list_stack_item() :
- root(true), indent(0), indent2(0), mark('\0') {}
+ list_stack_item(list_item_type r) :
+ type(r), indent(0), indent2(0), mark('\0') {}
list_stack_item(char mark, unsigned int indent, unsigned int indent2) :
- root(false), indent(indent), indent2(indent2), mark(mark)
+ type(syntactic_list), indent(indent), indent2(indent2), mark(mark)
{}
};
@@ -61,27 +68,13 @@ namespace quickbook
};
};
- template <typename T>
- struct member_action
- {
- typedef void(T::*member_function)(parse_iterator, parse_iterator);
-
- T& l;
- member_function mf;
-
- member_action(T& l, member_function mf) : l(l), mf(mf) {}
-
- void operator()(parse_iterator first, parse_iterator last) const {
- (l.*mf)(first, last);
- }
- };
-
struct main_grammar_local
{
////////////////////////////////////////////////////////////////////////
// Local actions
void start_blocks_impl(parse_iterator first, parse_iterator last);
+ void start_nested_blocks_impl(parse_iterator first, parse_iterator last);
void end_blocks_impl(parse_iterator first, parse_iterator last);
void check_indentation_impl(parse_iterator first, parse_iterator last);
void check_code_block_impl(parse_iterator first, parse_iterator last);
@@ -90,46 +83,15 @@ namespace quickbook
string_iterator last);
void clear_stack();
- struct in_list_impl {
- main_grammar_local& l;
-
- in_list_impl(main_grammar_local& l) :
- l(l) {}
-
- bool operator()() const {
- return !l.list_stack.top().root;
- }
- };
-
- struct set_no_eols_scoped : scoped_action_base
- {
- set_no_eols_scoped(main_grammar_local& l)
- : l(l) {}
-
- bool start() {
- saved_no_eols = l.no_eols;
- l.no_eols = false;
-
- return true;
- }
-
- void cleanup() {
- l.no_eols = saved_no_eols;
- }
-
- main_grammar_local& l;
- bool saved_no_eols;
- };
-
////////////////////////////////////////////////////////////////////////
// Local members
cl::rule<scanner>
- top_level, indent_check,
- paragraph_separator,
+ template_phrase, top_level, indent_check,
+ paragraph_separator, inside_paragraph,
code, code_line, blank_line, hr,
inline_code, skip_inline_code,
- template_,
+ template_, attribute_template, template_body,
code_block, skip_code_block, macro,
template_args,
template_args_1_4, template_arg_1_4,
@@ -143,36 +105,29 @@ namespace quickbook
skip_escape
;
- struct simple_markup_closure
- : cl::closure<simple_markup_closure, char>
+ struct block_context_closure : cl::closure<block_context_closure,
+ element_info::context>
{
- member1 mark;
+ // Mask used to determine whether or not an element is a block
+ // element.
+ member1 is_block_mask;
};
- struct block_item_closure : cl::closure<block_item_closure, bool>
- {
- member1 still_in_block;
- };
+ cl::rule<scanner> simple_markup, simple_markup_end;
- struct context_closure : cl::closure<context_closure, element_info::context>
- {
- member1 context;
- };
-
- cl::rule<scanner, simple_markup_closure::context_t> simple_markup;
- cl::rule<scanner> simple_markup_end;
-
- cl::rule<scanner, block_item_closure::context_t> paragraph;
- cl::rule<scanner, context_closure::context_t> paragraph_item;
- cl::rule<scanner, block_item_closure::context_t> list;
- cl::rule<scanner, context_closure::context_t> list_item;
- cl::rule<scanner, context_closure::context_t> common;
- cl::rule<scanner, context_closure::context_t> element;
+ cl::rule<scanner> paragraph;
+ cl::rule<scanner> list;
+ cl::rule<scanner, block_context_closure::context_t> syntactic_block_item;
+ cl::rule<scanner> common;
+ cl::rule<scanner> element;
// state
std::stack<list_stack_item> list_stack;
unsigned int list_indent;
bool no_eols;
+ element_info::context context;
+ char mark; // Simple markup's deliminator
+ bool still_in_block; // Inside a syntatic block
// transitory state
block_types::values block_type;
@@ -189,31 +144,36 @@ namespace quickbook
: list_stack()
, list_indent(0)
, no_eols(true)
+ , context(element_info::in_top_level)
+ , mark('\0')
, state_(state)
{}
};
struct process_element_impl : scoped_action_base {
- process_element_impl(main_grammar_local& l)
- : l(l) {}
+ process_element_impl(main_grammar_local& l) :
+ l(l), pushed_source_mode_(false), element_context_error_(false) {}
bool start()
{
- if (!(l.info.type & l.element.context()) ||
- qbk_version_n < l.info.qbk_version)
+ // This element doesn't exist in the current language version.
+ if (qbk_version_n < l.info.qbk_version)
return false;
- info_ = l.info;
-
- if (!l.list_stack.empty() && !l.list_stack.top().root &&
- info_.type == element_info::block)
+ // The element is not allowed in this context.
+ if (!(l.info.type & l.context))
{
- // If in a list and the element is a block, end the list.
- list_item_action list_item(l.state_);
- list_item();
- l.clear_stack();
+ if (qbk_version_n < 107u) {
+ return false;
+ }
+ else {
+ element_context_error_ = true;
+ }
}
- else if (info_.type != element_info::phrase &&
+
+ info_ = l.info;
+
+ if (info_.type != element_info::phrase &&
info_.type != element_info::maybe_block)
{
paragraph_action para(l.state_);
@@ -222,12 +182,12 @@ namespace quickbook
assert(l.state_.values.builder.empty());
- if (!l.state_.source_mode_next.empty() &&
+ if (l.state_.source_mode_next &&
info_.type != element_info::maybe_block)
{
- l.state_.source_mode.swap(saved_source_mode_);
- l.state_.source_mode = detail::to_s(l.state_.source_mode_next.get_quickbook());
- l.state_.source_mode_next = value();
+ l.state_.push_tagged_source_mode(l.state_.source_mode_next);
+ pushed_source_mode_ = true;
+ l.state_.source_mode_next = 0;
}
return true;
@@ -236,45 +196,61 @@ namespace quickbook
template <typename ResultT, typename ScannerT>
bool result(ResultT result, ScannerT const& scan)
{
- if (result || info_.type & element_info::in_phrase)
- return result;
-
- error_action error(l.state_);
- error(scan.first, scan.first);
- return true;
+ if (element_context_error_) {
+ error_message_action error(l.state_,
+ "Element not allowed in this context.");
+ error(scan.first, scan.first);
+ return true;
+ }
+ else if (result) {
+ return true;
+ }
+ else if (qbk_version_n < 107u &&
+ info_.type & element_info::in_phrase) {
+ // Old versions of quickbook had a soft fail
+ // for unparsed phrase elements.
+ return false;
+ }
+ else {
+ // Parse error in body.
+ error_action error(l.state_);
+ error(scan.first, scan.first);
+ return true;
+ }
}
void success(parse_iterator, parse_iterator) { l.element_type = info_.type; }
void failure() { l.element_type = element_info::nothing; }
void cleanup() {
- if (!saved_source_mode_.empty())
- l.state_.source_mode.swap(saved_source_mode_);
+ if (pushed_source_mode_)
+ l.state_.pop_tagged_source_mode();
}
main_grammar_local& l;
element_info info_;
- std::string saved_source_mode_;
+ bool pushed_source_mode_;
+ bool element_context_error_;
};
- struct set_no_eols_scoped : scoped_action_base
+ struct scoped_paragraph : scoped_action_base
{
- set_no_eols_scoped(main_grammar_local& l)
- : l(l) {}
+ scoped_paragraph(quickbook::state& state) :
+ state(state), pushed(false) {}
bool start() {
- saved_no_eols = l.no_eols;
- l.no_eols = false;
-
+ state.push_tagged_source_mode(state.source_mode_next);
+ pushed = true;
+ state.source_mode_next = 0;
return true;
}
void cleanup() {
- l.no_eols = saved_no_eols;
+ if (pushed) state.pop_tagged_source_mode();
}
- main_grammar_local& l;
- bool saved_no_eols;
+ quickbook::state& state;
+ bool pushed;
};
struct in_list_impl {
@@ -284,10 +260,44 @@ namespace quickbook
l(l) {}
bool operator()() const {
- return !l.list_stack.top().root;
+ return !l.list_stack.empty() &&
+ l.list_stack.top().type == list_stack_item::syntactic_list;
}
};
+ template <typename T, typename M>
+ struct set_scoped_value_impl : scoped_action_base
+ {
+ typedef M T::*member_ptr;
+
+ set_scoped_value_impl(T& l, member_ptr ptr)
+ : l(l), ptr(ptr), saved_value() {}
+
+ bool start(M const& value) {
+ saved_value = l.*ptr;
+ l.*ptr = value;
+
+ return true;
+ }
+
+ void cleanup() {
+ l.*ptr = saved_value;
+ }
+
+ T& l;
+ member_ptr ptr;
+ M saved_value;
+ };
+
+ template <typename T, typename M>
+ struct set_scoped_value : scoped_parser<set_scoped_value_impl<T, M> >
+ {
+ typedef set_scoped_value_impl<T, M> impl;
+
+ set_scoped_value(T& l, typename impl::member_ptr ptr) :
+ scoped_parser<impl>(impl(l, ptr)) {}
+ };
+
////////////////////////////////////////////////////////////////////////////
// Local grammar
@@ -297,35 +307,44 @@ namespace quickbook
new main_grammar_local(state));
// Global Actions
- element_action element(state);
- paragraph_action paragraph(state);
- list_item_action list_item(state);
+ quickbook::element_action element_action(state);
+ quickbook::paragraph_action paragraph_action(state);
phrase_end_action end_phrase(state);
- raw_char_action raw_char(state.phrase);
- plain_char_action plain_char(state.phrase, state);
- escape_unicode_action escape_unicode(state.phrase, state);
+ raw_char_action raw_char(state);
+ plain_char_action plain_char(state);
+ escape_unicode_action escape_unicode(state);
- simple_phrase_action simple_markup(state.phrase, state);
+ simple_phrase_action simple_markup(state);
- break_action break_(state.phrase, state);
- do_macro_action do_macro(state.phrase, state);
+ break_action break_(state);
+ do_macro_action do_macro(state);
error_action error(state);
element_id_warning_action element_id_warning(state);
scoped_parser<to_value_scoped_action> to_value(state);
+ scoped_parser<scoped_paragraph> scope_paragraph(state);
// Local Actions
scoped_parser<process_element_impl> process_element(local);
- scoped_parser<set_no_eols_scoped> scoped_no_eols(local);
in_list_impl in_list(local);
+
+ set_scoped_value<main_grammar_local, bool> scoped_no_eols(
+ local, &main_grammar_local::no_eols);
+ set_scoped_value<main_grammar_local, element_info::context> scoped_context(
+ local, &main_grammar_local::context);
+ set_scoped_value<main_grammar_local, bool> scoped_still_in_block(
+ local, &main_grammar_local::still_in_block);
+
member_action<main_grammar_local> check_indentation(local,
&main_grammar_local::check_indentation_impl);
member_action<main_grammar_local> check_code_block(local,
&main_grammar_local::check_code_block_impl);
member_action<main_grammar_local> start_blocks(local,
&main_grammar_local::start_blocks_impl);
+ member_action<main_grammar_local> start_nested_blocks(local,
+ &main_grammar_local::start_nested_blocks_impl);
member_action<main_grammar_local> end_blocks(local,
&main_grammar_local::end_blocks_impl);
@@ -340,9 +359,9 @@ namespace quickbook
// brackets.
nested_phrase =
state.values.save()
- [ *( ~cl::eps_p(']')
- >> local.common(element_info::in_phrase)
- )
+ [
+ scoped_context(element_info::in_phrase)
+ [*(~cl::eps_p(']') >> local.common)]
]
;
@@ -350,9 +369,9 @@ namespace quickbook
// by a paragraph end.
paragraph_phrase =
state.values.save()
- [ *( ~cl::eps_p(phrase_end)
- >> local.common(element_info::in_phrase)
- )
+ [
+ scoped_context(element_info::in_phrase)
+ [*(~cl::eps_p(phrase_end) >> local.common)]
]
;
@@ -360,9 +379,9 @@ namespace quickbook
// elements.
extended_phrase =
state.values.save()
- [ *( ~cl::eps_p(phrase_end)
- >> local.common(element_info::in_conditional)
- )
+ [
+ scoped_context(element_info::in_conditional)
+ [*(~cl::eps_p(phrase_end) >> local.common)]
]
;
@@ -372,28 +391,65 @@ namespace quickbook
// is part of the paragraph that contains it.
inline_phrase =
state.values.save()
- [ *local.common(element_info::in_phrase)
+ [ qbk_ver(107u)
+ >> local.template_phrase
+ | qbk_ver(0, 107u)
+ >> scoped_context(element_info::in_phrase)
+ [*local.common]
]
;
table_title_phrase =
state.values.save()
- [ *( ~cl::eps_p(space >> (']' | '[' >> space >> '['))
- >> local.common(element_info::in_phrase)
- )
+ [
+ scoped_context(element_info::in_phrase)
+ [ *( ~cl::eps_p(space >> (']' | '[' >> space >> '['))
+ >> local.common
+ )
+ ]
]
;
inside_preformatted =
- scoped_no_eols()
+ scoped_no_eols(false)
[ paragraph_phrase
]
;
+ // Phrase templates can contain block tags, but can't contain
+ // syntatic blocks.
+ local.template_phrase =
+ scoped_context(element_info::in_top_level)
+ [ *( (local.paragraph_separator >> space >> cl::anychar_p)
+ [error("Paragraph in phrase template.")]
+ | local.common
+ )
+ ]
+ ;
+
// Top level blocks
block_start =
- (*eol) [start_blocks]
- >> (*local.top_level) [end_blocks]
+ (*eol) [start_blocks]
+ >> ( *( local.top_level
+ >> !( qbk_ver(106u)
+ >> cl::ch_p(']')
+ >> cl::eps_p [error("Mismatched close bracket")]
+ )
+ )
+ ) [end_blocks]
+ ;
+
+ // Blocks contains within an element, e.g. a table cell or a footnote.
+ inside_paragraph =
+ state.values.save()
+ [ cl::eps_p [start_nested_blocks]
+ >> ( qbk_ver(107u)
+ >> (*eol)
+ >> (*local.top_level)
+ | qbk_ver(0, 107u)
+ >> local.inside_paragraph
+ ) [end_blocks]
+ ]
;
local.top_level =
@@ -418,40 +474,57 @@ namespace quickbook
;
local.paragraph =
- cl::eps_p [local.paragraph.still_in_block = true]
- >> local.paragraph_item(element_info::only_contextual_block)
- >> *( cl::eps_p(local.paragraph.still_in_block)
- >> local.paragraph_item(element_info::only_block)
- )
- >> cl::eps_p [paragraph]
- ;
-
- local.paragraph_item =
- local.element(local.paragraph_item.context)
- >> !eol [local.paragraph.still_in_block = false]
- | local.paragraph_separator [local.paragraph.still_in_block = false]
- | local.common(element_info::in_phrase)
+ // Usually superfluous call
+ // for paragraphs in lists.
+ cl::eps_p [paragraph_action]
+ >> scope_paragraph()
+ [
+ scoped_context(element_info::in_top_level)
+ [ scoped_still_in_block(true)
+ [ local.syntactic_block_item(element_info::is_contextual_block)
+ >> *( cl::eps_p(ph::var(local.still_in_block))
+ >> local.syntactic_block_item(element_info::is_block)
+ )
+ ]
+ ]
+ ] [paragraph_action]
;
local.list =
*cl::blank_p
>> (cl::ch_p('*') | '#')
- >> (*cl::blank_p) [local.list.still_in_block = true]
- >> *( cl::eps_p(local.list.still_in_block)
- >> ( qbk_ver(106u) >> local.list_item(element_info::only_block)
- | qbk_ver(0, 106u) >> local.list_item(element_info::only_list_block)
- )
- )
- // TODO: This is sometimes called in the wrong place. Currently
- // harmless.
- >> cl::eps_p [list_item]
+ >> (*cl::blank_p)
+ >> scoped_context(element_info::in_list_block)
+ [ scoped_still_in_block(true)
+ [ *( cl::eps_p(ph::var(local.still_in_block))
+ >> local.syntactic_block_item(element_info::is_block)
+ )
+ ]
+ ]
;
- local.list_item =
- local.element(local.list_item.context)
- >> !eol [local.list.still_in_block = false]
- | local.paragraph_separator [local.list.still_in_block = false]
- | local.common(element_info::in_phrase)
+ local.syntactic_block_item =
+ local.paragraph_separator [ph::var(local.still_in_block) = false]
+ | (cl::eps_p(~cl::ch_p(']')) | qbk_ver(0, 107u))
+ [ph::var(local.element_type) = element_info::nothing]
+ >> local.common
+
+ // If the element is a block, then a newline will end the
+ // current syntactic block.
+ //
+ // Note that we don't do this for lists in 1.6, as it causes
+ // the list block to end. The support for nested syntactic
+ // blocks in 1.7 will fix that. Although it does mean the
+ // following line will need to be indented. TODO: Flag that
+ // the indentation check shouldn't be made?
+ >> !( cl::eps_p(in_list) >> qbk_ver(106u, 107u)
+ | cl::eps_p
+ (
+ ph::static_cast_<int>(local.syntactic_block_item.is_block_mask) &
+ ph::static_cast_<int>(ph::var(local.element_type))
+ )
+ >> eol [ph::var(local.still_in_block) = false]
+ )
;
local.paragraph_separator =
@@ -467,14 +540,13 @@ namespace quickbook
;
// Blocks contains within an element, e.g. a table cell or a footnote.
- inside_paragraph =
- state.values.save()
- [ *( local.paragraph_separator [paragraph]
- >> *eol
+ local.inside_paragraph =
+ scoped_context(element_info::in_nested_block)
+ [ *( local.paragraph_separator [paragraph_action]
| ~cl::eps_p(']')
- >> local.common(element_info::in_nested_block)
+ >> local.common
)
- ] [paragraph]
+ ] [paragraph_action]
;
local.hr =
@@ -486,7 +558,7 @@ namespace quickbook
>> *(line_comment | (cl::anychar_p - (cl::eol_p | "[/")))
)
>> *eol
- ] [element]
+ ] [element_action]
;
local.element
@@ -501,7 +573,7 @@ namespace quickbook
[ cl::lazy_p(*ph::var(local.info.rule))
>> space
>> ']'
- ] [element]
+ ] [element_action]
]
;
@@ -510,7 +582,7 @@ namespace quickbook
[( local.code_line
>> *(*local.blank_line >> local.code_line)
) [state.values.entry(ph::arg1, ph::arg2)]
- ] [element]
+ ] [element_action]
>> *eol
;
@@ -529,7 +601,7 @@ namespace quickbook
local.common =
local.macro
- | local.element(local.common.context)
+ | local.element
| local.template_
| local.break_
| local.code_block
@@ -544,6 +616,8 @@ namespace quickbook
skip_entity =
'['
+ // For escaped templates:
+ >> !(space >> cl::ch_p('`') >> (cl::alpha_p | '_'))
>> *(~cl::eps_p(']') >> skip_entity)
>> !cl::ch_p(']')
| local.skip_code_block
@@ -579,17 +653,45 @@ namespace quickbook
( '['
>> space
>> state.values.list(template_tags::template_)
- [ !cl::str_p("`") [state.values.entry(ph::arg1, ph::arg2, template_tags::escape)]
- >> ( cl::eps_p(cl::punct_p)
- >> state.templates.scope [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
- | state.templates.scope [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
+ [ local.template_body
+ >> ']'
+ ]
+ ) [element_action]
+ ;
+
+ local.attribute_template =
+ ( '['
+ >> space
+ >> state.values.list(template_tags::attribute_template)
+ [ local.template_body
+ >> ']'
+ ]
+ ) [element_action]
+ ;
+
+ local.template_body =
+ ( cl::str_p('`')
+ >> cl::eps_p(cl::punct_p)
+ >> state.templates.scope
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::escape)]
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
+ >> !qbk_ver(106u)
+ [error("Templates with punctuation names can't be escaped in quickbook 1.6+")]
+ | cl::str_p('`')
+ >> state.templates.scope
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::escape)]
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
+
+ | cl::eps_p(cl::punct_p)
+ >> state.templates.scope
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
+
+ | state.templates.scope
+ [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)]
>> cl::eps_p(hard_space)
)
>> space
>> !local.template_args
- >> ']'
- ]
- ) [element]
;
local.template_args =
@@ -669,7 +771,7 @@ namespace quickbook
) >> cl::eps_p('`')
) [state.values.entry(ph::arg1, ph::arg2)]
>> '`'
- ] [element]
+ ] [element_action]
;
local.skip_inline_code =
@@ -727,7 +829,7 @@ namespace quickbook
>> !(*cl::blank_p >> cl::eol_p)
) [state.values.entry(ph::arg1, ph::arg2)]
>> (*cl::space_p >> "```")
- ] [element]
+ ] [element_action]
| cl::eps_p [error("Unfinished code block")]
>> *cl::anychar_p
)
@@ -743,18 +845,18 @@ namespace quickbook
>> !(*cl::blank_p >> cl::eol_p)
) [state.values.entry(ph::arg1, ph::arg2)]
>> (*cl::space_p >> "``")
- ] [element]
+ ] [element_action]
| cl::eps_p [error("Unfinished code block")]
>> *cl::anychar_p
)
;
local.simple_markup =
- cl::chset<>("*/_=") [local.simple_markup.mark = ph::arg1]
+ cl::chset<>("*/_=") [ph::var(local.mark) = ph::arg1]
>> cl::eps_p(cl::graph_p) // graph_p must follow first mark
>> lookback
[ cl::anychar_p // skip back over the markup
- >> ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
+ >> ~cl::eps_p(cl::ch_p(boost::ref(local.mark)))
// first mark not be preceeded by
// the same character.
>> (cl::space_p | cl::punct_p | cl::end_p)
@@ -768,15 +870,15 @@ namespace quickbook
[
cl::eps_p((state.macro & macro_identifier) >> local.simple_markup_end)
>> state.macro [do_macro]
- | ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
+ | ~cl::eps_p(cl::ch_p(boost::ref(local.mark)))
>> +( ~cl::eps_p
- ( lookback [~cl::f_ch_p(local.simple_markup.mark)]
+ ( lookback [~cl::ch_p(boost::ref(local.mark))]
>> local.simple_markup_end
)
>> cl::anychar_p [plain_char]
)
]
- >> cl::f_ch_p(local.simple_markup.mark)
+ >> cl::ch_p(boost::ref(local.mark))
[simple_markup]
]
;
@@ -784,8 +886,8 @@ namespace quickbook
local.simple_markup_end
= ( lookback[cl::graph_p] // final mark must be preceeded by
// graph_p
- >> cl::f_ch_p(local.simple_markup.mark)
- >> ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
+ >> cl::ch_p(boost::ref(local.mark))
+ >> ~cl::eps_p(cl::ch_p(boost::ref(local.mark)))
// final mark not be followed by
// the same character.
>> (cl::space_p | cl::punct_p | cl::end_p)
@@ -811,7 +913,7 @@ namespace quickbook
[ (*(cl::anychar_p - "'''")) [state.values.entry(ph::arg1, ph::arg2, phrase_tags::escape)]
>> ( cl::str_p("'''")
| cl::eps_p [error("Unclosed boostbook escape.")]
- ) [element]
+ ) [element_action]
]
;
@@ -842,11 +944,12 @@ namespace quickbook
>> (*(cl::anychar_p - "'''"))
>> ( cl::str_p("'''")
| cl::eps_p [error("Unclosed boostbook escape.")]
- ) [element]
+ )
;
- attribute_value_1_7 =
- *( ~cl::eps_p(']' | cl::space_p | comment)
+ attribute_template_body =
+ space
+ >> *( ~cl::eps_p(space >> cl::end_p | comment)
>> ( cl::eps_p
( cl::ch_p('[')
>> space
@@ -857,13 +960,38 @@ namespace quickbook
)
) [error("Elements not allowed in attribute values.")]
>> local.square_brackets
- | local.template_
+ | local.attribute_template
| cl::eps_p(cl::ch_p('[')) [error("Unmatched template in attribute value.")]
>> local.square_brackets
| raw_escape
| cl::anychar_p [raw_char]
)
)
+ >> space
+ ;
+
+
+ attribute_value_1_7 =
+ state.values.save() [
+ +( ~cl::eps_p(']' | cl::space_p | comment)
+ >> ( cl::eps_p
+ ( cl::ch_p('[')
+ >> space
+ >> ( cl::eps_p(cl::punct_p)
+ >> elements
+ | elements
+ >> (cl::eps_p - (cl::alnum_p | '_'))
+ )
+ ) [error("Elements not allowed in attribute values.")]
+ >> local.square_brackets
+ | local.attribute_template
+ | cl::eps_p(cl::ch_p('['))[error("Unmatched template in attribute value.")]
+ >> local.square_brackets
+ | raw_escape
+ | cl::anychar_p [raw_char]
+ )
+ )
+ ]
;
//
@@ -882,7 +1010,7 @@ namespace quickbook
>> *cl::space_p
)
>> cl::end_p
- ] [element]
+ ] [element_action]
;
local.command_line_macro_identifier =
@@ -965,7 +1093,21 @@ namespace quickbook
void main_grammar_local::start_blocks_impl(parse_iterator, parse_iterator)
{
- list_stack.push(list_stack_item());
+ list_stack.push(list_stack_item(list_stack_item::top_level));
+ }
+
+ void main_grammar_local::start_nested_blocks_impl(parse_iterator, parse_iterator)
+ {
+ // If this nested block is part of a list, then tell the
+ // output state.
+ //
+ // TODO: This is a bit dodgy, it would be better if this
+ // was handled when the output state is pushed (currently
+ // in to_value_scoped_action).
+ state_.in_list = state_.explicit_list;
+ state_.explicit_list = false;
+
+ list_stack.push(list_stack_item(list_stack_item::nested_block));
}
void main_grammar_local::end_blocks_impl(parse_iterator, parse_iterator)
@@ -1004,10 +1146,16 @@ namespace quickbook
unsigned int new_indent = indent_length(first, last);
if (new_indent > list_stack.top().indent2) {
- block_type = block_types::code;
+ if (list_stack.top().type != list_stack_item::nested_block) {
+ block_type = block_types::code;
+ }
+ else {
+ block_type = block_types::paragraph;
+ }
}
else {
- while (!list_stack.top().root && new_indent < list_stack.top().indent)
+ while (list_stack.top().type == list_stack_item::syntactic_list
+ && new_indent < list_stack.top().indent)
{
state_.end_list_item();
state_.end_list(list_stack.top().mark);
@@ -1015,7 +1163,8 @@ namespace quickbook
list_indent = list_stack.top().indent;
}
- if (!list_stack.top().root && new_indent == list_stack.top().indent)
+ if (list_stack.top().type == list_stack_item::syntactic_list
+ && new_indent == list_stack.top().indent)
{
// If the paragraph is aligned with the list item's marker,
// then end the current list item if that's aligned (or to
@@ -1038,7 +1187,7 @@ namespace quickbook
list_stack_item save = list_stack.top();
list_stack.pop();
- assert(list_stack.top().root ?
+ assert(list_stack.top().type != list_stack_item::syntactic_list ?
new_indent >= list_stack.top().indent :
new_indent > list_stack.top().indent);
@@ -1054,14 +1203,24 @@ namespace quickbook
block_type = block_types::paragraph;
}
+
+ if (qbk_version_n == 106u &&
+ list_stack.top().type == list_stack_item::syntactic_list) {
+ detail::outerr(state_.current_file, first)
+ << "Nested blocks in lists won't be supported in "
+ << "quickbook 1.6"
+ << std::endl;
+ ++state_.error_count;
+ }
}
else {
clear_stack();
- if (last == first)
- block_type = block_types::paragraph;
- else
+ if (list_stack.top().type != list_stack_item::nested_block &&
+ last != first)
block_type = block_types::code;
+ else
+ block_type = block_types::paragraph;
}
}
@@ -1072,12 +1231,14 @@ namespace quickbook
unsigned int new_indent2 = indent_length(first, last);
char mark = *mark_pos;
- if (list_stack.top().root && new_indent > 0) {
+ if (list_stack.top().type == list_stack_item::top_level &&
+ new_indent > 0) {
block_type = block_types::code;
return;
}
- if (list_stack.top().root || new_indent > list_indent) {
+ if (list_stack.top().type != list_stack_item::syntactic_list ||
+ new_indent > list_indent) {
list_stack.push(list_stack_item(mark, new_indent, new_indent2));
state_.start_list(mark);
}
@@ -1087,7 +1248,8 @@ namespace quickbook
else {
// This should never reach root, since the first list
// has indentation 0.
- while(!list_stack.top().root && new_indent < list_stack.top().indent)
+ while(list_stack.top().type == list_stack_item::syntactic_list &&
+ new_indent < list_stack.top().indent)
{
state_.end_list_item();
state_.end_list(list_stack.top().mark);
@@ -1114,7 +1276,7 @@ namespace quickbook
void main_grammar_local::clear_stack()
{
- while (!list_stack.top().root) {
+ while (list_stack.top().type == list_stack_item::syntactic_list) {
state_.end_list_item();
state_.end_list(list_stack.top().mark);
list_stack.pop();
diff --git a/tools/quickbook/src/markups.cpp b/tools/quickbook/src/markups.cpp
index 558848444..f077943a0 100644
--- a/tools/quickbook/src/markups.cpp
+++ b/tools/quickbook/src/markups.cpp
@@ -26,6 +26,7 @@ namespace quickbook
{
markup init_markups[] = {
{ block_tags::paragraph, "<para>\n", "</para>\n" },
+ { block_tags::paragraph_in_list, "<simpara>\n", "</simpara>\n" },
{ block_tags::blurb, "<sidebar role=\"blurb\">\n", "</sidebar>\n" },
{ block_tags::blockquote, "<blockquote>", "</blockquote>" },
{ block_tags::preformatted, "<programlisting>", "</programlisting>" },
diff --git a/tools/quickbook/src/input_path.cpp b/tools/quickbook/src/native_text.cpp
index 3fa8717a8..3e4ce8749 100644
--- a/tools/quickbook/src/input_path.cpp
+++ b/tools/quickbook/src/native_text.cpp
@@ -8,7 +8,7 @@
#include <boost/program_options.hpp>
#include <iostream>
-#include "input_path.hpp"
+#include "native_text.hpp"
#include "utils.hpp"
#include "files.hpp"
@@ -70,12 +70,12 @@ namespace detail {
#endif
#if QUICKBOOK_WIDE_PATHS
- std::string input_to_utf8(input_string const& x)
+ std::string command_line_to_utf8(command_line_string const& x)
{
return to_utf8(x);
}
#else
- std::string input_to_utf8(input_string const& x)
+ std::string command_line_to_utf8(command_line_string const& x)
{
return x;
}
@@ -105,7 +105,7 @@ namespace detail {
#endif
#if QUICKBOOK_CYGWIN_PATHS
- fs::path input_to_path(input_string const& path)
+ fs::path command_line_to_path(command_line_string const& path)
{
cygwin_conv_path_t flags = CCP_POSIX_TO_WIN_W | CCP_RELATIVE;
@@ -140,7 +140,7 @@ namespace detail {
return std::string(result.get());
}
#else
- fs::path input_to_path(input_string const& path)
+ fs::path command_line_to_path(command_line_string const& path)
{
return fs::path(path);
}
@@ -307,6 +307,18 @@ namespace detail {
return *this;
}
+#if !defined(BOOST_NO_LONG_LONG)
+ ostream& ostream::operator<<(long long x) {
+ base << x;
+ return *this;
+ }
+
+ ostream& ostream::operator<<(unsigned long long x) {
+ base << x;
+ return *this;
+ }
+#endif
+
ostream& ostream::operator<<(fs::path const& x) {
base << path_to_stream(x);
return *this;
diff --git a/tools/quickbook/src/input_path.hpp b/tools/quickbook/src/native_text.hpp
index 65295143b..11b990da0 100644
--- a/tools/quickbook/src/input_path.hpp
+++ b/tools/quickbook/src/native_text.hpp
@@ -6,8 +6,10 @@
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
-#if !defined(BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP)
-#define BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP
+// For handling native strings and streams.
+
+#if !defined(BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP)
+#define BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP
#include <boost/config.hpp>
#include <boost/filesystem/path.hpp>
@@ -51,22 +53,22 @@ namespace quickbook
// 'generic': Paths in quickbook source and the generated boostbook.
// Always UTF-8.
- // 'input': Paths (or other parameters) from the command line and
+ // 'command_line':
+ // Paths (or other parameters) from the command line and
// possibly other sources in the future. Wide strings on
// normal windows, UTF-8 for cygwin and other platforms
// (hopefully).
- // 'stream': Strings to be written to a stream.
// 'path': Stored as a boost::filesystem::path. Since
// Boost.Filesystem doesn't support cygwin, this
// is always wide on windows. UTF-8 on other
// platforms (again, hopefully).
#if QUICKBOOK_WIDE_PATHS
- typedef std::wstring input_string;
- typedef boost::wstring_ref input_string_ref;
+ typedef std::wstring command_line_string;
+ typedef boost::wstring_ref command_line_string_ref;
#else
- typedef std::string input_string;
- typedef boost::string_ref input_string_ref;
+ typedef std::string command_line_string;
+ typedef boost::string_ref command_line_string_ref;
#endif
// A light wrapper around C++'s streams that gets things right
@@ -103,6 +105,12 @@ namespace quickbook
ostream& operator<<(unsigned int x);
ostream& operator<<(long x);
ostream& operator<<(unsigned long x);
+
+#if !defined(BOOST_NO_LONG_LONG)
+ ostream& operator<<(long long x);
+ ostream& operator<<(unsigned long long x);
+#endif
+
ostream& operator<<(fs::path const&);
// Modifiers
@@ -111,8 +119,8 @@ namespace quickbook
};
- std::string input_to_utf8(input_string const&);
- fs::path input_to_path(input_string const&);
+ std::string command_line_to_utf8(command_line_string const&);
+ fs::path command_line_to_path(command_line_string const&);
std::string path_to_generic(fs::path const&);
fs::path generic_to_path(boost::string_ref);
diff --git a/tools/quickbook/src/phrase_element_grammar.cpp b/tools/quickbook/src/phrase_element_grammar.cpp
index b287d6362..2c0a597ff 100644
--- a/tools/quickbook/src/phrase_element_grammar.cpp
+++ b/tools/quickbook/src/phrase_element_grammar.cpp
@@ -19,6 +19,7 @@
#include <boost/spirit/include/classic_if.hpp>
#include <boost/spirit/include/phoenix1_primitives.hpp>
#include <boost/spirit/include/phoenix1_casts.hpp>
+#include <boost/foreach.hpp>
namespace quickbook
{
@@ -38,7 +39,7 @@ namespace quickbook
new phrase_element_grammar_local);
error_action error(state);
- raw_char_action raw_char(state.phrase);
+ raw_char_action raw_char(state);
scoped_parser<cond_phrase_push> scoped_cond_phrase(state);
scoped_parser<to_value_scoped_action> to_value(state);
@@ -146,13 +147,15 @@ namespace quickbook
blank
>> ( qbk_ver(0, 106u)
>> (*(cl::anychar_p - phrase_end)) [state.values.entry(ph::arg1, ph::arg2)]
- | qbk_ver(106u)
+ | qbk_ver(106u, 107u)
>> to_value()
[ *( raw_escape
| (cl::anychar_p - phrase_end)
[raw_char]
)
]
+ | qbk_ver(107u)
+ >> to_value() [attribute_value_1_7]
)
;
@@ -171,16 +174,14 @@ namespace quickbook
;
local.source_mode =
- ( cl::str_p("c++")
- | "python"
- | "teletype"
- ) [state.values.entry(ph::arg1, ph::arg2)];
+ cl::eps_p [state.values.entry(ph::arg1, ph::arg2)]
+ >> source_modes [state.values.entry(ph::arg1)];
- elements.add
- ("c++", element_info(element_info::phrase, &local.empty, source_mode_tags::cpp))
- ("python", element_info(element_info::phrase, &local.empty, source_mode_tags::python))
- ("teletype", element_info(element_info::phrase, &local.empty, source_mode_tags::teletype))
- ;
+ BOOST_FOREACH(int tag, source_mode_tags::tags()) {
+ source_modes.add(source_mode_tags::name(tag), tag);
+ elements.add(source_mode_tags::name(tag),
+ element_info(element_info::phrase, &local.empty, tag));
+ }
elements.add
("role", element_info(element_info::phrase, &local.role, phrase_tags::role, 106u))
@@ -188,7 +189,11 @@ namespace quickbook
local.role
= space
- >> (+(cl::alnum_p | '_')) [state.values.entry(ph::arg1, ph::arg2)]
+ >> ( qbk_ver(0, 107u)
+ >> (+(cl::alnum_p | '_')) [state.values.entry(ph::arg1, ph::arg2)]
+ | qbk_ver(107u)
+ >> to_value() [attribute_value_1_7]
+ )
>> hard_space
>> local.inner_phrase
;
diff --git a/tools/quickbook/src/quickbook.cpp b/tools/quickbook/src/quickbook.cpp
index 128bb0b3d..f867f3583 100644
--- a/tools/quickbook/src/quickbook.cpp
+++ b/tools/quickbook/src/quickbook.cpp
@@ -14,8 +14,8 @@
#include "post_process.hpp"
#include "utils.hpp"
#include "files.hpp"
-#include "input_path.hpp"
-#include "id_manager.hpp"
+#include "native_text.hpp"
+#include "document_state.hpp"
#include <boost/program_options.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
@@ -40,7 +40,7 @@
#pragma warning(disable:4355)
#endif
-#define QUICKBOOK_VERSION "Quickbook Version 1.5.9"
+#define QUICKBOOK_VERSION "Quickbook Version 1.6.1"
namespace quickbook
{
@@ -99,7 +99,7 @@ namespace quickbook
parse_iterator pos = info.stop;
std::string doc_type = pre(state, pos, include_doc_id, nested_file);
- info = cl::parse(info.hit ? info.stop : first, last, state.grammar().block);
+ info = cl::parse(info.hit ? info.stop : first, last, state.grammar().block_start);
post(state, doc_type);
@@ -138,12 +138,12 @@ namespace quickbook
, parse_document_options const& options_)
{
string_stream buffer;
- id_manager ids;
+ document_state output;
int result = 0;
try {
- quickbook::state state(filein_, options_.xinclude_base, buffer, ids);
+ quickbook::state state(filein_, options_.xinclude_base, buffer, output);
set_macros(state);
if (state.error_count == 0) {
@@ -162,15 +162,14 @@ namespace quickbook
if (!options_.deps_out.empty())
{
- fs::ofstream out(options_.deps_out);
- state.dependencies.write_dependencies(out,
+ state.dependencies.write_dependencies(options_.deps_out,
options_.deps_out_flags);
}
if (!options_.locations_out.empty())
{
fs::ofstream out(options_.locations_out);
- state.dependencies.write_dependencies(out,
+ state.dependencies.write_dependencies(options_.locations_out,
dependency_tracker::checked);
}
}
@@ -178,10 +177,14 @@ namespace quickbook
detail::outerr(filein_) << e.what() << std::endl;
result = 1;
}
+ catch (std::runtime_error& e) {
+ detail::outerr() << e.what() << std::endl;
+ result = 1;
+ }
if (!fileout_.empty() && result == 0)
{
- std::string stage2 = ids.replace_placeholders(buffer.str());
+ std::string stage2 = output.replace_placeholders(buffer.str());
fs::ofstream fileout(fileout_);
@@ -252,7 +255,7 @@ main(int argc, char* argv[])
using boost::program_options::notify;
using boost::program_options::positional_options_description;
- using quickbook::detail::input_string;
+ using quickbook::detail::command_line_string;
// First thing, the filesystem should record the current working directory.
fs::initial_path<fs::path>();
@@ -280,27 +283,27 @@ main(int argc, char* argv[])
("no-self-linked-headers", "stop headers linking to themselves")
("indent", PO_VALUE<int>(), "indent spaces")
("linewidth", PO_VALUE<int>(), "line width")
- ("input-file", PO_VALUE<input_string>(), "input file")
- ("output-file", PO_VALUE<input_string>(), "output file")
- ("output-deps", PO_VALUE<input_string>(), "output dependency file")
+ ("input-file", PO_VALUE<command_line_string>(), "input file")
+ ("output-file", PO_VALUE<command_line_string>(), "output file")
+ ("output-deps", PO_VALUE<command_line_string>(), "output dependency file")
("debug", "debug mode (for developers)")
("ms-errors", "use Microsoft Visual Studio style error & warn message format")
- ("include-path,I", PO_VALUE< std::vector<input_string> >(), "include path")
- ("define,D", PO_VALUE< std::vector<input_string> >(), "define macro")
- ("image-location", PO_VALUE<input_string>(), "image location")
+ ("include-path,I", PO_VALUE< std::vector<command_line_string> >(), "include path")
+ ("define,D", PO_VALUE< std::vector<command_line_string> >(), "define macro")
+ ("image-location", PO_VALUE<command_line_string>(), "image location")
;
hidden.add_options()
("expect-errors",
"Succeed if the input file contains a correctly handled "
"error, fail otherwise.")
- ("xinclude-base", PO_VALUE<input_string>(),
+ ("xinclude-base", PO_VALUE<command_line_string>(),
"Generate xincludes as if generating for this target "
"directory.")
- ("output-deps-format", PO_VALUE<input_string>(),
+ ("output-deps-format", PO_VALUE<command_line_string>(),
"Comma separated list of formatting options for output-deps, "
"options are: escaped, checked")
- ("output-checked-locations", PO_VALUE<input_string>(),
+ ("output-checked-locations", PO_VALUE<command_line_string>(),
"Writes a file listing all the file locations that were "
"checked, starting with '+' if they were found, or '-' "
"if they weren't.\n"
@@ -418,24 +421,24 @@ main(int argc, char* argv[])
if (vm.count("include-path"))
{
boost::transform(
- vm["include-path"].as<std::vector<input_string> >(),
+ vm["include-path"].as<std::vector<command_line_string> >(),
std::back_inserter(quickbook::include_path),
- quickbook::detail::input_to_path);
+ quickbook::detail::command_line_to_path);
}
quickbook::preset_defines.clear();
if (vm.count("define"))
{
boost::transform(
- vm["define"].as<std::vector<input_string> >(),
+ vm["define"].as<std::vector<command_line_string> >(),
std::back_inserter(quickbook::preset_defines),
- quickbook::detail::input_to_utf8);
+ quickbook::detail::command_line_to_utf8);
}
if (vm.count("input-file"))
{
- fs::path filein = quickbook::detail::input_to_path(
- vm["input-file"].as<input_string>());
+ fs::path filein = quickbook::detail::command_line_to_path(
+ vm["input-file"].as<command_line_string>());
fs::path fileout;
bool default_output = true;
@@ -443,16 +446,16 @@ main(int argc, char* argv[])
if (vm.count("output-deps"))
{
parse_document_options.deps_out =
- quickbook::detail::input_to_path(
- vm["output-deps"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["output-deps"].as<command_line_string>());
default_output = false;
}
if (vm.count("output-deps-format"))
{
std::string format_flags =
- quickbook::detail::input_to_utf8(
- vm["output-deps-format"].as<input_string>());
+ quickbook::detail::command_line_to_utf8(
+ vm["output-deps-format"].as<command_line_string>());
std::vector<std::string> flag_names;
boost::algorithm::split(flag_names, format_flags,
@@ -485,15 +488,15 @@ main(int argc, char* argv[])
if (vm.count("output-checked-locations"))
{
parse_document_options.locations_out =
- quickbook::detail::input_to_path(
- vm["output-checked-locations"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["output-checked-locations"].as<command_line_string>());
default_output = false;
}
if (vm.count("output-file"))
{
- fileout = quickbook::detail::input_to_path(
- vm["output-file"].as<input_string>());
+ fileout = quickbook::detail::command_line_to_path(
+ vm["output-file"].as<command_line_string>());
}
else if (default_output)
{
@@ -504,8 +507,8 @@ main(int argc, char* argv[])
if (vm.count("xinclude-base"))
{
parse_document_options.xinclude_base =
- quickbook::detail::input_to_path(
- vm["xinclude-base"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["xinclude-base"].as<command_line_string>());
}
else
{
@@ -525,8 +528,8 @@ main(int argc, char* argv[])
if (vm.count("image-location"))
{
- quickbook::image_location = quickbook::detail::input_to_path(
- vm["image-location"].as<input_string>());
+ quickbook::image_location = quickbook::detail::command_line_to_path(
+ vm["image-location"].as<command_line_string>());
}
else
{
diff --git a/tools/quickbook/src/state.cpp b/tools/quickbook/src/state.cpp
index 9f2168a93..be14604f7 100644
--- a/tools/quickbook/src/state.cpp
+++ b/tools/quickbook/src/state.cpp
@@ -10,9 +10,13 @@
=============================================================================*/
#include "state.hpp"
#include "state_save.hpp"
+#include "document_state.hpp"
#include "quickbook.hpp"
#include "grammar.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
+#include "utils.hpp"
+#include "phrase_tags.hpp"
+#include <boost/foreach.hpp>
#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
#pragma warning(disable:4355)
@@ -26,9 +30,10 @@ namespace quickbook
unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
state::state(fs::path const& filein_, fs::path const& xinclude_base_,
- string_stream& out_, id_manager& ids)
+ string_stream& out_, document_state& document)
: grammar_()
+ , order_pos(0)
, xinclude_base(xinclude_base_)
, templates()
@@ -36,30 +41,37 @@ namespace quickbook
, anchors()
, warned_about_breaks(false)
, conditional(true)
- , ids(ids)
+ , document(document)
, callouts()
, callout_depth(0)
+ , dependencies()
+ , explicit_list(false)
, imported(false)
, macro()
- , source_mode("c++")
+ , source_mode()
, source_mode_next()
+ , source_mode_next_pos()
, current_file(0)
- , filename_relative(filein_.filename())
+ , current_path(filein_, 0, filein_.filename())
, template_depth(0)
, min_section_level(1)
+ , in_list(false)
+ , in_list_save()
, out(out_)
, phrase()
+
, values(&current_file)
{
// add the predefined macros
macro.add
("__DATE__", std::string(quickbook_get_date))
("__TIME__", std::string(quickbook_get_time))
- ("__FILENAME__", detail::path_to_generic(filename_relative))
+ ("__FILENAME__", std::string())
;
+ update_filename_macro();
boost::scoped_ptr<quickbook_grammar> g(
new quickbook_grammar(*this));
@@ -70,52 +82,100 @@ namespace quickbook
return *grammar_;
}
- file_state::file_state(quickbook::state& state, scope_flags scope)
+ void state::update_filename_macro() {
+ *boost::spirit::classic::find(macro, "__FILENAME__")
+ = detail::encode_string(
+ detail::path_to_generic(current_path.abstract_file_path));
+ }
+
+ unsigned state::get_new_order_pos() {
+ return ++order_pos;
+ }
+
+ void state::push_output() {
+ out.push();
+ phrase.push();
+ in_list_save.push(in_list);
+ }
+
+ void state::pop_output() {
+ phrase.pop();
+ out.pop();
+ in_list = in_list_save.top();
+ in_list_save.pop();
+ }
+
+ source_mode_info state::tagged_source_mode() const {
+ source_mode_info result;
+
+ BOOST_FOREACH(source_mode_info const& s, tagged_source_mode_stack) {
+ result.update(s);
+ }
+
+ return result;
+ }
+
+ source_mode_info state::current_source_mode() const {
+ source_mode_info result = source_mode;
+
+ result.update(document.section_source_mode());
+
+ BOOST_FOREACH(source_mode_info const& s, tagged_source_mode_stack) {
+ result.update(s);
+ }
+
+ return result;
+ }
+
+ void state::change_source_mode(source_mode_type s) {
+ source_mode = source_mode_info(s, get_new_order_pos());
+ }
+
+ void state::push_tagged_source_mode(source_mode_type s) {
+ tagged_source_mode_stack.push_back(
+ source_mode_info(s, s ? get_new_order_pos() : 0));
+ }
+
+ void state::pop_tagged_source_mode() {
+ assert(!tagged_source_mode_stack.empty());
+ tagged_source_mode_stack.pop_back();
+ }
+
+ state_save::state_save(quickbook::state& state, scope_flags scope)
: state(state)
, scope(scope)
, qbk_version(qbk_version_n)
, imported(state.imported)
, current_file(state.current_file)
- , filename_relative(state.filename_relative)
+ , current_path(state.current_path)
, xinclude_base(state.xinclude_base)
, source_mode(state.source_mode)
, macro()
+ , template_depth(state.template_depth)
+ , min_section_level(state.min_section_level)
{
if (scope & scope_macros) macro = state.macro;
if (scope & scope_templates) state.templates.push();
if (scope & scope_output) {
- state.out.push();
- state.phrase.push();
+ state.push_output();
}
state.values.builder.save();
}
- file_state::~file_state()
+ state_save::~state_save()
{
state.values.builder.restore();
boost::swap(qbk_version_n, qbk_version);
boost::swap(state.imported, imported);
boost::swap(state.current_file, current_file);
- boost::swap(state.filename_relative, filename_relative);
+ boost::swap(state.current_path, current_path);
boost::swap(state.xinclude_base, xinclude_base);
boost::swap(state.source_mode, source_mode);
if (scope & scope_output) {
- state.out.pop();
- state.phrase.pop();
+ state.pop_output();
}
if (scope & scope_templates) state.templates.pop();
if (scope & scope_macros) state.macro = macro;
- }
-
- template_state::template_state(quickbook::state& state)
- : file_state(state, file_state::scope_all)
- , template_depth(state.template_depth)
- , min_section_level(state.min_section_level)
- {
- }
-
- template_state::~template_state()
- {
boost::swap(state.template_depth, template_depth);
boost::swap(state.min_section_level, min_section_level);
}
diff --git a/tools/quickbook/src/state.hpp b/tools/quickbook/src/state.hpp
index 8d5f38945..e4271906a 100644
--- a/tools/quickbook/src/state.hpp
+++ b/tools/quickbook/src/state.hpp
@@ -18,6 +18,8 @@
#include "template_stack.hpp"
#include "symbols.hpp"
#include "dependency_tracker.hpp"
+#include "syntax_highlight.hpp"
+#include "include_paths.hpp"
namespace quickbook
{
@@ -27,7 +29,7 @@ namespace quickbook
struct state
{
state(fs::path const& filein_, fs::path const& xinclude_base, string_stream& out_,
- id_manager&);
+ document_state&);
private:
boost::scoped_ptr<quickbook_grammar> grammar_;
@@ -42,34 +44,42 @@ namespace quickbook
static int const max_template_depth = 100;
// global state
+ unsigned order_pos;
fs::path xinclude_base;
template_stack templates;
int error_count;
string_list anchors;
bool warned_about_breaks;
bool conditional;
- id_manager& ids;
+ document_state& document;
value_builder callouts; // callouts are global as
int callout_depth; // they don't nest.
dependency_tracker dependencies;
+ bool explicit_list; // set when using a list
// state saved for files and templates.
bool imported;
string_symbols macro;
- std::string source_mode;
- value source_mode_next;
+ source_mode_info source_mode;
+ source_mode_type source_mode_next;
+ value source_mode_next_pos;
+ std::vector<source_mode_info>
+ tagged_source_mode_stack;
file_ptr current_file;
- fs::path filename_relative; // for the __FILENAME__ macro.
- // (relative to the original file
- // or include path).
+ quickbook_path current_path;
// state saved for templates.
int template_depth;
int min_section_level;
// output state - scoped by templates and grammar
+ bool in_list; // generating a list
+ std::stack<bool> in_list_save; // save the in_list state
+ // TODO: Something better...
collector out; // main output stream
collector phrase; // phrase output stream
+
+ // values state - scoped by everything.
value_parser values; // parsed values
quickbook_grammar& grammar() const;
@@ -78,6 +88,13 @@ namespace quickbook
// actions
///////////////////////////////////////////////////////////////////////////
+ void update_filename_macro();
+
+ unsigned get_new_order_pos();
+
+ void push_output();
+ void pop_output();
+
void start_list(char mark);
void end_list(char mark);
void start_list_item();
@@ -86,6 +103,12 @@ namespace quickbook
void start_callouts();
std::string add_callout(value);
std::string end_callouts();
+
+ source_mode_info current_source_mode() const;
+ source_mode_info tagged_source_mode() const;
+ void change_source_mode(source_mode_type);
+ void push_tagged_source_mode(source_mode_type);
+ void pop_tagged_source_mode();
};
extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
diff --git a/tools/quickbook/src/state_save.hpp b/tools/quickbook/src/state_save.hpp
index f8b53e7c8..8cae8cd1b 100644
--- a/tools/quickbook/src/state_save.hpp
+++ b/tools/quickbook/src/state_save.hpp
@@ -18,7 +18,7 @@ namespace quickbook
//
// Defined in state.cpp
- struct file_state
+ struct state_save
{
enum scope_flags {
scope_none = 0,
@@ -29,8 +29,8 @@ namespace quickbook
scope_all = scope_callables + scope_output
};
- explicit file_state(quickbook::state&, scope_flags);
- ~file_state();
+ explicit state_save(quickbook::state&, scope_flags);
+ ~state_save();
quickbook::state& state;
scope_flags scope;
@@ -38,22 +38,15 @@ namespace quickbook
bool imported;
std::string doc_type;
file_ptr current_file;
- fs::path filename_relative;
+ quickbook_path current_path;
fs::path xinclude_base;
- std::string source_mode;
+ source_mode_info source_mode;
string_symbols macro;
- private:
- file_state(file_state const&);
- file_state& operator=(file_state const&);
- };
-
- struct template_state : file_state
- {
- explicit template_state(quickbook::state&);
- ~template_state();
-
int template_depth;
int min_section_level;
+ private:
+ state_save(state_save const&);
+ state_save& operator=(state_save const&);
};
}
diff --git a/tools/quickbook/src/syntax_highlight.cpp b/tools/quickbook/src/syntax_highlight.cpp
index fdeaef5da..12e2c5e07 100644
--- a/tools/quickbook/src/syntax_highlight.cpp
+++ b/tools/quickbook/src/syntax_highlight.cpp
@@ -13,81 +13,22 @@
#include <boost/spirit/include/classic_symbols.hpp>
#include <boost/spirit/include/classic_loops.hpp>
#include "grammar.hpp"
-#include "grammar_impl.hpp" // Just for context stuff. Should move?
#include "state.hpp"
#include "actions.hpp"
+#include "syntax_highlight.hpp"
#include "utils.hpp"
#include "files.hpp"
-#include "input_path.hpp"
+#include "native_text.hpp"
+#include "phrase_tags.hpp"
namespace quickbook
{
namespace cl = boost::spirit::classic;
- template <typename T, typename Value>
- struct member_action_value
- {
- typedef void(T::*member_function)(Value);
-
- T& l;
- member_function mf;
-
- member_action_value(T& l, member_function mf) : l(l), mf(mf) {}
-
- void operator()(Value v) const {
- (l.*mf)(v);
- }
- };
-
- template <typename T>
- struct member_action
- {
- typedef void(T::*member_function)(parse_iterator, parse_iterator);
-
- T& l;
- member_function mf;
-
- member_action(T& l, member_function mf) : l(l), mf(mf) {}
-
- void operator()(parse_iterator first, parse_iterator last) const {
- (l.*mf)(first, last);
- }
- };
-
- template <typename T, typename Arg1>
- struct member_action1
- {
- typedef void(T::*member_function)(parse_iterator, parse_iterator, Arg1);
-
- T& l;
- member_function mf;
-
- member_action1(T& l, member_function mf) : l(l), mf(mf) {}
-
- struct impl
- {
- member_action1 a;
- Arg1 value;
-
- impl(member_action1& a, Arg1 value) :
- a(a), value(value)
- {}
-
- void operator()(parse_iterator first, parse_iterator last) const {
- (a.l.*a.mf)(first, last, value);
- }
- };
-
- impl operator()(Arg1 a1) {
- return impl(*this, a1);
- }
- };
-
// Syntax Highlight Actions
struct syntax_highlight_actions
{
- quickbook::collector out;
quickbook::state& state;
do_macro_action do_macro_impl;
@@ -96,8 +37,8 @@ namespace quickbook
boost::string_ref marked_text;
syntax_highlight_actions(quickbook::state& state, bool is_block) :
- out(), state(state),
- do_macro_impl(out, state),
+ state(state),
+ do_macro_impl(state),
support_callouts(is_block && (qbk_version_n >= 107u ||
state.current_file->is_code_snippets)),
marked_text()
@@ -119,26 +60,26 @@ namespace quickbook
void syntax_highlight_actions::span(parse_iterator first,
parse_iterator last, char const* name)
{
- out << "<phrase role=\"" << name << "\">";
+ state.phrase << "<phrase role=\"" << name << "\">";
while (first != last)
- detail::print_char(*first++, out.get());
- out << "</phrase>";
+ detail::print_char(*first++, state.phrase.get());
+ state.phrase << "</phrase>";
}
void syntax_highlight_actions::span_start(parse_iterator first,
parse_iterator last, char const* name)
{
- out << "<phrase role=\"" << name << "\">";
+ state.phrase << "<phrase role=\"" << name << "\">";
while (first != last)
- detail::print_char(*first++, out.get());
+ detail::print_char(*first++, state.phrase.get());
}
void syntax_highlight_actions::span_end(parse_iterator first,
parse_iterator last)
{
while (first != last)
- detail::print_char(*first++, out.get());
- out << "</phrase>";
+ detail::print_char(*first++, state.phrase.get());
+ state.phrase << "</phrase>";
}
void syntax_highlight_actions::unexpected_char(parse_iterator first,
@@ -152,30 +93,32 @@ namespace quickbook
<< "\n";
// print out an unexpected character
- out << "<phrase role=\"error\">";
+ state.phrase << "<phrase role=\"error\">";
while (first != last)
- detail::print_char(*first++, out.get());
- out << "</phrase>";
+ detail::print_char(*first++, state.phrase.get());
+ state.phrase << "</phrase>";
}
void syntax_highlight_actions::plain_char(parse_iterator first,
parse_iterator last)
{
while (first != last)
- detail::print_char(*first++, out.get());
+ detail::print_char(*first++, state.phrase.get());
}
void syntax_highlight_actions::pre_escape_back(parse_iterator,
parse_iterator)
{
- state.phrase.push(); // save the stream
+ state.push_output(); // save the stream
}
void syntax_highlight_actions::post_escape_back(parse_iterator,
parse_iterator)
{
- out << state.phrase.str();
- state.phrase.pop(); // restore the stream
+ std::string tmp;
+ state.phrase.swap(tmp);
+ state.pop_output(); // restore the stream
+ state.phrase << tmp;
}
void syntax_highlight_actions::do_macro(std::string const& v)
@@ -191,7 +134,7 @@ namespace quickbook
void syntax_highlight_actions::callout(parse_iterator, parse_iterator)
{
- out << state.add_callout(qbk_value(state.current_file,
+ state.phrase << state.add_callout(qbk_value(state.current_file,
marked_text.begin(), marked_text.end()));
marked_text.clear();
}
@@ -318,7 +261,7 @@ namespace quickbook
(
(
(+(cl::anychar_p - "``") >> cl::eps_p("``"))
- & g.phrase
+ & g.phrase_start
)
>> cl::str_p("``")
)
@@ -473,7 +416,7 @@ namespace quickbook
(
(
(+(cl::anychar_p - "``") >> cl::eps_p("``"))
- & g.phrase
+ & g.phrase_start
)
>> cl::str_p("``")
)
@@ -595,7 +538,7 @@ namespace quickbook
(
(
(+(cl::anychar_p - "``") >> cl::eps_p("``"))
- & g.phrase
+ & g.phrase_start
)
>> cl::str_p("``")
)
@@ -619,39 +562,35 @@ namespace quickbook
syntax_highlight_actions& actions;
};
- std::string syntax_highlight(
+ void syntax_highlight(
parse_iterator first,
parse_iterator last,
quickbook::state& state,
- std::string const& source_mode,
+ source_mode_type source_mode,
bool is_block)
{
syntax_highlight_actions syn_actions(state, is_block);
// print the code with syntax coloring
- if (source_mode == "c++")
- {
- cpp_highlight cpp_p(syn_actions);
- boost::spirit::classic::parse(first, last, cpp_p);
- }
- else if (source_mode == "python")
- {
- python_highlight python_p(syn_actions);
- boost::spirit::classic::parse(first, last, python_p);
- }
- else if (source_mode == "teletype")
- {
- teletype_highlight teletype_p(syn_actions);
- boost::spirit::classic::parse(first, last, teletype_p);
- }
- else
+ switch(source_mode)
{
- BOOST_ASSERT(0);
+ case source_mode_tags::cpp: {
+ cpp_highlight cpp_p(syn_actions);
+ boost::spirit::classic::parse(first, last, cpp_p);
+ break;
+ }
+ case source_mode_tags::python: {
+ python_highlight python_p(syn_actions);
+ boost::spirit::classic::parse(first, last, python_p);
+ break;
+ }
+ case source_mode_tags::teletype: {
+ teletype_highlight teletype_p(syn_actions);
+ boost::spirit::classic::parse(first, last, teletype_p);
+ break;
+ }
+ default:
+ BOOST_ASSERT(0);
}
-
- std::string str;
- syn_actions.out.swap(str);
-
- return str;
}
}
diff --git a/tools/quickbook/src/syntax_highlight.hpp b/tools/quickbook/src/syntax_highlight.hpp
new file mode 100644
index 000000000..12b3a63ae
--- /dev/null
+++ b/tools/quickbook/src/syntax_highlight.hpp
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 2011,2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#if !defined(BOOST_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP)
+#define BOOST_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP
+
+#include "fwd.hpp"
+#include "phrase_tags.hpp"
+#include <boost/swap.hpp>
+
+namespace quickbook
+{
+ //
+ // source_mode_info
+ //
+ // The source mode is stored in a few places, so the order needs to also be
+ // stored to work out which is the current source mode.
+
+ struct source_mode_info {
+ source_mode_type source_mode;
+ unsigned order;
+
+ source_mode_info() : source_mode(source_mode_tags::cpp), order(0) {}
+
+ source_mode_info(source_mode_type source_mode, unsigned order) :
+ source_mode(source_mode),
+ order(order) {}
+
+ void update(source_mode_info const& x) {
+ if (x.order > order) {
+ source_mode = x.source_mode;
+ order = x.order;
+ }
+ }
+
+ void swap(source_mode_info& x) {
+ boost::swap(source_mode, x.source_mode);
+ boost::swap(order, x.order);
+ }
+ };
+
+ inline void swap(source_mode_info& x, source_mode_info& y) {
+ x.swap(y);
+ }
+
+ void syntax_highlight(
+ parse_iterator first, parse_iterator last,
+ quickbook::state& state,
+ source_mode_type source_mode,
+ bool is_block);
+}
+
+#endif
diff --git a/tools/quickbook/src/template_tags.hpp b/tools/quickbook/src/template_tags.hpp
index a47158dae..d895707bc 100644
--- a/tools/quickbook/src/template_tags.hpp
+++ b/tools/quickbook/src/template_tags.hpp
@@ -15,6 +15,7 @@ namespace quickbook
{
QUICKBOOK_VALUE_TAGS(template_tags, 0x100,
(template_)
+ (attribute_template)
(escape)
(identifier)
(block)
diff --git a/tools/quickbook/src/utils.cpp b/tools/quickbook/src/utils.cpp
index 9bd0bee67..6f3b49acd 100644
--- a/tools/quickbook/src/utils.cpp
+++ b/tools/quickbook/src/utils.cpp
@@ -15,6 +15,27 @@
namespace quickbook { namespace detail
{
+ std::string encode_string(boost::string_ref str)
+ {
+ std::string result;
+ result.reserve(str.size());
+
+ for (boost::string_ref::const_iterator it = str.begin();
+ it != str.end(); ++it)
+ {
+ switch (*it)
+ {
+ case '<': result += "&lt;"; break;
+ case '>': result += "&gt;"; break;
+ case '&': result += "&amp;"; break;
+ case '"': result += "&quot;"; break;
+ default: result += *it; break;
+ }
+ }
+
+ return result;
+ }
+
void print_char(char ch, std::ostream& out)
{
switch (ch)
@@ -29,7 +50,7 @@ namespace quickbook { namespace detail
}
}
- void print_string(boost::string_ref const& str, std::ostream& out)
+ void print_string(boost::string_ref str, std::ostream& out)
{
for (boost::string_ref::const_iterator cur = str.begin();
cur != str.end(); ++cur)
@@ -45,21 +66,45 @@ namespace quickbook { namespace detail
return static_cast<char>(std::tolower(static_cast<unsigned char>(ch)));
}
- std::string escape_uri(std::string uri)
+ static std::string escape_uri_impl(std::string& uri_param, char const* mark)
{
+ // Extra capital characters for validating percent escapes.
+ static char const hex[] = "0123456789abcdefABCDEF";
+
+ std::string uri;
+ uri.swap(uri_param);
+
for (std::string::size_type n = 0; n < uri.size(); ++n)
{
- static char const mark[] = "-_.!~*'()?\\/";
- if((!std::isalnum(static_cast<unsigned char>(uri[n])) || 127 < static_cast<unsigned char>(uri[n]))
- && 0 == std::strchr(mark, uri[n]))
+ if (static_cast<unsigned char>(uri[n]) > 127 ||
+ (!std::isalnum(static_cast<unsigned char>(uri[n])) &&
+ !std::strchr(mark, uri[n])) ||
+ (uri[n] == '%' && !(n + 2 < uri.size() &&
+ std::strchr(hex, uri[n+1]) &&
+ std::strchr(hex, uri[n+2]))))
{
- static char const hex[] = "0123456789abcdef";
char escape[] = { hex[uri[n] / 16], hex[uri[n] % 16] };
uri.insert(n + 1, escape, 2);
uri[n] = '%';
n += 2;
}
+ else if (uri[n] == '%')
+ {
+ n += 2;
+ }
}
+
return uri;
}
+
+ std::string escape_uri(std::string uri_param)
+ {
+ // TODO: I don't understand this choice of characters.....
+ return escape_uri_impl(uri_param, "-_.!~*'()?\\/");
+ }
+
+ std::string partially_escape_uri(std::string uri_param)
+ {
+ return escape_uri_impl(uri_param, "-_.!~*'()?\\/:&=#%+");
+ }
}}
diff --git a/tools/quickbook/src/utils.hpp b/tools/quickbook/src/utils.hpp
index d86774724..3f5c5455d 100644
--- a/tools/quickbook/src/utils.hpp
+++ b/tools/quickbook/src/utils.hpp
@@ -17,8 +17,9 @@
#include <boost/utility/string_ref.hpp>
namespace quickbook { namespace detail {
+ std::string encode_string(boost::string_ref);
void print_char(char ch, std::ostream& out);
- void print_string(boost::string_ref const& str, std::ostream& out);
+ void print_string(boost::string_ref str, std::ostream& out);
char filter_identifier_char(char ch);
template <typename Range>
@@ -33,8 +34,15 @@ namespace quickbook { namespace detail {
return out_name;
}
+ // URI escape string
std::string escape_uri(std::string uri);
- inline std::string escape_uri(boost::string_ref const& uri) {
+ inline std::string escape_uri(boost::string_ref uri) {
+ return escape_uri(std::string(uri.begin(), uri.end()));
+ }
+
+ // URI escape string, leaving characters generally used in URIs.
+ std::string partially_escape_uri(std::string uri);
+ inline std::string partially_escape_uri(boost::string_ref uri) {
return escape_uri(std::string(uri.begin(), uri.end()));
}
diff --git a/tools/quickbook/test/Jamfile.v2 b/tools/quickbook/test/Jamfile.v2
index 900b4758a..505b58ff1 100644
--- a/tools/quickbook/test/Jamfile.v2
+++ b/tools/quickbook/test/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project test
+project quickbook/test
: requirements
<toolset>msvc:<debug-symbols>off
;
@@ -24,6 +24,7 @@ import quickbook-testing : quickbook-test quickbook-error-test ;
test-suite quickbook.test :
[ quickbook-test anchor-1_1 ]
[ quickbook-test anchor-1_6 ]
+ [ quickbook-test anchor-1_7 ]
[ quickbook-test blocks-1_5 ]
[ quickbook-test callouts-1_5 ]
[ quickbook-test callouts-1_7 ]
@@ -52,6 +53,7 @@ test-suite quickbook.test :
[ quickbook-test heading-1_3 ]
[ quickbook-test heading-1_5 ]
[ quickbook-test heading-1_6 ]
+ [ quickbook-test heading-1_7 ]
[ quickbook-error-test heading_unclosed-1_4-fail ]
[ quickbook-test hr-1_5 ]
[ quickbook-test hr-1_6 ]
@@ -63,33 +65,48 @@ test-suite quickbook.test :
[ quickbook-error-test include-1_1-fail ]
[ quickbook-test include-1_5 ]
[ quickbook-test include-1_6 ]
+ [ quickbook-test include-1_7 ]
[ quickbook-test include2-1_6 ]
[ quickbook-error-test include_win_path-1_6-fail ]
+ [ quickbook-error-test include_invalid_path1-1_7-fail ]
+ [ quickbook-error-test include_invalid_path2-1_7-fail ]
+ [ quickbook-error-test include_invalid_path3-1_7-fail ]
+ [ quickbook-error-test include_unicode_glob-1_7-fail ]
[ quickbook-test link-1_1 ]
[ quickbook-test link-1_6 ]
[ quickbook-test link-1_7 ]
+ [ quickbook-error-test link-1_7-fail ]
+ [ quickbook-error-test link-1_7-fail2 ]
[ quickbook-test list_test-1_5 ]
[ quickbook-test list_test-1_6 ]
+ [ quickbook-error-test list_test-1_6-fail ]
+ [ quickbook-test list_test-1_7 ]
+ [ quickbook-error-test list_test-1_7-fail1 ]
[ quickbook-test macro-1_5 ]
[ quickbook-test macro-1_6 ]
[ quickbook-error-test mismatched_brackets-1_1-fail ]
[ quickbook-test mismatched_brackets1-1_1 ]
[ quickbook-test mismatched_brackets2-1_1 ]
+ [ quickbook-test mismatched_brackets3-1_1 ]
[ quickbook-test newline-1_1 ]
[ quickbook-test para_test-1_5 ]
[ quickbook-error-test post_process-fail ]
[ quickbook-test preformatted-1_1 ]
[ quickbook-test preformatted-1_6 ]
[ quickbook-test role-1_6 ]
+ [ quickbook-test role-1_7 ]
+ [ quickbook-error-test role-1_7-fail ]
[ quickbook-test section-1_4 ]
[ quickbook-test section-1_5-unclosed ]
[ quickbook-test section-1_5 ]
+ [ quickbook-test section-1_7 ]
[ quickbook-test simple_markup-1_5 ]
[ quickbook-test source_mode-1_7 ]
[ quickbook-test svg-1_1 ]
[ quickbook-test table-1_3 ]
[ quickbook-test table-1_5 ]
[ quickbook-test table-1_6 ]
+ [ quickbook-test table-1_7 ]
[ quickbook-error-test template_arguments1-1_1-fail ]
[ quickbook-error-test template_arguments2-1_1-fail ]
[ quickbook-error-test template_arguments3-1_1-fail ]
@@ -100,6 +117,11 @@ test-suite quickbook.test :
[ quickbook-test templates-1_3 ]
[ quickbook-test templates-1_4 ]
[ quickbook-test templates-1_5 ]
+ [ quickbook-test templates-1_6 ]
+ [ quickbook-error-test templates-1_6-fail1 ]
+ [ quickbook-test templates-1_7 ]
+ [ quickbook-error-test templates-1_7-fail1 ]
+ [ quickbook-error-test templates-1_7-fail2 ]
[ quickbook-test unicode_escape-1_5 ]
[ quickbook-test unmatched_element-1_5 ]
[ quickbook-test unmatched_element-1_6 ]
diff --git a/tools/quickbook/test/anchor-1_7.gold b/tools/quickbook/test/anchor-1_7.gold
new file mode 100644
index 000000000..71e22458d
--- /dev/null
+++ b/tools/quickbook/test/anchor-1_7.gold
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title><link linkend="anchor_test.anchors">Anchors</link></title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t"/><link linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_"/><link linkend="anchor_test.anchors.this_heading_should_pick_up_the_">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h4">
+ <phrase id="anchor_test.anchors.finally_this"/><link linkend="anchor_test.anchors.finally_this">Finally
+ this</link>
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link></title>
+ <section id="anchor_test.section_anchor.nested_section">
+ <title><anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested
+ Section</link></title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional
+ Section Anchor</link></title>
+ </section>
+ <section id="anchor_test.lists">
+ <title><link linkend="anchor_test.lists">Lists</link></title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title><link linkend="anchor_test.anchors_in_templates">Anchors in templates</link></title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_co">
+ <title><link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in
+ syntax highlighted code</link></title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title><link linkend="anchor_test.nested_anchors">Nested anchors</link></title>
+ <table frame="all" id="anchor_test.nested_anchors.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="anchor_test.templates">
+ <title><link linkend="anchor_test.templates">Anchors with templates</link></title>
+ <anchor id="anchor1"/><anchor id="anchor2"/><anchor id="x1y"/><anchor id="x12y"/>
+ </section>
+</article>
diff --git a/tools/quickbook/test/anchor-1_7.quickbook b/tools/quickbook/test/anchor-1_7.quickbook
new file mode 100644
index 000000000..f2b5c13db
--- /dev/null
+++ b/tools/quickbook/test/anchor-1_7.quickbook
@@ -0,0 +1,97 @@
+[article Anchor Test
+[quickbook 1.7]
+]
+
+[section Anchors]
+
+[#a1] A paragraph containing several anchors. [#a2] We want to make sure
+they appear in the correct place. [#a3]
+
+[heading This heading shouldn't pick up the previous anchor]
+
+[#a4]
+
+[heading This heading should pick up the previous anchor]
+
+[#a5]
+[heading And this one]
+
+[#a6][heading Also this one]
+
+[#a7][h3 Finally this]
+
+[#a8]
+
+[endsect]
+
+[#a9]
+[section Section Anchor]
+[#a10][section Nested Section]
+[endsect]
+[/ This anchor is invalid, I'm not sure what to do with it]
+[#a11]
+[endsect]
+
+[#a12][?__not_defined__ #a13]
+[section Conditional Section Anchor]
+[endsect]
+
+[section Lists]
+
+[#a14]
+* Item 1
+* Item 2
+* Nested List
+ [#a15]
+ * Nested Item 1
+ * Nested Item 2
+ * [#a16] Nested Item 3
+* Item 3
+
+[endsect]
+
+[section Anchors in templates]
+
+[template anchor1[][#t1]]
+[template para[] Text content]
+
+[anchor1]
+
+Some text.
+
+[#t2]
+
+[para]
+
+[endsect]
+
+[section Anchors in syntax highlighted code]
+
+ int ``[#s1]``main() {}
+
+[endsect]
+
+[section Nested anchors]
+
+[table Table with anchors
+ [[Heading]]
+ [[[#table1]Cell 1]]
+ [[[#table2] Cell 2]]
+ [[Cell 3[#table3]]]
+]
+[endsect]
+
+[section:templates Anchors with templates]
+
+[template a1 anchor1]
+[template a2 anchor2]
+
+[#[a1]]
+[#[a2]]
+
+[template anchor[name] [#x[name]y]]
+
+[anchor 1]
+[anchor 12]
+
+[endsect] [/ templates]
diff --git a/tools/quickbook/test/command-line/Jamfile.v2 b/tools/quickbook/test/command-line/Jamfile.v2
index 052ec82af..9e838e0a4 100644
--- a/tools/quickbook/test/command-line/Jamfile.v2
+++ b/tools/quickbook/test/command-line/Jamfile.v2
@@ -7,7 +7,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project quickook/tests/command-line ;
+project quickbook/tests/command-line ;
import quickbook-testing : quickbook-test quickbook-fail-test quickbook-error-test ;
@@ -25,4 +25,4 @@ test-suite command-line.test :
output_nested_in_file :
basic-1_6.quickbook :
<testing.arg>--output-file=basic-1_6.quickbook/basic.xml ]
- ; \ No newline at end of file
+ ;
diff --git a/tools/quickbook/test/doc-info/Jamfile.v2 b/tools/quickbook/test/doc-info/Jamfile.v2
index bfb06cfc9..a35229c09 100644
--- a/tools/quickbook/test/doc-info/Jamfile.v2
+++ b/tools/quickbook/test/doc-info/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project quickook/tests/doc-info ;
+project quickbook/tests/doc-info ;
import quickbook-testing : quickbook-test quickbook-error-test ;
diff --git a/tools/quickbook/test/elements-1_6.gold b/tools/quickbook/test/elements-1_6.gold
index bc9ee06f3..59a90af5c 100644
--- a/tools/quickbook/test/elements-1_6.gold
+++ b/tools/quickbook/test/elements-1_6.gold
@@ -5,28 +5,36 @@
<title>1.6 Elements</title>
<orderedlist>
<listitem>
- <para>
+ <simpara>
item1
- </para>
+ </simpara>
</listitem>
<listitem>
- <para>
+ <simpara>
item2
- </para>
+ </simpara>
</listitem>
</orderedlist>
<itemizedlist>
<listitem>
- <para>
+ <simpara>
item1
- </para>
+ </simpara>
</listitem>
<listitem>
- <para>
+ <simpara>
item2
- </para>
+ </simpara>
</listitem>
</itemizedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Check that <emphasis role="bold">bold text</emphasis> isn't confused with
+ a list.
+ </simpara>
+ </listitem>
+ </orderedlist>
<simplesect><title>A <emphasis role="bold">simplesect</emphasis>!</title></simplesect>
</article>
diff --git a/tools/quickbook/test/elements-1_6.quickbook b/tools/quickbook/test/elements-1_6.quickbook
index 68372d123..e313cd98d 100644
--- a/tools/quickbook/test/elements-1_6.quickbook
+++ b/tools/quickbook/test/elements-1_6.quickbook
@@ -8,6 +8,14 @@
[itemized_list [item1][item2]]
+[ordered_list
+ [
+ Check that
+ *bold text*
+ isn't confused with a list.
+ ]
+]
+
[block'''<simplesect><title>'''A *simplesect*!'''</title>''']
-[block'''</simplesect>'''] \ No newline at end of file
+[block'''</simplesect>''']
diff --git a/tools/quickbook/test/heading-1_7.gold b/tools/quickbook/test/heading-1_7.gold
new file mode 100644
index 000000000..52f8291ab
--- /dev/null
+++ b/tools/quickbook/test/heading-1_7.gold
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.7</title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h0">
+ <phrase id="heading_test_1_7.generic_header"/><link linkend="heading_test_1_7.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h2">
+ <phrase id="heading_test_1_7.level_1"/><link linkend="heading_test_1_7.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h3">
+ <phrase id="heading_test_1_7.level_2"/><link linkend="heading_test_1_7.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_7.h4">
+ <phrase id="heading_test_1_7.level_3"/><link linkend="heading_test_1_7.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_7.h5">
+ <phrase id="heading_test_1_7.level_4"/><link linkend="heading_test_1_7.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_7.h6">
+ <phrase id="heading_test_1_7.level_5"/><link linkend="heading_test_1_7.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_7.h8">
+ <phrase id="heading_test_1_7.level_6"/><link linkend="heading_test_1_7.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h9">
+ <phrase id="heading_test_1_7.bold"/><link linkend="heading_test_1_7.bold"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h10">
+ <phrase id="heading_test_1_7.comment"/><link linkend="heading_test_1_7.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h11">
+ <phrase id="heading_test_1_7.anchor_anchor_heading"/><link linkend="heading_test_1_7.anchor_anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h12">
+ <phrase id="heading_test_1_7.link_anchor_link_heading"/><link linkend="heading_test_1_7.link_anchor_link_heading"><link
+ linkend="anchor">Link heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h13">
+ <phrase id="heading_test_1_7.h1"/><link linkend="heading_test_1_7.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1">
+ <title><link linkend="heading_test_1_7.s1">S1</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.h0">
+ <phrase id="heading_test_1_7.s1.h2"/><link linkend="heading_test_1_7.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s2">
+ <title><link linkend="heading_test_1_7.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.s2.h0">
+ <phrase id="heading_test_1_7.s1.s2.h3"/><link linkend="heading_test_1_7.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h1">
+ <phrase id="heading_test_1_7.s1.h4"/><link linkend="heading_test_1_7.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s3">
+ <title><link linkend="heading_test_1_7.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_7.s1.s3.h0">
+ <phrase id="heading_test_1_7.s1.s3.h5"/><link linkend="heading_test_1_7.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h3">
+ <phrase id="heading_test_1_7.s1.h6"/><link linkend="heading_test_1_7.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h14">
+ <phrase id="heading_test_1_7.h7"/><link linkend="heading_test_1_7.h7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h15">
+ <phrase id="heading_test_1_7.a1"/><link linkend="heading_test_1_7.a1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0">
+ <title><link linkend="heading_test_1_7.s1_0">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h0">
+ <phrase id="heading_test_1_7.s1_0.a2"/><link linkend="heading_test_1_7.s1_0.a2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s2">
+ <title><link linkend="heading_test_1_7.s1_0.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s2.h0">
+ <phrase id="heading_test_1_7.s1_0.s2.a3"/><link linkend="heading_test_1_7.s1_0.s2.a3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h1">
+ <phrase id="heading_test_1_7.s1_0.a4"/><link linkend="heading_test_1_7.s1_0.a4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s3">
+ <title><link linkend="heading_test_1_7.s1_0.s3">S3</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s3.h0">
+ <phrase id="heading_test_1_7.s1_0.s3.a5"/><link linkend="heading_test_1_7.s1_0.s3.a5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.h2">
+ <phrase id="heading_test_1_7.s1_0.a6"/><link linkend="heading_test_1_7.s1_0.a6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h16">
+ <phrase id="heading_test_1_7.a7"/><link linkend="heading_test_1_7.a7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h17">
+ <phrase id="heading_test_1_7.abc-2"/><link linkend="heading_test_1_7.abc-2">Template
+ Id</link>
+ </bridgehead>
+</article>
diff --git a/tools/quickbook/test/heading-1_7.quickbook b/tools/quickbook/test/heading-1_7.quickbook
new file mode 100644
index 000000000..47f878add
--- /dev/null
+++ b/tools/quickbook/test/heading-1_7.quickbook
@@ -0,0 +1,83 @@
+[article Heading Test 1.7
+[quickbook 1.7]
+]
+
+[/ Basic headers ]
+
+[heading Generic header]
+[h1 Level 1]
+[h2 Level 2]
+[h3 Level 3]
+[h4 Level 4]
+[h5 Level 5]
+[h6 Level 6]
+
+[/ Test how heading ids are generated when different types of markup are present]
+
+[h1 *Bold*]
+[h1 [/]Comment[/]]
+
+[/ Test how ids are generated for headings containing things like anchors
+ and links ]
+
+[h1 [#anchor]Anchor heading]
+[h1 [link anchor Link heading]]
+
+[/ Test how heading ids are generated inside sections]
+
+[h1 H1]
+
+[section:s1 S1]
+
+[heading H2]
+
+[section:s2 S2]
+
+[h3 H3]
+
+[endsect]
+
+[h2 H4]
+
+[section:s3 S3]
+
+[heading H5]
+
+[endsect]
+
+[h2 H6]
+
+[endsect]
+
+[h1 H7]
+
+[/ Repeat with explicit ids]
+
+[h1:a1 H1]
+
+[section:s1 S1]
+
+[h2:a2 H2]
+
+[section:s2 S2]
+
+[h3:a3 H3]
+
+[endsect]
+
+[h2:a4 H4]
+
+[section:s3 S3]
+
+[h3:a5 H5]
+
+[endsect]
+
+[heading:a6 H6]
+
+[endsect]
+
+[h1:a7 H7]
+
+[template thing[] abc]
+[heading:[thing]-2 Template Id]
diff --git a/tools/quickbook/test/include-1_7.gold b/tools/quickbook/test/include-1_7.gold
new file mode 100644
index 000000000..206509bf2
--- /dev/null
+++ b/tools/quickbook/test/include-1_7.gold
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo0.test">
+ <title><link linkend="foo0.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
diff --git a/tools/quickbook/test/include-1_7.quickbook b/tools/quickbook/test/include-1_7.quickbook
new file mode 100644
index 000000000..481e4130a
--- /dev/null
+++ b/tools/quickbook/test/include-1_7.quickbook
@@ -0,0 +1,18 @@
+[article Include Test
+ [quickbook 1.7]
+ [id include-test]
+]
+
+[include include-inc.quickbook]
+[include:foo include-inc.quickbook]
+
+[template id2[] include-inc]
+[include:foo0 [id2].quickbook]
+
+[def __defined__]
+
+[? __undefined__ [include:foo1 include-inc.quickbook] ]
+[? __undefined__ [include:foo1 not-a-file.quickbook] ]
+[? __defined__
+ Just trying including in a conditional macro. [include:foo2 include-inc.quickbook]
+ With some text around it.]
diff --git a/tools/quickbook/test/include/Jamfile.v2 b/tools/quickbook/test/include/Jamfile.v2
index 3ab39b201..a40bf5543 100644
--- a/tools/quickbook/test/include/Jamfile.v2
+++ b/tools/quickbook/test/include/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project test/includes
+project quickbook/test/includes
: requirements
<toolset>msvc:<debug-symbols>off
;
@@ -16,7 +16,9 @@ import quickbook-testing : quickbook-test quickbook-error-test ;
test-suite quickbook.test :
[ quickbook-test import-basic-1.6 ]
[ quickbook-test filename ]
+ [ quickbook-test filename-1_7 ]
[ quickbook-test filename-path : : : <quickbook-test-include>sub ]
+ [ quickbook-test filename_path-1_7 : : : <quickbook-test-include>sub ]
[ quickbook-test doc-title1-1.5 ]
[ quickbook-test doc-title1a-1.5 ]
[ quickbook-test section ]
@@ -41,4 +43,6 @@ test-suite quickbook.test :
[ quickbook-test source_mode-1_6 ]
[ quickbook-test nested_compatibility-1_5 ]
[ quickbook-test nested_compatibility-1_6 ]
+ [ quickbook-test template_include-1_7 ]
+ [ quickbook-test glob-1_7 ]
;
diff --git a/tools/quickbook/test/include/filename-1_7.gold b/tools/quickbook/test/include/filename-1_7.gold
new file mode 100644
index 000000000..935b42642
--- /dev/null
+++ b/tools/quickbook/test/include/filename-1_7.gold
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename Test</title>
+ <para>
+ filename-1_7.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h0">
+ <phrase id="filename_test.test_1"/><link linkend="filename_test.test_1">Test
+ 1</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h1">
+ <phrase id="filename_test.test_2"/><link linkend="filename_test.test_2">Test
+ 2</link>
+ </bridgehead>
+ <para>
+ filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h2">
+ <phrase id="filename_test.test_3"/><link linkend="filename_test.test_3">Test
+ 3</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h3">
+ <phrase id="filename_test.test_4"/><link linkend="filename_test.test_4">Test
+ 4</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+</article>
diff --git a/tools/quickbook/test/include/filename-1_7.quickbook b/tools/quickbook/test/include/filename-1_7.quickbook
new file mode 100644
index 000000000..9d462af89
--- /dev/null
+++ b/tools/quickbook/test/include/filename-1_7.quickbook
@@ -0,0 +1,21 @@
+[article Filename Test
+[quickbook 1.7]
+]
+
+__FILENAME__
+
+[heading Test 1]
+
+[include sub/*.quickbook]
+
+[heading Test 2]
+
+[include filename_include?.quickbook]
+
+[heading Test 3]
+
+[include su\[b\]/filename\\_include1.quickbook]
+
+[heading Test 4]
+
+[include su\\b/*.quickbook]
diff --git a/tools/quickbook/test/include/filename_path-1_7.gold b/tools/quickbook/test/include/filename_path-1_7.gold
new file mode 100644
index 000000000..6f52dafc1
--- /dev/null
+++ b/tools/quickbook/test/include/filename_path-1_7.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test_with_include_path" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename test with include path</title>
+ <para>
+ filename_path-1_7.quickbook
+ </para>
+ <para>
+ filename_include1.quickbook
+ </para>
+ <para>
+ ../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
diff --git a/tools/quickbook/test/include/filename_path-1_7.quickbook b/tools/quickbook/test/include/filename_path-1_7.quickbook
new file mode 100644
index 000000000..741d76ad5
--- /dev/null
+++ b/tools/quickbook/test/include/filename_path-1_7.quickbook
@@ -0,0 +1,7 @@
+[article Filename test with include path
+[quickbook 1.7]
+]
+
+__FILENAME__
+
+[include filename_include?.quickbook]
diff --git a/tools/quickbook/test/include/glob-1_7.gold b/tools/quickbook/test/include/glob-1_7.gold
new file mode 100644
index 000000000..ba31ae961
--- /dev/null
+++ b/tools/quickbook/test/include/glob-1_7.gold
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="glob_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Glob Test</title>
+ <section id="glob_test.t1_0">
+ <title><link linkend="glob_test.t1_0">Test 1.0</link></title>
+ </section>
+ <section id="glob_test.t1_1">
+ <title><link linkend="glob_test.t1_1">Test 1.1</link></title>
+ <para>
+ A
+ </para>
+ </section>
+ <section id="glob_test.t1_2">
+ <title><link linkend="glob_test.t1_2">Test 1.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t1_3">
+ <title><link linkend="glob_test.t1_3">Test 1.3</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_1">
+ <title><link linkend="glob_test.t2_1">Test 2.1</link></title>
+ <para>
+ A
+ </para>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_2">
+ <title><link linkend="glob_test.t2_2">Test 2.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+</article>
diff --git a/tools/quickbook/test/include/glob-1_7.quickbook b/tools/quickbook/test/include/glob-1_7.quickbook
new file mode 100644
index 000000000..826c12be8
--- /dev/null
+++ b/tools/quickbook/test/include/glob-1_7.quickbook
@@ -0,0 +1,39 @@
+[article Glob Test
+[quickbook 1.7]
+]
+
+[section:t1_0 Test 1.0]
+
+[include glob0/*]
+
+[endsect] [/t1_0]
+
+[section:t1_1 Test 1.1]
+
+[include glob1/*]
+
+[endsect] [/t1_1]
+
+[section:t1_2 Test 1.2]
+
+[include glob1/*/*]
+
+[endsect] [/t1_2]
+
+[section:t1_3 Test 1.3]
+
+[include glob1/*/b.qbk]
+
+[endsect] [/t1_3]
+
+[section:t2_1 Test 2.1]
+
+[include glob2/*]
+
+[endsect] [/t2_1]
+
+[section:t2_2 Test 2.2]
+
+[include glob2/*/*]
+
+[endsect] [/t2_2]
diff --git a/tools/quickbook/test/include/glob1/a.qbk b/tools/quickbook/test/include/glob1/a.qbk
new file mode 100644
index 000000000..f70f10e4d
--- /dev/null
+++ b/tools/quickbook/test/include/glob1/a.qbk
@@ -0,0 +1 @@
+A
diff --git a/tools/quickbook/test/include/glob1/glob1-1/b.qbk b/tools/quickbook/test/include/glob1/glob1-1/b.qbk
new file mode 100644
index 000000000..223b7836f
--- /dev/null
+++ b/tools/quickbook/test/include/glob1/glob1-1/b.qbk
@@ -0,0 +1 @@
+B
diff --git a/tools/quickbook/test/include/glob2/a.qbk b/tools/quickbook/test/include/glob2/a.qbk
new file mode 100644
index 000000000..160580801
--- /dev/null
+++ b/tools/quickbook/test/include/glob2/a.qbk
@@ -0,0 +1,3 @@
+A
+
+[include */*.qbk]
diff --git a/tools/quickbook/test/include/glob2/glob2-1/b.qbk b/tools/quickbook/test/include/glob2/glob2-1/b.qbk
new file mode 100644
index 000000000..223b7836f
--- /dev/null
+++ b/tools/quickbook/test/include/glob2/glob2-1/b.qbk
@@ -0,0 +1 @@
+B
diff --git a/tools/quickbook/test/include/in_section-1_5.gold b/tools/quickbook/test/include/in_section-1_5.gold
index 1dfeaff90..3548e2c47 100644
--- a/tools/quickbook/test/include/in_section-1_5.gold
+++ b/tools/quickbook/test/include/in_section-1_5.gold
@@ -13,6 +13,11 @@
<bridgehead renderas="sect1" id="include_in_section_include_1.container.inner.h0">
<phrase id="include_in_section_include_1.container.inner.test2"/><link linkend="include_in_section_include_1.container.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container.inner.h1">
+ <phrase id="include_in_section_include_1.container.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
<bridgehead renderas="sect1" id="section_include.container.h0">
<phrase id="section_include.container.test1"/><link linkend="section_include.container.test1">Test1</link>
@@ -22,6 +27,11 @@
<bridgehead renderas="sect1" id="section_include.container.inner.h0">
<phrase id="section_include.container.inner.test2"/><link linkend="section_include.container.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container.inner.h0">
+ <phrase id="include_in_section_include_2.container.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</section>
<bridgehead renderas="sect1" id="include_in_section_include_1.h0">
@@ -32,6 +42,10 @@
<bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
<phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
<bridgehead renderas="sect1" id="section_include.h0">
<phrase id="section_include.test1"/><link linkend="section_include.test1">Test1</link>
@@ -41,6 +55,10 @@
<bridgehead renderas="sect1" id="section_include.inner.h0">
<phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_2.inner.h0">
+ <phrase id="include_in_section_include_2.inner.simple_include"/><link linkend="include_in_section_include_2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
<section id="include_in_section_1_5.container2">
<title><link linkend="include_in_section_1_5.container2">Container2</link></title>
@@ -52,6 +70,11 @@
<bridgehead renderas="sect1" id="include_in_section_include_1.container2.inner.h0">
<phrase id="include_in_section_include_1.container2.inner.test2"/><link linkend="include_in_section_include_1.container2.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container2.inner.h1">
+ <phrase id="include_in_section_include_1.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
<bridgehead renderas="sect1" id="section_include.container2.h0">
<phrase id="section_include.container2.test1"/><link linkend="section_include.container2.test1">Test1</link>
@@ -61,6 +84,11 @@
<bridgehead renderas="sect1" id="section_include.container2.inner.h0">
<phrase id="section_include.container2.inner.test2"/><link linkend="section_include.container2.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container2.inner.h0">
+ <phrase id="include_in_section_include_2.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</section>
</article>
diff --git a/tools/quickbook/test/include/in_section-1_6.gold b/tools/quickbook/test/include/in_section-1_6.gold
index 7601df44f..3ffa60170 100644
--- a/tools/quickbook/test/include/in_section-1_6.gold
+++ b/tools/quickbook/test/include/in_section-1_6.gold
@@ -16,6 +16,10 @@
<bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
<phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</article>
<article id="section_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
@@ -29,6 +33,10 @@
<bridgehead renderas="sect1" id="section_include.inner.h0">
<phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="section_include.inner.h1">
+ <phrase id="section_include.inner.simple_include"/><link linkend="section_include.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</article>
</section>
@@ -43,6 +51,10 @@
<bridgehead renderas="sect1" id="include_in_section_include_1_0.inner.h0">
<phrase id="include_in_section_include_1_0.inner.test2"/><link linkend="include_in_section_include_1_0.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_0.inner.h1">
+ <phrase id="include_in_section_include_1_0.inner.simple_include"/><link linkend="include_in_section_include_1_0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</article>
<article id="section_include0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
@@ -56,6 +68,10 @@
<bridgehead renderas="sect1" id="section_include0.inner.h0">
<phrase id="section_include0.inner.test2"/><link linkend="section_include0.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="section_include0.inner.h1">
+ <phrase id="section_include0.inner.simple_include"/><link linkend="section_include0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</article>
<section id="include_in_section_1_6.container2">
@@ -71,6 +87,10 @@
<bridgehead renderas="sect1" id="include_in_section_include_1_1.inner.h0">
<phrase id="include_in_section_include_1_1.inner.test2"/><link linkend="include_in_section_include_1_1.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_1.inner.h1">
+ <phrase id="include_in_section_include_1_1.inner.simple_include"/><link
+ linkend="include_in_section_include_1_1.inner.simple_include">Simple include</link>
+ </bridgehead>
</section>
</article>
<article id="section_include1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
@@ -84,6 +104,10 @@
<bridgehead renderas="sect1" id="section_include1.inner.h0">
<phrase id="section_include1.inner.test2"/><link linkend="section_include1.inner.test2">Test2</link>
</bridgehead>
+ <bridgehead renderas="sect3" id="section_include1.inner.h1">
+ <phrase id="section_include1.inner.simple_include"/><link linkend="section_include1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
</section>
</article>
</section>
diff --git a/tools/quickbook/test/include/in_section-inc1.quickbook b/tools/quickbook/test/include/in_section-inc1.quickbook
index f8fab4d12..f74bf5dbd 100644
--- a/tools/quickbook/test/include/in_section-inc1.quickbook
+++ b/tools/quickbook/test/include/in_section-inc1.quickbook
@@ -8,4 +8,6 @@
[h1 Test2]
-[endsect] \ No newline at end of file
+[include include-id-inc1.quickbook]
+
+[endsect]
diff --git a/tools/quickbook/test/include/in_section-inc2.quickbook b/tools/quickbook/test/include/in_section-inc2.quickbook
index 9d8ee5169..0a30aaa74 100644
--- a/tools/quickbook/test/include/in_section-inc2.quickbook
+++ b/tools/quickbook/test/include/in_section-inc2.quickbook
@@ -9,4 +9,6 @@
[h1 Test2]
-[endsect] \ No newline at end of file
+[include include-id-inc1.quickbook]
+
+[endsect]
diff --git a/tools/quickbook/test/include/source_mode-1_5.gold b/tools/quickbook/test/include/source_mode-1_5.gold
index 4fbee6f63..2ed6b7fee 100644
--- a/tools/quickbook/test/include/source_mode-1_5.gold
+++ b/tools/quickbook/test/include/source_mode-1_5.gold
@@ -4,4 +4,6 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Souce Mode Include</title>
<programlisting>void main() {}</programlisting>
+<programlisting>void main() {}
+</programlisting>
</article>
diff --git a/tools/quickbook/test/include/source_mode-1_5.quickbook b/tools/quickbook/test/include/source_mode-1_5.quickbook
index 9700cd13c..d5df05bd4 100644
--- a/tools/quickbook/test/include/source_mode-1_5.quickbook
+++ b/tools/quickbook/test/include/source_mode-1_5.quickbook
@@ -1,3 +1,4 @@
[article Souce Mode Include [source-mode teletype][quickbook 1.5]]
-[include source_mode-inc1.quickbook] \ No newline at end of file
+[include source_mode-inc1.quickbook]
+[include source_mode-inc2.quickbook]
diff --git a/tools/quickbook/test/include/source_mode-1_6.gold b/tools/quickbook/test/include/source_mode-1_6.gold
index 6d20203e6..aa01d2057 100644
--- a/tools/quickbook/test/include/source_mode-1_6.gold
+++ b/tools/quickbook/test/include/source_mode-1_6.gold
@@ -8,4 +8,6 @@
<title>Source include with no source-mode</title>
<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
</article>
+<programlisting>void main() {}
+</programlisting>
</article>
diff --git a/tools/quickbook/test/include/source_mode-1_6.quickbook b/tools/quickbook/test/include/source_mode-1_6.quickbook
index 77ccae433..fc4243f3b 100644
--- a/tools/quickbook/test/include/source_mode-1_6.quickbook
+++ b/tools/quickbook/test/include/source_mode-1_6.quickbook
@@ -1,4 +1,5 @@
[source-mode teletype][quickbook 1.6]
[article Souce Mode Include]
-[include source_mode-inc1.quickbook] \ No newline at end of file
+[include source_mode-inc1.quickbook]
+[include source_mode-inc2.quickbook]
diff --git a/tools/quickbook/test/include/source_mode-inc2.quickbook b/tools/quickbook/test/include/source_mode-inc2.quickbook
new file mode 100644
index 000000000..81dba8a17
--- /dev/null
+++ b/tools/quickbook/test/include/source_mode-inc2.quickbook
@@ -0,0 +1,3 @@
+[/ Source include with no source-mode, and no docinfo.]
+
+ void main() {}
diff --git a/tools/quickbook/test/include/template_include-1_7.gold b/tools/quickbook/test/include/template_include-1_7.gold
new file mode 100644
index 000000000..163ff30ee
--- /dev/null
+++ b/tools/quickbook/test/include/template_include-1_7.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_include_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template include test</title>
+ <bridgehead renderas="sect2" id="template_include_test.h0">
+ <phrase id="template_include_test.simple_include"/><link linkend="template_include_test.simple_include">Simple
+ include</link>
+ </bridgehead>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+</article>
diff --git a/tools/quickbook/test/include/template_include-1_7.quickbook b/tools/quickbook/test/include/template_include-1_7.quickbook
new file mode 100644
index 000000000..19f58fab0
--- /dev/null
+++ b/tools/quickbook/test/include/template_include-1_7.quickbook
@@ -0,0 +1,8 @@
+[article Template include test
+[quickbook 1.7]
+]
+
+[template include_foo[name] [include [name].quickbook]]
+
+[include_foo include-id-inc1]
+[include_foo source_mode-inc2]
diff --git a/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook b/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook
new file mode 100644
index 000000000..fa7e8e337
--- /dev/null
+++ b/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include .\\\/empty-inc.quickbook]
diff --git a/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook b/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook
new file mode 100644
index 000000000..4f2672840
--- /dev/null
+++ b/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include .\\\\empty-inc.quickbook]
diff --git a/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook b/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook
new file mode 100644
index 000000000..5c99c1143
--- /dev/null
+++ b/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include empty\[-/\]inc.quickbook]
diff --git a/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook b/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook
new file mode 100644
index 000000000..79a9df667
--- /dev/null
+++ b/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Unicode glob
+[quickbook 1.7]
+]
+
+[include £*.quickbook]
diff --git a/tools/quickbook/test/link-1_1.gold b/tools/quickbook/test/link-1_1.gold
index 70fd440f1..955fdec76 100644
--- a/tools/quickbook/test/link-1_1.gold
+++ b/tools/quickbook/test/link-1_1.gold
@@ -31,4 +31,15 @@
as well.
</para>
</section>
+ <section id="link_tests.escaping_links">
+ <title>Escaping links</title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
</article>
diff --git a/tools/quickbook/test/link-1_1.quickbook b/tools/quickbook/test/link-1_1.quickbook
index 2ddb0bf21..a22ce70f0 100644
--- a/tools/quickbook/test/link-1_1.quickbook
+++ b/tools/quickbook/test/link-1_1.quickbook
@@ -39,3 +39,10 @@ whitespace when they appear together as in [link x] [link y]. Also in [link x]
as well.
[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
+[endsect]
diff --git a/tools/quickbook/test/link-1_6.gold b/tools/quickbook/test/link-1_6.gold
index 05af56162..587b67be3 100644
--- a/tools/quickbook/test/link-1_6.gold
+++ b/tools/quickbook/test/link-1_6.gold
@@ -35,4 +35,15 @@
as well.
</para>
</section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
</article>
diff --git a/tools/quickbook/test/link-1_6.quickbook b/tools/quickbook/test/link-1_6.quickbook
index 28e99dbfd..c874a79c6 100644
--- a/tools/quickbook/test/link-1_6.quickbook
+++ b/tools/quickbook/test/link-1_6.quickbook
@@ -43,3 +43,10 @@ whitespace when they appear together as in [link x] [link y]. Also in [link x]
as well.
[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
+[endsect]
diff --git a/tools/quickbook/test/link-1_7-fail.quickbook b/tools/quickbook/test/link-1_7-fail.quickbook
new file mode 100644
index 000000000..9f2db1fb1
--- /dev/null
+++ b/tools/quickbook/test/link-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Link fail test
+[quickbook 1.7]
+]
+
+[link something [table]]
diff --git a/tools/quickbook/test/link-1_7-fail2.quickbook b/tools/quickbook/test/link-1_7-fail2.quickbook
new file mode 100644
index 000000000..30ac49570
--- /dev/null
+++ b/tools/quickbook/test/link-1_7-fail2.quickbook
@@ -0,0 +1,6 @@
+[article Link fail test
+[quickbook 1.7]
+]
+
+[/ Escapes aren't allowed in links.]
+[link '''escaped stuff''']
diff --git a/tools/quickbook/test/link-1_7.gold b/tools/quickbook/test/link-1_7.gold
index f3eec12e7..c2e5f0398 100644
--- a/tools/quickbook/test/link-1_7.gold
+++ b/tools/quickbook/test/link-1_7.gold
@@ -21,9 +21,6 @@
<para>
<link linkend="link">description</link>
</para>
- <para>
- <link linkend="link[Hello]">description</link>
- </para>
</section>
<section id="link_tests.side_by_side_links">
<title><link linkend="link_tests.side_by_side_links">Side-by-side links</link></title>
@@ -40,5 +37,20 @@
<para>
<link linkend="blah.x2">Templated link?</link>
</para>
+ <para>
+ <link linkend="something-one-two">something-one-two</link> <link linkend="something-one-two">something-one-two</link>
+ <link linkend="something-one-two">something-one-two</link>
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
</section>
</article>
diff --git a/tools/quickbook/test/link-1_7.quickbook b/tools/quickbook/test/link-1_7.quickbook
index 8e146b970..acfba3188 100644
--- a/tools/quickbook/test/link-1_7.quickbook
+++ b/tools/quickbook/test/link-1_7.quickbook
@@ -28,9 +28,6 @@
[link link[/ comment]description]
-[link link\[Hello\] description]
-
-
[endsect]
[section Side-by-side links]
@@ -49,4 +46,16 @@ as well.
[template thing[]x]
[link blah.[thing]2 Templated link?]
+[template link_in_template[x y] [link something-[x]-[y]]]
+[link_in_template one two]
+[link_in_template one..two]
+[link_in_template one .. two ]
+
+[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
[endsect]
diff --git a/tools/quickbook/test/list_test-1_6-fail.quickbook b/tools/quickbook/test/list_test-1_6-fail.quickbook
new file mode 100644
index 000000000..7ca8a9399
--- /dev/null
+++ b/tools/quickbook/test/list_test-1_6-fail.quickbook
@@ -0,0 +1,46 @@
+[article List Test
+[quickbook 1.6]
+]
+
+Markup in list:
+
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
+
+[section Paragraphs in list items]
+
+* A1
+
+ A2
+
+* B1
+ * C1
+
+ C2
+
+ B2
+
+* D1
+ * E1
+
+ E2
+
+ E3
+
+ D2
+
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+[endsect]
diff --git a/tools/quickbook/test/list_test-1_6.gold b/tools/quickbook/test/list_test-1_6.gold
index f0055257a..b6d3775a6 100644
--- a/tools/quickbook/test/list_test-1_6.gold
+++ b/tools/quickbook/test/list_test-1_6.gold
@@ -310,40 +310,51 @@
</simpara>
</listitem>
<listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
<simpara>
- <informaltable frame="all">
- <tgroup cols="1">
- <thead>
- <row>
- <entry>
- <para>
- Heading
- </para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>
- Cell
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ Some text.
</simpara>
</listitem>
<listitem>
<simpara>
- <bridgehead renderas="sect2" id="list_test.h0">
- <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
- heading for a list item</link>
- </bridgehead>
- <para>
- The content of the list item.
- </para>
+ [section Doesn't expand] Blah, blah. [endsect]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 1.
+ </simpara>
+ <simpara>
+ Paragraph cheat 2.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 3.
+ </simpara>
+ <simpara>
+ Paragraph cheat 4.
</simpara>
</listitem>
</itemizedlist>
@@ -426,99 +437,12 @@
<itemizedlist>
<listitem>
<simpara>
- One
- </simpara>
- </listitem>
- </itemizedlist>
- <section id="list_test.list_immediately_following_mark0.nested_section">
- <title><link linkend="list_test.list_immediately_following_mark0.nested_section">Nested
- section</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- Two
- </simpara>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- <section id="list_test.paragraphs_in_list_items">
- <title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
- items</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- A1
- <para>
- A2
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- B1
- <itemizedlist>
- <listitem>
- <simpara>
- C1
- <para>
- C2
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- B2
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- D1
- <itemizedlist>
- <listitem>
- <simpara>
- E1
- <para>
- E2
- </para>
- <para>
- E3
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- D2
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- </section>
- <section id="list_test.indented_code_blocks_in_lists">
- <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
- blocks in lists</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- A
-<programlisting><phrase role="identifier">B</phrase>
-</programlisting>
- <para>
- C
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- D
-<programlisting><phrase role="identifier">E</phrase>
-</programlisting>
+ One [section Nested section]
</simpara>
</listitem>
<listitem>
<simpara>
- F
+ Two [endsect]
</simpara>
</listitem>
</itemizedlist>
diff --git a/tools/quickbook/test/list_test-1_6.quickbook b/tools/quickbook/test/list_test-1_6.quickbook
index dbba74258..fe1e18756 100644
--- a/tools/quickbook/test/list_test-1_6.quickbook
+++ b/tools/quickbook/test/list_test-1_6.quickbook
@@ -74,9 +74,17 @@ Markup in list:
* ["Quoted]
* [footnote Footnote]
* [table [[Heading]][[Cell]]]
-* [heading The heading for a list item]
-
- The content of the list item.
+ Some text.
+* [section Doesn't expand]
+ Blah, blah.
+ [endsect]
+
+* Paragraph cheat 1.
+ [block]
+ Paragraph cheat 2.
+* Paragraph cheat 3.
+ [block]
+ Paragraph cheat 4.
Don't end list with comment 1:
@@ -108,40 +116,5 @@ Don't end list with comment 2:
[section Nested section]
* Two
[endsect]
-[endsect]
-
-[section Paragraphs in list items]
-
-* A1
-
- A2
-
-* B1
- * C1
-
- C2
-
- B2
-
-* D1
- * E1
-
- E2
-
- E3
-
- D2
-
-[endsect]
-
-[section Indented code blocks in lists]
-
-* A
-
- B
- C
-* D
- E
-* F
[endsect]
diff --git a/tools/quickbook/test/list_test-1_7-fail1.quickbook b/tools/quickbook/test/list_test-1_7-fail1.quickbook
new file mode 100644
index 000000000..c8beed1c5
--- /dev/null
+++ b/tools/quickbook/test/list_test-1_7-fail1.quickbook
@@ -0,0 +1,9 @@
+[article List Fail Test 1
+[quickbook 1.7]
+]
+
+[section List immediately following markup]
+* One
+* Two
+* Three
+[endsect]
diff --git a/tools/quickbook/test/list_test-1_7.gold b/tools/quickbook/test/list_test-1_7.gold
new file mode 100644
index 000000000..dec074c74
--- /dev/null
+++ b/tools/quickbook/test/list_test-1_7.gold
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <bridgehead renderas="sect2" id="list_test.h0">
+ <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
+ heading for a list item</link>
+ </bridgehead>
+ <simpara>
+ The content of the list item.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.paragraphs_in_list_items">
+ <title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
+ items</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ E1
+ </simpara>
+ <simpara>
+ E2
+ </simpara>
+ <simpara>
+ E3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ D2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.indented_code_blocks_in_lists">
+ <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
+ blocks in lists</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+<programlisting><phrase role="identifier">B</phrase>
+</programlisting>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+<programlisting><phrase role="identifier">E</phrase>
+</programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/tools/quickbook/test/list_test-1_7.quickbook b/tools/quickbook/test/list_test-1_7.quickbook
new file mode 100644
index 000000000..8eac6a718
--- /dev/null
+++ b/tools/quickbook/test/list_test-1_7.quickbook
@@ -0,0 +1,134 @@
+[article List Test
+[quickbook 1.7]
+]
+
+Simple list:
+
+* A
+* B
+
+Simple list:
+
+#A
+#B
+
+Two level list:
+
+* A
+ * A
+ * B
+* B
+ * A
+ * B
+
+Two level list:
+
+# A
+ * A
+ * B
+# B
+ * A
+ * B
+
+Three level list:
+
+# A
+ * A
+ * B
+ * C
+ * D
+ * E
+ * F
+ * G
+ * H
+
+Three level list:
+
+# A
+ * A
+ * B
+ # C
+ # D
+# G
+# H
+
+Inconsistent Indentation:
+
+* A1
+ * B1
+ * B2
+ * C1
+ * C2
+ * B3
+ * B4
+ * B5
+ * C3
+ * B6
+ * A2
+* A3
+
+Markup in list:
+
+* *Bold*
+* [*Bold]
+* ["Quoted]
+* [footnote Footnote]
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
+
+Don't end list with comment 1:
+
+* A1
+* A2
+
+[/ End list?]
+* A3
+* A4
+
+Don't end list with comment 2:
+
+* A1
+ * B1
+
+[/ End list?]
+ * B2
+ * B3
+
+[section Paragraphs in list items]
+
+* A1
+
+ A2
+
+* B1
+ * C1
+
+ C2
+
+ B2
+
+* D1
+ * E1
+
+ E2
+
+ E3
+
+ D2
+
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+
+[endsect]
diff --git a/tools/quickbook/test/mismatched_brackets3-1_1.gold b/tools/quickbook/test/mismatched_brackets3-1_1.gold
new file mode 100644
index 000000000..a7ab11e83
--- /dev/null
+++ b/tools/quickbook/test/mismatched_brackets3-1_1.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <section id="mismatched_brackets.something">
+ <title>Something</title>
+ </section>
+ <para>
+ ]
+ </para>
+</article>
diff --git a/tools/quickbook/test/mismatched_brackets3-1_1.quickbook b/tools/quickbook/test/mismatched_brackets3-1_1.quickbook
new file mode 100644
index 000000000..dadd42692
--- /dev/null
+++ b/tools/quickbook/test/mismatched_brackets3-1_1.quickbook
@@ -0,0 +1,6 @@
+[article Mismatched brackets]
+
+[section Something]
+
+[endsect]
+]
diff --git a/tools/quickbook/test/python/include_glob.qbk b/tools/quickbook/test/python/include_glob.qbk
new file mode 100644
index 000000000..6e1f5248a
--- /dev/null
+++ b/tools/quickbook/test/python/include_glob.qbk
@@ -0,0 +1,11 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ 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)
+]
+
+[quickbook 1.7]
+[article Include Path]
+[include ?.qbk]
diff --git a/tools/quickbook/test/python/include_glob_deps.txt b/tools/quickbook/test/python/include_glob_deps.txt
new file mode 100644
index 000000000..82fb66e68
--- /dev/null
+++ b/tools/quickbook/test/python/include_glob_deps.txt
@@ -0,0 +1,6 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+include_glob.qbk
+sub1/a.qbk
+sub2/b.qbk
diff --git a/tools/quickbook/test/python/include_glob_locs.txt b/tools/quickbook/test/python/include_glob_locs.txt
new file mode 100644
index 000000000..ccab607e0
--- /dev/null
+++ b/tools/quickbook/test/python/include_glob_locs.txt
@@ -0,0 +1,9 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++ include_glob.qbk
+g ?.qbk
+g sub1/?.qbk
++ sub1/a.qbk
+g sub2/?.qbk
++ sub2/b.qbk
diff --git a/tools/quickbook/test/python/output-deps.py b/tools/quickbook/test/python/output-deps.py
index 159b6c95d..875a808db 100644
--- a/tools/quickbook/test/python/output-deps.py
+++ b/tools/quickbook/test/python/output-deps.py
@@ -24,6 +24,10 @@ def main(args, directory):
deps_gold = 'include_path_deps.txt',
locations_gold = 'include_path_locs.txt',
input_path = ['sub1', 'sub2'])
+ failures += run_quickbook(quickbook_command, 'include_glob.qbk',
+ deps_gold = 'include_glob_deps.txt',
+ locations_gold = 'include_glob_locs.txt',
+ input_path = ['sub1', 'sub2'])
if failures == 0:
print "Success"
@@ -123,22 +127,34 @@ def load_dependencies(filename, adjust_paths = False):
return dependencies
def load_locations(filename, adjust_paths = False):
- line_matcher = re.compile("^([+-]) (.*)$")
+ line_matcher = re.compile("^([+-g]) (.*)$")
dependencies = {}
f = open(filename, 'r')
+ glob = None
+ globs = {}
for line in f:
if line[0] == '#': continue
m = line_matcher.match(line)
- if not m:
- raise Exception("Invalid dependency file: %1s" % filename)
- found = m.group(1) == '+'
+
path = m.group(2)
if adjust_paths:
path = os.path.realpath(path)
- if path in dependencies:
- raise Exception("Duplicate path (%1s) in %2s" % (path, filename))
- dependencies[path] = found
- return dependencies
+
+ if not m:
+ raise Exception("Invalid dependency file: %1s" % filename)
+ if m.group(1) == 'g':
+ globs[path] = []
+ glob = path
+ elif glob:
+ if m.group(1) != '+':
+ raise Exception("Negative match in glob.")
+ globs[glob].append(path)
+ else:
+ found = m.group(1) == '+'
+ if path in dependencies:
+ raise Exception("Duplicate path (%1s) in %2s" % (path, filename))
+ dependencies[path] = found
+ return { 'dependencies': dependencies, 'globs': globs }
def temp_filename(extension):
file = tempfile.mkstemp(suffix = extension)
diff --git a/tools/quickbook/test/role-1_7-fail.quickbook b/tools/quickbook/test/role-1_7-fail.quickbook
new file mode 100644
index 000000000..b01d16e23
--- /dev/null
+++ b/tools/quickbook/test/role-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Quickbook Role Fail Test
+[quickbook 1.7]
+]
+
+[role]
diff --git a/tools/quickbook/test/role-1_7.gold b/tools/quickbook/test/role-1_7.gold
new file mode 100644
index 000000000..4cd7d5bb7
--- /dev/null
+++ b/tools/quickbook/test/role-1_7.gold
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook Role Test</title>
+ <para>
+ <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase>
+ </para>
+ <para>
+ road <phrase role="red">Red</phrase> <phrase role="red"></phrase> <phrase role="three-colours-red">Three
+ Colours Red</phrase> <phrase role="red-road">Red Road</phrase>
+ </para>
+</article>
diff --git a/tools/quickbook/test/role-1_7.quickbook b/tools/quickbook/test/role-1_7.quickbook
new file mode 100644
index 000000000..17bf44952
--- /dev/null
+++ b/tools/quickbook/test/role-1_7.quickbook
@@ -0,0 +1,13 @@
+[article Quickbook Role Test
+[quickbook 1.7]
+]
+
+[role keyword Keyword] [role keyword]
+
+[template r red]
+[template r2 road]
+[r2]
+[role [r] Red] [role [r]]
+[role three-colours-[r] Three Colours Red]
+[role [r]-[r2] Red Road]
+
diff --git a/tools/quickbook/test/section-1_7.gold b/tools/quickbook/test/section-1_7.gold
new file mode 100644
index 000000000..33c67675a
--- /dev/null
+++ b/tools/quickbook/test/section-1_7.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.7</title>
+ <section id="section_id_1_7.quickbook_section_no_id_test">
+ <title><link linkend="section_id_1_7.quickbook_section_no_id_test">Quickbook
+ section no id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test1">
+ <title><link linkend="section_id_1_7.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test2">
+ <title><link linkend="section_id_1_7.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test3_quickbook_section_id_te">
+ <title><link linkend="section_id_1_7.id_test3_quickbook_section_id_te">id_test3
+ Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.--">
+ <title><link linkend="section_id_1_7.--">Quickbook section odd id test</link></title>
+ </section>
+ <section id="section_id_1_7.sect-abc">
+ <title><link linkend="section_id_1_7.sect-abc">Section with template in id</link></title>
+ </section>
+</article>
diff --git a/tools/quickbook/test/section-1_7.quickbook b/tools/quickbook/test/section-1_7.quickbook
new file mode 100644
index 000000000..925e34b2c
--- /dev/null
+++ b/tools/quickbook/test/section-1_7.quickbook
@@ -0,0 +1,18 @@
+[article Section Id 1.7
+ [quickbook 1.7]
+]
+
+[section Quickbook section no id test]
+[endsect]
+[section:id_test1 Quickbook section id test]
+[endsect]
+[section :id_test2 Quickbook section id test]
+[endsect]
+[section: id_test3 Quickbook section id test]
+[endsect]
+[section:-- Quickbook section odd id test]
+[endsect]
+
+[template thing[] abc]
+[section:sect-[thing] Section with template in id]
+[endsect]
diff --git a/tools/quickbook/test/snippets/Jamfile.v2 b/tools/quickbook/test/snippets/Jamfile.v2
index 4dfd0d0e8..6765dff9e 100644
--- a/tools/quickbook/test/snippets/Jamfile.v2
+++ b/tools/quickbook/test/snippets/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project quickook/tests/snippets ;
+project quickbook/test/snippets ;
import quickbook-testing : quickbook-test quickbook-error-test ;
diff --git a/tools/quickbook/test/source_mode-1_7.gold b/tools/quickbook/test/source_mode-1_7.gold
index e40bae860..2cc454a6d 100644
--- a/tools/quickbook/test/source_mode-1_7.gold
+++ b/tools/quickbook/test/source_mode-1_7.gold
@@ -26,7 +26,14 @@
<itemizedlist>
<listitem>
<simpara>
- Sadly this doesn't work.
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
</simpara>
</listitem>
<listitem>
@@ -35,4 +42,22 @@
</simpara>
</listitem>
</itemizedlist>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code> and <code><phrase
+ role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{}</phrase></code> should both be C++ highlighted. <code>int
+ main() {}</code> shouldn't be, but <code><phrase role="keyword">int</phrase>
+ <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
+ role="special">{}</phrase></code> should.
+ </para>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>. Not highlighted:
+ <code>int main() {}</code>.
+ </para>
+ <section id="source_mode_test.cpp">
+ <title><link linkend="source_mode_test.cpp">C++ section</link></title>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </section>
</article>
diff --git a/tools/quickbook/test/source_mode-1_7.quickbook b/tools/quickbook/test/source_mode-1_7.quickbook
index f5b9ee37f..9388867c8 100644
--- a/tools/quickbook/test/source_mode-1_7.quickbook
+++ b/tools/quickbook/test/source_mode-1_7.quickbook
@@ -8,5 +8,17 @@
[!c++]`int main() {}` but `plain text`.
[!c++]
-* Sadly this doesn't work.
* `int main() {}`
+* `int main() {}`
+* [teletype] `int main() {}` [/ shouldn't be highlighted]
+
+[!c++]
+`int main() {}` and `int main() {}` should both be C++ highlighted.
+[!teletype]`int main() {}` shouldn't be, but `int main() {}` should.
+
+[!c++] `int main() {}`. Not highlighted: `int main() {}`.
+
+[!c++]
+[section:cpp C++ section]
+``int main() {}``
+[endsect]
diff --git a/tools/quickbook/test/table-1_7.gold b/tools/quickbook/test/table-1_7.gold
new file mode 100644
index 000000000..6b8eafabf
--- /dev/null
+++ b/tools/quickbook/test/table-1_7.gold
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.7</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.-table5-">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title_on_multiple_lines_with_bol">
+ <title>Title on multiple lines with <emphasis role="bold">bold</emphasis> text?</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a_b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Row 2. Cell 1.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ <entry>
+ <para>
+ Row 2. Cell 2.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.id123">
+ <title>Table with template id</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/tools/quickbook/test/table-1_7.quickbook b/tools/quickbook/test/table-1_7.quickbook
new file mode 100644
index 000000000..84d68f71d
--- /dev/null
+++ b/tools/quickbook/test/table-1_7.quickbook
@@ -0,0 +1,151 @@
+[article Table 1.7
+ [quickbook 1.7]
+ [id table_tests]
+]
+
+[table:table1 Table 1 [[Heading]][[cell]]]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[table:table4
+ [[Heading]]
+ [[cell]]
+]
+
+[table:-table5-
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[table Title on multiple
+ lines with *bold* text?
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[section:section1 Section 1]
+
+[table:table1 Table 1
+ [[Heading]]
+ [[cell]]
+]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+ [
+ [
+Row 2. Cell 1.
+
+* Row 2. Cell 1. List item 1.
+* Row 2. Cell 1. List item 2.
+ ]
+ [
+ Row 2. Cell 2.
+
+ * Row 2. Cell 2. List item 1.
+ * Row 2. Cell 2. List item 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[template id_value[] id123]
+[table:[id_value] Table with template id]
+
+[endsect]
diff --git a/tools/quickbook/test/templates-1_3.gold b/tools/quickbook/test/templates-1_3.gold
index c53fef1e6..ed3668fda 100644
--- a/tools/quickbook/test/templates-1_3.gold
+++ b/tools/quickbook/test/templates-1_3.gold
@@ -167,25 +167,26 @@
</simpara>
</listitem>
<listitem>
- <simpara>
- <para/>
- </simpara>
+ <para/>
</listitem>
<listitem>
- <simpara>
<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
- </simpara>
</listitem>
<listitem>
<simpara>
- <para>
- Paragraphs 1
- </para>
- <para>
- Paragraphs 2
- </para>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
</simpara>
</listitem>
</itemizedlist>
</section>
+ <section id="templates.escaped_templates">
+ <title><link linkend="templates.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
</article>
diff --git a/tools/quickbook/test/templates-1_3.quickbook b/tools/quickbook/test/templates-1_3.quickbook
index 457cd157d..a6d434878 100644
--- a/tools/quickbook/test/templates-1_3.quickbook
+++ b/tools/quickbook/test/templates-1_3.quickbook
@@ -198,3 +198,19 @@ Paragraphs 2
* [paragraphs]
[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/tools/quickbook/test/templates-1_4.gold b/tools/quickbook/test/templates-1_4.gold
index 72e33e0bf..40c244369 100644
--- a/tools/quickbook/test/templates-1_4.gold
+++ b/tools/quickbook/test/templates-1_4.gold
@@ -18,4 +18,11 @@
<para>
{1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
</para>
+ <section id="template_1_4.escaped_templates">
+ <title><link linkend="template_1_4.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
</article>
diff --git a/tools/quickbook/test/templates-1_4.quickbook b/tools/quickbook/test/templates-1_4.quickbook
index fc808554e..3fb893748 100644
--- a/tools/quickbook/test/templates-1_4.quickbook
+++ b/tools/quickbook/test/templates-1_4.quickbook
@@ -34,4 +34,20 @@
[ternary 1 2 3] [/ {1-2-3} ]
[ternary 1..2 3 4] [/ {1-2-3 4} ]
[ternary 1 2..3 4] [/ {1 2-3-4} ]
-[ternary [1..2..3] [/ {(1-2-3} (but with a square bracket) ] \ No newline at end of file
+[ternary [1..2..3] [/ {(1-2-3} (but with a square bracket) ]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/tools/quickbook/test/templates-1_5.gold b/tools/quickbook/test/templates-1_5.gold
index bb05aaca9..9577f1a91 100644
--- a/tools/quickbook/test/templates-1_5.gold
+++ b/tools/quickbook/test/templates-1_5.gold
@@ -3,40 +3,237 @@
<article id="template_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Template 1.5</title>
- <para>
- static scoping
- </para>
- <para>
- [a]
- </para>
- <para>
- new
- </para>
- <para>
- foo foo
- </para>
- <para>
- {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
- </para>
- <para>
- { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
- </para>
- <para>
- {[1-2] 3} {[1-2] 3} {[1-2}
- </para>
- <para>
- {1-2-3} {1-2-3}
- </para>
- <para>
- Some <emphasis role="bold">text</emphasis>
- </para>
- <para>
- A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
- </para>
- <para>
- Some *text* A <emphasis>paragraph</emphasis>.
- </para>
- <para>
- <index type="things"><title>Things</title></index>
- </para>
+ <section id="template_1_5.templates">
+ <title><link linkend="template_1_5.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_5.empty_templates">
+ <title><link linkend="template_1_5.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_5.nested_templates">
+ <title><link linkend="template_1_5.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_5.block_markup">
+ <title><link linkend="template_1_5.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_5.static_scoping">
+ <title><link linkend="template_1_5.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_5.template_arguments">
+ <title><link linkend="template_1_5.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_5.block_and_phrase_templates">
+ <title><link linkend="template_1_5.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_5.escaped_templates">
+ <title><link linkend="template_1_5.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
</article>
diff --git a/tools/quickbook/test/templates-1_5.quickbook b/tools/quickbook/test/templates-1_5.quickbook
index 038b8b3f0..55ec031fd 100644
--- a/tools/quickbook/test/templates-1_5.quickbook
+++ b/tools/quickbook/test/templates-1_5.quickbook
@@ -2,12 +2,211 @@
[quickbook 1.5]
]
-[/ 1.5 uses static scoping ]
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+
+[!baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase[content] Start phrase template. [content] End phrase template.]
+
+Pre [block [block Hello!]] Post
+
+Pre [block [phrase Hello!]] Post
+
+Pre [phrase [block Hello!]] Post
+
+Pre [phrase [phrase Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
[template x static scoping]
-[template foo1[] [x]]
-[template foo2[x] [foo1]]
-[foo2 dynamic scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
[/ This should be '[a]' because [a] isn't matched. ]
[template test1[] [a]]
@@ -17,8 +216,8 @@
[/ In 1.5 template arguments are scoped at the point they are defined]
[template y new]
-[template foo3[a y] [a]]
-[foo3 [y] old]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
@@ -27,7 +226,11 @@
[template echo_twice[x] [echo [same [x]]..[same [x]]]]
[echo_twice foo]
-[/ 1.5 template arguments]
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
[template binary[x y] {[x]-[y]}]
[binary 1..2] [/ {1-2} ]
@@ -50,18 +253,22 @@
[ternary 1..2..3] [/ {1-2-3} ]
[ternary 1 2 3] [/ {1-2-3} ]
-[/ Block vs. phrase templates ]
+[endsect]
-[template phrase[] Some *text*]
-[template block[]
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
A <emphasis>paragraph</emphasis>.
]
-[phrase]
-[block]
-[`phrase]
-[`block]
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
[/ Trailing newline shouldn't be included]
@@ -69,4 +276,22 @@ A <emphasis>paragraph</emphasis>.
'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
]
-[named_index things Things] \ No newline at end of file
+[named_index things Things]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/tools/quickbook/test/templates-1_6-fail1.quickbook b/tools/quickbook/test/templates-1_6-fail1.quickbook
new file mode 100644
index 000000000..0fd039b1e
--- /dev/null
+++ b/tools/quickbook/test/templates-1_6-fail1.quickbook
@@ -0,0 +1,8 @@
+[article Template 1.6 fail 1
+ [quickbook 1.6]
+]
+
+[/ I've removed support for escaping punctuation templates in 1.6. ]
+
+[template ~ body]
+[`~]
diff --git a/tools/quickbook/test/templates-1_6.gold b/tools/quickbook/test/templates-1_6.gold
new file mode 100644
index 000000000..b37604e75
--- /dev/null
+++ b/tools/quickbook/test/templates-1_6.gold
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.6</title>
+ <section id="template_1_6.templates">
+ <title><link linkend="template_1_6.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_6.empty_templates">
+ <title><link linkend="template_1_6.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_6.nested_templates">
+ <title><link linkend="template_1_6.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_6.block_markup">
+ <title><link linkend="template_1_6.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_6.static_scoping">
+ <title><link linkend="template_1_6.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_6.template_arguments">
+ <title><link linkend="template_1_6.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_6.block_and_phrase_templates">
+ <title><link linkend="template_1_6.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_6.template_body">
+ <title><link linkend="template_1_6.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_6.escaped_templates">
+ <title><link linkend="template_1_6.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/tools/quickbook/test/templates-1_6.quickbook b/tools/quickbook/test/templates-1_6.quickbook
new file mode 100644
index 000000000..627bd7fd8
--- /dev/null
+++ b/tools/quickbook/test/templates-1_6.quickbook
@@ -0,0 +1,313 @@
+[article Template 1.6
+ [quickbook 1.6]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+
+[!baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block_foo[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase_foo[content] Start phrase template. [content] End phrase template.]
+
+Pre [block_foo [block_foo Hello!]] Post
+
+Pre [block_foo [phrase_foo Hello!]] Post
+
+Pre [phrase_foo [block_foo Hello!]] Post
+
+Pre [phrase_foo [phrase_foo Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
+
+[template x static scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
+
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
+[/ In 1.5 template arguments are scoped at the point they are defined]
+
+[template y new]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
+
+[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
+
+[template same[x] [x]]
+[template echo[a b] [a] [b]]
+[template echo_twice[x] [echo [same [x]]..[same [x]]]]
+[echo_twice foo]
+
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
+
+[binary \[1 2\] 3] [/ {[1-2] 3} ]
+[binary \[1..2\] 3] [/ {[1-2] 3} ]
+[binary \[1 2] [/ {(1-2} ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+
+[endsect]
+
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
+
+A <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[endsect]
+
+[/-------------------------------- Skipping template body ]
+
+[section:template_body Skipping the template body correctly]
+
+[template args1[x] [`x]]
+[template args2[]
+[ordered_list [``code``]]
+]
+[/ Due to a bug in the template parser need to stop the parser
+ thinking that the code is an escaped template. ]
+[template args3[]
+[ordered_list [\ `code`]]
+]
+
+[args1 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[endsect]
diff --git a/tools/quickbook/test/templates-1_7-fail1.quickbook b/tools/quickbook/test/templates-1_7-fail1.quickbook
new file mode 100644
index 000000000..0618bebb9
--- /dev/null
+++ b/tools/quickbook/test/templates-1_7-fail1.quickbook
@@ -0,0 +1,12 @@
+[article Template 1.7 fail
+[quickbook 1.7]
+]
+
+[/ This should fail because it's a phrase template containing a paragraph
+ separator. ]
+
+[template fail[] Phrase content.
+
+Paragraph content.]
+
+[fail]
diff --git a/tools/quickbook/test/templates-1_7-fail2.quickbook b/tools/quickbook/test/templates-1_7-fail2.quickbook
new file mode 100644
index 000000000..548884b16
--- /dev/null
+++ b/tools/quickbook/test/templates-1_7-fail2.quickbook
@@ -0,0 +1,11 @@
+[article Template 1.7 fail
+[quickbook 1.7]
+]
+
+[/ This should fail because it's a block template called from an attribute ]
+
+[template fail[]
+
+Block template.]
+
+[link this-should-[fail]]
diff --git a/tools/quickbook/test/templates-1_7.gold b/tools/quickbook/test/templates-1_7.gold
new file mode 100644
index 000000000..c7d4c64e0
--- /dev/null
+++ b/tools/quickbook/test/templates-1_7.gold
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.7</title>
+ <section id="template_1_7.templates">
+ <title><link linkend="template_1_7.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_7.empty_templates">
+ <title><link linkend="template_1_7.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_7.nested_templates">
+ <title><link linkend="template_1_7.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template. Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_7.block_markup">
+ <title><link linkend="template_1_7.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_7.static_scoping">
+ <title><link linkend="template_1_7.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_7.template_arguments">
+ <title><link linkend="template_1_7.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_7.block_and_phrase_templates">
+ <title><link linkend="template_1_7.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text2 afterwards. Text3 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 afterwards.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ </section>
+ <section id="template_1_7.template_body">
+ <title><link linkend="template_1_7.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_7.escaped_templates">
+ <title><link linkend="template_1_7.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/tools/quickbook/test/templates-1_7.quickbook b/tools/quickbook/test/templates-1_7.quickbook
new file mode 100644
index 000000000..bf1feaca2
--- /dev/null
+++ b/tools/quickbook/test/templates-1_7.quickbook
@@ -0,0 +1,322 @@
+[article Template 1.7
+ [quickbook 1.7]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template |[bar] '''<hey>'''[bar]'''</hey>''']
+
+[|baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block_foo[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase_foo[content] Start phrase template. [content] End phrase template.]
+
+Pre [block_foo [block_foo Hello!]] Post
+
+Pre [block_foo [phrase_foo Hello!]] Post
+
+Pre [phrase_foo [block_foo Hello!]] Post
+
+Pre [phrase_foo [phrase_foo Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
+
+[template x static scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
+
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
+[/ In 1.5 template arguments are scoped at the point they are defined]
+
+[template y new]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
+
+[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
+
+[template same[x] [x]]
+[template echo[a b] [a] [b]]
+[template echo_twice[x] [echo [same [x]]..[same [x]]]]
+[echo_twice foo]
+
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
+
+[binary \[1 2\] 3] [/ {[1-2] 3} ]
+[binary \[1..2\] 3] [/ {[1-2] 3} ]
+[binary \[1 2] [/ {(1-2} ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+
+[endsect]
+
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
+
+A <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[/ Blocks in phrase templates ]
+
+[template phrase_block1[] [table]]
+[template phrase_block2[] [table] Text2 afterwards.]
+[template phrase_block3[] Text3 before. [table]]
+[template phrase_block4[] Text4 before. [table] Text4 afterwards.]
+[template phrase_block5[] [table] * Not a list.]
+[template phrase_block6[] [table]
+* Not a list.]
+
+[phrase_block1][phrase_block2][phrase_block3][phrase_block4]
+[phrase_block5][phrase_block6]
+
+[endsect]
+
+[/-------------------------------- Skipping template body ]
+
+[section:template_body Skipping the template body correctly]
+
+[template args1[x] [`x]]
+[template args2[] [ordered_list [``code``]]]
+[/ Due to a bug in the template parser need to stop the parser
+ thinking that the code is an escaped template. ]
+[template args3[] [ordered_list [\ `code`]]]
+
+[args1 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[endsect]
diff --git a/tools/quickbook/test/unit/Jamfile.v2 b/tools/quickbook/test/unit/Jamfile.v2
index 2dca66993..68262d65c 100644
--- a/tools/quickbook/test/unit/Jamfile.v2
+++ b/tools/quickbook/test/unit/Jamfile.v2
@@ -8,7 +8,7 @@
import testing ;
-project quickbook-unit-tests
+project quickbook/test/unit-tests
: requirements
<include>../../src
<warnings>all
@@ -23,6 +23,7 @@ project quickbook-unit-tests
run values_test.cpp ../../src/values.cpp ../../src/files.cpp ;
run post_process_test.cpp ../../src/post_process.cpp ;
run source_map_test.cpp ../../src/files.cpp ;
+run glob_test.cpp ../../src/glob.cpp ;
# Copied from spirit
run symbols_tests.cpp ;
diff --git a/tools/quickbook/test/unit/glob_test.cpp b/tools/quickbook/test/unit/glob_test.cpp
new file mode 100644
index 000000000..fa2578116
--- /dev/null
+++ b/tools/quickbook/test/unit/glob_test.cpp
@@ -0,0 +1,122 @@
+/*=============================================================================
+ Copyright (c) 2013 Daniel James
+
+ 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)
+=============================================================================*/
+
+#include "glob.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+void glob_tests() {
+ BOOST_TEST(quickbook::glob("", ""));
+
+ BOOST_TEST(!quickbook::glob("*", ""));
+ BOOST_TEST(quickbook::glob("*", "a"));
+ BOOST_TEST(quickbook::glob("*b", "b"));
+ BOOST_TEST(quickbook::glob("*b", "ab"));
+ BOOST_TEST(quickbook::glob("*b", "bab"));
+ BOOST_TEST(quickbook::glob("*b*", "b"));
+ BOOST_TEST(quickbook::glob("*b*", "ab"));
+ BOOST_TEST(quickbook::glob("*b*", "bc"));
+ BOOST_TEST(quickbook::glob("*b*", "abc"));
+ BOOST_TEST(!quickbook::glob("*b*", ""));
+ BOOST_TEST(!quickbook::glob("*b*", "a"));
+ BOOST_TEST(!quickbook::glob("*b*", "ac"));
+
+ BOOST_TEST(quickbook::glob("hello.txt", "hello.txt"));
+ BOOST_TEST(!quickbook::glob("world.txt", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("*world.txt", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("world.txt*", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("hello", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("*hello", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("hello*", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("*world*", "helloworld.txt"));
+
+ BOOST_TEST(quickbook::glob("?", "a"));
+ BOOST_TEST(!quickbook::glob("?", ""));
+ BOOST_TEST(!quickbook::glob("?", "ab"));
+ BOOST_TEST(quickbook::glob("a?", "ab"));
+ BOOST_TEST(quickbook::glob("?b", "ab"));
+ BOOST_TEST(quickbook::glob("?bc", "abc"));
+ BOOST_TEST(quickbook::glob("a?c", "abc"));
+ BOOST_TEST(quickbook::glob("ab?", "abc"));
+ BOOST_TEST(!quickbook::glob("?bc", "aac"));
+ BOOST_TEST(!quickbook::glob("a?c", "bbc"));
+ BOOST_TEST(!quickbook::glob("ab?", "abcd"));
+
+ BOOST_TEST(quickbook::glob("[a]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a]", "a"));
+ BOOST_TEST(!quickbook::glob("[b]", "a"));
+ BOOST_TEST(quickbook::glob("[^b]", "a"));
+ BOOST_TEST(quickbook::glob("[a-z]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a-z]", "a"));
+ BOOST_TEST(!quickbook::glob("[b-z]", "a"));
+ BOOST_TEST(quickbook::glob("[^b-z]", "a"));
+ BOOST_TEST(quickbook::glob("[-a]", "a"));
+ BOOST_TEST(quickbook::glob("[-a]", "-"));
+ BOOST_TEST(!quickbook::glob("[-a]", "b"));
+ BOOST_TEST(!quickbook::glob("[^-a]", "a"));
+ BOOST_TEST(!quickbook::glob("[^-a]", "-"));
+ BOOST_TEST(quickbook::glob("[^-a]", "b"));
+ BOOST_TEST(quickbook::glob("[a-]", "a"));
+ BOOST_TEST(quickbook::glob("[a-]", "-"));
+ BOOST_TEST(!quickbook::glob("[a-]", "b"));
+ BOOST_TEST(!quickbook::glob("[^a-]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a-]", "-"));
+ BOOST_TEST(quickbook::glob("[^a-]", "b"));
+ BOOST_TEST(quickbook::glob("[a-ce-f]", "a"));
+ BOOST_TEST(!quickbook::glob("[a-ce-f]", "d"));
+ BOOST_TEST(quickbook::glob("[a-ce-f]", "f"));
+ BOOST_TEST(!quickbook::glob("[a-ce-f]", "g"));
+ BOOST_TEST(!quickbook::glob("[^a-ce-f]", "a"));
+ BOOST_TEST(quickbook::glob("[^a-ce-f]", "d"));
+ BOOST_TEST(!quickbook::glob("[^a-ce-f]", "f"));
+ BOOST_TEST(quickbook::glob("[^a-ce-f]", "g"));
+ BOOST_TEST(!quickbook::glob("[b]", "a"));
+ BOOST_TEST(quickbook::glob("[a]bc", "abc"));
+ BOOST_TEST(quickbook::glob("a[b]c", "abc"));
+ BOOST_TEST(quickbook::glob("ab[c]", "abc"));
+ BOOST_TEST(quickbook::glob("a[a-c]c", "abc"));
+ BOOST_TEST(quickbook::glob("*[b]*", "abc"));
+ BOOST_TEST(quickbook::glob("[\\]]", "]"));
+ BOOST_TEST(!quickbook::glob("[^\\]]", "]"));
+
+ BOOST_TEST(quickbook::glob("b*ana", "banana"));
+ BOOST_TEST(quickbook::glob("1234*1234*1234", "123412341234"));
+ BOOST_TEST(!quickbook::glob("1234*1234*1234", "1234123341234"));
+ BOOST_TEST(quickbook::glob("1234*1234*1234", "123412312312341231231234"));
+ BOOST_TEST(!quickbook::glob("1234*1234*1234", "12341231231234123123123"));
+}
+
+void check_glob_tests()
+{
+ BOOST_TEST(!quickbook::check_glob(""));
+ BOOST_TEST(!quickbook::check_glob("file"));
+ BOOST_TEST(!quickbook::check_glob("file\\[\\]"));
+ BOOST_TEST(quickbook::check_glob("[x]"));
+ BOOST_TEST(quickbook::check_glob("abc[x]"));
+ BOOST_TEST(quickbook::check_glob("[x]abd"));
+ BOOST_TEST_THROWS(quickbook::check_glob("["), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[xyz"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("xyx["), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("abc]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("]def"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[[]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[]]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("**"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[/]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("\\"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("\\\\"), quickbook::glob_error);
+}
+
+int main()
+{
+ glob_tests();
+ check_glob_tests();
+
+ return boost::report_errors();
+}
diff --git a/tools/quickbook/test/versions/Jamfile.v2 b/tools/quickbook/test/versions/Jamfile.v2
index ccb46dc7b..dd185d587 100644
--- a/tools/quickbook/test/versions/Jamfile.v2
+++ b/tools/quickbook/test/versions/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project test/versions
+project quickbook/test/versions
: requirements
<toolset>msvc:<debug-symbols>off
;
diff --git a/tools/quickbook/test/xinclude/Jamfile.v2 b/tools/quickbook/test/xinclude/Jamfile.v2
index 2974e8608..fbc8981c4 100644
--- a/tools/quickbook/test/xinclude/Jamfile.v2
+++ b/tools/quickbook/test/xinclude/Jamfile.v2
@@ -6,7 +6,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
#
-project test/xinclude
+project quickbook/test/xinclude
: requirements
<toolset>msvc:<debug-symbols>off
;
diff --git a/tools/regression/build/Jamroot.jam b/tools/regression/build/Jamroot.jam
index e1abe768c..61eae7121 100644
--- a/tools/regression/build/Jamroot.jam
+++ b/tools/regression/build/Jamroot.jam
@@ -37,7 +37,7 @@ obj tiny_xml
:
<define>BOOST_ALL_NO_LIB=1
<define>_CRT_SECURE_NO_WARNINGS
- <use>/boost//headers
+ <implicit-dependency>/boost//headers
:
release
;
@@ -51,7 +51,7 @@ exe process_jam_log
:
<define>BOOST_ALL_NO_LIB=1
<define>_CRT_SECURE_NO_WARNINGS
- <use>/boost//headers
+ <implicit-dependency>/boost//headers
:
release
;
@@ -64,7 +64,7 @@ exe compiler_status
/boost/filesystem//boost_filesystem/<link>static
:
<define>BOOST_ALL_NO_LIB=1
- <use>/boost//headers
+ <implicit-dependency>/boost//headers
:
release
;
@@ -77,8 +77,25 @@ exe library_status
/boost/filesystem//boost_filesystem/<link>static
:
<define>BOOST_ALL_NO_LIB=1
- <use>/boost//headers
+ <implicit-dependency>/boost//headers
:
release
;
explicit library_status ;
+
+exe boost_report
+ :
+ [ glob report/*.cpp ]
+ /boost/filesystem//boost_filesystem/<link>static
+ /boost//filesystem/<link>static
+ /boost//date_time/<link>static
+ /boost//regex/<link>static
+ /boost//program_options/<link>static
+ /boost//iostreams/<link>static
+ :
+ <define>BOOST_ALL_NO_LIB=1
+ <implicit-dependency>/boost//headers
+ :
+ release
+ ;
+explicit boost_report ;
diff --git a/tools/regression/doc/index.html b/tools/regression/doc/index.html
index 799ba5df4..14775eb53 100644
--- a/tools/regression/doc/index.html
+++ b/tools/regression/doc/index.html
@@ -43,7 +43,7 @@
</ul>
<hr />
- <p>Revised $Date: 2010-06-26 05:30:09 -0700 (Sat, 26 Jun 2010) $</p>
+ <p>Revised $Date$</p>
<p>Copyright Beman Dawes 2003.</p>
diff --git a/tools/regression/doc/library_status.html b/tools/regression/doc/library_status.html
index 0b83ca44e..a8eb4827f 100644
--- a/tools/regression/doc/library_status.html
+++ b/tools/regression/doc/library_status.html
@@ -459,6 +459,6 @@
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or
http://www.boost.org/LICENSE_1_0.txt)</p>
- <p>Revised $Date: 2011-10-06 08:41:40 -0700 (Thu, 06 Oct 2011) $</p>
+ <p>Revised $Date$</p>
</body>
</html>
diff --git a/tools/regression/src/compiler_status.cpp b/tools/regression/src/compiler_status.cpp
index c4444bbcc..63f813445 100644
--- a/tools/regression/src/compiler_status.cpp
+++ b/tools/regression/src/compiler_status.cpp
@@ -34,7 +34,7 @@ namespace fs = boost::filesystem;
namespace xml = boost::tiny_xml;
#include <cstdlib> // for abort, exit
-#include <cctype> // for toupper
+#include <cctype> // for toupper, isdigit
#include <string>
#include <vector>
#include <set>
@@ -46,6 +46,15 @@ namespace xml = boost::tiny_xml;
#include <stdexcept>
#include <cassert>
+#include <stdio.h> // for popen, pclose
+#if defined(_MSC_VER)
+# define POPEN _popen
+# define PCLOSE _pclose
+#else
+# define POPEN popen
+# define PCLOSE pclose
+#endif
+
using std::string;
const string pass_msg( "Pass" );
@@ -107,15 +116,24 @@ namespace
string revision( const fs::path & boost_root )
{
string rev;
- fs::path entries( boost_root / ".svn" / "entries" );
- fs::ifstream entries_file( entries );
- if ( entries_file )
+ string command("cd ");
+ command += boost_root.string() + " & svn info";
+ FILE* fp = POPEN(command.c_str(), "r");
+ if (fp)
{
- std::getline( entries_file, rev );
- std::getline( entries_file, rev );
- std::getline( entries_file, rev );
- std::getline( entries_file, rev ); // revision number as a string
+ static const int line_max = 128;
+ char line[line_max];
+ while (fgets(line, line_max, fp) != NULL)
+ {
+ string ln(line);
+ if (ln.find("Revision: ") != string::npos)
+ {
+ for(auto itr = ln.begin()+10; itr != ln.end() && isdigit(*itr); ++itr)
+ rev += *itr;
+ }
+ }
}
+ std::cout << "Revision: " << rev << std::endl;
return rev;
}
diff --git a/tools/regression/src/library_status.cpp b/tools/regression/src/library_status.cpp
index 885dfdb17..3faa0f63c 100644
--- a/tools/regression/src/library_status.cpp
+++ b/tools/regression/src/library_status.cpp
@@ -1,6 +1,5 @@
// Generate Library Status HTML from jam regression test output -----------//
-// Copyright Robert Ramey 2012
// Copyright Bryce Lelbach 2011
// Copyright Beman Dawes 2002-2011.
@@ -170,18 +169,19 @@ namespace
// find_element ------------------------------------------------------------//
+ struct element_equal {
+ const string & m_name;
+ element_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::element_ptr & xep) const {
+ return xep.get()->name == m_name;
+ }
+ };
+
xml::element_list::const_iterator find_element(
const xml::element & root, const string & name
){
- struct element_equal {
- const string & m_name;
- element_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::element_ptr & xep) const {
- return xep.get()->name == m_name;
- }
- };
return std::find_if(
root.elements.begin(),
root.elements.end(),
@@ -202,19 +202,20 @@ namespace
// attribute_value ----------------------------------------------------------//
+ struct attribute_equal {
+ const string & m_name;
+ attribute_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::attribute & a) const {
+ return a.name == m_name;
+ }
+ };
+
const string & attribute_value(
const xml::element & element,
const string & attribute_name
){
- struct attribute_equal {
- const string & m_name;
- attribute_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::attribute & a) const {
- return a.name == m_name;
- }
- };
xml::attribute_list::const_iterator itr;
itr = std::find_if(
element.attributes.begin(),
@@ -368,6 +369,13 @@ namespace
return result;
}
+ struct has_fail_result {
+ //bool operator()(const boost::shared_ptr<const xml::element> e) const {
+ bool operator()(const xml::element_ptr & e) const {
+ return attribute_value(*e, "result") == "fail";
+ }
+ };
+
// do_cell ---------------------------------------------------------------//
bool do_cell(
const fs::path & target_dir,
@@ -389,8 +397,6 @@ namespace
return true;
}
- int anything_generated = 0;
-
string test_type( "unknown" );
bool always_show_run_output( false );
@@ -402,33 +408,15 @@ namespace
always_show_run_output
= attribute_value( db, "show-run-output" ) == "true";
- /*
- test_type = attribute_value( db, "test-type" );
- std::string test_type_base( test_type );
- if ( test_type_base.size() > 5 )
- {
- const string::size_type trailer = test_type_base.size() - 5;
- if ( test_type_base.substr( trailer ) == "_fail" )
- {
- test_type_base.erase( trailer );
- }
- }
- if ( test_type_base.size() > 4 )
- {
- const string::size_type trailer = test_type_base.size() - 4;
- if ( test_type_base.substr( trailer ) == "_pyd" )
- {
- test_type_base.erase( trailer );
- }
- }
-
- xml::element_list::const_iterator itr;
- itr = find_element( db, test_type_base );
- if(db.elements.end() == itr)
- return pass;
- */
- pass = (attribute_value( db, "result" ) != "fail");
+ // if we don't find any failures
+ // mark it as a pass
+ pass = (db.elements.end() == std::find_if(
+ db.elements.begin(),
+ db.elements.end(),
+ has_fail_result()
+ ));
+ int anything_generated = 0;
if (!no_links){
anything_generated =
generate_report(
@@ -483,7 +471,7 @@ namespace
){
bool retval = false;
if(node.is_leaf){
- retval = do_cell(
+ return do_cell(
dir_root,
lib_name,
test_name,
diff --git a/tools/regression/src/regression.py b/tools/regression/src/regression.py
index 5bda7c4f7..22bee2f9e 100644
--- a/tools/regression/src/regression.py
+++ b/tools/regression/src/regression.py
@@ -26,7 +26,7 @@ repo_path = {
'trunk' : 'trunk',
'release' : 'branches/release',
'build' : 'trunk/tools/build/v2',
- 'jam' : 'trunk/tools/build/v2/engine',
+ 'jam' : 'trunk/tools/build/engine',
'regression' : 'trunk/tools/regression',
'boost-build.jam'
: 'trunk/boost-build.jam'
@@ -373,7 +373,7 @@ class runner:
fn = os.path.join(d, "test_log.xml")
cd = os.getcwd()
try:
- os.chdir (os.path.join (self.boost_root, 'tools/build/v2/test'));
+ os.chdir (os.path.join (self.boost_root, 'tools/build/test'));
bjam_path = os.path.dirname (self.tool_path( self.bjam ))
self.log( "Using bjam binary in '%s'" % (bjam_path))
os.putenv('PATH', bjam_path + os.pathsep + os.environ['PATH'])
@@ -549,8 +549,8 @@ class runner:
raise
def command_show_revision(self):
- modified = '$Date: 2011-10-06 08:41:40 -0700 (Thu, 06 Oct 2011) $'
- revision = '$Revision: 74759 $'
+ modified = '$Date$'
+ revision = '$Revision$'
import re
re_keyword_value = re.compile( r'^\$\w+:\s+(.*)\s+\$$' )
diff --git a/tools/regression/src/run_tests.sh b/tools/regression/src/run_tests.sh
index 483cecfea..d4c82f7d6 100644
--- a/tools/regression/src/run_tests.sh
+++ b/tools/regression/src/run_tests.sh
@@ -75,7 +75,7 @@ exe_suffix=
# The location of the binary for running bjam. The default should work
# under most circumstances.
#
-bjam="$boost_root/tools/build/v2/engine/bin/bjam$exe_suffix"
+bjam="$boost_root/tools/build/engine/bin/bjam$exe_suffix"
#
# "process_jam_log", and "compiler_status" paths to built helper programs:
@@ -133,7 +133,7 @@ fi
# rebuild bjam if required:
#
echo building bjam:
-cd "$boost_root/tools/build/v2/engine" && \
+cd "$boost_root/tools/build/engine" && \
LOCATE_TARGET=bin sh ./build.sh
if test $? != 0 ; then
echo "bjam build failed."
diff --git a/tools/regression/test/test-cases/general/bjam.log b/tools/regression/test/test-cases/general/bjam.log
index 71013f745..a896470f2 100644
--- a/tools/regression/test/test-cases/general/bjam.log
+++ b/tools/regression/test/test-cases/general/bjam.log
@@ -46,7 +46,7 @@ MkDir1 ..\..\..\bin.v2\tools\regression\test\compile-fail~pass.test\msvc-7.1\deb
MkDir1 ..\..\..\bin.v2\tools\regression\test\compile-fail~pass.test\msvc-7.1\debug\link-static\threading-multi
compile-c-c++ ..\..\..\bin.v2\tools\regression\test\compile-fail~pass.test\msvc-7.1\debug\link-static\threading-multi\compile-fail~pass.obj
compile-fail~pass.cpp
-compile-fail~pass.cpp(9) : fatal error C1189: #error : example of a compile failure
+compile-fail~pass.cpp(9) : fatal error C1189: #error : example of a compile failure
(failed-as-expected) ..\..\..\bin.v2\tools\regression\test\compile-fail~pass.test\msvc-7.1\debug\link-static\threading-multi\compile-fail~pass.obj
**passed** ..\..\..\bin.v2\tools\regression\test\compile-fail~pass.test\msvc-7.1\debug\link-static\threading-multi\compile-fail~pass.test
MkDir1 ..\..\..\bin.v2\tools\regression\test\compile~fail.test
@@ -56,7 +56,7 @@ MkDir1 ..\..\..\bin.v2\tools\regression\test\compile~fail.test\msvc-7.1\debug\li
MkDir1 ..\..\..\bin.v2\tools\regression\test\compile~fail.test\msvc-7.1\debug\link-static\threading-multi
compile-c-c++ ..\..\..\bin.v2\tools\regression\test\compile~fail.test\msvc-7.1\debug\link-static\threading-multi\compile~fail.obj
compile~fail.cpp
-compile~fail.cpp(9) : fatal error C1189: #error : example of a compile failure
+compile~fail.cpp(9) : fatal error C1189: #error : example of a compile failure
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" >nul
cl /Zm800 -nologo @"..\..\..\bin.v2\tools\regression\test\compile~fail.test\msvc-7.1\debug\link-static\threading-multi\compile~fail.obj.rsp"
@@ -145,7 +145,7 @@ MkDir1 ..\..\..\bin.v2\tools\regression\test\run-fail~compile-fail.test\msvc-7.1
MkDir1 ..\..\..\bin.v2\tools\regression\test\run-fail~compile-fail.test\msvc-7.1\debug\link-static\threading-multi
compile-c-c++ ..\..\..\bin.v2\tools\regression\test\run-fail~compile-fail.test\msvc-7.1\debug\link-static\threading-multi\run-fail~compile-fail.obj
run-fail~compile-fail.cpp
-run-fail~compile-fail.cpp(9) : fatal error C1189: #error : example of a compile failure
+run-fail~compile-fail.cpp(9) : fatal error C1189: #error : example of a compile failure
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" >nul
cl /Zm800 -nologo @"..\..\..\bin.v2\tools\regression\test\run-fail~compile-fail.test\msvc-7.1\debug\link-static\threading-multi\run-fail~compile-fail.obj.rsp"
diff --git a/tools/release/2release.bat b/tools/release/2release.bat
deleted file mode 100644
index 391ac2ea1..000000000
--- a/tools/release/2release.bat
+++ /dev/null
@@ -1,16 +0,0 @@
-@echo off
-rem Copyright Beman Dawes 2011
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-if not %1$==$ goto usage_ok
-echo Usage: 2release path-relative-to-boost-root [svn-options]
-echo Path may be to file or directory
-echo Options include --dry-run
-echo WARNING: The current directory must be the directory in %BOOST_RELEASE%
-echo specified by the path-relative argument
-goto done
-
-:usage_ok
-svn merge %2 %3 %4 %5 %6 https://svn.boost.org/svn/boost/branches/release/%1 ^
- https://svn.boost.org/svn/boost/trunk/%1
-
-:done
diff --git a/tools/release/README b/tools/release/README
deleted file mode 100644
index bb8eaeca5..000000000
--- a/tools/release/README
+++ /dev/null
@@ -1,11 +0,0 @@
-Boost SourceForge release folder README
----------------------------------------
-
-The only differences between the distribution files are the line endings
-and archive format. The .bz2 and .7z formats are preferred as more compact.
-
-Distribution files with extensions .gz and .bz2 use Unix line endings.
-
-Distribution files with extensions .zip and .7z use Windows line endings.
-
-See http://www.boost.org/users/history for information about each Boost release.
diff --git a/tools/release/bjam_warnings.bat b/tools/release/bjam_warnings.bat
deleted file mode 100644
index b45f4b785..000000000
--- a/tools/release/bjam_warnings.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-rem Scan bjam/b2 log file for compile warnings
-
-rem Copyright 2011 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-if not %1$==$ goto usage_ok
-echo Usage: bjam_warnings log-path
-goto done
-
-:usage_ok
-
-grep -i "warning" %1 | grep -E "boost|libs" | sort | uniq
-
-:done
diff --git a/tools/release/build_docs.sh b/tools/release/build_docs.sh
deleted file mode 100755
index 6e00fb31a..000000000
--- a/tools/release/build_docs.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-# Build docs
-
-# Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-
-if [ $# -lt 1 ]
-then
- echo "invoke:" $0 "directory-name"
- echo "example:" $0 "posix"
- exit 1
-fi
-
-echo building $1 docs...
-pushd $1/doc
-bjam --v2 >../../$1-bjam.log
-ls html
-popd
-
diff --git a/tools/release/build_release.sh b/tools/release/build_release.sh
deleted file mode 100755
index 39a10df4d..000000000
--- a/tools/release/build_release.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-# Build release packages
-
-# Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-
-if [ $# -lt 1 ]
-then
- echo "invoke:" $0 "release-name"
- echo "example:" $0 "boost_1_35_0_RC3"
- exit 1
-fi
-
-./load_posix.sh
-./load_windows.sh
-./build_docs.sh posix
-./build_docs.sh windows
-./build_release_packages.sh $1
-
diff --git a/tools/release/build_release_packages.bat b/tools/release/build_release_packages.bat
deleted file mode 100644
index 5f72e5157..000000000
--- a/tools/release/build_release_packages.bat
+++ /dev/null
@@ -1,47 +0,0 @@
-@echo off
-rem Build release packages
-
-rem Copyright Beman Dawes 2009
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Build release packages...
-
-if not %1$==$ goto ok
-echo Usage: build_release_packages release-name
-echo Example: build_release_packages boost_1_38_0_Beta1
-goto done
-
-:ok
-
-echo Preping posix...
-rmdir /s /q posix\bin.v2 2>nul
-rmdir /s /q posix\dist 2>nul
-ren posix %1
-del %1.tar.gz 2>nul
-del %1.tar.bz2 2>nul
-echo Creating gz...
-tar cfz %1.tar.gz %1
-echo Creating bz2...
-gzip -d -c %1.tar.gz | bzip2 >%1.tar.bz2
-echo Cleaning up posix...
-ren %1 posix
-
-echo Preping windows...
-rmdir /s /q windows\bin.v2 2>nul
-rmdir /s /q windows\dist 2>nul
-ren windows %1
-del %1.zip 2>nul
-del %1.7z 2>nul
-echo Creating zip...
-zip -r -q %1.zip %1
-echo Creating 7z...
-7z a -r -bd %1.7z %1
-echo Cleaning up windows...
-ren %1 windows
-
-grep "Revision:" snapshot.log
-echo Build release packages complete
-
-:done
diff --git a/tools/release/build_release_packages.sh b/tools/release/build_release_packages.sh
deleted file mode 100755
index 2a126c01c..000000000
--- a/tools/release/build_release_packages.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-# Build release packages
-
-# Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-if [ $# -lt 1 ]
-then
- echo "invoke:" $0 "release-name"
- echo "example:" $0 "boost_1_35_0_RC3"
- exit 1
-fi
-
-echo "preping posix..."
-rm -r posix/bin.v2 2>/dev/null
-rm -r posix/dist 2>/dev/null
-mv posix $1
-rm -f $1.tar.gz 2>/dev/null
-rm -f $1.tar.bz2 2>/dev/null
-echo "creating gz..."
-tar cfz $1.tar.gz $1
-echo "creating bz2..."
-gzip -c $1.tar.gz | bzip2 >$1.tar.bz2
-echo "cleaning up..."
-mv $1 posix
-
-echo "preping windows..."
-rm -r windows/bin.v2 2>/dev/null
-rm -r windows/dist 2>/dev/null
-mv windows $1
-rm -f $1.zip 2>/dev/null
-rm -f $1.7z 2>/dev/null
-echo "creating zip..."
-zip -r $1.zip $1
-echo "creating 7z..."
-7z a -r $1.7z $1
-echo "cleaning up..."
-mv $1 windows
-
-exit 0
-
diff --git a/tools/release/index.html b/tools/release/index.html
deleted file mode 100644
index 8e850eab4..000000000
--- a/tools/release/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<title>Release Scripts</title>
-<link rel="stylesheet" type="text/css" href="../../doc/src/minimal.css">
-</head>
-
-<body>
-<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="637">
- <tr>
- <td width="277">
-<a href="../../index.htm">
-<img src="../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td>
- <td width="337" align="middle">
- <font size="7">Release Scripts</font>
- </td>
- </tr>
-</table>
-
-<h2>Introduction</h2>
-<p>The release scripts are used by the release management team to build the
-release distribution files, and perform related release management functions.</p>
-<p>The files being built include:</p>
-<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
- <tr>
- <td width="100%" colspan="2">
- <p align="center"><b><i>Files</i></b></td>
- </tr>
- <tr>
- <td width="50%">boost_x_xx_x.7z</td>
- <td width="50%">&nbsp;</td>
- </tr>
- <tr>
- <td width="50%">boost_x_xx_x.tar.bz2</td>
- <td width="50%">Unix-style line endings</td>
- </tr>
- <tr>
- <td width="50%">boost_x_xx_x.tar.gz</td>
- <td width="50%">Unix-style line endings</td>
- </tr>
- <tr>
- <td width="50%">boost_x_xx_x.zip</td>
- <td width="50%">Windows-style line endings</td>
- </tr>
-</table>
-<p>The content of all files is identical except for the line endings.</p>
-
-<hr>
-
-<p>© Copyright Beman Dawes, 2008<br>
-Distributed under the Boost Software License, Version 1.0. See
-<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
-
-<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->January 18, 2008<!--webbot bot="Timestamp" endspan i-checksum="31853" --> </font>
-</p>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/tools/release/inspect.sh b/tools/release/inspect.sh
deleted file mode 100755
index 7c04fb58c..000000000
--- a/tools/release/inspect.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# Inspect snapshot
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-# This script uses ftp, and thus assumes ~/.netrc contains a machine ... entry
-
-pushd posix/tools/inspect/build
-bjam
-popd
-echo inspect...
-pushd posix
-dist/bin/inspect >../inspect.html
-popd
-
-# create the ftp script
-echo create ftp script...
-echo "dir" >inspect.ftp
-echo "binary" >>inspect.ftp
-echo "put inspect.html" >>inspect.ftp
-echo "delete inspect-snapshot.html" >>inspect.ftp
-echo "rename inspect.html inspect-snapshot.html" >>inspect.ftp
-echo "dir" >>inspect.ftp
-echo "bye" >>inspect.ftp
-# use cygwin ftp rather than Windows ftp
-echo ftp...
-/usr/bin/ftp -v -i boost.cowic.de <inspect.ftp
-echo inspect.sh complete
diff --git a/tools/release/inspect_trunk.bat b/tools/release/inspect_trunk.bat
deleted file mode 100644
index 4a306a930..000000000
--- a/tools/release/inspect_trunk.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-rem Inspect Trunk
-rem Copyright Beman Dawes 2008, 2009
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Must be run in directory containing svn checkout of trunk
-
-echo Clean trunk working copy ...
-rem cleanup clears locks or other residual problems (we learned this the hard way!)
-svn cleanup
-echo Update trunk working copy...
-svn up --non-interactive --trust-server-cert
-pushd tools\inspect\build
-echo Build inspect program...
-bjam
-popd
-echo Copy inspect.exe to %UTIL% directory...
-copy /y dist\bin\inspect.exe %UTIL%
-echo Inspect...
-inspect >%TEMP%\trunk_inspect.html
-
-echo Create ftp script...
-pushd %TEMP%
-copy %BOOST_TRUNK%\..\user.txt inspect.ftp
-echo dir >>inspect.ftp
-echo binary >>inspect.ftp
-echo put trunk_inspect.html >>inspect.ftp
-echo dir >>inspect.ftp
-echo mdelete inspect-trunk.html >>inspect.ftp
-echo rename trunk_inspect.html inspect-trunk.html >>inspect.ftp
-echo dir >>inspect.ftp
-echo bye >>inspect.ftp
-
-echo Run ftp script...
-ftp -n -i -s:inspect.ftp boost.cowic.de
-popd
-
-echo Update script for next run
-copy /y tools\release\inspect_trunk.bat
-
-echo Inspect script complete
diff --git a/tools/release/linux_user-config.jam b/tools/release/linux_user-config.jam
deleted file mode 100644
index 6b62071b0..000000000
--- a/tools/release/linux_user-config.jam
+++ /dev/null
@@ -1,21 +0,0 @@
-# Linux user-config.jam
-
-import toolset : using ;
-
-using gcc ;
-
-using python ; # requires pythonN.NN-dev be installed
-
-# Boost iostreams requires no user-config.jam entries,
-# but does require zliblg-dev, libbz2-dev, be installed
-
-using xsltproc ;
-
-using boostbook
- : /usr/share/xml/docbook/stylesheet/nwalsh
- : /usr/share/xml/docbook/schema/dtd/4.2
- ;
-
-# Remove this line if you're not using doxygen
-using doxygen ;
-using quickbook ;
diff --git a/tools/release/load_posix.sh b/tools/release/load_posix.sh
deleted file mode 100755
index eecdbed24..000000000
--- a/tools/release/load_posix.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Load posix directory from branches/release snapshot, using LF line termination
-
-# Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-
-rm -r -f posix 2>/dev/null
-svn export --non-interactive --native-eol LF http://svn.boost.org/svn/boost/branches/release posix
-
diff --git a/tools/release/load_windows.sh b/tools/release/load_windows.sh
deleted file mode 100755
index 08967ddf9..000000000
--- a/tools/release/load_windows.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Load windows directory from branches/release snapshot, using CR/LF line termination
-
-# Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-
-rm -r -f windows 2>/dev/null
-svn export --non-interactive --native-eol CRLF http://svn.boost.org/svn/boost/branches/release windows
-
diff --git a/tools/release/make_packages.sh b/tools/release/make_packages.sh
deleted file mode 100755
index 3aeb17f8f..000000000
--- a/tools/release/make_packages.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# Build branches/release packages
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-
-if [ $# -lt 1 ]
-then
- echo "invoke:" $0 "package-name"
- echo "example:" $0 "boost_1_35_0_RC3"
- exit 1
-fi
-
-echo "preping posix..."
-rm -r posix/bin.v2 2>/dev/null
-rm -r posix/dist 2>/dev/null
-mv posix $1
-rm -f $1.tar.gz 2>/dev/null
-rm -f $1.tar.bz2 2>/dev/null
-echo "creating gz..."
-tar cfz $1.tar.gz $1
-echo "creating bz2..."
-gunzip -c $1.tar.gz | bzip2 >$1.tar.bz2
-echo "cleaning up..."
-mv $1 posix
-
-echo "preping windows..."
-rm -r windows/bin.v2 2>/dev/null
-rm -r windows/dist 2>/dev/null
-mv windows $1
-rm -f $1.zip 2>/dev/null
-rm -f $1.7z 2>/dev/null
-echo "creating zip..."
-zip -r $1.zip $1
-echo "creating 7z..."
-7z a -r $1.7z $1
-echo "cleaning up..."
-mv $1 windows
-
-echo "done automatic processing; you must now upload packages manually"
-exit 0
-
-
-
diff --git a/tools/release/merge2release.bat b/tools/release/merge2release.bat
deleted file mode 100644
index 39bb01f21..000000000
--- a/tools/release/merge2release.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-rem @echo off
-rem Copyright Beman Dawes 2010
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-if not %1$==$ goto usage_ok
-echo Usage: merge2release library-name [svn-options]
-echo Options include --dry-run
-goto done
-
-:usage_ok
-pushd %BOOST_RELEASE%
-pushd boost
-call 2release boost/%1.hpp %2 %3 %4 %5 %6
-pushd %1
-call 2release boost/%1 %2 %3 %4 %5 %6
-popd
-popd
-pushd libs\%1
-call 2release libs/%1 %2 %3 %4 %5 %6
-popd
-popd
-
-:done
diff --git a/tools/release/merge_release_cycle_init.bat b/tools/release/merge_release_cycle_init.bat
deleted file mode 100644
index 3eb3bbe70..000000000
--- a/tools/release/merge_release_cycle_init.bat
+++ /dev/null
@@ -1,16 +0,0 @@
-rem @echo off
-rem Copyright Beman Dawes 2011
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-pushd %BOOST_RELEASE%
-svn up
-call 2release Jamroot
-call 2release index.html
-pushd boost
-call 2release boost/version.hpp
-popd
-pushd more
-call 2release more
-popd
-popd
diff --git a/tools/release/release-mgt-msvc/compare_trees/compare_trees.vcproj b/tools/release/release-mgt-msvc/compare_trees/compare_trees.vcproj
deleted file mode 100644
index f52093006..000000000
--- a/tools/release/release-mgt-msvc/compare_trees/compare_trees.vcproj
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="compare_trees"
- ProjectGUID="{7E6AD5ED-4168-4613-A342-0217AA82DEC1}"
- RootNamespace="compare_trees"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- AdditionalLibraryDirectories="..\..\..\..\stage\lib"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- AdditionalLibraryDirectories="..\..\..\..\stage\lib"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\compare_trees.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/release/release-mgt-msvc/msvc.sln b/tools/release/release-mgt-msvc/msvc.sln
deleted file mode 100644
index ca70e06f6..000000000
--- a/tools/release/release-mgt-msvc/msvc.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compare_trees", "compare_trees\compare_trees.vcproj", "{7E6AD5ED-4168-4613-A342-0217AA82DEC1}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strftime", "strftime\strftime.vcproj", "{4A82F955-7630-4B79-9C50-E45F27E28BA8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7E6AD5ED-4168-4613-A342-0217AA82DEC1}.Debug|Win32.ActiveCfg = Debug|Win32
- {7E6AD5ED-4168-4613-A342-0217AA82DEC1}.Debug|Win32.Build.0 = Debug|Win32
- {7E6AD5ED-4168-4613-A342-0217AA82DEC1}.Release|Win32.ActiveCfg = Release|Win32
- {7E6AD5ED-4168-4613-A342-0217AA82DEC1}.Release|Win32.Build.0 = Release|Win32
- {4A82F955-7630-4B79-9C50-E45F27E28BA8}.Debug|Win32.ActiveCfg = Debug|Win32
- {4A82F955-7630-4B79-9C50-E45F27E28BA8}.Debug|Win32.Build.0 = Debug|Win32
- {4A82F955-7630-4B79-9C50-E45F27E28BA8}.Release|Win32.ActiveCfg = Release|Win32
- {4A82F955-7630-4B79-9C50-E45F27E28BA8}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/tools/release/release-mgt-msvc/strftime/strftime.vcproj b/tools/release/release-mgt-msvc/strftime/strftime.vcproj
deleted file mode 100644
index 4b8e9ab86..000000000
--- a/tools/release/release-mgt-msvc/strftime/strftime.vcproj
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="strftime"
- ProjectGUID="{4A82F955-7630-4B79-9C50-E45F27E28BA8}"
- RootNamespace="strftime"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\strftime.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/release/release_reports.sh b/tools/release/release_reports.sh
deleted file mode 100755
index 73d8ead91..000000000
--- a/tools/release/release_reports.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# Run the release branch regression reporting system
-
-# Copyright 2008 Beman Dawes
-
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-# Requirements:
-#
-# * ~/boost/trunk is an svn working copy of the trunk
-# * ~/boost/release-reports is a directory devoted to release regression reporting
-# * ~/boost/release-reports/boost is an svn working of branches/release
-# * ~/boost/release-reports/release/ exists
-
-echo Updating ~/boost/trunk/tools/regression ...
-svn up ~/boost/trunk/tools/regression
-
-echo Updating ~/boost/trunk/tools/release ...
-svn up ~/boost/trunk/tools/release
-
-pushd ~/boost/release-reports
-
-echo Running build_results.sh ...
-date >report.log
-~/boost/trunk/tools/regression/xsl_reports/build_results.sh release 1>>report.log 2>>report.log
-date >>report.log
-
-popd
-echo Release regression reporting complete - see ~/boost/release-reports/report.log
diff --git a/tools/release/revision_number.bat b/tools/release/revision_number.bat
deleted file mode 100644
index 8f03bd0f1..000000000
--- a/tools/release/revision_number.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-rem Create revision information, to be used by other script
-
-rem Copyright 2011 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Getting current subversion revision number...
-svn co --non-interactive --depth=files http://svn.boost.org/svn/boost/branches/release svn_info
-svn info svn_info
-
-svn info svn_info | grep Revision | sed "s/Revision: /set BOOST_REVISION_NUMBER=/" >generated_set_release.bat
-call generated_set_release.bat
diff --git a/tools/release/snapshot.bat b/tools/release/snapshot.bat
deleted file mode 100644
index 5029e3d73..000000000
--- a/tools/release/snapshot.bat
+++ /dev/null
@@ -1,39 +0,0 @@
-@echo off
-rem Run POSIX and Windows snapshots and inspection
-
-rem Copyright 2008 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-rem Must be run in a directory devoted to boost release snapshots
-
-echo Remove residue from prior runs...
-rem rmdir commands seem to finish before the deletes are necessarily complete.
-rem This can occasionally cause subsequent commands to fail because they expect
-rem the directory to be gone or empty. snapshot_posix and snapshot_windows
-rem are affected. Fix is to run rmdir here so that deletes are complete
-rem by the time snapshots are run.
-rmdir /s /q posix >nul
-rmdir /s /q windows >nul
-time /t
-
-echo Using %BOOST_TRUNK% as boost trunk
-time /t
-pushd %BOOST_TRUNK%
-echo Running svn cleanup on %BOOST_TRUNK%
-svn --non-interactive --trust-server-cert cleanup
-echo Running svn update on %BOOST_TRUNK%
-svn --non-interactive --trust-server-cert up
-popd
-call %BOOST_TRUNK%\tools\release\revision_number.bat
-time /t
-call %BOOST_TRUNK%\tools\release\snapshot_download_docs.bat
-time /t
-call %BOOST_TRUNK%\tools\release\snapshot_posix.bat
-time /t
-call %BOOST_TRUNK%\tools\release\snapshot_windows.bat
-time /t
-call %BOOST_TRUNK%\tools\release\snapshot_inspection.bat
-time /t
-echo Revision %BOOST_REVISION_NUMBER% snapshot complete
diff --git a/tools/release/snapshot.sh b/tools/release/snapshot.sh
deleted file mode 100755
index 8e45abbcc..000000000
--- a/tools/release/snapshot.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-sleep 5s
-echo Using $BOOST_TRUNK as boost trunk
-date
-$BOOST_TRUNK/tools/release/snapshot_posix.sh
-date
-$BOOST_TRUNK/tools/release/snapshot_windows.sh
-date
-$BOOST_TRUNK/tools/release/snapshot_inspect.sh
-date
-sleep 5s
diff --git a/tools/release/snapshot_download_docs.bat b/tools/release/snapshot_download_docs.bat
deleted file mode 100644
index 5bdae2b5a..000000000
--- a/tools/release/snapshot_download_docs.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-@echo off
-rem Download and unpack boost-release-docs.7z
-
-rem Copyright 2008 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Downloading docs subdirectory...
-
-echo Deleting old files and directories ...
-del boost-docs.7z 2>nul
-del boost-release-docs.7z 2>nul
-rmdir /s /q docs_temp 2>nul
-mkdir docs_temp
-
-echo Creating ftp script ...
-rem user.txt must be a single line: user userid password
-rem where "userid" and "password" are replace with the appropriate values
-copy user.txt download_docs.ftp
-echo binary >>download_docs.ftp
-echo get boost-release-docs.7z >>download_docs.ftp
-echo bye >>download_docs.ftp
-
-echo Running ftp script ...
-ftp -d -n -i -s:download_docs.ftp boost.cowic.de
-
-echo Unpacking 7z file ...
-7z x -y -odocs_temp boost-release-docs.7z
-
-echo Download and unpack boost-release-docs.7z complete! \ No newline at end of file
diff --git a/tools/release/snapshot_inspect.sh b/tools/release/snapshot_inspect.sh
deleted file mode 100755
index 7c04fb58c..000000000
--- a/tools/release/snapshot_inspect.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# Inspect snapshot
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-# This script uses ftp, and thus assumes ~/.netrc contains a machine ... entry
-
-pushd posix/tools/inspect/build
-bjam
-popd
-echo inspect...
-pushd posix
-dist/bin/inspect >../inspect.html
-popd
-
-# create the ftp script
-echo create ftp script...
-echo "dir" >inspect.ftp
-echo "binary" >>inspect.ftp
-echo "put inspect.html" >>inspect.ftp
-echo "delete inspect-snapshot.html" >>inspect.ftp
-echo "rename inspect.html inspect-snapshot.html" >>inspect.ftp
-echo "dir" >>inspect.ftp
-echo "bye" >>inspect.ftp
-# use cygwin ftp rather than Windows ftp
-echo ftp...
-/usr/bin/ftp -v -i boost.cowic.de <inspect.ftp
-echo inspect.sh complete
diff --git a/tools/release/snapshot_inspection.bat b/tools/release/snapshot_inspection.bat
deleted file mode 100644
index 1a86aa4b8..000000000
--- a/tools/release/snapshot_inspection.bat
+++ /dev/null
@@ -1,28 +0,0 @@
-rem Inspect snapshot
-
-rem Copyright Beman Dawes 2008, 2011
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo inspect...
-pushd windows
-rem inspect_trunk.bat builds inspect program every day and copies it to %UTIL%
-%UTIL%%\inspect >..\inspect.html
-popd
-
-echo Create ftp script...
-copy user.txt inspect.ftp
-echo dir >>inspect.ftp
-echo binary >>inspect.ftp
-echo put inspect.html >>inspect.ftp
-echo dir >>inspect.ftp
-echo mdelete inspect-snapshot.html >>inspect.ftp
-echo rename inspect.html inspect-snapshot.html >>inspect.ftp
-echo dir >>inspect.ftp
-echo bye >>inspect.ftp
-
-echo Run ftp script...
-ftp -n -i -s:inspect.ftp boost.cowic.de
-
-echo Inspect script complete
diff --git a/tools/release/snapshot_posix.bat b/tools/release/snapshot_posix.bat
deleted file mode 100644
index 1a061dccb..000000000
--- a/tools/release/snapshot_posix.bat
+++ /dev/null
@@ -1,69 +0,0 @@
-rem Build a branches/release snapshot for POSIX, using LF line termination
-
-rem Copyright 2008 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Build a branches/release snapshot for POSIX, using LF line termination...
-echo Revision %BOOST_REVISION_NUMBER%
-echo Removing old files...
-rmdir /s /q posix >nul
-rmdir /s /q svn_info >nul
-del posix.tar.gz >nul
-del posix.tar.bz2 >nul
-
-echo Exporting files from subversion...
-svn export --non-interactive --native-eol LF -r %BOOST_REVISION_NUMBER% http://svn.boost.org/svn/boost/branches/release posix
-
-echo Copying docs into posix...
-pushd posix
-xcopy /s /y ..\docs_temp
-popd
-
-echo Setting SNAPSHOT_DATE
-strftime "%%Y-%%m-%%d" >date.txt
-set /p SNAPSHOT_DATE= <date.txt
-echo SNAPSHOT_DATE is %SNAPSHOT_DATE%
-
-echo Renaming root directory...
-ren posix boost-posix-%SNAPSHOT_DATE%
-
-echo Building .gz file...
-tar cfz posix.tar.gz --numeric-owner --group=0 --owner=0 boost-posix-%SNAPSHOT_DATE%
-echo Building .bz2 file...
-gzip -d -c posix.tar.gz | bzip2 >posix.tar.bz2
-
-ren boost-posix-%SNAPSHOT_DATE% posix
-
-echo The ftp transfer will be done in two steps because that has proved more
-echo reliable on Beman's Windows XP 64-bit system.
-
-echo Creating ftp script 1 ...
-copy user.txt posix.ftp
-echo dir >>posix.ftp
-echo binary >>posix.ftp
-
-rem echo put posix.tar.gz >>posix.ftp
-rem echo mdelete boost-posix*.gz >>posix.ftp
-rem echo rename posix.tar.gz boost-posix-%SNAPSHOT_DATE%.tar.gz >>posix.ftp
-
-echo put posix.tar.bz2 >>posix.ftp
-echo bye >>posix.ftp
-
-echo Running ftp script 1 ...
-ftp -n -i -s:posix.ftp boost.cowic.de
-
-echo Creating ftp script 2 ...
-copy user.txt posix.ftp
-echo dir >>posix.ftp
-echo mdelete boost-posix*.bz2 >>posix.ftp
-echo rename posix.tar.bz2 boost-posix-%SNAPSHOT_DATE%.tar.bz2 >>posix.ftp
-
-echo dir >>posix.ftp
-echo bye >>posix.ftp
-
-echo Running ftp script 2 ...
-ftp -n -i -s:posix.ftp boost.cowic.de
-
-echo POSIX snapshot complete!
diff --git a/tools/release/snapshot_posix.sh b/tools/release/snapshot_posix.sh
deleted file mode 100755
index ccc625a99..000000000
--- a/tools/release/snapshot_posix.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env bash
-
-# Build a branches/release snapshot for Posix, using LF line termination
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-echo "Build a branches/release snapshot for POSIX, using LF line termination..."
-
-echo "Removing old files..."
-rm -r -f posix
-rm -r -f svn_info
-
-echo "Exporting files from subversion..."
-# leave an audit trail, which is used by inspect to determine revision number
-# use --non-recursive rather than --depth=files until the linux distros catch up
-svn co --non-recursive http://svn.boost.org/svn/boost/branches/release svn_info
-svn export --non-interactive --native-eol LF http://svn.boost.org/svn/boost/branches/release posix
-
-#echo "Building bjam..."
-# failure to use an up-to-date copy of bjam has caused much wasted effort.
-#pushd posix/tools/build/v2/engine
-#./build.sh gcc
-#popd
-#
-#echo "Building docs..."
-#pushd posix/doc
-#../tools/build/v2/engine/bin.cygwinx86/bjam --toolset=gcc &>../../posix-bjam.log
-#popd
-
-echo "Cleaning up and renaming..."
-#rm -r posix/bin.v2
-SNAPSHOT_DATE=`eval date +%Y-%m-%d`
-echo SNAPSHOT_DATE is $SNAPSHOT_DATE
-mv posix boost-posix-$SNAPSHOT_DATE
-rm -f posix.tar.gz
-rm -f posix.tar.bz2
-
-echo "Building .gz file..."
-tar cfz posix.tar.gz boost-posix-$SNAPSHOT_DATE
-echo "Building .bz2 file..."
-gunzip -c posix.tar.gz | bzip2 >posix.tar.bz2
-mv boost-posix-$SNAPSHOT_DATE posix
-
-echo "Creating ftp script..."
-echo "dir" >posix.ftp
-echo "binary" >>posix.ftp
-
-#echo "put posix.tar.gz" >>posix.ftp
-#echo "mdelete boost-posix*.gz" >>posix.ftp
-#echo "rename posix.tar.gz boost-posix-$SNAPSHOT_DATE.tar.gz" >>posix.ftp
-
-echo "put posix.tar.bz2" >>posix.ftp
-echo "mdelete boost-posix*.bz2" >>posix.ftp
-echo "rename posix.tar.bz2 boost-posix-$SNAPSHOT_DATE.tar.bz2" >>posix.ftp
-
-echo "dir" >>posix.ftp
-echo "bye" >>posix.ftp
-
-echo "Running ftp script..."
-# use cygwin ftp rather than Windows ftp
-/usr/bin/ftp -v -i boost.cowic.de <posix.ftp
-
-echo POSIX snapshot complete!
diff --git a/tools/release/snapshot_windows.bat b/tools/release/snapshot_windows.bat
deleted file mode 100644
index af31d6261..000000000
--- a/tools/release/snapshot_windows.bat
+++ /dev/null
@@ -1,75 +0,0 @@
-rem Build a branches/release snapshot for Windows, using CRLF line termination
-
-rem Copyright 2008 Beman Dawes
-
-rem Distributed under the Boost Software License, Version 1.0.
-rem See http://www.boost.org/LICENSE_1_0.txt
-
-echo Build a branches/release snapshot for Windows, using CRLF line termination...
-echo Revision %BOOST_REVISION_NUMBER%
-
-echo Removing old files...
-rmdir /s /q windows >nul
-rmdir /s /q svn_info >nul
-del windows.7z >nul
-del windows.zip >nul
-
-echo Exporting files from subversion...
-svn export --non-interactive --native-eol CRLF -r %BOOST_REVISION_NUMBER% http://svn.boost.org/svn/boost/branches/release windows
-
-echo Copying docs into windows...
-pushd windows
-xcopy /s /y ..\docs_temp
-popd
-
-echo Setting SNAPSHOT_DATE
-strftime "%%Y-%%m-%%d" >date.txt
-set /p SNAPSHOT_DATE= <date.txt
-echo SNAPSHOT_DATE is %SNAPSHOT_DATE%
-
-echo Renaming root directory...
-ren windows boost-windows-%SNAPSHOT_DATE%
-
-echo Building .7z file...
-rem On Windows, 7z comes from the 7-Zip package, not Cygwin,
-rem so path must include C:\Program Files\7-Zip
-7z a -r windows.7z boost-windows-%SNAPSHOT_DATE%
-
-rem Building .zip file...
-rem zip -r windows.zip boost-windows-%SNAPSHOT_DATE%
-
-ren boost-windows-%SNAPSHOT_DATE% windows
-
-echo The ftp transfer will be done in two steps because that has proved more
-echo reliable on Beman's Windows XP 64-bit system.
-
-echo Creating ftp script 1 ...
-rem user.txt must be a single line: user userid password
-rem where "userid" and "password" are replace with the appropriate values
-copy user.txt windows.ftp
-echo dir >>windows.ftp
-echo binary >>windows.ftp
-
-rem echo put windows.zip >>windows.ftp
-rem echo mdelete boost-windows*.zip >>windows.ftp
-rem echo rename windows.zip boost-windows-%SNAPSHOT_DATE%.zip >>windows.ftp
-
-echo put windows.7z >>windows.ftp
-echo bye >>windows.ftp
-
-echo Running ftp script 1 ...
-ftp -n -i -s:windows.ftp boost.cowic.de
-
-echo Creating ftp script 2 ...
-copy user.txt windows.ftp
-echo dir >>windows.ftp
-echo mdelete boost-windows*.7z >>windows.ftp
-echo rename windows.7z boost-windows-%SNAPSHOT_DATE%.7z >>windows.ftp
-
-echo dir >>windows.ftp
-echo bye >>windows.ftp
-
-echo Running ftp script 2 ...
-ftp -n -i -s:windows.ftp boost.cowic.de
-
-echo Windows snapshot complete!
diff --git a/tools/release/snapshot_windows.sh b/tools/release/snapshot_windows.sh
deleted file mode 100755
index 14de67f14..000000000
--- a/tools/release/snapshot_windows.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-# Build a branches/release snapshot for Windows, using CRLF line termination
-
-# © Copyright 2008 Beman Dawes
-# Distributed under the Boost Software License, Version 1.0.
-# See http://www.boost.org/LICENSE_1_0.txt
-
-# This script uses ftp, and thus assumes ~/.netrc contains a machine ... entry
-
-echo "Build a branches/release snapshot for Windows, using CRLF line termination..."
-
-echo "Removing old files..."
-rm -r -f windows
-
-echo "Exporting files from subversion..."
-svn export --non-interactive --native-eol CRLF http://svn.boost.org/svn/boost/branches/release windows
-
-#echo "Copying docs from posix tree..."
-#cp --recursive posix/doc/html windows/doc
-
-echo "Renaming..."
-SNAPSHOT_DATE=`eval date +%Y-%m-%d`
-echo SNAPSHOT_DATE is $SNAPSHOT_DATE
-mv windows boost-windows-$SNAPSHOT_DATE
-
-#rm -f windows.zip
-#zip -r windows.zip boost-windows-$SNAPSHOT_DATE
-
-echo "Building .7z..."
-rm -f windows.7z
-# On Windows, 7z comes from the 7-Zip package, not Cygwin,
-# so path must include C:\Program Files\7-Zip.
-7z a -r windows.7z boost-windows-$SNAPSHOT_DATE
-
-echo "Reverting name..."
-mv boost-windows-$SNAPSHOT_DATE windows
-
-echo "Creating ftp script..."
-cat <user.txt >>windows.ftp
-echo "dir" >>windows.ftp
-echo "binary" >>windows.ftp
-
-#echo "put windows.zip" >>windows.ftp
-#echo "mdelete boost-windows*.zip" >>windows.ftp
-#echo "rename windows.zip boost-windows-$SNAPSHOT_DATE.zip" >>windows.ftp
-
-echo "put windows.7z" >>windows.ftp
-echo "mdelete boost-windows*.7z" >>windows.ftp
-echo "rename windows.7z boost-windows-$SNAPSHOT_DATE.7z" >>windows.ftp
-echo "dir" >>windows.ftp
-echo "bye" >>windows.ftp
-
-echo "Running ftp script..."
-# This is the Windows ftp client
-ftp -n -i -d -s:windows.ftp boost.cowic.de
-
-echo "Windows snapshot complete!"
diff --git a/tools/release/strftime.cpp b/tools/release/strftime.cpp
deleted file mode 100644
index 57d66099a..000000000
--- a/tools/release/strftime.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// Command line utility to output the date under control of a format string
-
-// Copyright 2008 Beman Dawes
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#define _CRT_SECURE_NO_WARNINGS
-
-#include <ctime>
-#include <string>
-#include <iostream>
-#include <cstdlib>
-
-using namespace std;
-
-int main(int argc, char * argv[])
-{
- if (argc != 2 )
- {
- cerr <<
- "Invoke: strftime format\n"
- "Example: strftime \"The date is %Y-%m-%d in ISO format\""
- "The format codes are:\n"
- " %a Abbreviated weekday name\n"
- " %A Full weekday name\n"
- " %b Abbreviated month name\n"
- " %B Full month name\n"
- " %c Date and time representation appropriate for locale\n"
- " %d Day of month as decimal number (01 - 31)\n"
- " %H Hour in 24-hour format (00 - 23)\n"
- " %I Hour in 12-hour format (01 - 12)\n"
- " %j Day of year as decimal number (001 - 366)\n"
- " %m Month as decimal number (01 - 12)\n"
- " %M Minute as decimal number (00 - 59)\n"
- " %p Current locale's A.M./P.M. indicator for 12-hour clock\n"
- " %S Second as decimal number (00 - 59)\n"
- " %U Week of year as decimal number, with Sunday as first day of week (00 - 53)\n"
- " %w Weekday as decimal number (0 - 6; Sunday is 0)\n"
- " %W Week of year as decimal number, with Monday as first day of week (00 - 53)\n"
- " %x Date representation for current locale\n"
- " %X Time representation for current locale\n"
- " %y Year without century, as decimal number (00 - 99)\n"
- " %Y Year with century, as decimal number\n"
- " %z, %Z Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown\n"
- " %% Percent sign\n"
- ;
- return 1;
- }
-
- string format = argv[1];
- time_t t = time(0);
- tm * tod = localtime(&t);
- if (!tod)
- {
- cerr << "error: localtime function failed\n";
- return 1;
- }
- char* s = new char [format.size() + 256];
- if (strftime( s, format.size() + 256, format.c_str(), tod ) == 0 )
- {
- cerr << "error: buffer overflow\n";
- return 1;
- }
-
- cout << s;
- return 0;
-}
diff --git a/tools/release/unmerged.bat b/tools/release/unmerged.bat
deleted file mode 100644
index 9a3581b8a..000000000
--- a/tools/release/unmerged.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-rem Copyright Beman Dawes 2009
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-if not %1$==$ goto usage_ok
-echo Usage: unmerged library-name [svn-options]
-echo Options include --summarize to show paths only. i.e. suppresses line-by-line diffs
-goto done
-
-:usage_ok
-svn diff %2 %3 %4 %5 %6 http://svn.boost.org/svn/boost/branches/release/boost/%1.hpp ^
- http://svn.boost.org/svn/boost/trunk/boost/%1.hpp
-svn diff %2 %3 %4 %5 %6 http://svn.boost.org/svn/boost/branches/release/boost/%1 ^
- http://svn.boost.org/svn/boost/trunk/boost/%1
-svn diff %2 %3 %4 %5 %6 http://svn.boost.org/svn/boost/branches/release/libs/%1 ^
- http://svn.boost.org/svn/boost/trunk/libs/%1
-
-:done
diff --git a/tools/release/unmerged_all.bat b/tools/release/unmerged_all.bat
deleted file mode 100644
index 6bb19dd9f..000000000
--- a/tools/release/unmerged_all.bat
+++ /dev/null
@@ -1,86 +0,0 @@
-rem Copyright Beman Dawes 2009
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-call unmerged accumulators --summarize
-call unmerged algorithm --summarize
-call unmerged any --summarize
-call unmerged array --summarize
-call unmerged asio --summarize
-call unmerged assign --summarize
-call unmerged bimap --summarize
-call unmerged bind --summarize
-call unmerged circular_buffer --summarize
-call unmerged compatibility --summarize
-call unmerged compose --summarize
-call unmerged concept --summarize
-call unmerged concept_check --summarize
-call unmerged config --summarize
-call unmerged conversion --summarize
-call unmerged crc --summarize
-call unmerged date_time --summarize
-call unmerged detail --summarize
-call unmerged disjoint_sets --summarize
-call unmerged dynamic_bitset --summarize
-call unmerged exception --summarize
-call unmerged filesystem --summarize
-call unmerged flyweight --summarize
-call unmerged foreach --summarize
-call unmerged format --summarize
-call unmerged function --summarize
-call unmerged functional --summarize
-call unmerged function_types --summarize
-call unmerged fusion --summarize
-call unmerged gil --summarize
-call unmerged graph --summarize
-call unmerged graph_parallel --summarize
-call unmerged integer --summarize
-call unmerged interprocess --summarize
-call unmerged intrusive --summarize
-call unmerged io --summarize
-call unmerged iostreams --summarize
-call unmerged iterator --summarize
-call unmerged lambda --summarize
-call unmerged logic --summarize
-call unmerged math --summarize
-call unmerged mem_fn --summarize
-call unmerged mpi --summarize
-call unmerged mpl --summarize
-call unmerged multi_array --summarize
-call unmerged multi_index --summarize
-call unmerged numeric --summarize
-call unmerged optional --summarize
-call unmerged parameter --summarize
-call unmerged pool --summarize
-call unmerged preprocessor --summarize
-call unmerged program_options --summarize
-call unmerged property_map --summarize
-call unmerged property_tree --summarize
-call unmerged proto --summarize
-call unmerged ptr_container --summarize
-call unmerged python --summarize
-call unmerged random --summarize
-call unmerged range --summarize
-call unmerged rational --summarize
-call unmerged regex --summarize
-call unmerged scope_exit --summarize
-call unmerged serialization --summarize
-call unmerged signals --summarize
-call unmerged signals2 --summarize
-call unmerged smart_ptr --summarize
-call unmerged spirit --summarize
-call unmerged statechart --summarize
-call unmerged static_assert --summarize
-call unmerged system --summarize
-call unmerged test --summarize
-call unmerged thread --summarize
-call unmerged timer --summarize
-call unmerged tokenizer --summarize
-call unmerged tr1 --summarize
-call unmerged tuple --summarize
-call unmerged typeof --summarize
-call unmerged type_traits --summarize
-call unmerged units --summarize
-call unmerged unordered --summarize
-call unmerged utility --summarize
-call unmerged variant --summarize
-call unmerged wave --summarize
-call unmerged xpressive --summarize
diff --git a/tools/release/unmerged_whatever.bat b/tools/release/unmerged_whatever.bat
deleted file mode 100644
index d49e468b2..000000000
--- a/tools/release/unmerged_whatever.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-@echo off
-rem Copyright Beman Dawes 2011
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-if not %1$==$ goto usage_ok
-echo Usage: unmerged_whatever path-from-root [svn-options]
-echo Options include --summarize to show paths only. i.e. suppresses line-by-line diffs
-goto done
-
-:usage_ok
-svn diff %2 %3 %4 %5 %6 http://svn.boost.org/svn/boost/branches/release/%1 ^
- http://svn.boost.org/svn/boost/trunk/%1
-
-:done
diff --git a/tools/release/upload2sourceforge.bat b/tools/release/upload2sourceforge.bat
deleted file mode 100644
index f16a2e809..000000000
--- a/tools/release/upload2sourceforge.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-rem Copyright Beman Dawes 2009
-rem Distributed under the Boost Software License, Version 1.0. See http://www.boost.org/LICENSE_1_0.txt
-if not %1$==$ goto usage_ok
-echo Usage: upload2sourceforge release-folder
-echo Example: upload2sourceforge 1.40.0
-goto done
-
-:usage_ok
-dir boost_*
-pause Are these the correct files to upload? [Ctrl-C to interrupt]
-rsync -avP -e ssh boost_* beman_dawes,boost@frs.sourceforge.net:/home/frs/project/b/bo/boost/boost/%1/
-
-:done
diff --git a/tools/wave/build/Jamfile.v2 b/tools/wave/build/Jamfile.v2
deleted file mode 100644
index 3e839eeae..000000000
--- a/tools/wave/build/Jamfile.v2
+++ /dev/null
@@ -1,69 +0,0 @@
-# Wave: A Standard compliant C++ preprocessor
-#
-# Boost Wave Library Build Jamfile
-#
-# http://www.boost.org/
-#
-# Copyright (c) 2001-2010 Hartmut Kaiser. 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)
-
-# Make sure all of Wave is compiled with threading disabled. We still need
-# to link with Boost.Thread, but no multi-threaded features are being used
-# in the Wave tool anyway.
-
-import feature ;
-
-feature.feature wavetool
- : on
- : optional composite propagated
- ;
-
-feature.compose <wavetool>on
- : <define>BOOST_WAVE_SUPPORT_THREADING=0
- ;
-
-###############################################################################
-project
- : requirements
- <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
- <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
- ;
-
-exe wave
- :
- ../cpp.cpp
- /boost//wave
- /boost//program_options
- /boost//filesystem
- /boost//serialization
- /boost//system
- /boost//thread
- /boost//date_time
- :
- <threading>multi
-# <debug-symbols>on
- <wavetool>on
- :
- release
- ;
-
-install dist-bin
- :
- wave
- :
- <install-type>EXE
- <location>../../../dist/bin
- :
- release
- ;
-
-install dist-lib
- :
- wave
- :
- <install-type>LIB
- <location>../../../dist/lib
- :
- release
- ;
diff --git a/tools/wave/cpp.cpp b/tools/wave/cpp.cpp
deleted file mode 100644
index 32bdd62ba..000000000
--- a/tools/wave/cpp.cpp
+++ /dev/null
@@ -1,1473 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
-
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#define BOOST_WAVE_SERIALIZATION 0 // enable serialization
-#define BOOST_WAVE_BINARY_SERIALIZATION 0 // use binary archives
-#define BOOST_WAVE_XML_SERIALIZATION 1 // use XML archives
-
-#include "cpp.hpp" // global configuration
-
-///////////////////////////////////////////////////////////////////////////////
-// Include additional Boost libraries
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/convenience.hpp>
-#include <boost/timer.hpp>
-#include <boost/any.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// Include Wave itself
-#include <boost/wave.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// Include the lexer related stuff
-#include <boost/wave/cpplexer/cpp_lex_token.hpp> // token type
-#include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer type
-
-///////////////////////////////////////////////////////////////////////////////
-// Include serialization support, if requested
-#if BOOST_WAVE_SERIALIZATION != 0
-#include <boost/serialization/serialization.hpp>
-#if BOOST_WAVE_BINARY_SERIALIZATION != 0
-#include <boost/archive/binary_iarchive.hpp>
-#include <boost/archive/binary_oarchive.hpp>
-typedef boost::archive::binary_iarchive iarchive;
-typedef boost::archive::binary_oarchive oarchive;
-#elif BOOST_WAVE_XML_SERIALIZATION != 0
-#include <boost/archive/xml_iarchive.hpp>
-#include <boost/archive/xml_oarchive.hpp>
-typedef boost::archive::xml_iarchive iarchive;
-typedef boost::archive::xml_oarchive oarchive;
-#else
-#include <boost/archive/text_iarchive.hpp>
-#include <boost/archive/text_oarchive.hpp>
-typedef boost::archive::text_iarchive iarchive;
-typedef boost::archive::text_oarchive oarchive;
-#endif
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Include the context policies to use
-#include "trace_macro_expansion.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// Include lexer specifics, import lexer names
-#if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION == 0
-#include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp>
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Include the grammar definitions, if these shouldn't be compiled separately
-// (ATTENTION: _very_ large compilation times!)
-#if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION == 0
-#include <boost/wave/grammars/cpp_intlit_grammar.hpp>
-#include <boost/wave/grammars/cpp_chlit_grammar.hpp>
-#include <boost/wave/grammars/cpp_grammar.hpp>
-#include <boost/wave/grammars/cpp_expression_grammar.hpp>
-#include <boost/wave/grammars/cpp_predef_macros_grammar.hpp>
-#include <boost/wave/grammars/cpp_defined_grammar.hpp>
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Import required names
-using namespace boost::spirit::classic;
-
-using std::pair;
-using std::vector;
-using std::getline;
-using std::ofstream;
-using std::cout;
-using std::cerr;
-using std::endl;
-using std::ostream;
-using std::istreambuf_iterator;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// This application uses the lex_iterator and lex_token types predefined
-// with the Wave library, but it is possible to use your own types.
-//
-// You may want to have a look at the other samples to see how this is
-// possible to achieve.
- typedef boost::wave::cpplexer::lex_token<> token_type;
- typedef boost::wave::cpplexer::lex_iterator<token_type>
- lex_iterator_type;
-
-// The C++ preprocessor iterators shouldn't be constructed directly. They
-// are to be generated through a boost::wave::context<> object. This
-// boost::wave::context object is additionally to be used to initialize and
-// define different parameters of the actual preprocessing.
- typedef boost::wave::context<
- std::string::iterator, lex_iterator_type,
- boost::wave::iteration_context_policies::load_file_to_string,
- trace_macro_expansion<token_type> >
- context_type;
-
-///////////////////////////////////////////////////////////////////////////////
-// print the current version
-std::string get_version()
-{
- std::string version (context_type::get_version_string());
- version = version.substr(1, version.size()-2); // strip quotes
- version += std::string(" (" CPP_VERSION_DATE_STR ")"); // add date
- return version;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// print the current version for interactive sessions
-int print_interactive_version()
-{
- cout << "Wave: A Standard conformant C++ preprocessor based on the Boost.Wave library" << endl;
- cout << "Version: " << get_version() << endl;
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// print the copyright statement
-int print_copyright()
-{
- char const *copyright[] = {
- "",
- "Wave: A Standard conformant C++ preprocessor based on the Boost.Wave library",
- "http://www.boost.org/",
- "",
- "Copyright (c) 2001-2012 Hartmut Kaiser, 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)",
- 0
- };
-
- for (int i = 0; 0 != copyright[i]; ++i)
- cout << copyright[i] << endl;
-
- return 0; // exit app
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// forward declarations only
-namespace cmd_line_utils
-{
- class include_paths;
-}
-
-namespace boost { namespace program_options {
-
- void validate(boost::any &v, std::vector<std::string> const &s,
- cmd_line_utils::include_paths *, long);
-
-}} // boost::program_options
-
-///////////////////////////////////////////////////////////////////////////////
-#include <boost/program_options.hpp>
-
-namespace po = boost::program_options;
-namespace fs = boost::filesystem;
-
-///////////////////////////////////////////////////////////////////////////////
-namespace cmd_line_utils {
-
- // Additional command line parser which interprets '@something' as an
- // option "config-file" with the value "something".
- inline pair<std::string, std::string>
- at_option_parser(std::string const&s)
- {
- if ('@' == s[0])
- return std::make_pair(std::string("config-file"), s.substr(1));
- else
- return pair<std::string, std::string>();
- }
-
- // class, which keeps include file information read from the command line
- class include_paths {
- public:
- include_paths() : seen_separator(false) {}
-
- vector<std::string> paths; // stores user paths
- vector<std::string> syspaths; // stores system paths
- bool seen_separator; // command line contains a '-I-' option
-
- // Function which validates additional tokens from command line.
- static void
- validate(boost::any &v, vector<std::string> const &tokens)
- {
- if (v.empty())
- v = boost::any(include_paths());
-
- include_paths *p = boost::any_cast<include_paths>(&v);
-
- BOOST_ASSERT(p);
- // Assume only one path per '-I' occurrence.
- std::string const& t = po::validators::get_single_string(tokens);
- if (t == "-") {
- // found -I- option, so switch behaviour
- p->seen_separator = true;
- }
- else if (p->seen_separator) {
- // store this path as a system path
- p->syspaths.push_back(t);
- }
- else {
- // store this path as an user path
- p->paths.push_back(t);
- }
- }
- };
-
- // Read all options from a given config file, parse and add them to the
- // given variables_map
- bool read_config_file_options(std::string const &filename,
- po::options_description const &desc, po::variables_map &vm,
- bool may_fail = false)
- {
- std::ifstream ifs(filename.c_str());
-
- if (!ifs.is_open()) {
- if (!may_fail) {
- cerr << filename
- << ": command line warning: config file not found"
- << endl;
- }
- return false;
- }
-
- vector<std::string> options;
- std::string line;
-
- while (std::getline(ifs, line)) {
- // skip empty lines
- std::string::size_type pos = line.find_first_not_of(" \t");
- if (pos == std::string::npos)
- continue;
-
- // skip comment lines
- if ('#' != line[pos]) {
- // strip leading and trailing whitespace
- std::string::size_type endpos = line.find_last_not_of(" \t");
- BOOST_ASSERT(endpos != std::string::npos);
- options.push_back(line.substr(pos, endpos-pos+1));
- }
- }
-
- if (options.size() > 0) {
- using namespace boost::program_options::command_line_style;
- po::store(po::command_line_parser(options)
- .options(desc).style(unix_style).run(), vm);
- po::notify(vm);
- }
- return true;
- }
-
- // predicate to extract all positional arguments from the command line
- struct is_argument {
- bool operator()(po::option const &opt)
- {
- return (opt.position_key == -1) ? true : false;
- }
- };
-
- // trim quotes from path names, if any
- std::string trim_quotes(std::string const& file)
- {
- if (('"' == file[0] || '\'' == file[0]) && file[0] == file[file.size()-1])
- {
- return file.substr(1, file.size()-2);
- }
- return file;
- }
-
-///////////////////////////////////////////////////////////////////////////////
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Special validator overload, which allows to handle the -I- syntax for
-// switching the semantics of an -I option.
-//
-///////////////////////////////////////////////////////////////////////////////
-namespace boost { namespace program_options {
-
- void validate(boost::any &v, std::vector<std::string> const &s,
- cmd_line_utils::include_paths *, long)
- {
- cmd_line_utils::include_paths::validate(v, s);
- }
-
-}} // namespace boost::program_options
-
-///////////////////////////////////////////////////////////////////////////////
-namespace {
-
- class auto_stop_watch : public stop_watch
- {
- public:
- auto_stop_watch(std::ostream &outstrm_)
- : print_time(false), outstrm(outstrm_)
- {
- }
-
- ~auto_stop_watch()
- {
- if (print_time) {
- outstrm << "Elapsed time: "
- << this->format_elapsed_time()
- << std::endl;
- }
- }
-
- void set_print_time(bool print_time_)
- {
- print_time = print_time_;
- }
-
- private:
- bool print_time;
- std::ostream &outstrm;
- };
-
- ///////////////////////////////////////////////////////////////////////////
- inline std::string
- report_iostate_error(std::ios::iostate state)
- {
- BOOST_ASSERT(state & (std::ios::badbit | std::ios::failbit | std::ios::eofbit));
- std::string result;
- if (state & std::ios::badbit) {
- result += " the reported problem was: "
- "loss of integrity of the stream buffer\n";
- }
- if (state & std::ios::failbit) {
- result += " the reported problem was: "
- "an operation was not processed correctly\n";
- }
- if (state & std::ios::eofbit) {
- result += " the reported problem was: "
- "end-of-file while writing to the stream\n";
- }
- return result;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Retrieve the position of a macro definition
- template <typename Context>
- inline bool
- get_macro_position(Context &ctx,
- typename Context::token_type::string_type const& name,
- typename Context::position_type &pos)
- {
- bool has_parameters = false;
- bool is_predefined = false;
- std::vector<typename Context::token_type> parameters;
- typename Context::token_sequence_type definition;
-
- return ctx.get_macro_definition(name, has_parameters, is_predefined,
- pos, parameters, definition);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Generate some meaningful error messages
- template <typename Exception>
- inline int
- report_error_message(Exception const &e)
- {
- // default error reporting
- cerr
- << e.file_name() << ":" << e.line_no() << ":" << e.column_no()
- << ": " << e.description() << endl;
-
- // errors count as one
- return (e.get_severity() == boost::wave::util::severity_error ||
- e.get_severity() == boost::wave::util::severity_fatal) ? 1 : 0;
- }
-
- template <typename Context>
- inline int
- report_error_message(Context &ctx, boost::wave::cpp_exception const &e)
- {
- // default error reporting
- int result = report_error_message(e);
-
- using boost::wave::preprocess_exception;
- switch(e.get_errorcode()) {
- case preprocess_exception::macro_redefinition:
- {
- // report the point of the initial macro definition
- typename Context::position_type pos;
- if (get_macro_position(ctx, e.get_related_name(), pos)) {
- cerr
- << pos << ": "
- << preprocess_exception::severity_text(e.get_severity())
- << ": this is the location of the previous definition."
- << endl;
- }
- else {
- cerr
- << e.file_name() << ":" << e.line_no() << ":"
- << e.column_no() << ": "
- << preprocess_exception::severity_text(e.get_severity())
- << ": not able to retrieve the location of the previous "
- << "definition." << endl;
- }
- }
- break;
-
- default:
- break;
- }
-
- return result;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Read one logical line of text
- inline bool
- read_a_line (std::istream &instream, std::string &instring)
- {
- bool eol = true;
- do {
- std::string line;
- std::getline(instream, line);
- if (instream.rdstate() & std::ios::failbit)
- return false; // nothing to do
-
- eol = true;
- if (line.find_last_of('\\') == line.size()-1)
- eol = false;
-
- instring += line + '\n';
- } while (!eol);
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Load and save the internal tables of the wave::context object
- template <typename Context>
- inline void
- load_state(po::variables_map const &vm, Context &ctx)
- {
-#if BOOST_WAVE_SERIALIZATION != 0
- try {
- if (vm.count("state") > 0) {
- fs::path state_file (
- boost::wave::util::create_path(vm["state"].as<std::string>()));
- if (state_file == "-")
- state_file = boost::wave::util::create_path("wave.state");
-
- std::ios::openmode mode = std::ios::in;
-
-#if BOOST_WAVE_BINARY_SERIALIZATION != 0
- mode = (std::ios::openmode)(mode | std::ios::binary);
-#endif
- std::ifstream ifs (state_file.string().c_str(), mode);
- if (ifs.is_open()) {
- using namespace boost::serialization;
- iarchive ia(ifs);
- std::string version;
-
- ia >> make_nvp("version", version); // load version
- if (version == CPP_VERSION_FULL_STR)
- ia >> make_nvp("state", ctx); // load the internal tables from disc
- else {
- cerr << "wave: detected version mismatch while loading state, state was not loaded." << endl;
- cerr << " loaded version: " << version << endl;
- cerr << " expected version: " << CPP_VERSION_FULL_STR << endl;
- }
- }
- }
- }
- catch (boost::archive::archive_exception const& e) {
- cerr << "wave: error while loading state: "
- << e.what() << endl;
- }
- catch (boost::wave::preprocess_exception const& e) {
- cerr << "wave: error while loading state: "
- << e.description() << endl;
- }
-#endif
- }
-
- template <typename Context>
- inline void
- save_state(po::variables_map const &vm, Context const &ctx)
- {
-#if BOOST_WAVE_SERIALIZATION != 0
- try {
- if (vm.count("state") > 0) {
- fs::path state_file (boost::wave::util::create_path(
- vm["state"].as<std::string>()));
- if (state_file == "-")
- state_file = boost::wave::util::create_path("wave.state");
-
- std::ios::openmode mode = std::ios::out;
-
-#if BOOST_WAVE_BINARY_SERIALIZATION != 0
- mode = (std::ios::openmode)(mode | std::ios::binary);
-#endif
- ofstream ofs(state_file.string().c_str(), mode);
- if (!ofs.is_open()) {
- cerr << "wave: could not open state file for writing: "
- << state_file.string() << endl;
- // this is non-fatal
- }
- else {
- using namespace boost::serialization;
- oarchive oa(ofs);
- std::string version(CPP_VERSION_FULL_STR);
- oa << make_nvp("version", version); // write version
- oa << make_nvp("state", ctx); // write the internal tables to disc
- }
- }
- }
- catch (boost::archive::archive_exception const& e) {
- cerr << "wave: error while writing state: "
- << e.what() << endl;
- }
-#endif
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // list all defined macros
- bool list_macro_names(context_type const& ctx, std::string filename)
- {
- // open file for macro names listing
- std::ofstream macronames_out;
- fs::path macronames_file (boost::wave::util::create_path(filename));
-
- if (macronames_file != "-") {
- macronames_file = boost::wave::util::complete_path(macronames_file);
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(macronames_file));
- macronames_out.open(macronames_file.string().c_str());
- if (!macronames_out.is_open()) {
- cerr << "wave: could not open file for macro name listing: "
- << macronames_file.string() << endl;
- return false;
- }
- }
- else {
- macronames_out.copyfmt(cout);
- macronames_out.clear(cout.rdstate());
- static_cast<std::basic_ios<char> &>(macronames_out).rdbuf(cout.rdbuf());
- }
-
- // simply list all defined macros and its definitions
- typedef context_type::const_name_iterator name_iterator;
- name_iterator end = ctx.macro_names_end();
- for (name_iterator it = ctx.macro_names_begin(); it != end; ++it)
- {
- typedef std::vector<context_type::token_type> parameters_type;
-
- bool has_pars = false;
- bool predef = false;
- context_type::position_type pos;
- parameters_type pars;
- context_type::token_sequence_type def;
-
- if (ctx.get_macro_definition(*it, has_pars, predef, pos, pars, def))
- {
- macronames_out << (predef ? "-P" : "-D") << *it;
- if (has_pars) {
- // list the parameter names for function style macros
- macronames_out << "(";
- parameters_type::const_iterator pend = pars.end();
- for (parameters_type::const_iterator pit = pars.begin();
- pit != pend; /**/)
- {
- macronames_out << (*pit).get_value();
- if (++pit != pend)
- macronames_out << ", ";
- }
- macronames_out << ")";
- }
- macronames_out << "=";
-
- // print the macro definition
- context_type::token_sequence_type::const_iterator dend = def.end();
- for (context_type::token_sequence_type::const_iterator dit = def.begin();
- dit != dend; ++dit)
- {
- macronames_out << (*dit).get_value();
- }
-
- macronames_out << std::endl;
- }
- }
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // list macro invocation counts
- bool list_macro_counts(context_type const& ctx, std::string filename)
- {
- // open file for macro invocation count listing
- std::ofstream macrocounts_out;
- fs::path macrocounts_file (boost::wave::util::create_path(filename));
-
- if (macrocounts_file != "-") {
- macrocounts_file = boost::wave::util::complete_path(macrocounts_file);
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(macrocounts_file));
- macrocounts_out.open(macrocounts_file.string().c_str());
- if (!macrocounts_out.is_open()) {
- cerr << "wave: could not open file for macro invocation count listing: "
- << macrocounts_file.string() << endl;
- return false;
- }
- }
- else {
- macrocounts_out.copyfmt(cout);
- macrocounts_out.clear(cout.rdstate());
- static_cast<std::basic_ios<char> &>(macrocounts_out).rdbuf(cout.rdbuf());
- }
-
- // list all expanded macro names and their counts in alphabetical order
- std::map<std::string, std::size_t> const& counts =
- ctx.get_hooks().get_macro_counts();
-
- typedef std::map<std::string, std::size_t>::const_iterator iterator;
- iterator end = counts.end();
- for (iterator it = counts.begin(); it != end; ++it)
- macrocounts_out << (*it).first << "," << (*it).second << std::endl;
-
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // read all of a file into a string
- std::string read_entire_file(std::istream& instream)
- {
- std::string content;
-
- instream.unsetf(std::ios::skipws);
-
-#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
- // this is known to be very slow for large files on some systems
- copy (std::istream_iterator<char>(instream),
- std::istream_iterator<char>(),
- std::inserter(content, content.end()));
-#else
- content = std::string(std::istreambuf_iterator<char>(instream.rdbuf()),
- std::istreambuf_iterator<char>());
-#endif
- return content;
- }
-} // anonymous namespace
-
-///////////////////////////////////////////////////////////////////////////////
-// do the actual preprocessing
-int
-do_actual_work (std::string file_name, std::istream &instream,
- po::variables_map const &vm, bool input_is_stdin)
-{
-// current file position is saved for exception handling
-boost::wave::util::file_position_type current_position;
-auto_stop_watch elapsed_time(cerr);
-int error_count = 0;
-
- try {
- // process the given file
- std::string instring;
-
- instream.unsetf(std::ios::skipws);
- if (!input_is_stdin)
- instring = read_entire_file(instream);
-
- // The preprocessing of the input stream is done on the fly behind the
- // scenes during iteration over the context_type::iterator_type stream.
- std::ofstream output;
- std::ofstream traceout;
- std::ofstream includelistout;
- std::ofstream listguardsout;
-
- trace_flags enable_trace = trace_nothing;
-
- if (vm.count("traceto")) {
- // try to open the file, where to put the trace output
- fs::path trace_file (boost::wave::util::create_path(
- vm["traceto"].as<std::string>()));
-
- if (trace_file != "-") {
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(trace_file));
- traceout.open(trace_file.string().c_str());
- if (!traceout.is_open()) {
- cerr << "wave: could not open trace file: " << trace_file
- << endl;
- return -1;
- }
- }
- enable_trace = trace_macros;
- }
- if ((enable_trace & trace_macros) && !traceout.is_open()) {
- // by default trace to std::cerr
- traceout.copyfmt(cerr);
- traceout.clear(cerr.rdstate());
- static_cast<std::basic_ios<char> &>(traceout).rdbuf(cerr.rdbuf());
- }
-
- // Open the stream where to output the list of included file names
- if (vm.count("listincludes")) {
- // try to open the file, where to put the include list
- fs::path includes_file(boost::wave::util::create_path(
- vm["listincludes"].as<std::string>()));
-
- if (includes_file != "-") {
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(includes_file));
- includelistout.open(includes_file.string().c_str());
- if (!includelistout.is_open()) {
- cerr << "wave: could not open include list file: "
- << includes_file.string() << endl;
- return -1;
- }
- }
- enable_trace = trace_flags(enable_trace | trace_includes);
- }
- if ((enable_trace & trace_includes) && !includelistout.is_open()) {
- // by default list included names to std::cout
- includelistout.copyfmt(cout);
- includelistout.clear(cout.rdstate());
- static_cast<std::basic_ios<char> &>(includelistout).
- rdbuf(cout.rdbuf());
- }
-
- // Open the stream where to output the list of included file names
- if (vm.count("listguards")) {
- // try to open the file, where to put the include list
- fs::path listguards_file(boost::wave::util::create_path(
- vm["listguards"].as<std::string>()));
-
- if (listguards_file != "-") {
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(listguards_file));
- listguardsout.open(listguards_file.string().c_str());
- if (!listguardsout.is_open()) {
- cerr << "wave: could not open include guard list file: "
- << listguards_file.string() << endl;
- return -1;
- }
- }
- enable_trace = trace_flags(enable_trace | trace_guards);
- }
- if ((enable_trace & trace_guards) && !listguardsout.is_open()) {
- // by default list included names to std::cout
- listguardsout.copyfmt(cout);
- listguardsout.clear(cout.rdstate());
- static_cast<std::basic_ios<char> &>(listguardsout).
- rdbuf(cout.rdbuf());
- }
-
- // enable preserving comments mode
- bool preserve_comments = false;
- bool preserve_whitespace = false;
- bool preserve_bol_whitespace = false;
-
- if (vm.count("preserve")) {
- int preserve = vm["preserve"].as<int>();
-
- switch(preserve) {
- case 0: break; // preserve no whitespace
- case 3: // preserve all whitespace
- preserve_whitespace = true;
- preserve_comments = true;
- preserve_bol_whitespace = true;
- break;
-
- case 2: // preserve comments and BOL whitespace only
- preserve_comments = true;
- preserve_bol_whitespace = true;
- break;
-
- case 1: // preserve BOL whitespace only
- preserve_bol_whitespace = true;
- break;
-
- default:
- cerr << "wave: bogus preserve whitespace option value: "
- << preserve << ", should be 0, 1, 2, or 3" << endl;
- return -1;
- }
- }
-
- // Since the #pragma wave system() directive may cause a potential security
- // threat, it has to be enabled explicitly by --extended or -x
- bool enable_system_command = false;
-
- if (vm.count("extended"))
- enable_system_command = true;
-
- // This this the central piece of the Wave library, it provides you with
- // the iterators to get the preprocessed tokens and allows to configure
- // the preprocessing stage in advance.
- bool allow_output = true; // will be manipulated from inside the hooks object
- std::string default_outfile; // will be used from inside the hooks object
- trace_macro_expansion<token_type> hooks(preserve_whitespace,
- preserve_bol_whitespace, output, traceout, includelistout,
- listguardsout, enable_trace, enable_system_command, allow_output,
- default_outfile);
-
- // enable macro invocation count, if appropriate
- if (vm.count("macrocounts"))
- hooks.enable_macro_counting();
-
- // check, if we have a license file to prepend
- std::string license;
-
- if (vm.count ("license")) {
- // try to open the file, where to put the preprocessed output
- std::string license_file(vm["license"].as<std::string>());
- std::ifstream license_stream(license_file.c_str());
-
- if (!license_stream.is_open()) {
- cerr << "wave: could not open specified license file: "
- << license_file << endl;
- return -1;
- }
- license = read_entire_file(license_stream);
- hooks.set_license_info(license);
- }
-
- context_type ctx (instring.begin(), instring.end(), file_name.c_str(), hooks);
-
-#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
- // enable C99 mode, if appropriate (implies variadics)
- if (vm.count("c99")) {
-#if BOOST_WAVE_SUPPORT_CPP0X != 0
- if (vm.count("c++11")) {
- cerr << "wave: multiple language options specified: --c99 "
- "and --c++11" << endl;
- return -1;
- }
-#endif
- ctx.set_language(
- boost::wave::language_support(
- boost::wave::support_c99
- | boost::wave::support_option_convert_trigraphs
- | boost::wave::support_option_emit_line_directives
-#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- | boost::wave::support_option_include_guard_detection
-#endif
-#if BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES != 0
- | boost::wave::support_option_emit_pragma_directives
-#endif
- | boost::wave::support_option_insert_whitespace
- ));
- }
- else if (vm.count("variadics")) {
- // enable variadics and placemarkers, if appropriate
- ctx.set_language(boost::wave::enable_variadics(ctx.get_language()));
- }
-#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
-#if BOOST_WAVE_SUPPORT_CPP0X != 0
- if (vm.count("c++11")) {
- if (vm.count("c99")) {
- cerr << "wave: multiple language options specified: --c99 "
- "and --c++11" << endl;
- return -1;
- }
- ctx.set_language(
- boost::wave::language_support(
- boost::wave::support_cpp0x
- | boost::wave::support_option_convert_trigraphs
- | boost::wave::support_option_long_long
- | boost::wave::support_option_emit_line_directives
-#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- | boost::wave::support_option_include_guard_detection
-#endif
-#if BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES != 0
- | boost::wave::support_option_emit_pragma_directives
-#endif
- | boost::wave::support_option_insert_whitespace
- ));
- }
-#endif // BOOST_WAVE_SUPPORT_CPP0X != 0
-
- // enable long long support, if appropriate
- if (vm.count("long_long")) {
- ctx.set_language(
- boost::wave::enable_long_long(ctx.get_language()));
- }
-
-#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
-// disable include guard detection
- if (vm.count("noguard")) {
- ctx.set_language(
- boost::wave::enable_include_guard_detection(
- ctx.get_language(), false));
- }
-#endif
-
- // enable preserving comments mode
- if (preserve_comments) {
- ctx.set_language(
- boost::wave::enable_preserve_comments(ctx.get_language()));
- }
-
- // control the generation of #line directives
- if (vm.count("line")) {
- int lineopt = vm["line"].as<int>();
- if (0 != lineopt && 1 != lineopt && 2 != lineopt) {
- cerr << "wave: bogus value for --line command line option: "
- << lineopt << endl;
- return -1;
- }
- ctx.set_language(
- boost::wave::enable_emit_line_directives(ctx.get_language(),
- lineopt != 0));
-
- if (2 == lineopt)
- ctx.get_hooks().enable_relative_names_in_line_directives(true);
- }
-
- // control whether whitespace should be inserted to disambiguate output
- if (vm.count("disambiguate")) {
- int disambiguateopt = vm["disambiguate"].as<int>();
- if (0 != disambiguateopt && 1 != disambiguateopt) {
- cerr << "wave: bogus value for --disambiguate command line option: "
- << disambiguateopt << endl;
- return -1;
- }
- ctx.set_language(
- boost::wave::enable_insert_whitespace(ctx.get_language(),
- disambiguateopt != 0));
- }
-
- // add include directories to the system include search paths
- if (vm.count("sysinclude")) {
- vector<std::string> syspaths = vm["sysinclude"].as<vector<std::string> >();
-
- vector<std::string>::const_iterator end = syspaths.end();
- for (vector<std::string>::const_iterator cit = syspaths.begin();
- cit != end; ++cit)
- {
- ctx.add_sysinclude_path(cmd_line_utils::trim_quotes(*cit).c_str());
- }
- }
-
- // add include directories to the include search paths
- if (vm.count("include")) {
- cmd_line_utils::include_paths const &ip =
- vm["include"].as<cmd_line_utils::include_paths>();
- vector<std::string>::const_iterator end = ip.paths.end();
-
- for (vector<std::string>::const_iterator cit = ip.paths.begin();
- cit != end; ++cit)
- {
- ctx.add_include_path(cmd_line_utils::trim_quotes(*cit).c_str());
- }
-
- // if -I- was given on the command line, this has to be propagated
- if (ip.seen_separator)
- ctx.set_sysinclude_delimiter();
-
- // add system include directories to the include path
- vector<std::string>::const_iterator sysend = ip.syspaths.end();
- for (vector<std::string>::const_iterator syscit = ip.syspaths.begin();
- syscit != sysend; ++syscit)
- {
- ctx.add_sysinclude_path(cmd_line_utils::trim_quotes(*syscit).c_str());
- }
- }
-
- // add additional defined macros
- if (vm.count("define")) {
- vector<std::string> const &macros = vm["define"].as<vector<std::string> >();
- vector<std::string>::const_iterator end = macros.end();
- for (vector<std::string>::const_iterator cit = macros.begin();
- cit != end; ++cit)
- {
- ctx.add_macro_definition(*cit);
- }
- }
-
- // add additional predefined macros
- if (vm.count("predefine")) {
- vector<std::string> const &predefmacros =
- vm["predefine"].as<vector<std::string> >();
- vector<std::string>::const_iterator end = predefmacros.end();
- for (vector<std::string>::const_iterator cit = predefmacros.begin();
- cit != end; ++cit)
- {
- ctx.add_macro_definition(*cit, true);
- }
- }
-
- // undefine specified macros
- if (vm.count("undefine")) {
- vector<std::string> const &undefmacros =
- vm["undefine"].as<vector<std::string> >();
- vector<std::string>::const_iterator end = undefmacros.end();
- for (vector<std::string>::const_iterator cit = undefmacros.begin();
- cit != end; ++cit)
- {
- ctx.remove_macro_definition(*cit, true);
- }
- }
-
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
- // suppress expansion of specified macros
- if (vm.count("noexpand")) {
- vector<std::string> const &noexpandmacros =
- vm["noexpand"].as<vector<std::string> >();
- vector<std::string>::const_iterator end = noexpandmacros.end();
- for (vector<std::string>::const_iterator cit = noexpandmacros.begin();
- cit != end; ++cit)
- {
- ctx.get_hooks().add_noexpandmacro(*cit);
- }
- }
-#endif
-
- // maximal include nesting depth
- if (vm.count("nesting")) {
- int max_depth = vm["nesting"].as<int>();
- if (max_depth < 1 || max_depth > 100000) {
- cerr << "wave: bogus maximal include nesting depth: "
- << max_depth << endl;
- return -1;
- }
- ctx.set_max_include_nesting_depth(max_depth);
- }
-
- // open the output file
- if (vm.count("output")) {
- // try to open the file, where to put the preprocessed output
- fs::path out_file (boost::wave::util::create_path(
- vm["output"].as<std::string>()));
-
- if (out_file == "-") {
- allow_output = false; // inhibit output initially
- default_outfile = "-";
- }
- else {
- out_file = boost::wave::util::complete_path(out_file);
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(out_file));
- output.open(out_file.string().c_str());
- if (!output.is_open()) {
- cerr << "wave: could not open output file: "
- << out_file.string() << endl;
- return -1;
- }
- if (!license.empty())
- output << license;
- default_outfile = out_file.string();
- }
- }
- else if (!input_is_stdin && vm.count("autooutput")) {
- // generate output in the file <input_base_name>.i
- fs::path out_file (boost::wave::util::create_path(file_name));
- std::string basename (boost::wave::util::leaf(out_file));
- std::string::size_type pos = basename.find_last_of(".");
-
- if (std::string::npos != pos)
- basename = basename.substr(0, pos);
- out_file = boost::wave::util::branch_path(out_file) / (basename + ".i");
-
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(out_file));
- output.open(out_file.string().c_str());
- if (!output.is_open()) {
- cerr << "wave: could not open output file: "
- << out_file.string() << endl;
- return -1;
- }
- if (!license.empty())
- output << license;
- default_outfile = out_file.string();
- }
-
- // we assume the session to be interactive if input is stdin and output is
- // stdout and the output is not inhibited
- bool is_interactive = input_is_stdin && !output.is_open() && allow_output;
-
- if (is_interactive) {
- // if interactive we don't warn for missing endif's etc.
- ctx.set_language(
- boost::wave::enable_single_line(ctx.get_language()), false);
- }
-
- // analyze the input file
- context_type::iterator_type first = ctx.begin();
- context_type::iterator_type last = ctx.end();
-
- // preprocess the required include files
- if (vm.count("forceinclude")) {
- // add the filenames to force as include files in _reverse_ order
- // the second parameter 'is_last' of the force_include function should
- // be set to true for the last (first given) file.
- std::vector<std::string> const &force =
- vm["forceinclude"].as<std::vector<std::string> >();
- std::vector<std::string>::const_reverse_iterator rend = force.rend();
- for (std::vector<std::string>::const_reverse_iterator cit = force.rbegin();
- cit != rend; /**/)
- {
- std::string filename(*cit);
- first.force_include(filename.c_str(), ++cit == rend);
- }
- }
-
- elapsed_time.set_print_time(!input_is_stdin && vm.count("timer") > 0);
- if (is_interactive) {
- print_interactive_version(); // print welcome message
- load_state(vm, ctx); // load the internal tables from disc
- }
- else if (vm.count("state")) {
- // the option "state" is usable in interactive mode only
- cerr << "wave: ignoring the command line option 'state', "
- << "use it in interactive mode only." << endl;
- }
-
- // >>>>>>>>>>>>> The actual preprocessing happens here. <<<<<<<<<<<<<<<<<<<
- // loop over the input lines if reading from stdin, otherwise this loop
- // will be executed once
- do {
- // loop over all generated tokens outputting the generated text
- bool finished = false;
-
- if (input_is_stdin) {
- if (is_interactive)
- cout << ">>> "; // prompt if is interactive
-
- // read next line and continue
- instring.clear();
- if (!read_a_line(instream, instring))
- break; // end of input reached
- first = ctx.begin(instring.begin(), instring.end());
- }
-
- bool need_to_advanve = false;
-
- do {
- try {
- if (need_to_advanve) {
- ++first;
- need_to_advanve = false;
- }
-
- while (first != last) {
- // store the last known good token position
- current_position = (*first).get_position();
-
- // print out the current token value
- if (allow_output) {
- if (!output.good()) {
- cerr << "wave: problem writing to the current "
- << "output file" << endl;
- cerr << report_iostate_error(output.rdstate());
- break;
- }
- if (output.is_open())
- output << (*first).get_value();
- else
- cout << (*first).get_value();
- }
-
- // advance to the next token
- ++first;
- }
- finished = true;
- }
- catch (boost::wave::cpp_exception const &e) {
- // some preprocessing error
- if (is_interactive || boost::wave::is_recoverable(e)) {
- error_count += report_error_message(ctx, e);
- need_to_advanve = true; // advance to the next token
- }
- else {
- throw; // re-throw for non-recoverable errors
- }
- }
- catch (boost::wave::cpplexer::lexing_exception const &e) {
- // some preprocessing error
- if (is_interactive ||
- boost::wave::cpplexer::is_recoverable(e))
- {
- error_count += report_error_message(e);
- need_to_advanve = true; // advance to the next token
- }
- else {
- throw; // re-throw for non-recoverable errors
- }
- }
- } while (!finished);
- } while (input_is_stdin);
-
- if (is_interactive)
- save_state(vm, ctx); // write the internal tables to disc
-
- // list all defined macros at the end of the preprocessing
- if (vm.count("macronames")) {
- if (!list_macro_names(ctx, vm["macronames"].as<std::string>()))
- return -1;
- }
- if (vm.count("macrocounts")) {
- if (!list_macro_counts(ctx, vm["macrocounts"].as<std::string>()))
- return -1;
- }
- }
- catch (boost::wave::cpp_exception const &e) {
- // some preprocessing error
- report_error_message(e);
- return 1;
- }
- catch (boost::wave::cpplexer::lexing_exception const &e) {
- // some lexing error
- report_error_message(e);
- return 2;
- }
- catch (std::exception const &e) {
- // use last recognized token to retrieve the error position
- cerr
- << current_position << ": "
- << "exception caught: " << e.what()
- << endl;
- return 3;
- }
- catch (...) {
- // use last recognized token to retrieve the error position
- cerr
- << current_position << ": "
- << "unexpected exception caught." << endl;
- return 4;
- }
- return -error_count; // returns the number of errors as a negative integer
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// main entry point
-int
-main (int argc, char *argv[])
-{
- // test Wave compilation configuration
- if (!BOOST_WAVE_TEST_CONFIGURATION()) {
- cout << "wave: warning: the library this application was linked against was compiled "
- << endl
- << " using a different configuration (see wave_config.hpp)."
- << endl;
- }
-
- // analyze the command line options and arguments
- try {
- // declare the options allowed on the command line only
- po::options_description desc_cmdline ("Options allowed on the command line only");
-
- desc_cmdline.add_options()
- ("help,h", "print out program usage (this message)")
- ("version,v", "print the version number")
- ("copyright", "print out the copyright statement")
- ("config-file", po::value<vector<std::string> >()->composing(),
- "specify a config file (alternatively: @filepath)")
- ;
-
- // declare the options allowed on command line and in config files
- po::options_description desc_generic ("Options allowed additionally in a config file");
-
- desc_generic.add_options()
- ("output,o", po::value<std::string>(),
- "specify a file [arg] to use for output instead of stdout or "
- "disable output [-]")
- ("autooutput,E",
- "output goes into a file named <input_basename>.i")
- ("license", po::value<std::string>(),
- "prepend the content of the specified file to each created file")
- ("include,I", po::value<cmd_line_utils::include_paths>()->composing(),
- "specify an additional include directory")
- ("sysinclude,S", po::value<vector<std::string> >()->composing(),
- "specify an additional system include directory")
- ("forceinclude,F", po::value<std::vector<std::string> >()->composing(),
- "force inclusion of the given file")
- ("define,D", po::value<std::vector<std::string> >()->composing(),
- "specify a macro to define (as macro[=[value]])")
- ("predefine,P", po::value<std::vector<std::string> >()->composing(),
- "specify a macro to predefine (as macro[=[value]])")
- ("undefine,U", po::value<std::vector<std::string> >()->composing(),
- "specify a macro to undefine")
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
- ("noexpand,N", po::value<std::vector<std::string> >()->composing(),
- "specify a macro name, which should not be expanded")
-#endif
- ("nesting,n", po::value<int>(),
- "specify a new maximal include nesting depth")
- ;
-
- po::options_description desc_ext ("Extended options (allowed everywhere)");
-
- desc_ext.add_options()
- ("traceto,t", po::value<std::string>(),
- "output macro expansion tracing information to a file [arg] "
- "or to stderr [-]")
- ("timer", "output overall elapsed computing time to stderr")
- ("long_long", "enable long long support in C++ mode")
-#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
- ("variadics", "enable certain C99 extensions in C++ mode")
- ("c99", "enable C99 mode (implies --variadics)")
-#endif
-#if BOOST_WAVE_SUPPORT_CPP0X != 0
- ("c++11", "enable C++11 mode (implies --variadics and --long_long)")
-#endif
- ("listincludes,l", po::value<std::string>(),
- "list names of included files to a file [arg] or to stdout [-]")
- ("macronames,m", po::value<std::string>(),
- "list all defined macros to a file [arg] or to stdout [-]")
- ("macrocounts,c", po::value<std::string>(),
- "list macro invocation counts to a file [arg] or to stdout [-]")
- ("preserve,p", po::value<int>()->default_value(0),
- "preserve whitespace\n"
- "0: no whitespace is preserved (default),\n"
- "1: begin of line whitespace is preserved,\n"
- "2: comments and begin of line whitespace is preserved,\n"
- "3: all whitespace is preserved")
- ("line,L", po::value<int>()->default_value(1),
- "control the generation of #line directives\n"
- "0: no #line directives are generated,\n"
- "1: #line directives will be emitted (default),\n"
- "2: #line directives will be emitted using relative\n"
- " filenames")
- ("disambiguate", po::value<int>()->default_value(1),
- "control whitespace insertion to disambiguate\n"
- "consecutive tokens\n"
- "0: no additional whitespace is generated,\n"
- "1: whitespace is used to disambiguate output (default)")
- ("extended,x", "enable the #pragma wave system() directive")
-#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- ("noguard,G", "disable include guard detection")
- ("listguards,g", po::value<std::string>(),
- "list names of files flagged as 'include once' to a file [arg] "
- "or to stdout [-]")
-#endif
-#if BOOST_WAVE_SERIALIZATION != 0
- ("state,s", po::value<std::string>(),
- "load and save state information from/to the given file [arg] "
- "or 'wave.state' [-] (interactive mode only)")
-#endif
- ;
-
- // combine the options for the different usage schemes
- po::options_description desc_overall_cmdline;
- po::options_description desc_overall_cfgfile;
-
- desc_overall_cmdline.add(desc_cmdline).add(desc_generic).add(desc_ext);
- desc_overall_cfgfile.add(desc_generic).add(desc_ext);
-
- // parse command line and store results
- using namespace boost::program_options::command_line_style;
-
- po::parsed_options opts(po::parse_command_line(argc, argv,
- desc_overall_cmdline, unix_style, cmd_line_utils::at_option_parser));
- po::variables_map vm;
-
- po::store(opts, vm);
- po::notify(vm);
-
-// // Try to find a wave.cfg in the same directory as the executable was
-// // started from. If this exists, treat it as a wave config file
-// fs::path filename(argv[0]);
-//
-// filename = filename.branch_path() / "wave.cfg";
-// cmd_line_utils::read_config_file_options(filename.string(),
-// desc_overall_cfgfile, vm, true);
-
- // extract the arguments from the parsed command line
- vector<po::option> arguments;
-
- std::remove_copy_if(opts.options.begin(), opts.options.end(),
- back_inserter(arguments), cmd_line_utils::is_argument());
-
- // try to find a config file somewhere up the filesystem hierarchy
- // starting with the input file path. This allows to use a general wave.cfg
- // file for all files in a certain project.
- if (arguments.size() > 0 && arguments[0].value[0] != "-") {
- // construct full path of input file
- fs::path input_dir (boost::wave::util::complete_path(
- boost::wave::util::create_path(arguments[0].value[0])));
-
- // chop of file name
- input_dir = boost::wave::util::branch_path(
- boost::wave::util::normalize(input_dir));
-
- // walk up the hierarchy, trying to find a file wave.cfg
- while (!input_dir.empty()) {
- fs::path filename = input_dir / "wave.cfg";
- if (cmd_line_utils::read_config_file_options(filename.string(),
- desc_overall_cfgfile, vm, true))
- {
- break; // break on the first cfg file found
- }
- input_dir = boost::wave::util::branch_path(input_dir);
- }
- }
-
- // if there is specified at least one config file, parse it and add the
- // options to the main variables_map
- if (vm.count("config-file")) {
- vector<std::string> const &cfg_files =
- vm["config-file"].as<vector<std::string> >();
- vector<std::string>::const_iterator end = cfg_files.end();
- for (vector<std::string>::const_iterator cit = cfg_files.begin();
- cit != end; ++cit)
- {
- // parse a single config file and store the results
- cmd_line_utils::read_config_file_options(*cit,
- desc_overall_cfgfile, vm);
- }
- }
-
- // ... act as required
- if (vm.count("help")) {
- po::options_description desc_help (
- "Usage: wave [options] [@config-file(s)] [file]");
-
- desc_help.add(desc_cmdline).add(desc_generic).add(desc_ext);
- cout << desc_help << endl;
- return 1;
- }
-
- if (vm.count("version")) {
- cout << get_version() << endl;
- return 0;
- }
-
- if (vm.count("copyright")) {
- return print_copyright();
- }
-
- // if there is no input file given, then take input from stdin
- if (0 == arguments.size() || 0 == arguments[0].value.size() ||
- arguments[0].value[0] == "-")
- {
- // preprocess the given input from stdin
- return do_actual_work("<stdin>", std::cin, vm, true);
- }
- else {
- if (arguments.size() > 1) {
- // this driver understands to parse one input file only
- cerr << "wave: more than one input file specified, "
- << "ignoring all but the first!" << endl;
- }
-
- std::string file_name(arguments[0].value[0]);
- std::ifstream instream(file_name.c_str());
-
- // preprocess the given input file
- if (!instream.is_open()) {
- cerr << "wave: could not open input file: " << file_name << endl;
- return -1;
- }
- return do_actual_work(file_name, instream, vm, false);
- }
- }
- catch (std::exception const &e) {
- cout << "wave: exception caught: " << e.what() << endl;
- return 6;
- }
- catch (...) {
- cerr << "wave: unexpected exception caught." << endl;
- return 7;
- }
-}
-
diff --git a/tools/wave/cpp.hpp b/tools/wave/cpp.hpp
deleted file mode 100644
index f2253f3c2..000000000
--- a/tools/wave/cpp.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
-
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#if !defined(CPP_HPP_920D0370_741F_44AF_BF86_F6104BDACF75_INCLUDED)
-#define CPP_HPP_920D0370_741F_44AF_BF86_F6104BDACF75_INCLUDED
-
-///////////////////////////////////////////////////////////////////////////////
-// This file may be used as a precompiled header (if applicable)
-
-///////////////////////////////////////////////////////////////////////////////
-// include often used files from the stdlib
-#include <iostream>
-#include <fstream>
-#include <string>
-#include <vector>
-#include <algorithm>
-#include <iterator>
-
-///////////////////////////////////////////////////////////////////////////////
-// include boost config
-#include <boost/config.hpp> // global configuration information
-
-///////////////////////////////////////////////////////////////////////////////
-// build version
-#include "cpp_version.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// configure this app here (global configuration constants)
-#include "cpp_config.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// include required boost libraries
-#include <boost/assert.hpp>
-#include <boost/pool/pool_alloc.hpp>
-
-#endif // !defined(CPP_HPP_920D0370_741F_44AF_BF86_F6104BDACF75_INCLUDED)
diff --git a/tools/wave/cpp_config.hpp b/tools/wave/cpp_config.hpp
deleted file mode 100644
index e6e4f63e2..000000000
--- a/tools/wave/cpp_config.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
- Global application configuration of the Wave driver command
-
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#if !defined(CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
-#define CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED
-
-///////////////////////////////////////////////////////////////////////////////
-// Uncomment the following, if you need debug output, the
-// BOOST_SPIRIT_DEBUG_FLAGS constants below helps to fine control the amount of
-// the generated debug output
-//#define BOOST_SPIRIT_DEBUG
-
-///////////////////////////////////////////////////////////////////////////////
-// debug rules, subrules and grammars only, for possible flags see
-// spirit/include/classic_debug.hpp
-#if defined(BOOST_SPIRIT_DEBUG)
-
-#define BOOST_SPIRIT_DEBUG_FLAGS ( \
- BOOST_SPIRIT_DEBUG_FLAGS_NODES | \
- BOOST_SPIRIT_DEBUG_FLAGS_CLOSURES \
- ) \
- /**/
-
-///////////////////////////////////////////////////////////////////////////////
-// Debug flags for the Wave library, possible flags (defined in
-// wave_config.hpp):
-//
-// #define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR 0x0001
-// #define BOOST_SPIRIT_DEBUG_FLAGS_TIME_CONVERSION 0x0002
-// #define BOOST_SPIRIT_DEBUG_FLAGS_CPP_EXPR_GRAMMAR 0x0004
-// #define BOOST_SPIRIT_DEBUG_FLAGS_INTLIT_GRAMMAR 0x0008
-// #define BOOST_SPIRIT_DEBUG_FLAGS_CHLIT_GRAMMAR 0x0010
-// #define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR 0x0020
-// #define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR 0x0040
-
-#define BOOST_SPIRIT_DEBUG_FLAGS_CPP ( 0 \
- /* insert the required flags from above */ \
- ) \
- /**/
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Include the configuration stuff for the Wave library itself
-#include <boost/wave/wave_config.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// MSVC specific #pragma's
-#if defined(BOOST_MSVC)
-#pragma warning (disable: 4355) // 'this' used in base member initializer list
-#pragma warning (disable: 4800) // forcing value to bool 'true' or 'false'
-#pragma inline_depth(255)
-#pragma inline_recursion(on)
-#endif // defined(BOOST_MSVC)
-
-#endif // !defined(CPP_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
diff --git a/tools/wave/cpp_version.hpp b/tools/wave/cpp_version.hpp
deleted file mode 100644
index 43330c2c9..000000000
--- a/tools/wave/cpp_version.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#if !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED)
-#define CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED
-
-#include <boost/wave/wave_version.hpp>
-
-#define CPP_VERSION_MAJOR BOOST_WAVE_VERSION_MAJOR
-#define CPP_VERSION_MINOR BOOST_WAVE_VERSION_MINOR
-#define CPP_VERSION_SUBMINOR BOOST_WAVE_VERSION_SUBMINOR
-#define CPP_VERSION_FULL BOOST_WAVE_VERSION
-
-#define CPP_VERSION_FULL_STR BOOST_PP_STRINGIZE(CPP_VERSION_FULL)
-
-#define CPP_VERSION_DATE 20120523L
-#define CPP_VERSION_DATE_STR "20120523"
-
-#endif // !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED)
diff --git a/tools/wave/stop_watch.hpp b/tools/wave/stop_watch.hpp
deleted file mode 100644
index e3285466e..000000000
--- a/tools/wave/stop_watch.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#if !defined(STOP_WATCH_HPP_HK040911_INCLUDED)
-#define STOP_WATCH_HPP_HK040911_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/timer.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-//
-class stop_watch : public boost::timer {
-
- typedef boost::timer base_t;
-
-public:
- stop_watch() : is_suspended_since(0), suspended_overall(0) {}
-
- void suspend()
- {
- if (0 == is_suspended_since) {
- // if not already suspended
- is_suspended_since = this->base_t::elapsed();
- }
- }
- void resume()
- {
- if (0 != is_suspended_since) {
- // if really suspended
- suspended_overall += this->base_t::elapsed() - is_suspended_since;
- is_suspended_since = 0;
- }
- }
- double elapsed() const
- {
- if (0 == is_suspended_since) {
- // currently running
- return this->base_t::elapsed() - suspended_overall;
- }
-
- // currently suspended
- BOOST_ASSERT(is_suspended_since >= suspended_overall);
- return is_suspended_since - suspended_overall;
- }
-
- std::string format_elapsed_time() const
- {
- double current = elapsed();
- char time_buffer[sizeof("1234:56:78.90 abcd.")+1];
-
- using namespace std;
- if (current >= 3600) {
- // show hours
- sprintf (time_buffer, "%d:%02d:%02d.%03d hrs.",
- (int)(current) / 3600, ((int)(current) % 3600) / 60,
- ((int)(current) % 3600) % 60,
- (int)(current * 1000) % 1000);
- }
- else if (current >= 60) {
- // show minutes
- sprintf (time_buffer, "%d:%02d.%03d min.",
- (int)(current) / 60, (int)(current) % 60,
- (int)(current * 1000) % 1000);
- }
- else {
- // show seconds
- sprintf(time_buffer, "%d.%03d sec.", (int)current,
- (int)(current * 1000) % 1000);
- }
- return time_buffer;
- }
-
-private:
- double is_suspended_since;
- double suspended_overall;
-};
-
-#endif // !defined(STOP_WATCH_HPP_HK040911_INCLUDED)
diff --git a/tools/wave/trace_macro_expansion.hpp b/tools/wave/trace_macro_expansion.hpp
deleted file mode 100644
index a12671811..000000000
--- a/tools/wave/trace_macro_expansion.hpp
+++ /dev/null
@@ -1,1494 +0,0 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
- http://www.boost.org/
-
- Copyright (c) 2001-2012 Hartmut Kaiser. 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)
-=============================================================================*/
-
-#if !defined(TRACE_MACRO_EXPANSION_HPP_D8469318_8407_4B9D_A19F_13CA60C1661F_INCLUDED)
-#define TRACE_MACRO_EXPANSION_HPP_D8469318_8407_4B9D_A19F_13CA60C1661F_INCLUDED
-
-#include <cstdio>
-#include <cstdlib>
-#include <ctime>
-
-#include <ostream>
-#include <string>
-#include <stack>
-#include <set>
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/convenience.hpp>
-
-#include <boost/wave/token_ids.hpp>
-#include <boost/wave/util/macro_helpers.hpp>
-#include <boost/wave/util/filesystem_compatibility.hpp>
-#include <boost/wave/preprocessing_hooks.hpp>
-#include <boost/wave/whitespace_handling.hpp>
-#include <boost/wave/language_support.hpp>
-#include <boost/wave/cpp_exceptions.hpp>
-
-#include "stop_watch.hpp"
-
-#ifdef BOOST_NO_STRINGSTREAM
-#include <strstream>
-#define BOOST_WAVE_OSSTREAM std::ostrstream
-std::string BOOST_WAVE_GETSTRING(std::ostrstream& ss)
-{
- ss << std::ends;
- std::string rval = ss.str();
- ss.freeze(false);
- return rval;
-}
-#else
-#include <sstream>
-#define BOOST_WAVE_GETSTRING(ss) ss.str()
-#define BOOST_WAVE_OSSTREAM std::ostringstream
-#endif
-
-// trace_flags: enable single tracing functionality
-enum trace_flags {
- trace_nothing = 0, // disable tracing
- trace_macros = 1, // enable macro tracing
- trace_macro_counts = 2, // enable invocation counting
- trace_includes = 4, // enable include file tracing
- trace_guards = 8 // enable include guard tracing
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Special error thrown whenever the #pragma wave system() directive is
-// disabled
-//
-///////////////////////////////////////////////////////////////////////////////
-class bad_pragma_exception :
- public boost::wave::preprocess_exception
-{
-public:
- enum error_code {
- pragma_system_not_enabled =
- boost::wave::preprocess_exception::last_error_number + 1,
- pragma_mismatched_push_pop,
- };
-
- bad_pragma_exception(char const *what_, error_code code, std::size_t line_,
- std::size_t column_, char const *filename_) throw()
- : boost::wave::preprocess_exception(what_,
- (boost::wave::preprocess_exception::error_code)code, line_,
- column_, filename_)
- {
- }
- ~bad_pragma_exception() throw() {}
-
- virtual char const *what() const throw()
- {
- return "boost::wave::bad_pragma_exception";
- }
- virtual bool is_recoverable() const throw()
- {
- return true;
- }
- virtual int get_severity() const throw()
- {
- return boost::wave::util::severity_remark;
- }
-
- static char const *error_text(int code)
- {
- switch(code) {
- case pragma_system_not_enabled:
- return "the directive '#pragma wave system()' was not enabled, use the "
- "-x command line argument to enable the execution of";
-
- case pragma_mismatched_push_pop:
- return "unbalanced #pragma push/pop in input file(s) for option";
- }
- return "Unknown exception";
- }
- static boost::wave::util::severity severity_level(int code)
- {
- switch(code) {
- case pragma_system_not_enabled:
- return boost::wave::util::severity_remark;
-
- case pragma_mismatched_push_pop:
- return boost::wave::util::severity_error;
- }
- return boost::wave::util::severity_fatal;
- }
- static char const *severity_text(int code)
- {
- return boost::wave::util::get_severity(boost::wave::util::severity_remark);
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// The trace_macro_expansion policy is used to trace the macro expansion of
-// macros whenever it is requested from inside the input stream to preprocess
-// through the '#pragma wave_option(trace: enable)' directive. The macro
-// tracing is disabled with the help of a '#pragma wave_option(trace: disable)'
-// directive.
-//
-// This policy type is used as a template parameter to the boost::wave::context<>
-// object.
-//
-///////////////////////////////////////////////////////////////////////////////
-template <typename TokenT>
-class trace_macro_expansion
-: public boost::wave::context_policies::eat_whitespace<TokenT>
-{
- typedef boost::wave::context_policies::eat_whitespace<TokenT> base_type;
-
-public:
- trace_macro_expansion(
- bool preserve_whitespace_, bool preserve_bol_whitespace_,
- std::ofstream &output_, std::ostream &tracestrm_,
- std::ostream &includestrm_, std::ostream &guardstrm_,
- trace_flags flags_, bool enable_system_command_,
- bool& generate_output_, std::string const& default_outfile_)
- : outputstrm(output_), tracestrm(tracestrm_),
- includestrm(includestrm_), guardstrm(guardstrm_),
- level(0), flags(flags_), logging_flags(trace_nothing),
- enable_system_command(enable_system_command_),
- preserve_whitespace(preserve_whitespace_),
- preserve_bol_whitespace(preserve_bol_whitespace_),
- generate_output(generate_output_),
- default_outfile(default_outfile_),
- emit_relative_filenames(false)
- {
- }
- ~trace_macro_expansion()
- {
- }
-
- void enable_macro_counting()
- {
- logging_flags = trace_flags(logging_flags | trace_macro_counts);
- }
- std::map<std::string, std::size_t> const& get_macro_counts() const
- {
- return counts;
- }
-
- void enable_relative_names_in_line_directives(bool flag)
- {
- emit_relative_filenames = flag;
- }
- bool enable_relative_names_in_line_directives() const
- {
- return emit_relative_filenames;
- }
-
- // add a macro name, which should not be expanded at all (left untouched)
- void add_noexpandmacro(std::string const& name)
- {
- noexpandmacros.insert(name);
- }
-
- void set_license_info(std::string const& info)
- {
- license_info = info;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'expanding_function_like_macro' is called whenever a
- // function-like macro is to be expanded.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'macrodef' marks the position, where the macro to expand
- // is defined.
- //
- // The parameter 'formal_args' holds the formal arguments used during the
- // definition of the macro.
- //
- // The parameter 'definition' holds the macro definition for the macro to
- // trace.
- //
- // The parameter 'macro_call' marks the position, where this macro invoked.
- //
- // The parameter 'arguments' holds the macro arguments used during the
- // invocation of the macro
- //
- // The parameters 'seqstart' and 'seqend' point into the input token
- // stream allowing to access the whole token sequence comprising the macro
- // invocation (starting with the opening parenthesis and ending after the
- // closing one).
- //
- // The return value defines whether the corresponding macro will be
- // expanded (return false) or will be copied to the output (return true).
- // Note: the whole argument list is copied unchanged to the output as well
- // without any further processing.
- //
- ///////////////////////////////////////////////////////////////////////////
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- // old signature
- template <typename ContainerT>
- void expanding_function_like_macro(
- TokenT const &macrodef, std::vector<TokenT> const &formal_args,
- ContainerT const &definition,
- TokenT const &macrocall, std::vector<ContainerT> const &arguments)
- {
- if (enabled_macro_counting())
- count_invocation(macrodef.get_value().c_str());
-
- if (!enabled_macro_tracing())
- return;
-#else
- // new signature
- template <typename ContextT, typename ContainerT, typename IteratorT>
- bool
- expanding_function_like_macro(ContextT const& ctx,
- TokenT const &macrodef, std::vector<TokenT> const &formal_args,
- ContainerT const &definition,
- TokenT const &macrocall, std::vector<ContainerT> const &arguments,
- IteratorT const& seqstart, IteratorT const& seqend)
- {
- if (enabled_macro_counting() || !noexpandmacros.empty()) {
- std::string name (macrodef.get_value().c_str());
-
- if (noexpandmacros.find(name.c_str()) != noexpandmacros.end())
- return true; // do not expand this macro
-
- if (enabled_macro_counting())
- count_invocation(name.c_str());
- }
-
- if (!enabled_macro_tracing())
- return false;
-#endif
- if (0 == get_level()) {
- // output header line
- BOOST_WAVE_OSSTREAM stream;
-
- stream
- << macrocall.get_position() << ": "
- << macrocall.get_value() << "(";
-
- // argument list
- for (typename ContainerT::size_type i = 0; i < arguments.size(); ++i) {
- stream << boost::wave::util::impl::as_string(arguments[i]);
- if (i < arguments.size()-1)
- stream << ", ";
- }
- stream << ")" << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- increment_level();
- }
-
- // output definition reference
- {
- BOOST_WAVE_OSSTREAM stream;
-
- stream
- << macrodef.get_position() << ": see macro definition: "
- << macrodef.get_value() << "(";
-
- // formal argument list
- for (typename std::vector<TokenT>::size_type i = 0;
- i < formal_args.size(); ++i)
- {
- stream << formal_args[i].get_value();
- if (i < formal_args.size()-1)
- stream << ", ";
- }
- stream << ")" << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- }
-
- if (formal_args.size() > 0) {
- // map formal and real arguments
- open_trace_body("invoked with\n");
- for (typename std::vector<TokenT>::size_type j = 0;
- j < formal_args.size(); ++j)
- {
- using namespace boost::wave;
-
- BOOST_WAVE_OSSTREAM stream;
- stream << formal_args[j].get_value() << " = ";
-#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
- if (T_ELLIPSIS == token_id(formal_args[j])) {
- // ellipsis
- for (typename ContainerT::size_type k = j;
- k < arguments.size(); ++k)
- {
- stream << boost::wave::util::impl::as_string(arguments[k]);
- if (k < arguments.size()-1)
- stream << ", ";
- }
- }
- else
-#endif
- {
- stream << boost::wave::util::impl::as_string(arguments[j]);
- }
- stream << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- }
- close_trace_body();
- }
- open_trace_body();
-
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
- return false;
-#endif
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'expanding_object_like_macro' is called whenever a
- // object-like macro is to be expanded .
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'macrodef' marks the position, where the macro to expand
- // is defined.
- //
- // The definition 'definition' holds the macro definition for the macro to
- // trace.
- //
- // The parameter 'macrocall' marks the position, where this macro invoked.
- //
- ///////////////////////////////////////////////////////////////////////////
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- // old signature
- template <typename ContainerT>
- void expanding_object_like_macro(TokenT const &macrodef,
- ContainerT const &definition, TokenT const &macrocall)
- {
- if (enabled_macro_counting())
- count_invocation(macrodef.get_value().c_str());
-
- if (!enabled_macro_tracing())
- return;
-#else
- // new signature
- template <typename ContextT, typename ContainerT>
- bool
- expanding_object_like_macro(ContextT const& ctx,
- TokenT const &macrodef, ContainerT const &definition,
- TokenT const &macrocall)
- {
- if (enabled_macro_counting() || !noexpandmacros.empty()) {
- std::string name (macrodef.get_value().c_str());
-
- if (noexpandmacros.find(name.c_str()) != noexpandmacros.end())
- return true; // do not expand this macro
-
- if (enabled_macro_counting())
- count_invocation(name.c_str());
- }
-
- if (!enabled_macro_tracing())
- return false;
-#endif
- if (0 == get_level()) {
- // output header line
- BOOST_WAVE_OSSTREAM stream;
-
- stream
- << macrocall.get_position() << ": "
- << macrocall.get_value() << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- increment_level();
- }
-
- // output definition reference
- {
- BOOST_WAVE_OSSTREAM stream;
-
- stream
- << macrodef.get_position() << ": see macro definition: "
- << macrodef.get_value() << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- }
- open_trace_body();
-
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
- return false;
-#endif
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'expanded_macro' is called whenever the expansion of a
- // macro is finished but before the rescanning process starts.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'result' contains the token sequence generated as the
- // result of the macro expansion.
- //
- ///////////////////////////////////////////////////////////////////////////
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- // old signature
- template <typename ContainerT>
- void expanded_macro(ContainerT const &result)
-#else
- // new signature
- template <typename ContextT, typename ContainerT>
- void expanded_macro(ContextT const& ctx,ContainerT const &result)
-#endif
- {
- if (!enabled_macro_tracing()) return;
-
- BOOST_WAVE_OSSTREAM stream;
- stream << boost::wave::util::impl::as_string(result) << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
-
- open_trace_body("rescanning\n");
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'rescanned_macro' is called whenever the rescanning of a
- // macro is finished.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'result' contains the token sequence generated as the
- // result of the rescanning.
- //
- ///////////////////////////////////////////////////////////////////////////
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- // old signature
- template <typename ContainerT>
- void rescanned_macro(ContainerT const &result)
-#else
- // new signature
- template <typename ContextT, typename ContainerT>
- void rescanned_macro(ContextT const& ctx,ContainerT const &result)
-#endif
- {
- if (!enabled_macro_tracing() || get_level() == 0)
- return;
-
- BOOST_WAVE_OSSTREAM stream;
- stream << boost::wave::util::impl::as_string(result) << std::endl;
- output(BOOST_WAVE_GETSTRING(stream));
- close_trace_body();
- close_trace_body();
-
- if (1 == get_level())
- decrement_level();
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'interpret_pragma' is called whenever a #pragma command
- // directive is found which isn't known to the core Wave library, where
- // command is the value defined as the BOOST_WAVE_PRAGMA_KEYWORD constant
- // which defaults to "wave".
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'pending' may be used to push tokens back into the input
- // stream, which are to be used as the replacement text for the whole
- // #pragma directive.
- //
- // The parameter 'option' contains the name of the interpreted pragma.
- //
- // The parameter 'values' holds the values of the parameter provided to
- // the pragma operator.
- //
- // The parameter 'act_token' contains the actual #pragma token, which may
- // be used for error output.
- //
- // If the return value is 'false', the whole #pragma directive is
- // interpreted as unknown and a corresponding error message is issued. A
- // return value of 'true' signs a successful interpretation of the given
- // #pragma.
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ContextT, typename ContainerT>
- bool
- interpret_pragma(ContextT &ctx, ContainerT &pending,
- typename ContextT::token_type const &option, ContainerT const &valuetokens,
- typename ContextT::token_type const &act_token)
- {
- typedef typename ContextT::token_type token_type;
-
- ContainerT values(valuetokens);
- boost::wave::util::impl::trim_sequence(values); // trim whitespace
-
- if (option.get_value() == "timer") {
- // #pragma wave timer(value)
- if (0 == values.size()) {
- // no value means '1'
- using namespace boost::wave;
- timer(token_type(T_INTLIT, "1", act_token.get_position()));
- }
- else {
- timer(values.front());
- }
- return true;
- }
- if (option.get_value() == "trace") {
- // enable/disable tracing option
- return interpret_pragma_trace(ctx, values, act_token);
- }
- if (option.get_value() == "system") {
- if (!enable_system_command) {
- // if the #pragma wave system() directive is not enabled, throw
- // a corresponding error (actually its a remark),
- typename ContextT::string_type msg(
- boost::wave::util::impl::as_string(values));
- BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
- pragma_system_not_enabled,
- msg.c_str(), act_token.get_position());
- return false;
- }
-
- // try to spawn the given argument as a system command and return the
- // std::cout of this process as the replacement of this _Pragma
- return interpret_pragma_system(ctx, pending, values, act_token);
- }
- if (option.get_value() == "stop") {
- // stop the execution and output the argument
- typename ContextT::string_type msg(
- boost::wave::util::impl::as_string(values));
- BOOST_WAVE_THROW_CTX(ctx, boost::wave::preprocess_exception,
- error_directive, msg.c_str(), act_token.get_position());
- return false;
- }
- if (option.get_value() == "option") {
- // handle different options
- return interpret_pragma_option(ctx, values, act_token);
- }
- return false;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'emit_line_directive' is called whenever a #line directive
- // has to be emitted into the generated output.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'pending' may be used to push tokens back into the input
- // stream, which are to be used instead of the default output generated
- // for the #line directive.
- //
- // The parameter 'act_token' contains the actual #pragma token, which may
- // be used for error output. The line number stored in this token can be
- // used as the line number emitted as part of the #line directive.
- //
- // If the return value is 'false', a default #line directive is emitted
- // by the library. A return value of 'true' will inhibit any further
- // actions, the tokens contained in 'pending' will be copied verbatim
- // to the output.
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ContextT, typename ContainerT>
- bool
- emit_line_directive(ContextT const& ctx, ContainerT &pending,
- typename ContextT::token_type const& act_token)
- {
- if (!need_emit_line_directives(ctx.get_language()) ||
- !enable_relative_names_in_line_directives())
- {
- return false;
- }
-
- // emit a #line directive showing the relative filename instead
- typename ContextT::position_type pos = act_token.get_position();
- unsigned int column = 6;
-
- typedef typename ContextT::token_type result_type;
- using namespace boost::wave;
-
- pos.set_column(1);
- pending.push_back(result_type(T_PP_LINE, "#line", pos));
-
- pos.set_column(column); // account for '#line'
- pending.push_back(result_type(T_SPACE, " ", pos));
-
- // 21 is the max required size for a 64 bit integer represented as a
- // string
- char buffer[22];
-
- using namespace std; // for some systems sprintf is in namespace std
- sprintf (buffer, "%ld", pos.get_line());
-
- pos.set_column(++column); // account for ' '
- pending.push_back(result_type(T_INTLIT, buffer, pos));
- pos.set_column(column += (unsigned int)strlen(buffer)); // account for <number>
- pending.push_back(result_type(T_SPACE, " ", pos));
- pos.set_column(++column); // account for ' '
-
- std::string file("\"");
- boost::filesystem::path filename(
- boost::wave::util::create_path(ctx.get_current_relative_filename().c_str()));
-
- using boost::wave::util::impl::escape_lit;
- file += escape_lit(boost::wave::util::native_file_string(filename)) + "\"";
-
- pending.push_back(result_type(T_STRINGLIT, file.c_str(), pos));
- pos.set_column(column += (unsigned int)file.size()); // account for filename
- pending.push_back(result_type(T_GENERATEDNEWLINE, "\n", pos));
-
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'opened_include_file' is called whenever a file referred
- // by an #include directive was successfully located and opened.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'filename' contains the file system path of the
- // opened file (this is relative to the directory of the currently
- // processed file or a absolute path depending on the paths given as the
- // include search paths).
- //
- // The include_depth parameter contains the current include file depth.
- //
- // The is_system_include parameter denotes, whether the given file was
- // found as a result of a #include <...> directive.
- //
- ///////////////////////////////////////////////////////////////////////////
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- // old signature
- void
- opened_include_file(std::string const &relname, std::string const &absname,
- std::size_t include_depth, bool is_system_include)
- {
-#else
- // new signature
- template <typename ContextT>
- void
- opened_include_file(ContextT const& ctx, std::string const &relname,
- std::string const &absname, bool is_system_include)
- {
- std::size_t include_depth = ctx.get_iteration_depth();
-#endif
- if (enabled_include_tracing()) {
- // print indented filename
- for (std::size_t i = 0; i < include_depth; ++i)
- includestrm << " ";
-
- if (is_system_include)
- includestrm << "<" << relname << "> (" << absname << ")";
- else
- includestrm << "\"" << relname << "\" (" << absname << ")";
-
- includestrm << std::endl;
- }
- }
-
-#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'detected_include_guard' is called whenever either a
- // include file is about to be added to the list of #pragma once headers.
- // That means this header file will not be opened and parsed again even
- // if it is specified in a later #include directive.
- // This function is called as the result of a detected include guard
- // scheme.
- //
- // The implemented heuristics for include guards detects two forms of
- // include guards:
- //
- // #ifndef INCLUDE_GUARD_MACRO
- // #define INCLUDE_GUARD_MACRO
- // ...
- // #endif
- //
- // or
- //
- // if !defined(INCLUDE_GUARD_MACRO)
- // #define INCLUDE_GUARD_MACRO
- // ...
- // #endif
- //
- // note, that the parenthesis are optional (i.e. !defined INCLUDE_GUARD_MACRO
- // will work as well). The code allows for any whitespace, newline and single
- // '#' tokens before the #if/#ifndef and after the final #endif.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'filename' contains the file system path of the
- // opened file (this is relative to the directory of the currently
- // processed file or a absolute path depending on the paths given as the
- // include search paths).
- //
- // The parameter contains the name of the detected include guard.
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ContextT>
- void
- detected_include_guard(ContextT const& ctx, std::string const& filename,
- std::string const& include_guard)
- {
- if (enabled_guard_tracing()) {
- guardstrm << include_guard << ":" << std::endl
- << " " << filename << std::endl;
- }
- }
-#endif
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'may_skip_whitespace' will be called by the
- // library whenever a token is about to be returned to the calling
- // application.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The 'token' parameter holds a reference to the current token. The policy
- // is free to change this token if needed.
- //
- // The 'skipped_newline' parameter holds a reference to a boolean value
- // which should be set to true by the policy function whenever a newline
- // is going to be skipped.
- //
- // If the return value is true, the given token is skipped and the
- // preprocessing continues to the next token. If the return value is
- // false, the given token is returned to the calling application.
- //
- // ATTENTION!
- // Caution has to be used, because by returning true the policy function
- // is able to force skipping even significant tokens, not only whitespace.
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ContextT>
- bool may_skip_whitespace(ContextT const &ctx, TokenT &token,
- bool &skipped_newline)
- {
- return this->base_type::may_skip_whitespace(
- ctx, token, need_preserve_comments(ctx.get_language()),
- preserve_bol_whitespace, skipped_newline) ?
- !preserve_whitespace : false;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // The function 'throw_exception' will be called by the library whenever a
- // preprocessing exception occurs.
- //
- // The parameter 'ctx' is a reference to the context object used for
- // instantiating the preprocessing iterators by the user.
- //
- // The parameter 'e' is the exception object containing detailed error
- // information.
- //
- // The default behavior is to call the function boost::throw_exception.
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ContextT>
- void
- throw_exception(ContextT const& ctx, boost::wave::preprocess_exception const& e)
- {
-#if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
- if (!is_import_directive_error(e))
- boost::throw_exception(e);
-#else
- boost::throw_exception(e);
-#endif
- }
- using base_type::throw_exception;
-
-protected:
-#if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
- ///////////////////////////////////////////////////////////////////////////
- // Avoid throwing an error from a #import directive
- bool is_import_directive_error(boost::wave::preprocess_exception const& e)
- {
- using namespace boost::wave;
- if (e.get_errorcode() != preprocess_exception::ill_formed_directive)
- return false;
-
- // the error string is formatted as 'severity: error: directive'
- std::string error(e.description());
- std::string::size_type p = error.find_last_of(":");
- return p != std::string::npos && error.substr(p+2) == "import";
- }
-#endif
-
- ///////////////////////////////////////////////////////////////////////////
- // Interpret the different Wave specific pragma directives/operators
- template <typename ContextT, typename ContainerT>
- bool
- interpret_pragma_trace(ContextT& ctx, ContainerT const &values,
- typename ContextT::token_type const &act_token)
- {
- typedef typename ContextT::token_type token_type;
- typedef typename token_type::string_type string_type;
-
- bool valid_option = false;
-
- if (1 == values.size()) {
- token_type const &value = values.front();
-
- if (value.get_value() == "enable" ||
- value.get_value() == "on" ||
- value.get_value() == "1")
- {
- // #pragma wave trace(enable)
- enable_tracing(static_cast<trace_flags>(
- tracing_enabled() | trace_macros));
- valid_option = true;
- }
- else if (value.get_value() == "disable" ||
- value.get_value() == "off" ||
- value.get_value() == "0")
- {
- // #pragma wave trace(disable)
- enable_tracing(static_cast<trace_flags>(
- tracing_enabled() & ~trace_macros));
- valid_option = true;
- }
- }
- if (!valid_option) {
- // unknown option value
- string_type option_str ("trace");
-
- if (values.size() > 0) {
- option_str += "(";
- option_str += boost::wave::util::impl::as_string(values);
- option_str += ")";
- }
- BOOST_WAVE_THROW_CTX(ctx, boost::wave::preprocess_exception,
- ill_formed_pragma_option, option_str.c_str(),
- act_token.get_position());
- return false;
- }
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // interpret the pragma wave option(preserve: [0|1|2|3|push|pop]) directive
- template <typename ContextT>
- static bool
- interpret_pragma_option_preserve_set(int mode, bool &preserve_whitespace,
- bool& preserve_bol_whitespace, ContextT &ctx)
- {
- switch(mode) {
- // preserve no whitespace
- case 0:
- preserve_whitespace = false;
- preserve_bol_whitespace = false;
- ctx.set_language(
- enable_preserve_comments(ctx.get_language(), false),
- false);
- break;
-
- // preserve BOL whitespace only
- case 1:
- preserve_whitespace = false;
- preserve_bol_whitespace = true;
- ctx.set_language(
- enable_preserve_comments(ctx.get_language(), false),
- false);
- break;
-
- // preserve comments and BOL whitespace only
- case 2:
- preserve_whitespace = false;
- preserve_bol_whitespace = true;
- ctx.set_language(
- enable_preserve_comments(ctx.get_language()),
- false);
- break;
-
- // preserve all whitespace
- case 3:
- preserve_whitespace = true;
- preserve_bol_whitespace = true;
- ctx.set_language(
- enable_preserve_comments(ctx.get_language()),
- false);
- break;
-
- default:
- return false;
- }
- return true;
- }
-
- template <typename ContextT, typename IteratorT>
- bool
- interpret_pragma_option_preserve(ContextT &ctx, IteratorT &it,
- IteratorT end, typename ContextT::token_type const &act_token)
- {
- using namespace boost::wave;
-
- token_id id = util::impl::skip_whitespace(it, end);
- if (T_COLON == id)
- id = util::impl::skip_whitespace(it, end);
-
- // implement push/pop
- if (T_IDENTIFIER == id) {
- if ((*it).get_value() == "push") {
- // push current preserve option onto the internal option stack
- if (need_preserve_comments(ctx.get_language())) {
- if (preserve_whitespace)
- preserve_options.push(3);
- else
- preserve_options.push(2);
- }
- else if (preserve_bol_whitespace) {
- preserve_options.push(1);
- }
- else {
- preserve_options.push(0);
- }
- return true;
- }
- else if ((*it).get_value() == "pop") {
- // test for mismatched push/pop #pragmas
- if (preserve_options.empty()) {
- BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
- pragma_mismatched_push_pop, "preserve",
- act_token.get_position());
- }
-
- // pop output preserve from the internal option stack
- bool result = interpret_pragma_option_preserve_set(
- preserve_options.top(), preserve_whitespace,
- preserve_bol_whitespace, ctx);
- preserve_options.pop();
- return result;
- }
- return false;
- }
-
- if (T_PP_NUMBER != id)
- return false;
-
- using namespace std; // some platforms have atoi in namespace std
- return interpret_pragma_option_preserve_set(
- atoi((*it).get_value().c_str()), preserve_whitespace,
- preserve_bol_whitespace, ctx);
- }
-
- // interpret the pragma wave option(line: [0|1|2|push|pop]) directive
- template <typename ContextT, typename IteratorT>
- bool
- interpret_pragma_option_line(ContextT &ctx, IteratorT &it,
- IteratorT end, typename ContextT::token_type const &act_token)
- {
- using namespace boost::wave;
-
- token_id id = util::impl::skip_whitespace(it, end);
- if (T_COLON == id)
- id = util::impl::skip_whitespace(it, end);
-
- // implement push/pop
- if (T_IDENTIFIER == id) {
- if ((*it).get_value() == "push") {
- // push current line option onto the internal option stack
- int mode = 0;
- if (need_emit_line_directives(ctx.get_language())) {
- mode = 1;
- if (enable_relative_names_in_line_directives())
- mode = 2;
- }
- line_options.push(mode);
- return true;
- }
- else if ((*it).get_value() == "pop") {
- // test for mismatched push/pop #pragmas
- if (line_options.empty()) {
- BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
- pragma_mismatched_push_pop, "line",
- act_token.get_position());
- }
-
- // pop output line from the internal option stack
- ctx.set_language(
- enable_emit_line_directives(ctx.get_language(), 0 != line_options.top()),
- false);
- enable_relative_names_in_line_directives(2 == line_options.top());
- line_options.pop();
- return true;
- }
- return false;
- }
-
- if (T_PP_NUMBER != id)
- return false;
-
- using namespace std; // some platforms have atoi in namespace std
- int emit_lines = atoi((*it).get_value().c_str());
- if (0 == emit_lines || 1 == emit_lines || 2 == emit_lines) {
- // set the new emit #line directive mode
- ctx.set_language(
- enable_emit_line_directives(ctx.get_language(), emit_lines),
- false);
- return true;
- }
- return false;
- }
-
- // interpret the pragma wave option(output: ["filename"|null|default|push|pop])
- // directive
- template <typename ContextT>
- bool
- interpret_pragma_option_output_open(boost::filesystem::path &fpath,
- ContextT& ctx, typename ContextT::token_type const &act_token)
- {
- namespace fs = boost::filesystem;
-
- // ensure all directories for this file do exist
- boost::wave::util::create_directories(
- boost::wave::util::branch_path(fpath));
-
- // figure out, whether the file has been written to by us, if yes, we
- // append any output to this file, otherwise we overwrite it
- std::ios::openmode mode = std::ios::out;
- if (fs::exists(fpath) && written_by_us.find(fpath) != written_by_us.end())
- mode = (std::ios::openmode)(std::ios::out | std::ios::app);
-
- written_by_us.insert(fpath);
-
- // close the current file
- if (outputstrm.is_open())
- outputstrm.close();
-
- // open the new file
- outputstrm.open(fpath.string().c_str(), mode);
- if (!outputstrm.is_open()) {
- BOOST_WAVE_THROW_CTX(ctx, boost::wave::preprocess_exception,
- could_not_open_output_file,
- fpath.string().c_str(), act_token.get_position());
- return false;
- }
-
- // write license text, if file was created and if requested
- if (mode == std::ios::out && !license_info.empty())
- outputstrm << license_info;
-
- generate_output = true;
- current_outfile = fpath;
- return true;
- }
-
- bool interpret_pragma_option_output_close(bool generate)
- {
- if (outputstrm.is_open())
- outputstrm.close();
- current_outfile = boost::filesystem::path();
- generate_output = generate;
- return true;
- }
-
- template <typename ContextT, typename IteratorT>
- bool
- interpret_pragma_option_output(ContextT &ctx, IteratorT &it,
- IteratorT end, typename ContextT::token_type const &act_token)
- {
- using namespace boost::wave;
- namespace fs = boost::filesystem;
-
- typedef typename ContextT::token_type token_type;
- typedef typename token_type::string_type string_type;
-
- token_id id = util::impl::skip_whitespace(it, end);
- if (T_COLON == id)
- id = util::impl::skip_whitespace(it, end);
-
- bool result = false;
- if (T_STRINGLIT == id) {
- namespace fs = boost::filesystem;
-
- string_type fname ((*it).get_value());
- fs::path fpath (boost::wave::util::create_path(
- util::impl::unescape_lit(fname.substr(1, fname.size()-2)).c_str()));
- fpath = boost::wave::util::complete_path(fpath, ctx.get_current_directory());
- result = interpret_pragma_option_output_open(fpath, ctx, act_token);
- }
- else if (T_IDENTIFIER == id) {
- if ((*it).get_value() == "null") {
- // suppress all output from this point on
- result = interpret_pragma_option_output_close(false);
- }
- else if ((*it).get_value() == "push") {
- // initialize the current_outfile, if appropriate
- if (output_options.empty() && current_outfile.empty() &&
- !default_outfile.empty() && default_outfile != "-")
- {
- current_outfile = boost::wave::util::complete_path(
- default_outfile, ctx.get_current_directory());
- }
-
- // push current output option onto the internal option stack
- output_options.push(
- output_option_type(generate_output, current_outfile));
- result = true;
- }
- else if ((*it).get_value() == "pop") {
- // test for mismatched push/pop #pragmas
- if (output_options.empty()) {
- BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
- pragma_mismatched_push_pop, "output",
- act_token.get_position());
- return false;
- }
-
- // pop output option from the internal option stack
- output_option_type const& opts = output_options.top();
- generate_output = opts.first;
- current_outfile = opts.second;
- if (!current_outfile.empty()) {
- // re-open the last file
- result = interpret_pragma_option_output_open(current_outfile,
- ctx, act_token);
- }
- else {
- // either no output or generate to std::cout
- result = interpret_pragma_option_output_close(generate_output);
- }
- output_options.pop();
- }
- }
- else if (T_DEFAULT == id) {
- // re-open the default output given on command line
- if (!default_outfile.empty()) {
- if (default_outfile == "-") {
- // the output was suppressed on the command line
- result = interpret_pragma_option_output_close(false);
- }
- else {
- // there was a file name on the command line
- fs::path fpath(boost::wave::util::create_path(default_outfile));
- result = interpret_pragma_option_output_open(fpath, ctx,
- act_token);
- }
- }
- else {
- // generate the output to std::cout
- result = interpret_pragma_option_output_close(true);
- }
- }
- return result;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // join all adjacent string tokens into the first one
- template <typename StringT>
- StringT unlit(StringT const& str)
- {
- return str.substr(1, str.size()-2);
- }
-
- template <typename StringT>
- StringT merge_string_lits(StringT const& lhs, StringT const& rhs)
- {
- StringT result ("\"");
-
- result += unlit(lhs);
- result += unlit(rhs);
- result += "\"";
- return result;
- }
-
- template <typename ContextT, typename ContainerT>
- void join_adjacent_string_tokens(ContextT &ctx, ContainerT const& values,
- ContainerT& joined_values)
- {
- using namespace boost::wave;
-
- typedef typename ContextT::token_type token_type;
- typedef typename token_type::string_type string_type;
- typedef typename ContainerT::const_iterator const_iterator;
- typedef typename ContainerT::iterator iterator;
-
- token_type* current = 0;
-
- const_iterator end = values.end();
- for (const_iterator it = values.begin(); it != end; ++it) {
- token_id id(*it);
-
- if (id == T_STRINGLIT) {
- if (!current) {
- joined_values.push_back(*it);
- current = &joined_values.back();
- }
- else {
- current->set_value(merge_string_lits(
- current->get_value(), (*it).get_value()));
- }
- }
- else if (current) {
- typedef util::impl::next_token<const_iterator> next_token_type;
- token_id next_id (next_token_type::peek(it, end, true));
-
- if (next_id != T_STRINGLIT) {
- current = 0;
- joined_values.push_back(*it);
- }
- }
- else {
- joined_values.push_back(*it);
- }
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // interpret the pragma wave option() directives
- template <typename ContextT, typename ContainerT>
- bool
- interpret_pragma_option(ContextT &ctx, ContainerT const &cvalues,
- typename ContextT::token_type const &act_token)
- {
- using namespace boost::wave;
-
- typedef typename ContextT::token_type token_type;
- typedef typename token_type::string_type string_type;
- typedef typename ContainerT::const_iterator const_iterator;
-
- ContainerT values;
- join_adjacent_string_tokens(ctx, cvalues, values);
-
- const_iterator end = values.end();
- for (const_iterator it = values.begin(); it != end; /**/) {
- bool valid_option = false;
-
- token_type const &value = *it;
- if (value.get_value() == "preserve") {
- // #pragma wave option(preserve: [0|1|2|3|push|pop])
- valid_option = interpret_pragma_option_preserve(ctx, it, end,
- act_token);
- }
- else if (value.get_value() == "line") {
- // #pragma wave option(line: [0|1|2|push|pop])
- valid_option = interpret_pragma_option_line(ctx, it, end,
- act_token);
- }
- else if (value.get_value() == "output") {
- // #pragma wave option(output: ["filename"|null|default|push|pop])
- valid_option = interpret_pragma_option_output(ctx, it, end,
- act_token);
- }
-
- if (!valid_option) {
- // unknown option value
- string_type option_str ("option");
-
- if (values.size() > 0) {
- option_str += "(";
- option_str += util::impl::as_string(values);
- option_str += ")";
- }
- BOOST_WAVE_THROW_CTX(ctx, boost::wave::preprocess_exception,
- ill_formed_pragma_option,
- option_str.c_str(), act_token.get_position());
- return false;
- }
-
- token_id id = util::impl::skip_whitespace(it, end);
- if (id == T_COMMA)
- util::impl::skip_whitespace(it, end);
- }
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // interpret the #pragma wave system() directive
- template <typename ContextT, typename ContainerT>
- bool
- interpret_pragma_system(ContextT& ctx, ContainerT &pending,
- ContainerT const &values,
- typename ContextT::token_type const &act_token)
- {
- typedef typename ContextT::token_type token_type;
- typedef typename token_type::string_type string_type;
-
- if (0 == values.size()) return false; // ill_formed_pragma_option
-
- string_type stdout_file(std::tmpnam(0));
- string_type stderr_file(std::tmpnam(0));
- string_type system_str(boost::wave::util::impl::as_string(values));
- string_type native_cmd(system_str);
-
- system_str += " >" + stdout_file + " 2>" + stderr_file;
- if (0 != std::system(system_str.c_str())) {
- // unable to spawn the command
- string_type error_str("unable to spawn command: ");
-
- error_str += native_cmd;
- BOOST_WAVE_THROW_CTX(ctx, boost::wave::preprocess_exception,
- ill_formed_pragma_option,
- error_str.c_str(), act_token.get_position());
- return false;
- }
-
- // rescan the content of the stdout_file and insert it as the
- // _Pragma replacement
- typedef typename ContextT::lexer_type lexer_type;
- typedef typename ContextT::input_policy_type input_policy_type;
- typedef boost::wave::iteration_context<
- ContextT, lexer_type, input_policy_type>
- iteration_context_type;
-
- iteration_context_type iter_ctx(ctx, stdout_file.c_str(),
- act_token.get_position(), ctx.get_language());
- ContainerT pragma;
-
- for (/**/; iter_ctx.first != iter_ctx.last; ++iter_ctx.first)
- pragma.push_back(*iter_ctx.first);
-
- // prepend the newly generated token sequence to the 'pending' container
- pending.splice(pending.begin(), pragma);
-
- // erase the created tempfiles
- std::remove(stdout_file.c_str());
- std::remove(stderr_file.c_str());
- return true;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // The function enable_tracing is called, whenever the status of the
- // tracing was changed.
- // The parameter 'enable' is to be used as the new tracing status.
- void enable_tracing(trace_flags flags)
- { logging_flags = flags; }
-
- // The function tracing_enabled should return the current tracing status.
- trace_flags tracing_enabled()
- { return logging_flags; }
-
- // Helper functions for generating the trace output
- void open_trace_body(char const *label = 0)
- {
- if (label)
- output(label);
- output("[\n");
- increment_level();
- }
- void close_trace_body()
- {
- if (get_level() > 0) {
- decrement_level();
- output("]\n");
- tracestrm << std::flush; // flush the stream buffer
- }
- }
-
- template <typename StringT>
- void output(StringT const &outstr) const
- {
- indent(get_level());
- tracestrm << outstr; // output the given string
- }
-
- void indent(int level) const
- {
- for (int i = 0; i < level; ++i)
- tracestrm << " "; // indent
- }
-
- int increment_level() { return ++level; }
- int decrement_level() { BOOST_ASSERT(level > 0); return --level; }
- int get_level() const { return level; }
-
- bool enabled_macro_tracing() const
- {
- return (flags & trace_macros) && (logging_flags & trace_macros);
- }
- bool enabled_include_tracing() const
- {
- return (flags & trace_includes);
- }
- bool enabled_guard_tracing() const
- {
- return (flags & trace_guards);
- }
- bool enabled_macro_counting() const
- {
- return logging_flags & trace_macro_counts;
- }
-
- void count_invocation(std::string const& name)
- {
- typedef std::map<std::string, std::size_t>::iterator iterator;
- typedef std::map<std::string, std::size_t>::value_type value_type;
-
- iterator it = counts.find(name);
- if (it == counts.end())
- {
- std::pair<iterator, bool> p = counts.insert(value_type(name, 0));
- if (p.second)
- it = p.first;
- }
-
- if (it != counts.end())
- ++(*it).second;
- }
-
- void timer(TokenT const &value)
- {
- if (value.get_value() == "0" || value.get_value() == "restart") {
- // restart the timer
- elapsed_time.restart();
- }
- else if (value.get_value() == "1") {
- // print out the current elapsed time
- std::cerr
- << value.get_position() << ": "
- << elapsed_time.format_elapsed_time()
- << std::endl;
- }
- else if (value.get_value() == "suspend") {
- // suspend the timer
- elapsed_time.suspend();
- }
- else if (value.get_value() == "resume") {
- // resume the timer
- elapsed_time.resume();
- }
- }
-
-private:
- std::ofstream &outputstrm; // main output stream
- std::ostream &tracestrm; // trace output stream
- std::ostream &includestrm; // included list output stream
- std::ostream &guardstrm; // include guard output stream
- int level; // indentation level
- trace_flags flags; // enabled globally
- trace_flags logging_flags; // enabled by a #pragma
- bool enable_system_command; // enable #pragma wave system() command
- bool preserve_whitespace; // enable whitespace preservation
- bool preserve_bol_whitespace; // enable begin of line whitespace preservation
- bool& generate_output; // allow generated tokens to be streamed to output
- std::string const& default_outfile; // name of the output file given on command line
- boost::filesystem::path current_outfile; // name of the current output file
-
- stop_watch elapsed_time; // trace timings
- std::set<boost::filesystem::path> written_by_us; // all files we have written to
-
- typedef std::pair<bool, boost::filesystem::path> output_option_type;
- std::stack<output_option_type> output_options; // output option stack
- std::stack<int> line_options; // line option stack
- std::stack<int> preserve_options; // preserve option stack
-
- std::map<std::string, std::size_t> counts; // macro invocation counts
- bool emit_relative_filenames; // emit relative names in #line directives
-
- std::set<std::string> noexpandmacros; // list of macros not to expand
-
- std::string license_info; // text to pre-pend to all generated output files
-};
-
-#undef BOOST_WAVE_GETSTRING
-#undef BOOST_WAVE_OSSTREAM
-
-#endif // !defined(TRACE_MACRO_EXPANSION_HPP_D8469318_8407_4B9D_A19F_13CA60C1661F_INCLUDED)