File: build.xml

package info (click to toggle)
epr-api 2.3~dev20150708-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,128 kB
  • sloc: ansic: 14,310; sh: 194; makefile: 146; xml: 125
file content (146 lines) | stat: -rw-r--r-- 5,996 bytes parent folder | download | duplicates (4)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<project name="make-epr_c_api.zip" default="build_zip" basedir=".">

    <!-- ==================================== -->
    <!-- set global properties for this build -->
    <!-- ==================================== -->
    <property name="version" value="2.2"/>
    <property name="home" value="."/>
    <property name="build" value="./build_for_zip"/>
    <property name="src" value="./src"/>
    <property name="prj" value="./prj"/>
    <property name="docs_html" value="./docs/epr_c_api"/>
    <property name="html_output" value="docs/epr_c_api"/>
    <property name="docs_img" value="./docs/images"/>
    <property name="examples" value="examples"/>
    <property name="epr_api" value="epr_api-${version}"/>

    <!-- ================================================================================ -->
    <!-- inits the src, srcTest, lib, classes and docs/api-doc directories in debug -->
    <!-- ================================================================================ -->
    <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the debug directory structure -->
        <delete dir="${build}"/>
        <mkdir dir="${build}/${epr_api}"/>
        <mkdir dir="${build}/${epr_api}/${src}"/>
        <mkdir dir="${build}/${epr_api}/${src}/${examples}"/>
        <mkdir dir="${build}/${epr_api}/docs"/>
        <mkdir dir="${build}/${epr_api}/docs/html"/>
        <mkdir dir="${build}/${epr_api}/docs/images"/>
        <mkdir dir="${build}/${epr_api}/prj/codeblocks"/>
        <mkdir dir="${build}/${epr_api}/prj/unix"/>
        <mkdir dir="${build}/${epr_api}/prj/unix/tests"/>
        <!--The following three lines are necessary for execute the makefile-->
        <mkdir dir="${build}/${epr_api}/build"/>
        <mkdir dir="${build}/${epr_api}/build/debug"/>
        <mkdir dir="${build}/${epr_api}/build/release"/>
    </target>

    <!-- ========================================= -->
    <!-- copy the recources to the build directory -->
    <!-- ========================================= -->
    <target name="copy_generate_resources" depends="init">
        <copy todir="${build}/${epr_api}/${prj}/codeblocks">
            <fileset dir="${prj}/win__code_blocks">
                <include name="**"/>
                <exclude name="**/.svn"/>
                <exclude name="**/.DS_Store"/>
                <exclude name="**/bin/"/>
                <exclude name="**/obj/"/>
                <exclude name="**/api_unit_tests/"/>
                <exclude name="**/bccunit_lib/"/>
                <exclude name="**/epr_main_test/"/>
                <exclude name="**/epr_subset_test/"/>
                <exclude name="**/epr_test_endian/"/>
                <exclude name="**/write_rgb/"/>
                <exclude name="epr_all.workspace"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/${prj}/unix">
            <fileset dir="${prj}/unix">
                <include name="**/cc_make_examples.sh"/>
                <include name="**/gcc_make_examples.sh"/>
                <include name="**/cc_make_api_tests.sh"/>
                <include name="**/gcc_make_api_tests.sh"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/${src}">
            <fileset dir="${src}">
                <include name="*.c"/>
                <include name="*.h"/>
                <include name="*.def"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/${src}/utils">
            <fileset dir="${src}/utils">
                <include name="*.c"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/${src}/api-test">
            <fileset dir="${src}/api-test">
                <include name="*.c"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/${src}/${examples}">
            <fileset dir="${src}/${examples}">
                <include name="*.c"/>
                <include name="*.h"/>
                <exclude name="write_rgb.c"/>
                <exclude name="tiff.h"/>
                <exclude name="tiffio.h"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}">
            <fileset dir="${home}">
                <include name="CHANGELOG.txt"/>
                <include name="LICENSE.txt"/>
                <include name="README.txt"/>
                <include name="VERSION.txt"/>
                <include name="makefile"/>
            </fileset>
        </copy>
        <copy todir="${build}/${epr_api}/docs">
            <fileset dir="${home}/docs">
                <include name="Doxyfile.txt"/>
                <include name="*.html"/>
            </fileset>
        </copy>

        <copy todir="${build}/${epr_api}/docs/images">
            <fileset dir="${docs_img}">
                <include name="*.gif"/>
            </fileset>
        </copy>
        <mkdir dir="${build}/${epr_api}/${html_output}"/>
        <copy todir="${build}/${epr_api}/${html_output}">
            <fileset dir="${home}/${html_output}">
                <include name="custom.css"/>
            </fileset>
        </copy>
        <exec dir="${build}/${epr_api}/docs" executable="doxygen">
            <arg value="Doxyfile.txt"/>
        </exec>
        <delete>
            <fileset dir="${build}/${epr_api}/docs">
                <include name="Doxyfile.txt"/>
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy todir="${build}/${epr_api}/docs/html">
            <fileset dir="${build}/${epr_api}/${html_output}"/>
        </copy>
        <delete dir="${build}/${epr_api}/${html_output}"/>
    </target>

    <!-- ==================== -->
    <!-- creates the zip file -->
    <!-- ==================== -->
    <target name="build_zip" depends="copy_generate_resources">
        <zip zipfile="${epr_api}.zip"
            basedir="${build}"
            update="false"/>
        <delete dir="${build}"/>
    </target>
</project>