~jstys-z/helioviewer.org/client5

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
<project name="Helioviewer" default="phpcs" basedir="../">
    <!-- Helioviewer Back-end Apache Ant build.xml. -->
    <!-- Last updated: February  06, 2010 By Keith -->
    <description>
        Helioviewer Back-end Apache Ant build.xml
    </description>
	
	<!-- TODO: target = all -->
	
    <!-- PHPUnit -->
    <condition property="phpunit.found">
       <or>
           <available file="/usr/local/bin/phpunit" type="file" />
           <available file="/usr/bin/phpunit" type="file" />
       </or>
    </condition>

    <target name="phpunit_prereqs" unless="phpunit.found">
       <echo>Unable to find PHPUnit.</echo>
       <echo>To install, follow instructions at:</echo>
       <echo>   http://www.phpunit.de/manual/3.4/en/installation.html</echo>
    </target>
    
    <target name="test" depends="phpunit_prereqs" if="phpunit.found">
        <description>
            Runs PHPUnit tests.
        </description>
        <echo>Running PHPUnit tests...</echo>
        <exec executable="phpunit" error="/dev/null">
            <arg line="tests/" />
        </exec>
    </target>
	
	<!-- PHP CodeSniffer -->
    <condition property="phpcs.found">
       <or>
           <available file="/usr/local/bin/phpcs" type="file" />
           <available file="/usr/bin/phpcs" type="file" />
       </or>
    </condition>
    
	<target name="phpcs_prereqs" unless="phpcs.found">
	   <echo>Unable to find PHP CodeSniffer.</echo>
	   <echo>To install, run:</echo>
	   <echo>   sudo pear install PHP_CodeSniffer</echo>
	</target>

	<target name="phpcs" depends="phpcs_prereqs" if="phpcs.found">
		<description>
            Checks code against a specified coding standard.
        </description>
		<echo>Checking coding standards</echo>
		<exec executable="phpcs" error="/dev/null">
			<arg line="-n --standard=pear --report-width=120 lib/" />
		</exec>
	</target>
	
    <!-- PHP Documentor -->
    <condition property="phpdoc.found">
       <or>
           <available file="/usr/local/bin/phpdoc" type="file" />
           <available file="/usr/bin/phpdoc" type="file" />
       </or>
    </condition>
    
    <target name="phpdoc" depends="phpdoc_prereqs" if="phpdoc.found">
        <description>
            Generates PHP Documentation using phpDocumentor.
        </description>
        <echo>Running phpDocumentor...</echo>
        <exec executable="phpdoc">
            <arg line="-t docs/ -d lib/" />
        </exec>
    </target>
    
    <target name="phpdoc_prereqs" unless="phpdoc.found">
       <echo>Unable to find phpDocumentor</echo>
       <echo>To install, run:</echo>
       <echo>   sudo pear install --alldeps PhpDocumentor</echo>
    </target>
    
</project>