xref: /aoo42x/main/solenv/ant/idl.xml (revision 41f03cd9)
1*41f03cd9SDamjan Jovanovic<?xml version="1.0" encoding="UTF-8"?>
2*41f03cd9SDamjan Jovanovic<!--***********************************************************
3*41f03cd9SDamjan Jovanovic *
4*41f03cd9SDamjan Jovanovic * Licensed to the Apache Software Foundation (ASF) under one
5*41f03cd9SDamjan Jovanovic * or more contributor license agreements.  See the NOTICE file
6*41f03cd9SDamjan Jovanovic * distributed with this work for additional information
7*41f03cd9SDamjan Jovanovic * regarding copyright ownership.  The ASF licenses this file
8*41f03cd9SDamjan Jovanovic * to you under the Apache License, Version 2.0 (the
9*41f03cd9SDamjan Jovanovic * "License"); you may not use this file except in compliance
10*41f03cd9SDamjan Jovanovic * with the License.  You may obtain a copy of the License at
11*41f03cd9SDamjan Jovanovic *
12*41f03cd9SDamjan Jovanovic *   http://www.apache.org/licenses/LICENSE-2.0
13*41f03cd9SDamjan Jovanovic *
14*41f03cd9SDamjan Jovanovic * Unless required by applicable law or agreed to in writing,
15*41f03cd9SDamjan Jovanovic * software distributed under the License is distributed on an
16*41f03cd9SDamjan Jovanovic * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17*41f03cd9SDamjan Jovanovic * KIND, either express or implied.  See the License for the
18*41f03cd9SDamjan Jovanovic * specific language governing permissions and limitations
19*41f03cd9SDamjan Jovanovic * under the License.
20*41f03cd9SDamjan Jovanovic *
21*41f03cd9SDamjan Jovanovic ***********************************************************-->
22*41f03cd9SDamjan Jovanovic
23*41f03cd9SDamjan Jovanovic
24*41f03cd9SDamjan Jovanovic<project name="idl" xmlns:if="ant:if" xmlns:unless="ant:unless">
25*41f03cd9SDamjan Jovanovic
26*41f03cd9SDamjan Jovanovic    <dirname property="idl.basedir" file="${ant.file.idl}"/>
27*41f03cd9SDamjan Jovanovic
28*41f03cd9SDamjan Jovanovic    <!-- global properties -->
29*41f03cd9SDamjan Jovanovic    <property file="${idl.basedir}/../../ant.properties"/>
30*41f03cd9SDamjan Jovanovic
31*41f03cd9SDamjan Jovanovic
32*41f03cd9SDamjan Jovanovic
33*41f03cd9SDamjan Jovanovic    <property name="idl.build.dir" location="${build.base.dir}/idl"/>
34*41f03cd9SDamjan Jovanovic    <property name="idl.urd.build.dir" location="${idl.build.dir}/urd"/>
35*41f03cd9SDamjan Jovanovic    <property name="idl.rdb.build.dir" location="${idl.build.dir}/rdb"/>
36*41f03cd9SDamjan Jovanovic    <property name="idl.classes.build.dir" location="${idl.build.dir}/classes"/>
37*41f03cd9SDamjan Jovanovic    <property name="idl.javamaker.flag" location="${idl.build.dir}/idl.javamaker.flag"/>
38*41f03cd9SDamjan Jovanovic
39*41f03cd9SDamjan Jovanovic    <target name="idl" depends="idl-check,idl-javamaker"/>
40*41f03cd9SDamjan Jovanovic
41*41f03cd9SDamjan Jovanovic    <target name="idl-check">
42*41f03cd9SDamjan Jovanovic        <local name="idl.files.exist"/>
43*41f03cd9SDamjan Jovanovic        <condition property="idl.files.exist">
44*41f03cd9SDamjan Jovanovic            <resourcecount refid="idl.files" when="greater" count="0"/>
45*41f03cd9SDamjan Jovanovic        </condition>
46*41f03cd9SDamjan Jovanovic
47*41f03cd9SDamjan Jovanovic        <local name="idl.files.union"/>
48*41f03cd9SDamjan Jovanovic        <union id="idl.files.union" if:set="idl.files.exist">
49*41f03cd9SDamjan Jovanovic            <filelist refid="idl.files"/>
50*41f03cd9SDamjan Jovanovic        </union>
51*41f03cd9SDamjan Jovanovic        <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist">
52*41f03cd9SDamjan Jovanovic            <srcresources refid="idl.files.union"/>
53*41f03cd9SDamjan Jovanovic        </uptodate>
54*41f03cd9SDamjan Jovanovic        <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/>
55*41f03cd9SDamjan Jovanovic    </target>
56*41f03cd9SDamjan Jovanovic
57*41f03cd9SDamjan Jovanovic    <target name="idl-javamaker" depends="idl-regmerge" unless="idl.uptodate">
58*41f03cd9SDamjan Jovanovic        <mkdir dir="${idl.classes.build.dir}"/>
59*41f03cd9SDamjan Jovanovic        <exec executable="${OUTDIR}/bin/javamaker" failonerror="true">
60*41f03cd9SDamjan Jovanovic            <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
61*41f03cd9SDamjan Jovanovic            <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
62*41f03cd9SDamjan Jovanovic            <arg value="-O${idl.classes.build.dir}"/>
63*41f03cd9SDamjan Jovanovic            <arg value="-BUCR"/>
64*41f03cd9SDamjan Jovanovic            <arg value="-nD"/>
65*41f03cd9SDamjan Jovanovic            <arg value="${idl.rdb.build.dir}/registry.rdb"/>
66*41f03cd9SDamjan Jovanovic            <arg value="-X${OUTDIR}/bin/types.rdb"/>
67*41f03cd9SDamjan Jovanovic        </exec>
68*41f03cd9SDamjan Jovanovic        <touch file="${idl.javamaker.flag}"/>
69*41f03cd9SDamjan Jovanovic    </target>
70*41f03cd9SDamjan Jovanovic
71*41f03cd9SDamjan Jovanovic    <target name="idl-regmerge" depends="idl-idlc" unless="idl.uptodate">
72*41f03cd9SDamjan Jovanovic        <mkdir dir="${idl.rdb.build.dir}"/>
73*41f03cd9SDamjan Jovanovic        <delete file="${idl.rdb.build.dir}/registry.rdb"/>
74*41f03cd9SDamjan Jovanovic        <apply executable="${OUTDIR}/bin/regmerge" failonerror="true">
75*41f03cd9SDamjan Jovanovic            <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
76*41f03cd9SDamjan Jovanovic            <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
77*41f03cd9SDamjan Jovanovic            <arg value="${idl.rdb.build.dir}/registry.rdb"/>
78*41f03cd9SDamjan Jovanovic            <arg value="/UCR"/>
79*41f03cd9SDamjan Jovanovic            <fileset dir="${idl.urd.build.dir}" includes="**/*.urd"/>
80*41f03cd9SDamjan Jovanovic        </apply>
81*41f03cd9SDamjan Jovanovic    </target>
82*41f03cd9SDamjan Jovanovic
83*41f03cd9SDamjan Jovanovic    <target name="idl-idlc" unless="idl.uptodate">
84*41f03cd9SDamjan Jovanovic        <mkdir dir="${idl.urd.build.dir}"/>
85*41f03cd9SDamjan Jovanovic        <apply executable="${OUTDIR}/bin/idlc" failonerror="true">
86*41f03cd9SDamjan Jovanovic            <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
87*41f03cd9SDamjan Jovanovic            <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
88*41f03cd9SDamjan Jovanovic            <arg value="-I${OUTDIR}/idl"/>
89*41f03cd9SDamjan Jovanovic            <arg value="-O"/>
90*41f03cd9SDamjan Jovanovic            <arg value="${idl.urd.build.dir}"/>
91*41f03cd9SDamjan Jovanovic            <arg value="-verbose"/>
92*41f03cd9SDamjan Jovanovic            <arg value="-cid"/>
93*41f03cd9SDamjan Jovanovic            <arg value="-we"/>
94*41f03cd9SDamjan Jovanovic            <filelist refid="idl.files"/>
95*41f03cd9SDamjan Jovanovic        </apply>
96*41f03cd9SDamjan Jovanovic    </target>
97*41f03cd9SDamjan Jovanovic
98*41f03cd9SDamjan Jovanovic</project>
99*41f03cd9SDamjan Jovanovic
100