idl.xml (bee6bcb9) idl.xml (a622bb93)
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

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

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
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

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

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" depends="idl-check,idl-javamaker"/>
39 <target name="idl">
40 <check-idl/>
41 <build-idl unless:set="idl.uptodate"/>
42 </target>
40
43
41 <target name="idl-check">
42 <local name="idl.files.exist"/>
43 <condition property="idl.files.exist">
44 <resourcecount refid="idl.files" when="greater" count="0"/>
45 </condition>
44 <macrodef name="check-idl">
45 <sequential>
46 <local name="idl.files.exist"/>
47 <condition property="idl.files.exist">
48 <resourcecount refid="idl.files" when="greater" count="0"/>
49 </condition>
46
50
47 <local name="idl.files.union"/>
48 <union id="idl.files.union" if:set="idl.files.exist">
49 <filelist refid="idl.files"/>
50 </union>
51 <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist">
52 <srcresources refid="idl.files.union"/>
53 </uptodate>
54 <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/>
55 </target>
51 <local name="idl.files.union"/>
52 <union id="idl.files.union" if:set="idl.files.exist">
53 <filelist refid="idl.files"/>
54 </union>
55 <uptodate property="idl.uptodate" targetfile="${idl.javamaker.flag}" if:set="idl.files.exist">
56 <srcresources refid="idl.files.union"/>
57 </uptodate>
58 <property name="idl.uptodate" value="true" unless:set="idl.files.exist"/>
59 </sequential>
60 </macrodef>
56
61
62 <macrodef name="build-idl">
63 <sequential>
64 <idlc/>
65 <regmerge/>
66 <javamaker
67 inputRdb="${idl.rdb.build.dir}/registry.rdb"
68 outputDirectory="${idl.classes.build.dir}"
69 noDependentTypes="true"
70 excludes="${OUTDIR}/bin/types.rdb"/>
71 <touch file="${idl.javamaker.flag}"/>
72 </sequential>
73 </macrodef>
74
75 <macrodef name="idlc">
76 <sequential>
77 <mkdir dir="${idl.urd.build.dir}"/>
78 <apply executable="${OUTDIR}/bin/idlc" failonerror="true">
79 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
80 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
81 <arg value="-I${OUTDIR}/idl"/>
82 <arg value="-O"/>
83 <arg value="${idl.urd.build.dir}"/>
84 <arg value="-verbose"/>
85 <arg value="-cid"/>
86 <arg value="-we"/>
87 <filelist refid="idl.files"/>
88 </apply>
89 </sequential>
90 </macrodef>
91
92 <macrodef name="regmerge">
93 <sequential>
94 <mkdir dir="${idl.rdb.build.dir}"/>
95 <delete file="${idl.rdb.build.dir}/registry.rdb"/>
96 <apply executable="${OUTDIR}/bin/regmerge" failonerror="true">
97 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
98 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
99 <arg value="${idl.rdb.build.dir}/registry.rdb"/>
100 <arg value="/UCR"/>
101 <fileset dir="${idl.urd.build.dir}" includes="**/*.urd"/>
102 </apply>
103 </sequential>
104 </macrodef>
105
57 <macrodef name="javamaker">
106 <macrodef name="javamaker">
58 <attribute name="input-rdb"/>
59 <attribute name="output-directory"/>
60 <attribute name="no-dependent-types" default="false"/>
107 <attribute name="inputRdb"/>
108 <attribute name="outputDirectory"/>
109 <attribute name="noDependentTypes" default="false"/>
61 <attribute name="excludes" default=""/>
62 <sequential>
110 <attribute name="excludes" default=""/>
111 <sequential>
63 <mkdir dir="@{output-directory}"/>
112 <mkdir dir="@{outputDirectory}"/>
64 <exec executable="${OUTDIR}/bin/javamaker" failonerror="true">
65 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
66 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
113 <exec executable="${OUTDIR}/bin/javamaker" failonerror="true">
114 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
115 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
67 <arg value="-O@{output-directory}"/>
116 <arg value="-O@{outputDirectory}"/>
68 <arg value="-BUCR"/>
69 <arg value="-nD"
117 <arg value="-BUCR"/>
118 <arg value="-nD"
70 if:true="@{no-dependent-types}"/>
71 <arg value="@{input-rdb}"/>
119 if:true="@{noDependentTypes}"/>
120 <arg value="@{inputRdb}"/>
72 <arg value="-X@{excludes}"
73 unless:blank="@{excludes}"/>
74 </exec>
75 </sequential>
76 </macrodef>
121 <arg value="-X@{excludes}"
122 unless:blank="@{excludes}"/>
123 </exec>
124 </sequential>
125 </macrodef>
77
78 <target name="idl-javamaker" depends="idl-regmerge" unless="idl.uptodate">
79 <mkdir dir="${idl.classes.build.dir}"/>
80 <javamaker
81 input-rdb="${idl.rdb.build.dir}/registry.rdb"
82 output-directory="${idl.classes.build.dir}"
83 no-dependent-types="true"
84 excludes="${OUTDIR}/bin/types.rdb"/>
85 <touch file="${idl.javamaker.flag}"/>
86 </target>
87
88 <target name="idl-regmerge" depends="idl-idlc" unless="idl.uptodate">
89 <mkdir dir="${idl.rdb.build.dir}"/>
90 <delete file="${idl.rdb.build.dir}/registry.rdb"/>
91 <apply executable="${OUTDIR}/bin/regmerge" failonerror="true">
92 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
93 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
94 <arg value="${idl.rdb.build.dir}/registry.rdb"/>
95 <arg value="/UCR"/>
96 <fileset dir="${idl.urd.build.dir}" includes="**/*.urd"/>
97 </apply>
98 </target>
99
100 <target name="idl-idlc" unless="idl.uptodate">
101 <mkdir dir="${idl.urd.build.dir}"/>
102 <apply executable="${OUTDIR}/bin/idlc" failonerror="true">
103 <env key="LD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
104 <env key="DYLD_LIBRARY_PATH" value="${OUTDIR}/lib"/>
105 <arg value="-I${OUTDIR}/idl"/>
106 <arg value="-O"/>
107 <arg value="${idl.urd.build.dir}"/>
108 <arg value="-verbose"/>
109 <arg value="-cid"/>
110 <arg value="-we"/>
111 <filelist refid="idl.files"/>
112 </apply>
113 </target>
114
115</project>
116
126</project>
127