1 # Copyright (C) 2003-2004 Doug Gregor and Dave Abrahams. Distributed
2 # under the Boost Software License, Version 1.0. (See accompanying
3 # file LICENSE_1_0.txt or copy at
4 # http://www.boost.org/LICENSE_1_0.txt)
6 # This module defines rules to handle generation of PDF and
7 # PostScript files from XSL Formatting Objects via Apache FOP
13 generators.register-standard fop.render.pdf : FO : PDF ;
14 generators.register-standard fop.render.ps : FO : PS ;
16 # Initializes the fop toolset.
18 rule init ( fop-command ? : java-home ? : java ? )
20 local has-command = $(.has-command) ;
27 if $(fop-command) || ! $(has-command)
29 fop-command = [ common.get-invocation-command fop : fop : $(fop-command)
30 : [ modules.peek : FOP_DIR ] ] ;
35 .FOP_COMMAND = $(fop-command) ;
38 if $(java-home) || $(java)
43 # JAVA_HOME is the location that java was installed to.
47 .FOP_SETUP += [ common.variable-setting-command JAVA_HOME : $(java-home) ] ;
50 # JAVACMD is the location that of the java executable, useful for a
51 # non-standard java installation, where the executable isn't at
52 # $JAVA_HOME/bin/java.
56 .FOP_SETUP += [ common.variable-setting-command JAVACMD : $(java) ] ;
63 $(.FOP_SETUP) $(.FOP_COMMAND:E=fop) $(>) $(<)
68 $(.FOP_SETUP) $(.FOP_COMMAND:E=fop) $(>) -ps $(<)