idl.xml (8f71f2da) idl.xml (4aa87146)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 14 unchanged lines hidden (view full) ---

23
24<project name="idl" xmlns:if="ant:if" xmlns:unless="ant:unless">
25
26 <dirname property="idl.basedir" file="${ant.file.idl}"/>
27
28 <!-- global properties -->
29 <property file="${idl.basedir}/../../ant.properties"/>
30
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 14 unchanged lines hidden (view full) ---

23
24<project name="idl" xmlns:if="ant:if" xmlns:unless="ant:unless">
25
26 <dirname property="idl.basedir" file="${ant.file.idl}"/>
27
28 <!-- global properties -->
29 <property file="${idl.basedir}/../../ant.properties"/>
30
31
32
33 <property name="idl.build.dir" location="${build.base.dir}/idl"/>
34 <property name="idl.urd.build.dir" location="${idl.build.dir}/urd"/>
35 <property name="idl.rdb.build.dir" location="${idl.build.dir}/rdb"/>
36 <property name="idl.classes.build.dir" location="${idl.build.dir}/classes"/>
37 <property name="idl.javamaker.flag" location="${idl.build.dir}/idl.javamaker.flag"/>
38
39 <target name="idl">
40 <check-idl/>
41 <build-idl unless:set="idl.uptodate"/>
42 </target>
43
44 <target name="unoprivateapi-cppumaker">
45 <property name="idl.cppumaker.flag" location="${unoprivateapi.outdir}/idl.cppumaker.flag"/>
46 <check-idl-cppumaker/>
47 <build-idl-cppumaker unless:set="idl.cppumaker.uptodate"/>
48 </target>
49
50 <macrodef name="check-idl">
31 <macrodef name="idl-javamaker">
32 <attribute name="idlFiles"/>
33 <attribute name="idlBuildDir"/>
51 <sequential>
34 <sequential>
52 <local name="idl.files.exist"/>
53 <condition property="idl.files.exist">
54 <resourcecount refid="idl.files" when="greater" count="0"/>
35 <local name="idl.javamaker.flag"/>
36 <property name="idl.javamaker.flag" location="@{idlBuildDir}/idl.javamaker.flag"/>
37
38 <local name="idl.uptodate"/>
39 <condition property="idl.uptodate">
40 <resourcecount property="idl.uptodate" when="equal" count="0">
41 <resources refid="@{idlFiles}"/>
42 </resourcecount>
55 </condition>
56
43 </condition>
44
57 <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist">
58 <srcresources>
59 <resources refid="idl.files"/>
60 </srcresources>
45 <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" unless:set="idl.uptodate">
46 <srcfiles refid="@{idlFiles}"/>
61 </uptodate>
47 </uptodate>
62 <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/>
48 <build-idl
49 idlFiles="@{idlFiles}"
50 idlBuildDir="@{idlBuildDir}"
51 targetFlagFile="${idl.javamaker.flag}"
52 unless:set="idl.uptodate"/>
63 </sequential>
64 </macrodef>
65
53 </sequential>
54 </macrodef>
55
66 <macrodef name="check-idl-cppumaker">
67 <sequential>
68 <uptodate property="idl.cppumaker.uptodate" targetfile="${idl.cppumaker.flag}">
69 <srcresources>
70 <file name="${unoprivateapi.idl}"/>
71 </srcresources>
72 </uptodate>
73 </sequential>
74 </macrodef>
75
76 <macrodef name="build-idl">
56 <macrodef name="build-idl">
57 <attribute name="idlFiles"/>
58 <attribute name="idlBuildDir"/>
59 <attribute name="targetFlagFile"/>
77 <sequential>
60 <sequential>
78 <idlc urdDirectory="${idl.urd.build.dir}">
79 <idlFiles>
80 <resources refid="idl.files"/>
81 </idlFiles>
82 </idlc>
61 <idlc
62 idlFiles="@{idlFiles}"
63 urdDir="@{idlBuildDir}/urd"/>
83 <regmerge
64 <regmerge
84 urdDirectory="${idl.urd.build.dir}"
85 rdbDirectory="${idl.rdb.build.dir}"/>
65 urdDir="@{idlBuildDir}/urd"
66 rdbFile="@{idlBuildDir}/registry.rdb"/>
86 <javamaker
67 <javamaker
87 inputRdb="${idl.rdb.build.dir}/registry.rdb"
88 outputDirectory="${idl.classes.build.dir}"
68 rdbFile="@{idlBuildDir}/registry.rdb"
69 outputDir="@{idlBuildDir}/classes"
89 noDependentTypes="true"
90 excludes="${OUTDIR}/bin/types.rdb"/>
70 noDependentTypes="true"
71 excludes="${OUTDIR}/bin/types.rdb"/>
91 <touch file="${idl.javamaker.flag}"/>
72 <touch file="@{targetFlagFile}"/>
92 </sequential>
93 </macrodef>
94
73 </sequential>
74 </macrodef>
75
95 <macrodef name="build-idl-cppumaker">
96 <sequential>
97 <idlc urdDirectory="${unoprivateapi.outdir}/urd">
98 <idlFiles>
99 <file name="${unoprivateapi.idl}"/>
100 </idlFiles>
101 </idlc>
102 <regmerge
103 urdDirectory="${unoprivateapi.outdir}/urd"
104 rdbDirectory="${unoprivateapi.outdir}/rdb"/>
105 <cppumaker
106 inputRdb="${unoprivateapi.outdir}/rdb/registry.rdb"
107 outputDirectory="${unoprivateapi.outdir}/inc"/>
108 <touch file="${idl.cppumaker.flag}"/>
109 </sequential>
110 </macrodef>
111
112 <macrodef name="idlc">
76 <macrodef name="idlc">
113 <element name="idlFiles"/>
114 <attribute name="urdDirectory"/>
77 <attribute name="idlFiles"/>
78 <attribute name="urdDir"/>
115 <sequential>
79 <sequential>
116 <mkdir dir="@{urdDirectory}"/>
80 <mkdir dir="@{urdDir}"/>
117 <apply executable="${OUTDIR}/bin/idlc" failonerror="true">
118 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
119 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
120 <arg value="-I${OUTDIR}/idl"/>
121 <arg value="-O"/>
81 <apply executable="${OUTDIR}/bin/idlc" failonerror="true">
82 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
83 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
84 <arg value="-I${OUTDIR}/idl"/>
85 <arg value="-O"/>
122 <arg value="@{urdDirectory}"/>
86 <arg value="@{urdDir}"/>
123 <arg value="-verbose"/>
124 <arg value="-cid"/>
125 <arg value="-we"/>
87 <arg value="-verbose"/>
88 <arg value="-cid"/>
89 <arg value="-we"/>
126 <resources>
127 <idlFiles/>
128 </resources>
90 <fileset refid="@{idlFiles}"/>
129 </apply>
130 </sequential>
131 </macrodef>
132
133 <macrodef name="regmerge">
91 </apply>
92 </sequential>
93 </macrodef>
94
95 <macrodef name="regmerge">
134 <attribute name="urdDirectory"/>
135 <attribute name="rdbDirectory"/>
96 <attribute name="urdDir"/>
97 <attribute name="rdbFile"/>
136 <sequential>
98 <sequential>
137 <mkdir dir="@{rdbDirectory}"/>
138 <delete file="@{rdbDirectory}/registry.rdb"/>
99 <delete file="@{rdbFile}"/>
139 <apply executable="${OUTDIR}/bin/regmerge" failonerror="true">
140 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
141 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
100 <apply executable="${OUTDIR}/bin/regmerge" failonerror="true">
101 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
102 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
142 <arg value="@{rdbDirectory}/registry.rdb"/>
103 <arg value="@{rdbFile}"/>
143 <arg value="/UCR"/>
104 <arg value="/UCR"/>
144 <fileset dir="@{urdDirectory}" includes="**/*.urd"/>
105 <fileset dir="@{urdDir}" includes="**/*.urd"/>
145 </apply>
146 </sequential>
147 </macrodef>
148
149 <macrodef name="javamaker">
106 </apply>
107 </sequential>
108 </macrodef>
109
110 <macrodef name="javamaker">
150 <attribute name="inputRdb"/>
151 <attribute name="outputDirectory"/>
111 <attribute name="rdbFile"/>
112 <attribute name="outputDir"/>
152 <attribute name="noDependentTypes" default="false"/>
153 <attribute name="excludes" default=""/>
154 <sequential>
113 <attribute name="noDependentTypes" default="false"/>
114 <attribute name="excludes" default=""/>
115 <sequential>
155 <mkdir dir="@{outputDirectory}"/>
116 <mkdir dir="@{outputDir}"/>
156 <exec executable="${OUTDIR}/bin/javamaker" failonerror="true">
157 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
158 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
117 <exec executable="${OUTDIR}/bin/javamaker" failonerror="true">
118 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
119 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
159 <arg value="-O@{outputDirectory}"/>
120 <arg value="-O@{outputDir}"/>
160 <arg value="-BUCR"/>
161 <arg value="-nD"
162 if:true="@{noDependentTypes}"/>
121 <arg value="-BUCR"/>
122 <arg value="-nD"
123 if:true="@{noDependentTypes}"/>
163 <arg value="@{inputRdb}"/>
124 <arg value="@{rdbFile}"/>
164 <arg value="-X@{excludes}"
165 unless:blank="@{excludes}"/>
166 </exec>
167 </sequential>
168 </macrodef>
169
125 <arg value="-X@{excludes}"
126 unless:blank="@{excludes}"/>
127 </exec>
128 </sequential>
129 </macrodef>
130
170 <macrodef name="cppumaker">
171 <attribute name="inputRdb"/>
172 <attribute name="outputDirectory"/>
173 <sequential>
174 <mkdir dir="@{outputDirectory}"/>
175 <exec executable="${OUTDIR}/bin/cppumaker" failonerror="true">
176 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
177 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
178 <arg value="-O@{outputDirectory}"/>
179 <arg value="-BUCR"/>
180 <arg value="-C"/>
181 <arg value="@{inputRdb}"/>
182 <arg value="${OUTDIR}/bin/udkapi.rdb"/>
183 </exec>
184 </sequential>
185 </macrodef>
186</project>
187
131</project>
132