1*6ad462b0Scbmarcum<?xml version="1.0" encoding="UTF-8"?> 2*6ad462b0Scbmarcum<!--*********************************************************** 3*6ad462b0Scbmarcum * 4*6ad462b0Scbmarcum * Licensed to the Apache Software Foundation (ASF) under one 5*6ad462b0Scbmarcum * or more contributor license agreements. See the NOTICE file 6*6ad462b0Scbmarcum * distributed with this work for additional information 7*6ad462b0Scbmarcum * regarding copyright ownership. The ASF licenses this file 8*6ad462b0Scbmarcum * to you under the Apache License, Version 2.0 (the 9*6ad462b0Scbmarcum * "License"); you may not use this file except in compliance 10*6ad462b0Scbmarcum * with the License. You may obtain a copy of the License at 11*6ad462b0Scbmarcum * 12*6ad462b0Scbmarcum * http://www.apache.org/licenses/LICENSE-2.0 13*6ad462b0Scbmarcum * 14*6ad462b0Scbmarcum * Unless required by applicable law or agreed to in writing, 15*6ad462b0Scbmarcum * software distributed under the License is distributed on an 16*6ad462b0Scbmarcum * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17*6ad462b0Scbmarcum * KIND, either express or implied. See the License for the 18*6ad462b0Scbmarcum * specific language governing permissions and limitations 19*6ad462b0Scbmarcum * under the License. 20*6ad462b0Scbmarcum * 21*6ad462b0Scbmarcum ***********************************************************--> 22*6ad462b0Scbmarcum 23*6ad462b0Scbmarcum 24*6ad462b0Scbmarcum<project name="idl" xmlns:if="ant:if" xmlns:unless="ant:unless"> 25*6ad462b0Scbmarcum 26*6ad462b0Scbmarcum <dirname property="idl.basedir" file="${ant.file.idl}"/> 27*6ad462b0Scbmarcum 28*6ad462b0Scbmarcum <macrodef name="idl-javamaker"> 29*6ad462b0Scbmarcum <attribute name="idlFiles"/> 30*6ad462b0Scbmarcum <attribute name="idlBuildDir"/> 31*6ad462b0Scbmarcum <sequential> 32*6ad462b0Scbmarcum <local name="idl.javamaker.flag"/> 33*6ad462b0Scbmarcum <property name="idl.javamaker.flag" location="@{idlBuildDir}/idl.javamaker.flag"/> 34*6ad462b0Scbmarcum 35*6ad462b0Scbmarcum <local name="idl.uptodate"/> 36*6ad462b0Scbmarcum <condition property="idl.uptodate"> 37*6ad462b0Scbmarcum <resourcecount property="idl.uptodate" when="equal" count="0"> 38*6ad462b0Scbmarcum <resources refid="@{idlFiles}"/> 39*6ad462b0Scbmarcum </resourcecount> 40*6ad462b0Scbmarcum </condition> 41*6ad462b0Scbmarcum 42*6ad462b0Scbmarcum <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" unless:set="idl.uptodate"> 43*6ad462b0Scbmarcum <srcfiles refid="@{idlFiles}"/> 44*6ad462b0Scbmarcum </uptodate> 45*6ad462b0Scbmarcum <build-idl 46*6ad462b0Scbmarcum idlFiles="@{idlFiles}" 47*6ad462b0Scbmarcum idlBuildDir="@{idlBuildDir}" 48*6ad462b0Scbmarcum targetFlagFile="${idl.javamaker.flag}" 49*6ad462b0Scbmarcum unless:set="idl.uptodate"/> 50*6ad462b0Scbmarcum </sequential> 51*6ad462b0Scbmarcum </macrodef> 52*6ad462b0Scbmarcum 53*6ad462b0Scbmarcum <macrodef name="build-idl"> 54*6ad462b0Scbmarcum <attribute name="idlFiles"/> 55*6ad462b0Scbmarcum <attribute name="idlBuildDir"/> 56*6ad462b0Scbmarcum <attribute name="targetFlagFile"/> 57*6ad462b0Scbmarcum <sequential> 58*6ad462b0Scbmarcum <idlc 59*6ad462b0Scbmarcum idlFiles="@{idlFiles}" 60*6ad462b0Scbmarcum urdDir="@{idlBuildDir}/urd"/> 61*6ad462b0Scbmarcum <regmerge 62*6ad462b0Scbmarcum urdDir="@{idlBuildDir}/urd" 63*6ad462b0Scbmarcum rdbFile="@{idlBuildDir}/registry.rdb"/> 64*6ad462b0Scbmarcum <javamaker 65*6ad462b0Scbmarcum rdbFile="@{idlBuildDir}/registry.rdb" 66*6ad462b0Scbmarcum outputDir="@{idlBuildDir}/classes" 67*6ad462b0Scbmarcum noDependentTypes="true" 68*6ad462b0Scbmarcum excludes="${openoffice.home}/program/types.rdb"/> 69*6ad462b0Scbmarcum <touch file="@{targetFlagFile}"/> 70*6ad462b0Scbmarcum </sequential> 71*6ad462b0Scbmarcum </macrodef> 72*6ad462b0Scbmarcum 73*6ad462b0Scbmarcum <macrodef name="idlc"> 74*6ad462b0Scbmarcum <attribute name="idlFiles"/> 75*6ad462b0Scbmarcum <attribute name="urdDir"/> 76*6ad462b0Scbmarcum <sequential> 77*6ad462b0Scbmarcum <mkdir dir="@{urdDir}"/> 78*6ad462b0Scbmarcum <apply executable="${openoffice.home}/sdk/bin/idlc" failonerror="true"> 79*6ad462b0Scbmarcum <env key="LD_LIBRARY_PATH" value="${openoffice.home}/program"/> 80*6ad462b0Scbmarcum <env key="DYLD_LIBRARY_PATH" value="${openoffice.home}/program"/> 81*6ad462b0Scbmarcum <arg value="-I${openoffice.home}/sdk/idl"/> 82*6ad462b0Scbmarcum <arg value="-O"/> 83*6ad462b0Scbmarcum <arg value="@{urdDir}"/> 84*6ad462b0Scbmarcum <arg value="-verbose"/> 85*6ad462b0Scbmarcum <arg value="-cid"/> 86*6ad462b0Scbmarcum <arg value="-we"/> 87*6ad462b0Scbmarcum <fileset refid="@{idlFiles}"/> 88*6ad462b0Scbmarcum </apply> 89*6ad462b0Scbmarcum </sequential> 90*6ad462b0Scbmarcum </macrodef> 91*6ad462b0Scbmarcum 92*6ad462b0Scbmarcum <macrodef name="regmerge"> 93*6ad462b0Scbmarcum <attribute name="urdDir"/> 94*6ad462b0Scbmarcum <attribute name="rdbFile"/> 95*6ad462b0Scbmarcum <sequential> 96*6ad462b0Scbmarcum <delete file="@{rdbFile}"/> 97*6ad462b0Scbmarcum <apply executable="${openoffice.home}/program/regmerge" failonerror="true"> 98*6ad462b0Scbmarcum <env key="LD_LIBRARY_PATH" value="${openoffice.home}/program"/> 99*6ad462b0Scbmarcum <env key="DYLD_LIBRARY_PATH" value="${openoffice.home}/program"/> 100*6ad462b0Scbmarcum <arg value="@{rdbFile}"/> 101*6ad462b0Scbmarcum <arg value="/UCR"/> 102*6ad462b0Scbmarcum <fileset dir="@{urdDir}" includes="**/*.urd"/> 103*6ad462b0Scbmarcum </apply> 104*6ad462b0Scbmarcum </sequential> 105*6ad462b0Scbmarcum </macrodef> 106*6ad462b0Scbmarcum 107*6ad462b0Scbmarcum <macrodef name="javamaker"> 108*6ad462b0Scbmarcum <attribute name="rdbFile"/> 109*6ad462b0Scbmarcum <attribute name="outputDir"/> 110*6ad462b0Scbmarcum <attribute name="noDependentTypes" default="false"/> 111*6ad462b0Scbmarcum <attribute name="excludes" default=""/> 112*6ad462b0Scbmarcum <sequential> 113*6ad462b0Scbmarcum <mkdir dir="@{outputDir}"/> 114*6ad462b0Scbmarcum <exec executable="${openoffice.home}/sdk/bin/javamaker" failonerror="true"> 115*6ad462b0Scbmarcum <env key="LD_LIBRARY_PATH" value="${openoffice.home}/program"/> 116*6ad462b0Scbmarcum <env key="DYLD_LIBRARY_PATH" value="${openoffice.home}/program"/> 117*6ad462b0Scbmarcum <arg value="-O@{outputDir}"/> 118*6ad462b0Scbmarcum <arg value="-BUCR"/> 119*6ad462b0Scbmarcum <arg value="-nD" 120*6ad462b0Scbmarcum if:true="@{noDependentTypes}"/> 121*6ad462b0Scbmarcum <arg value="@{rdbFile}"/> 122*6ad462b0Scbmarcum <arg value="-X@{excludes}" 123*6ad462b0Scbmarcum unless:blank="@{excludes}"/> 124*6ad462b0Scbmarcum </exec> 125*6ad462b0Scbmarcum </sequential> 126*6ad462b0Scbmarcum </macrodef> 127*6ad462b0Scbmarcum 128*6ad462b0Scbmarcum</project> 129*6ad462b0Scbmarcum 130