fop.jam

来自「boost库提供标准的C++ API 配合dev c++使用,功能更加强大」· JAM 代码 · 共 40 行

JAM
40
字号
#  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 $(>) $(<)
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?