|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68685 - trunk/tools/build/v2/tools
From: steven_at_[hidden]
Date: 2011-02-06 18:55:33
Author: steven_watanabe
Date: 2011-02-06 18:55:31 EST (Sun, 06 Feb 2011)
New Revision: 68685
URL: http://svn.boost.org/trac/boost/changeset/68685
Log:
Allow doxygen configuration to be overridden. Use common.get-invocation-command to check the command.
Text files modified:
trunk/tools/build/v2/tools/doxygen.jam | 118 +++++++++++++++++++++------------------
1 files changed, 64 insertions(+), 54 deletions(-)
Modified: trunk/tools/build/v2/tools/doxygen.jam
==============================================================================
--- trunk/tools/build/v2/tools/doxygen.jam (original)
+++ trunk/tools/build/v2/tools/doxygen.jam 2011-02-06 18:55:31 EST (Sun, 06 Feb 2011)
@@ -38,6 +38,7 @@
import modules ;
import project ;
import utility ;
+import errors ;
# Use to specify extra configuration paramters. These get translated
@@ -95,60 +96,6 @@
{
.initialized = true ;
- if ! $(name)
- {
- local doxygen-path ;
-
- if [ os.name ] = NT
- {
- local ProgramFiles = [ modules.peek : ProgramFiles ] ;
- if $(ProgramFiles)
- {
- ProgramFiles = "$(ProgramFiles:J= )" ;
- }
- else
- {
- ProgramFiles = "C:\\Program Files" ;
- }
-
- doxygen-path =
- [ GLOB
- [ modules.peek : PATH ]
- "$(ProgramFiles)\\doxygen\\bin"
- : doxygen\.exe ] ;
- }
- else
- {
- doxygen-path =
- [ GLOB
- [ modules.peek : PATH ]
- : doxygen ] ;
- }
-
- doxygen-path = $(doxygen-path[1]) ;
-
- if $(doxygen-path)
- {
- .doxygen = $(doxygen-path) ;
- }
-
- .doxygen ?= doxygen ;
- }
- else
- {
- .doxygen = $(name) ;
- }
-
- if --debug-configuration in [ modules.peek : ARGV ]
- {
- ECHO "notice:" using doxygen ":" $(.doxygen) ;
- }
-
- if [ .is-cygwin ]
- {
- .is-cygwin = true ;
- }
-
.doxproc = [ modules.binding $(__name__) ] ;
.doxproc = $(.doxproc:D)/doxproc.py ;
@@ -171,11 +118,71 @@
IMPORT $(__name__) : doxygen : : doxygen ;
}
+
+ if $(name)
+ {
+ modify-config ;
+ .doxygen = $(name) ;
+ check-doxygen ;
+ }
+
+ if ! $(.doxygen)
+ {
+ check-doxygen ;
+ }
}
+rule freeze-config ( )
+{
+ if ! $(.initialized)
+ {
+ errors.user-error "doxygen must be initialized before it can be used." ;
+ }
+ if ! $(.config-frozen)
+ {
+ .config-frozen = true ;
+
+ if [ .is-cygwin ]
+ {
+ .is-cygwin = true ;
+ }
+ }
+}
+
+rule modify-config ( )
+{
+ if $(.config-frozen)
+ {
+ errors.user-error "Cannot change doxygen after it has been used." ;
+ }
+}
+
+rule check-doxygen ( )
+{
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using doxygen ":" $(.doxygen) ;
+ }
+ local extra-paths ;
+ if [ os.name ] = NT
+ {
+ local ProgramFiles = [ modules.peek : ProgramFiles ] ;
+ if $(ProgramFiles)
+ {
+ extra-paths = "$(ProgramFiles:J= )" ;
+ }
+ else
+ {
+ extra-paths = "C:\\Program Files" ;
+ }
+ }
+ .doxygen = [ common.get-invocation-command doxygen :
+ doxygen : $(.doxygen) : $(extra-paths) ] ;
+}
rule name ( )
{
+ freeze-config ;
return $(.doxygen) ;
}
@@ -219,6 +226,7 @@
rule translate-path ( path )
{
+ freeze-config ;
if [ os.on-windows ]
{
if [ os.name ] = CYGWIN
@@ -311,6 +319,7 @@
#
rule run ( target : source : properties * )
{
+ freeze-config ;
if <doxygen.rmdir>on in $(properties)
{
local output-dir =
@@ -602,6 +611,7 @@
#
rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * )
{
+ freeze-config ;
local project = [ project.current ] ;
if $(target:S) = .html
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk