mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
# Copyright (C) 2003 Doug Gregor. Permission to copy, use, modify,
|
|
# sell and distribute this software is granted provided this
|
|
# copyright notice appears in all copies. This software is provided
|
|
# "as is" without express or implied warranty, and with no claim as
|
|
# to its suitability for any purpose.
|
|
|
|
# This module defines rules to handle generation of PDF and PostScript files
|
|
# from XSL Formatting Objects via Apache FOP
|
|
|
|
import generators ;
|
|
|
|
generators.register-standard fop.fo-to-print : FO : PDF ;
|
|
generators.register-standard fop.fo-to-print : FO : PS ;
|
|
|
|
rule init ( fop-dir ? : java-home ? )
|
|
{
|
|
if ! $(fop-dir)
|
|
{
|
|
fop-dir = [ modules.peek : FOP_DIR ] ;
|
|
}
|
|
|
|
if ! $(.initialized)
|
|
{
|
|
.initialized = true ;
|
|
.fop-dir = $(fop-dir) ;
|
|
.java-home = $(java-home) ;
|
|
}
|
|
}
|
|
|
|
rule fo-to-print ( target : source : properties * )
|
|
{
|
|
JAVA_HOME on $(target) = $(.java-home) ;
|
|
FOP_DIR on $(target) = $(.fop-dir) ;
|
|
fop $(target) : $(source) ;
|
|
}
|
|
|
|
actions fop
|
|
{
|
|
JAVA_HOME=$(JAVA_HOME) $(FOP_DIR)/fop.sh $(>) $(<)
|
|
} |