storlets/StorletSamples/java/ExecDepStorlet/build.xml

50 lines
1.7 KiB
XML

<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-->
<project>
<target name="clean">
<delete dir="bin" />
</target>
<target name="java">
<mkdir dir="bin" />
<javac srcdir="src" destdir="bin"
classpath="../../../src/java/SCommon/bin/SCommon.jar"
includeantruntime="false" />
</target>
<target name="csrc" depends="jar">
<echo message="int main(){return 42;}" file="bin/get42.c" />
</target>
<target name="exe" depends="csrc">
<exec dir="." executable="gcc">
<arg line="-o bin/get42 " />
<arg line="bin/get42.c" />
</exec>
</target>
<target name="jar" depends="java">
<jar destfile="execdepstorlet-1.0.jar" basedir="bin">
<manifest>
<attribute name="Main-Class"
value="org.openstack.storlet.ExecDepStorlet" />
</manifest>
</jar>
<move file="execdepstorlet-1.0.jar" todir="bin" />
</target>
<target name="text" depends="jar">
<echo message="Some junk content" file="bin/junk.txt" />
</target>
<target name="build" depends="clean,jar,exe,text">
</target>
</project>