canoprof_to_opale.ant 2.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
    <property file="canoprof_to_opale.properties"/>    
    <!-- CHECK FOR OS FAMILY -->
    <condition property="is_windows">
        <os family="windows"/>
    </condition>
    <condition property="is_unix">
        <os family="unix"/>
    </condition>

    <target name="to_hdoc_windows" if="${is_windows}">
    	<delete>
            <fileset dir="${cano_in}">
                <include name="*.scar"/>
            </fileset>
        </delete>
        <copy todir="${cano_in}">
            <fileset dir="${in}">
                <include name="*.scar"/>
            </fileset>
        </copy> 
        <exec dir="../canoprof_to_hdoc" executable="run.bat"/>
    </target>
    
    <target name="to_hdoc_unix" if="${is_unix}">
    	<delete>
            <fileset dir="${cano_in}">
                <include name="*.scar"/>
            </fileset>
        </delete>
        <copy todir="${cano_in}">
            <fileset dir="${in}">
                <include name="*.scar"/>
            </fileset>
        </copy> 
        <exec executable="/bin/bash" dir="../canoprof_to_hdoc">
            <arg value="../canoprof_to_hdoc/run.sh"/>
        </exec>
    </target>
    
    
    <target name="to_opale_unix" if="${is_unix}">
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${cano_out}"/>
        </copy>
        <exec executable="/bin/bash" dir="../hdoc_to_opale">
            <arg value="../hdoc_to_opale/run.sh"/>
        </exec>
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${cano_out}"/>
        </copy>
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
    </target>
    
    <target name="to_opale_end">
        <copy todir="${out}">
            <fileset dir="${opa_out}"/>
        </copy>
    </target>
        
    <target name="main">
        <delete dir="${out}" failonerror="false"/>
        <mkdir dir="output"/>
        <antcall target="to_hdoc_unix"/>
        <antcall target="to_hdoc_windows"/>
        <antcall target="to_opale_unix"/>        
        <antcall target="to_opale_windows"/>
        <antcall target="to_opale_end"/>
        <echo file="${out}/testfile" message="Ok"/>        
    </target>
</project>