source: proiecte/HadoopJUnit/hadoop-0.20.1/src/contrib/fuse-dfs/build.xml

Last change on this file was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 3.5 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4   Licensed to the Apache Software Foundation (ASF) under one or more
5   contributor license agreements.  See the NOTICE file distributed with
6   this work for additional information regarding copyright ownership.
7   The ASF licenses this file to You under the Apache License, Version 2.0
8   (the "License"); you may not use this file except in compliance with
9   the License.  You may obtain a copy of the License at
10
11       http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18-->
19
20<project name="fuse-dfs" default="compile">
21
22  <import file="../build-contrib.xml"/>
23
24  <target name="check-libhdfs-fuse">
25    <condition property="libhdfs-fuse">
26      <and>
27        <isset property="fusedfs"/>
28        <isset property="libhdfs"/>
29      </and>
30    </condition>
31  </target>
32
33
34  <target name="check-libhdfs-exists" if="fusedfs">
35  <property name="libhdfs.lib" value="${hadoop.root}/build/libhdfs/libhdfs.so"/>
36        <available file="${libhdfs.lib}" property="libhdfs-exists"/>
37    <fail message="libhdfs.so does not exist: ${libhdfs.lib}. Please check flags -Dlibhdfs=1 -Dfusedfs=1 are set or first try ant compile-libhdfs -Dlibhdfs=1">
38         <condition>
39            <not><isset property="libhdfs-exists"/></not>
40          </condition>
41   </fail>
42   </target>
43
44  <!-- override compile target !-->
45  <target name="compile" depends="check-libhdfs-fuse,check-libhdfs-exists" if="libhdfs-fuse">
46    <echo message="contrib: ${name}"/>
47
48    <condition property="perms" value="1" else="0">
49    <not>
50      <isset property="libhdfs.noperms"/>
51    </not>
52    </condition>
53
54    <exec executable="/bin/sh" failonerror="true">
55      <arg value="${root}/bootstrap.sh"/>
56    </exec>
57    <exec executable="make" failonerror="true">
58      <env key="OS_NAME" value="${os.name}"/>
59      <env key="OS_ARCH" value="${os.arch}"/>
60      <env key="HADOOP_HOME" value="${hadoop.root}"/>
61      <env key="PACKAGE_VERSION" value="0.1.0"/>
62
63      <env key="PERMS" value="${perms}"/>
64    </exec>
65    <mkdir dir="${build.dir}"/>
66    <mkdir dir="${build.dir}/test"/>
67    <exec executable="cp" failonerror="true">
68    <arg line="${root}/src/fuse_dfs ${build.dir}"/>
69    </exec>
70    <mkdir dir="${build.dir}/test"/>
71    <exec executable="cp" failonerror="true">
72    <arg line="${root}/src/fuse_dfs_wrapper.sh ${build.dir}"/>
73    </exec>
74
75  </target>
76
77  <!-- override jar target !-->
78  <target name="jar"/>
79
80  <!-- override package target !-->
81  <target name="package" depends="check-libhdfs-fuse" if="libhdfs-fuse">
82    <echo message="contrib: ${name}"/>
83
84    <mkdir dir="${dist.dir}/contrib/${name}"/>
85    <exec executable="cp">
86      <arg value="-p"/>
87      <arg value="README"/>
88      <arg value="src/fuse_dfs"/>
89      <arg value="src/fuse_dfs_wrapper.sh"/>
90      <arg value="${dist.dir}/contrib/${name}"/>
91    </exec>
92  </target>
93
94  <target name="test" if="fusedfs">
95    <echo message="testing FuseDFS ..."/>
96   <antcall target="hadoopbuildcontrib.test"> 
97   </antcall>
98  </target> 
99
100  <!-- override clean target !-->
101  <target name="clean" depends="check-libhdfs-fuse" if="libhdfs-fuse">
102    <echo message="contrib: ${name}"/>
103
104    <exec executable="make">
105      <arg value="clean"/>
106    </exec>
107  </target>
108
109</project>
Note: See TracBrowser for help on using the repository browser.