Index: tools/build/v2/tools/fop.jam =================================================================== --- tools/build/v2/tools/fop.jam (revision 66265) +++ tools/build/v2/tools/fop.jam (working copy) @@ -9,7 +9,8 @@ import os ; import generators ; import common ; -import errors ; +import errors ; +import boostbook ; generators.register-standard fop.render.pdf : FO : PDF ; generators.register-standard fop.render.ps : FO : PS ; @@ -21,19 +22,35 @@ if $(.initialized) { - if $(.FOP_COMMAND) != $(fop-command) || $(JAVA_HOME) != $(java-home) - || $(JAVACMD) != $(java) + if $(.FOP_COMMAND) != $(fop-command) || $(.JAVA_HOME) != $(java-home) + || $(.JAVACMD) != $(java) { errors.user-error "fop: reinitialization with different options" ; } } else { + # Save the parameters to check if reinitialized. .initialized = true ; .FOP_COMMAND = $(fop-command) ; - # What is the meaning of this logic? Needs more comments!! --DWA - java-home ?= $(java) ; - .FOP_SETUP = [ common.variable-setting-command JAVA_HOME : $(java-home) ] ; + .JAVA_HOME = $(java-home) ; + .JAVACMD = $(java) ; + + # JAVA_HOME is the location that java was installed to. + + if $(java-home) + { + .FOP_SETUP += [ common.variable-setting-command JAVA_HOME : $(java-home) ] ; + } + + # JAVACMD is the location that of the java executable, useful for a + # non-standard java installation, where the executable isn't at + # $JAVA_HOME/bin/java. + + if $(java) + { + .FOP_SETUP += [ common.variable-setting-command JAVACMD : $(java) ] ; + } } # Make sure the fop command is executed from within the directory where it's located.