|
7 | 7 | <property name="dir.resources.sbe" location="perf/resources/sbe"/> |
8 | 8 | <property name="dir.resources.protobuf" location="perf/resources/protobuf"/> |
9 | 9 |
|
| 10 | + <property name="dir.target.perf" location="target/perf"/> |
10 | 11 | <property name="dir.target.perf.classes" location="target/perf/classes"/> |
11 | 12 | <property name="dir.target.perf.java" location="target/perf/java"/> |
12 | 13 | <property name="dir.target.perf.dist" location="target/perf/dist"/> |
13 | 14 | <property name="dir.target.perf.cpp" location="target/perf/cpp"/> |
14 | 15 |
|
| 16 | + <property name="dir.deps" location="deps"/> |
| 17 | + <property name="dir.deps.protobuf.build" location="deps/pb"/> |
| 18 | + |
15 | 19 | <property file="build-local.properties"/> |
16 | 20 |
|
17 | 21 | <path id="perf.tools.classpath"> |
|
123 | 127 | </sequential> |
124 | 128 | </target> |
125 | 129 |
|
| 130 | + <target name="deps:init" depends=""> |
| 131 | + <mkdir dir="${dir.deps}"/> |
| 132 | + <mkdir dir="${dir.deps.protobuf.build}"/> |
| 133 | + </target> |
| 134 | + |
| 135 | + <target name="deps:clean" depends=""> |
| 136 | + <delete dir="${dir.deps}"/> |
| 137 | + </target> |
| 138 | + |
| 139 | + <target name="protobuf:download" depends="deps:init"> |
| 140 | + <sequential> |
| 141 | + <local name="protobuf.name"/> |
| 142 | + <local name="sha.fail"/> |
| 143 | + <local name="cksum.fail"/> |
| 144 | + <property name="protobuf.name" value="protobuf-2.5.0.tar.gz"/> |
| 145 | + <get dest="/tmp"> |
| 146 | + <url url="https://protobuf.googlecode.com/files/${protobuf.name}"/> |
| 147 | + </get> |
| 148 | + <checksum file="/tmp/${protobuf.name}" algorithm="sha1" property="7f6ea7bc1382202fb1ce8c6933f1ef8fea0c0148" verifyproperty="sha.fail"/> |
| 149 | + <condition property="cksum.fail"> |
| 150 | + <equals arg1="${sha.fail}" arg2="false"/> |
| 151 | + </condition> |
| 152 | + <fail if="cksum.fail">Checksum failed</fail> |
| 153 | + <copy file="/tmp/${protobuf.name}" todir="${dir.deps.protobuf.build}"/> |
| 154 | + </sequential> |
| 155 | + </target> |
| 156 | + |
| 157 | + <target name="protobuf:unpack" depends="deps:init, protobuf:download"> |
| 158 | + <!-- untar/unzip, etc. won't preserve executable bits... grumble... --> |
| 159 | + <exec executable="tar" dir="${dir.deps.protobuf.build}" failonerror="true"> |
| 160 | + <arg value="xzf"/> |
| 161 | + <arg value="protobuf-2.5.0.tar.gz"/> |
| 162 | + </exec> |
| 163 | + </target> |
| 164 | + |
| 165 | + <target name="protobuf:build" depends="protobuf:unpack"> |
| 166 | + <sequential> |
| 167 | + <exec executable="./configure" dir="${dir.deps.protobuf.build}/protobuf-2.5.0" output="${dir.deps.protobuf.build}/protobuf-configure.out" failonerror="true"> |
| 168 | + <arg value="--prefix=${dir.deps}/protobuf-2.5.0"/> |
| 169 | + </exec> |
| 170 | + <exec executable="make" dir="${dir.deps.protobuf.build}/protobuf-2.5.0" output="${dir.deps.protobuf.build}/protobuf-make.out" failonerror="true"/> |
| 171 | + <exec executable="make" dir="${dir.deps.protobuf.build}/protobuf-2.5.0" output="${dir.deps.protobuf.build}/protobuf-make-insta.out" failonerror="true"> |
| 172 | + <arg value="install"/> |
| 173 | + </exec> |
| 174 | + </sequential> |
| 175 | + </target> |
| 176 | + |
126 | 177 | </project> |
0 commit comments