1
<project name="Helioviewer" default="phpcs" basedir="../">
2
<!-- Helioviewer Back-end Apache Ant build.xml. -->
3
<!-- Last updated: February 06, 2010 By Keith -->
5
Helioviewer Back-end Apache Ant build.xml
8
<!-- TODO: target = all -->
11
<condition property="phpunit.found">
13
<available file="/usr/local/bin/phpunit" type="file" />
14
<available file="/usr/bin/phpunit" type="file" />
18
<target name="phpunit_prereqs" unless="phpunit.found">
19
<echo>Unable to find PHPUnit.</echo>
20
<echo>To install, follow instructions at:</echo>
21
<echo> http://www.phpunit.de/manual/3.4/en/installation.html</echo>
24
<target name="test" depends="phpunit_prereqs" if="phpunit.found">
28
<echo>Running PHPUnit tests...</echo>
29
<exec executable="phpunit" error="/dev/null">
34
<!-- PHP CodeSniffer -->
35
<condition property="phpcs.found">
37
<available file="/usr/local/bin/phpcs" type="file" />
38
<available file="/usr/bin/phpcs" type="file" />
42
<target name="phpcs_prereqs" unless="phpcs.found">
43
<echo>Unable to find PHP CodeSniffer.</echo>
44
<echo>To install, run:</echo>
45
<echo> sudo pear install PHP_CodeSniffer</echo>
48
<target name="phpcs" depends="phpcs_prereqs" if="phpcs.found">
50
Checks code against a specified coding standard.
52
<echo>Checking coding standards</echo>
53
<exec executable="phpcs" error="/dev/null">
54
<arg line="-n --standard=pear --report-width=120 src/" />
58
<!-- PHP Documentor -->
59
<condition property="phpdoc.found">
61
<available file="/usr/local/bin/phpdoc" type="file" />
62
<available file="/usr/bin/phpdoc" type="file" />
66
<target name="phpdoc" depends="phpdoc_prereqs" if="phpdoc.found">
68
Generates PHP Documentation using phpDocumentor.
70
<echo>Running phpDocumentor...</echo>
71
<exec executable="phpdoc">
72
<arg line="-t docs/ -d src/" />
76
<target name="phpdoc_prereqs" unless="phpdoc.found">
77
<echo>Unable to find phpDocumentor</echo>
78
<echo>To install, run:</echo>
79
<echo> sudo pear install --alldeps PhpDocumentor</echo>
b'\\ No newline at end of file'