From d33cd065b193ede1a6e11af0d52198082eda2e2f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 20 Apr 2005 23:23:28 +0000 Subject: [PATCH] Automatic configuration of tools. [SVN r28348] --- v2/tools/boostbook-config.jam | 37 +++++++++++++++++++++++++++++++++++ v2/tools/msvc-config.jam | 2 +- v2/tools/xsltproc-config.jam | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 v2/tools/boostbook-config.jam create mode 100644 v2/tools/xsltproc-config.jam diff --git a/v2/tools/boostbook-config.jam b/v2/tools/boostbook-config.jam new file mode 100644 index 000000000..8a80b8c28 --- /dev/null +++ b/v2/tools/boostbook-config.jam @@ -0,0 +1,37 @@ +#~ Copyright 2005 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) + +# Automatic configuration for BoostBook tools. To use, just import this module. + +import os ; +import toolset : using ; + +local docbook_xsl-path = [ modules.peek : DOCBOOK_XSL_DIR ] ; +local docbook_dtd-path = [ modules.peek : DOCBOOK_DTD_DIR ] ; +if [ os.name ] = NT +{ + docbook_xsl-path ?= [ GLOB "C:\\Boost\\share" : docbook-xsl* ] ; + docbook_xsl-path = $(docbook_xsl-path[1]) ; + docbook_dtd-path ?= [ GLOB "C:\\Boost\\share" : docbook-xml* ] ; + docbook_dtd-path = $(docbook_dtd-path[1]) ; + + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using boostbook ":" $(docbook_xsl-path) ":" $(docbook_dtd-path) ; + } + using boostbook : $(docbook_xsl-path) : $(docbook_dtd-path) ; +} +else +{ + docbook_xsl-path ?= [ GLOB "/usr/local/share" "/usr/share" "/opt/share" : docbook-xsl* ] ; + docbook_xsl-path = $(docbook_xsl-path[1]) ; + docbook_dtd-path ?= [ GLOB "/usr/local/share" "/usr/share" "/opt/share" : docbook-xml* ] ; + docbook_dtd-path = $(docbook_dtd-path[1]) ; + + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using boostbook ":" $(docbook_xsl-path) ":" $(docbook_dtd-path) ; + } + using boostbook : $(docbook_xsl-path) : $(docbook_dtd-path) ; +} diff --git a/v2/tools/msvc-config.jam b/v2/tools/msvc-config.jam index 729a499d5..ae7114b1a 100644 --- a/v2/tools/msvc-config.jam +++ b/v2/tools/msvc-config.jam @@ -20,7 +20,7 @@ if [ os.name ] = NT { if --debug-configuration in [ modules.peek : ARGV ] { - ECHO "notice:" msvc ":" $(vc-version) ":" "$(vc-path)\\bin\\cl.exe" ; + ECHO "notice:" using msvc ":" $(vc-version) ":" "$(vc-path)\\bin\\cl.exe" ; } using msvc : $(vc-version) : "$(vc-path)\\bin\\cl.exe" ; } diff --git a/v2/tools/xsltproc-config.jam b/v2/tools/xsltproc-config.jam new file mode 100644 index 000000000..de54a2eb3 --- /dev/null +++ b/v2/tools/xsltproc-config.jam @@ -0,0 +1,37 @@ +#~ Copyright 2005 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) + +# Automatic configuration for Python tools and librries. To use, just import this module. + +import os ; +import toolset : using ; + +if [ os.name ] = NT +{ + local xsltproc-path = [ GLOB [ modules.peek : PATH ] "C:\\Boost\\bin" : xsltproc\.exe ] ; + xsltproc-path = $(xsltproc-path[1]) ; + + if $(xsltproc-path) + { + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using xsltproc ":" $(xsltproc-path) ; + } + using xsltproc : $(xsltproc-path) ; + } +} +else +{ + local xsltproc-path = [ GLOB [ modules.peek : PATH ] : xsltproc ] ; + xsltproc-path = $(xsltproc-path[1]) ; + + if $(xsltproc-path) + { + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using xsltproc ":" $(xsltproc-path) ; + } + using xsltproc : $(xsltproc-path) ; + } +}