summaryrefslogtreecommitdiffstats
path: root/build.xml
blob: ed3a0f7e67d062412fc7b94ca2239152289b78d9 (plain)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
<?xml version="1.0"?>
<!--
 Licensed to the Ant-Contrib Project under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The Ant-Contrib Project licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

-->
<project default="jars" basedir=".">

  <!-- Give user a chance to override without editing this file
       (and without typing -D each time it compiles it) -->

  <property name="Name" value="cpptasks"/>
  <property name="name" value="cpptasks"/>
  <property name="version" value="1.0b5"/>

  <property name="debug" value="true" />
  <property name="deprecation" value="false" />
  <property name="optimize" value="true" />
  <property name="junit.fork" value="false" />
  <!--  base of Ant CVS source
        required for xdocs and dist tasks
        (zipped source doesn't contain xdocs proposal)  -->
  <property name="ant-src.dir" location="/ant-src/ant"/>
  <property name="xdocs.dir" location="${ant-src.dir}/proposal/xdocs"/>
  <property name="javac.source" value="1.3"/>
  <property name="javac.target" value="1.1"/>

  <!--
       ===================================================================
         Set the properties related to the source tree
       ===================================================================
  -->
  <property name="src.dir" value="src/main/java"/>
  <property name="resources.dir" value="src/main/resources"/>
  <property name="java.dir" value="src/main/java"/>
  <property name="tests.java.dir" value="src/test/java"/>
  <property name="tests.resources.dir" value="src/test/resources"/>

  <!--
       ===================================================================
         Set the properties for the build area
       ===================================================================
  -->
  <property name="build.dir" value="target"/>
  <property name="build.classes" value="${build.dir}/classes"/>
  <property name="tests.build.classes" value="${build.dir}/tests"/>
  <property name="tests.build.lib" value="${build.dir}/lib"/>
  <property name="build.lib" value="${build.dir}/lib"/>
  <property name="build.javadocs" value="${build.dir}/javadocs"/>
  <property name="lib.dir" value="lib"/>
  <property name="clover.jar" value="/clover-1.2/lib/clover.jar"/>

 <!--
       ===================================================================
         Set up properties for the distribution area
       ===================================================================
  -->
  <property name="dist.name" value="${name}-${version}"/>
  <property name="dist.base" value="target"/>
  <property name="dist.dir" value="${dist.base}/${dist.name}"/>
  <property name="dist.javadocs" value="${dist.dir}/docs/manual/api"/>

<!--
       ===================================================================
         Prepare the build
       ===================================================================
  -->
  <target name="prepare">
    <tstamp>
      <format property="year" pattern="yyyy" />
    </tstamp>
    <filterset id="build.filters">
      <filter token="VERSION" value="${version}" />
      <filter token="DATE" value="${TODAY}" />
      <filter token="TIME" value="${TSTAMP}" />
    </filterset>
    <available property="junit-available" classname="junit.framework.TestCase"/>
  </target>


<!--
       ===================================================================
         Configure for coverage analysis
       ===================================================================
  -->
<target name="with.clover">
        <taskdef classpath="${clover.jar}" resource="clovertasks"/>
        <clover-setup initString="cpptasks.db"/>
</target>

<!--
       ===================================================================
         Generate coverage analysis
       ===================================================================
  -->
<target name="coverage-report" depends="clean, with.clover, run-coverage-tests">
	    <mkdir dir="${build.dir}/coverage/report"/>
        <clover-report>
                <current title="cpptasks coverage" outfile="${build.dir}/coverage/report">
                        <format type="html"/>
                </current>
        </clover-report>

        <replace dir="${build.dir}/coverage/report"
            includes="**/*.html"
            token='Ant-Contrib Tasks only. &lt;/td&gt;'
        	value='Ant-Contrib Tasks only. &lt;/td&gt;&lt;td&gt;&lt;a target="_parent" href="http://sourceforge.net"&gt;&lt;img src="http://sourceforge.net/sflogo.php?group_id=36177&amp;amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /&gt;&lt;/a&gt;&lt;/td&gt;'/>

</target>

  <!--
       ===================================================================
         Build the code
       ===================================================================
  -->
  <target name="build"
          depends="prepare"
          description="--> compiles the source code">
    <mkdir dir="${build.classes}"/>
    <javac srcdir="${java.dir}"
           destdir="${build.classes}"
           debug="${debug}"
           target="${javac.target}"
           source="${javac.source}"
           deprecation="${deprecation}"
           optimize="${optimize}" >
    </javac>
  </target>

  <!--
       ===================================================================
         Create the jar
       ===================================================================
  -->
  <target name="jars"
          depends="build"
          description="--> creates the jar">
    <mkdir dir="${build.lib}"/>
    <jar jarfile="${build.lib}/${name}.jar">
         <fileset dir="${build.classes}"/>
         <fileset dir="${resources.dir}" excludes="META-INF"/>
 		 <manifest>
 		 	<section name="net.sf.antcontrib.cpptasks">
 		 		<attribute name="Implementation-Title" value="cpptasks: Compiler Tasks for Apache Ant."/>
 		 		<attribute name="Implementation-Vendor" value="Ant-Contrib Project"/>
 		 		<attribute name="Implementation-Version" value="${version}"/>
 		 	</section>
 		 </manifest>
 		 <metainf dir="${resources.dir}/META-INF"/>                
    </jar>
  </target>

    <target name="junit-warning" depends="prepare" unless="junit-available">
        <fail message="junit.jar is required in Ant's lib directory to build this target.  Download from http://www.junit.org"/>
    </target>


  <target name="build-tests" depends="jars,junit-warning">
    <mkdir dir="${tests.build.classes}"/>
    <mkdir dir="${tests.build.lib}"/>
    <javac srcdir="${tests.java.dir}"
           destdir="${tests.build.classes}"
           debug="true"
           deprecation="false"
           target="${javac.target}"
           source="${javac.source}"
           optimize="false"
           classpath="${build.lib}/${name}.jar;${java.class.path}"/>
    <jar jarfile="${tests.build.lib}/${name}_test.jar">
            <fileset dir="." includes="NOTICE LICENSE"/>
            <fileset dir="${tests.build.classes}"/>
    </jar>
  </target>

  <target name="run-tests"  depends="build-tests" description="Run tests">
        <junit printsummary="false"
                fork="true"
                dir="${tests.resources.dir}">
            <classpath>
                <pathelement location="${tests.build.lib}/${name}_test.jar" />
                <pathelement location="${build.lib}/${name}.jar" />
            </classpath>

            <test name="net.sf.antcontrib.cpptasks.TestAllClasses" outfile="result">
                <formatter type="xml" />
                <formatter type="brief" usefile="false" />
            </test>

        </junit>
  </target>

  <target name="run-coverage-tests"  depends="build-tests">
        <junit printsummary="false"
                fork="true"
                dir="${tests.resources.dir}">
            <classpath>
                <pathelement location="${tests.build.lib}/${name}_test.jar" />
                <pathelement location="${build.lib}/${name}.jar" />
                <pathelement location="${clover.jar}" />
            </classpath>

            <test name="net.sf.antcontrib.cpptasks.TestAllClasses" outfile="result">
                <formatter type="xml" />
                <formatter type="brief" usefile="false" />
            </test>

        </junit>
  </target>

  <target name="run-devstudio-tests"  depends="build-tests">
        <junit printsummary="true" haltonfailure="true">
            <classpath>
                <pathelement location="${tests.build.lib}/${name}_test.jar" />
                <pathelement location="${build.lib}/${name}.jar" />
            </classpath>

            <test name="net.sf.antcontrib.cpptasks.devstudio.TestInstalledDevStudio"
                haltonfailure="true" outfile="result">
                <formatter type="xml" />
                        <formatter type="brief" usefile="false" />
            </test>

        </junit>
  </target>
  <!--
       ===================================================================
         Create the jar and javadocs
       ===================================================================
  -->
  <target name="gump" depends="jars, javadocs"
          description="--> creates the jar and javadocs" />

 <!--
       ===================================================================
         Create the complete distribution
       ===================================================================
  -->
  <target name="dist" depends="jars, javadocs, xdocs" description="--> creates a complete distribution">
    <delete dir="${dist.dir}"/>
    <mkdir dir="${dist.dir}/src"/>
    <copy todir="${dist.dir}">
      <fileset dir="${build.lib}" includes="cpptasks.jar"/>
      <fileset dir=".">
        <include name="build.xml"/>
      </fileset>
    </copy>
    <copy todir="${dist.dir}/src">
        <fileset dir="${src.dir}">
             <include name="net/**/*.java"/>
             <include name="cpptasks.types"/>
             <include name="cpptasks.tasks"/>
             <include name="cpptasks.mf"/>
        </fileset>
    </copy>
    <mkdir dir="${dist.dir}/samples"/>
    <copy todir="${dist.dir}/samples">
        <fileset dir="samples" includes="*.ant"/>
    </copy>
    <mkdir dir="${dist.javadocs}"/>
    <copy todir="${dist.javadocs}" overwrite="true">
      <fileset dir="${build.javadocs}"/>
    </copy>

    <mkdir dir="${dist.dir}/docs"/>
    <copy todir="${dist.dir}/docs" overwrite="true">
      <fileset dir="${build.dir}/xdocs/docs/manual/other"/>
    </copy>

    <copy todir="${dist.dir}" overwrite="true">
            <fileset dir="." includes="LICENSE NOTICE"/>
    </copy>

    <delete file="${dist.base}/${dist.name}.zip"/>
    <zip zipfile="${dist.base}/${dist.name}.zip">
        <fileset dir="${dist.base}" includes="${dist.name}/**"/>
    </zip>
    <delete file="${dist.base}/${dist.name}.tar.gz"/>
    <tar tarfile="${dist.base}/${dist.name}.tar.gz" compression="gzip">
        <tarfileset dir="${dist.base}" includes="${dist.name}/**"/>
    </tar>
  </target>

  <!--
       ===================================================================
         Cleans up build and distribution directories
       ===================================================================
  -->
  <target name="clean"
          description="--> cleans up build and dist directories">
    <delete dir="${build.dir}" />
    <delete dir="${dist.base}" />
    <delete dir="${dist.dir}" />
    <delete><fileset dir="." includes="cpptasks.db*"/></delete>
  </target>

  <!--
       ===================================================================
         Creates the API documentation
       ===================================================================
  -->
  <target name="javadoc_check">
    <uptodate property="javadoc.notrequired"
              targetfile="${build.javadocs}/packages.html" >
        <srcfiles dir= "${java.dir}" includes="**/*.java"/>
    </uptodate>
  </target>

  <target name="javadocs" depends="prepare, javadoc_check"
          unless="javadoc.notrequired"
          description="--> creates the API documentation">
    <mkdir dir="${build.javadocs}"/>
    <javadoc packagenames="net.sf.antcontrib.*"
             useexternalfile="yes"
             sourcepath="${java.dir}"
             destdir="${build.javadocs}"
             author="true"
             version="true"
             windowtitle="${Name} API"
             doctitle="${Name}">
      <group title="CCTasks" packages="net.sf.antcontrib.cpptasks" />

      <bottom>Copyright &#169; 2001-${year} Ant-Contrib project. All Rights Reserved.</bottom>
    </javadoc>
  </target>


  <target name="detab" depends="prepare" description="detabs java files">
      <replace token="&#9;" value="    " dir="src" includes="**/*.java"/>
      <replace token="&#9;" value="    " dir="test" includes="**/*.java"/>

  </target>

  <target name="checkstyle-all" depends="prepare" description="Checks style of all source">
    <!--   requires checkstyle-all-2.1.jar or later in lib directory
                download from http://checkstyle.sourceforge.net  -->
    <taskdef resource="checkstyletask.properties"/>

    <checkstyle config="sun_checks.xml">
        <fileset dir="${java.dir}" includes="**/*.java"/>
    </checkstyle>
  </target>

  <target name="checkstyle" depends="prepare" description="Checks style of cleaned up source">
    <!--   requires checkstyle-all-3.3.jar or later in lib directory
                download from http://checkstyle.sourceforge.net  -->
    <taskdef resource="checkstyletask.properties"/>

        <!-- only includes files that pass Sun checks   -->
    <checkstyle config="sun_checks.xml">
        <fileset dir="${java.dir}/net/sf/antcontrib/cpptasks/parser"
                  includes="CaseInsensitiveLetterState.java
                            FortranParser.java
                          LetterState.java
                          WhitespaceOrLetterState.java
                          WhitespaceOrCaseInsensitiveLetterState.java"/>
        <fileset dir="${java.dir}">
                <include name="net/sf/antcontrib/cpptasks/types/VersionInfo.java"/>
                <include name="net/sf/antcontrib/cpptasks/Distributer*.java"/>
                <include name="net/sf/antcontrib/cpptasks/TargetDef.java"/>
                <include name="net/sf/antcontrib/cpptasks/CPUEnum.java"/>
                <include name="net/sf/antcontrib/cpptasks/ArchEnum.java"/>
                <include name="net/sf/antcontrib/cpptasks/OSFamilyEnum.java"/>
                <include name="net/sf/antcontrib/cpptasks/OptimizationEnum.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/WarningLevelEnum.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/trolltech/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/mozilla/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/openwatcom/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/platforms/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/platforms/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/ide/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/borland/CBuilderXProjectWriter.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/devstudio/DevStudioProjectWriter.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java"/>
        </fileset>
            <fileset dir="${tests.java.dir}">
                    <include name="net/sf/antcontrib/cpptasks/parser/TestFortranParser.java"/>
                    <include name="net/sf/antcontrib/cpptasks/MockFileCollector.java"/>
                    <include name="net/sf/antcontrib/cpptasks/TestProcessorDef.java"/>
                    <include name="net/sf/antcontrib/cpptasks/TestCompilerDef.java"/>
                    <include name="net/sf/antcontrib/cpptasks/TestLinkerDef.java"/>
                    <include name="net/sf/antcontrib/cpptasks/types/TestLibrarySet.java"/>
                    <include name="net/sf/antcontrib/cpptasks/types/TestLibrarySet.java"/>
            	    <include name="net/sf/antcontrib/cpptasks/TestCCTask.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectParser.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/mozilla/*.java"/>
        	    <include name="net/sf/antcontrib/cpptasks/openwatcom/*.java"/>
            	<include name="net/sf/antcontrib/cpptasks/platforms/*.java"/>
            </fileset>
    </checkstyle>
  </target>

  <target name="xdocs-init">
        <available property="cctask-available" classname="net.sf.antcontrib.cpptasks.CCTask"/>
        <available property="xdocs.build-available" file="${xdocs.dir}/build.xml"/>
  </target>

  <target name="xdocs-cctask-warning" depends="xdocs-init" unless="cctask-available">
        <fail>cpptasks.jar must be in the classpath, SET CLASSPATH=${build.dir}\lib\cpptasks.jar before running ant.</fail>
  </target>

  <target name="xdocs-build-warning" depends="xdocs-init" unless="xdocs.build-available">
        <fail message="Could not locate &quot;${xdocs.dir}/build.xml&quot;, specify value for xdocs.dir that points to Ant's proposal/xdocs directory."/>
  </target>

  <!--
        cpptasks.jar must be on path

  -->
  <target name="xdocs" depends="xdocs-cctask-warning,xdocs-build-warning">

        <condition property="shellcmd" value="cmd">
            <os family="windows"/>
         </condition>
         <property name="shellcmd" value="sh"/>

        <mkdir dir="${build.dir}/xdocs"/>
        <ant dir="${xdocs.dir}" target="gen" inheritAll="false">
            <property name="src.dir" location="${src.dir}/net/sf/antcontrib/cpptasks"/>
            <property name="src.root" location="${src.dir}"/>
            <property name="build.dir" location="${build.dir}/xdocs"/>
        </ant>

        <!--   the docs task doesn't like running here
                  will run it in Ant's xdoc build directory
                  and copy results back   -->
        <delete dir="${xdocs.dir}/build"/>
        <copy todir="${xdocs.dir}/build">
            <fileset dir="${build.dir}/xdocs" includes="**/*.xml"/>
        </copy>
        <!--
        <ant dir="${xdocs.dir}" target="docs" inheritAll="false">
            <property name="src.dir" location="${src.dir}/net/sf/antcontrib/cpptasks"/>
            <property name="src.root" location="${src.dir}"/>
            <property name="build.dir" location="${build.dir}/xdocs"/>
        </ant>
        -->
        <exec dir="${xdocs.dir}" executable="${shellcmd}">
            <arg value="ant"/>
            <arg value="docs"/>
        </exec>
        <copy todir="${build.dir}/xdocs">
            <fileset dir="${xdocs.dir}/build" includes="**/*.html"/>
        </copy>

        <!--  Replace Apache Software copyright notice with Ant-Contrib  -->
        <property name="nontask.html" value="compilerarg.html,linkerarg.html,compiler.html,fileset.html,includepath.html,sysincludepath.html,define.html,undefine.html,defineset.html,libset.html,syslibset.html,linker.html,precompile.html,except.html,versioninfo.html,target.html,distributer.html,map.html,project.html"/>
        <property name="all.html" value="cc.html,${nontask.html}"/>
        <property name="doc.dir" value="${build.dir}/xdocs/docs/manual/other"/>

        <move file="${doc.dir}/compilerargument.html" tofile="${doc.dir}/compilerarg.html"/>
        <move file="${doc.dir}/linkerargument.html" tofile="${doc.dir}/linkerarg.html"/>
        <move file="${doc.dir}/compilerdef.html" tofile="${doc.dir}/compiler.html"/>
        <move file="${doc.dir}/targetdef.html" tofile="${doc.dir}/target.html"/>
        <move file="${doc.dir}/distributerdef.html" tofile="${doc.dir}/distributer.html"/>
        <move file="${doc.dir}/conditionalfileset.html" tofile="${doc.dir}/fileset.html"/>
        <move file="${doc.dir}/defineargument.html" tofile="${doc.dir}/define.html"/>
        <move file="${doc.dir}/undefineargument.html" tofile="${doc.dir}/undefine.html"/>
        <move file="${doc.dir}/libraryset.html" tofile="${doc.dir}/libset.html"/>
        <move file="${doc.dir}/systemlibraryset.html" tofile="${doc.dir}/syslibset.html"/>
        <move file="${doc.dir}/linkerdef.html" tofile="${doc.dir}/linker.html"/>
        <move file="${doc.dir}/precompiledef.html" tofile="${doc.dir}/precompile.html"/>
        <move file="${doc.dir}/systemincludepath.html" tofile="${doc.dir}/sysincludepath.html"/>
        <move file="${doc.dir}/precompileexceptdef.html" tofile="${doc.dir}/except.html"/>
        <move file="${doc.dir}/distributermap.html" tofile="${doc.dir}/map.html"/>
        <move file="${doc.dir}/projectdef.html" tofile="${doc.dir}/project.html"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="2000-2003, Apache Software Foundation"
            value="2001-2005, Ant-Contrib Project"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="http://jakarta.apache.org/ant/"
            value="http://sourceforge.net"/>


        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token='../../images/ant_logo_large.gif'
            value='http://sourceforge.net/sflogo.php?group_id=36177&amp;amp;type=4'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token='alt="Apache Ant"'
            value='alt="SourceForge logo"'/>


        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;compilerarg&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.CompilerArgument)"
            value='&lt;strong&gt;&lt;a href="compilerarg.html" style="color: white"&gt;compilerarg&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;linkerarg&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.LinkerArgument)"
            value='&lt;strong&gt;&lt;a href="linkerarg.html" style="color: white"&gt;linkerarg&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;compiler&lt;/strong&gt; (net.sf.antcontrib.cpptasks.CompilerDef)"
            value='&lt;strong&gt;&lt;a href="compiler.html" style="color: white"&gt;compiler&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;linker&lt;/strong&gt; (net.sf.antcontrib.cpptasks.LinkerDef)"
            value='&lt;strong&gt;&lt;a href="linker.html" style="color: white"&gt;linker&lt;/a&gt;&lt;/strong&gt;'/>


        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;defineset&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.DefineSet)"
            value='&lt;strong&gt;&lt;a href="defineset.html" style="color: white"&gt;defineset&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;fileset&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.ConditionalFileSet)"
            value='&lt;strong&gt;&lt;a href="fileset.html" style="color: white"&gt;fileset&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;libset&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.LibrarySet)"
            value='&lt;strong&gt;&lt;a href="libset.html" style="color: white"&gt;libset&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;syslibset&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.SystemLibrarySet)"
            value='&lt;strong&gt;&lt;a href="syslibset.html" style="color: white"&gt;syslibset&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;includepath&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.IncludePath)"
            value='&lt;strong&gt;&lt;a href="includepath.html" style="color: white"&gt;includepath&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;sysincludepath&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.SystemIncludePath)"
            value='&lt;strong&gt;&lt;a href="sysincludepath.html" style="color: white"&gt;sysincludepath&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;precompile&lt;/strong&gt; (net.sf.antcontrib.cpptasks.PrecompileDef)"
            value='&lt;strong&gt;&lt;a href="precompile.html" style="color: white"&gt;precompile&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="precompile.html"
            token="&lt;strong&gt;except&lt;/strong&gt; (net.sf.antcontrib.cpptasks.PrecompileExceptDef)"
            value='&lt;strong&gt;&lt;a href="except.html" style="color: white"&gt;except&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="defineset.html"
            token="&lt;strong&gt;define&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.DefineArgument)"
            value='&lt;strong&gt;&lt;a href="define.html" style="color: white"&gt;define&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="defineset.html"
            token="&lt;strong&gt;undefine&lt;/strong&gt; (net.sf.antcontrib.cpptasks.types.UndefineArgument)"
            value='&lt;strong&gt;&lt;a href="undefine.html" style="color: white"&gt;undefine&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;distributer&lt;/strong&gt; (net.sf.antcontrib.cpptasks.DistributerDef)"
            value='&lt;strong&gt;&lt;a href="distributer.html" style="color: white"&gt;distributer&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;target&lt;/strong&gt; (net.sf.antcontrib.cpptasks.TargetDef)"
            value='&lt;strong&gt;&lt;a href="target.html" style="color: white"&gt;target&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;versioninfo&lt;/strong&gt; (net.sf.antcontrib.cpptasks.VersionInfo)"
            value='&lt;strong&gt;&lt;a href="versioninfo.html" style="color: white"&gt;versioninfo&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;map&lt;/strong&gt; (net.sf.antcontrib.cpptasks.DistributerMap)"
            value='&lt;strong&gt;&lt;a href="map.html" style="color: white"&gt;map&lt;/a&gt;&lt;/strong&gt;'/>

       <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${all.html}"
            token="&lt;strong&gt;project&lt;/strong&gt; (net.sf.antcontrib.cpptasks.ide.ProjectDef)"
            value='&lt;strong&gt;&lt;a href="project.html" style="color: white"&gt;project&lt;/a&gt;&lt;/strong&gt;'/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
             includes="${all.html}"
             token="&lt;strong&gt;debug&lt;/strong&gt; (net.sf.antcontrib.cpptasks.ide.DebugDef)"
             value='&lt;strong&gt;&lt;a href="debug.html" style="color: white"&gt;debug&lt;/a&gt;&lt;/strong&gt;'/>

  	
        <!--   remove Task from the title of everything but cc.html   -->
        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="${nontask.html}"
            token="Task&lt;/strong"
            value="&lt;/strong"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="cc.html"
            token="Cc"
            value="cc"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="compilerarg.html"
            token="Compilerargument"
            value="compilerarg"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="linkerarg.html"
            token="Linkerargument"
            value="linkerarg"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="compiler.html"
            token="Compilerdef"
            value="compiler"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="fileset.html"
            token="Conditionalfileset"
            value="fileset"/>


        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="includepath.html"
            token="Includepath"
            value="includepath"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="sysincludepath.html"
            token="Systemincludepath"
            value="sysincludepath"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="defineargument.html"
            token="Defineargument"
            value="define"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="undefineargument.html"
            token="Undefineargument"
            value="undefine"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="defineset.html"
            token="Defineset"
            value="defineset"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="libset.html"
            token="Libraryset"
            value="libset"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="syslibset.html"
            token="Systemlibraryset"
            value="syslibset"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="linker.html"
            token="Linkerdef"
            value="linker"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="precompile.html"
            token="Precompiledef"
            value="precompile"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="define.html"
            token="Defineargument"
            value="define"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="undefine.html"
            token="Undefineargument"
            value="undefine"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="except.html"
            token="Precompileexceptdef"
            value="except"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="target.html"
            token="Targetdef"
            value="target"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="distributer.html"
            token="Distributerdef"
            value="distributer"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="versioninfo.html"
            token="Versioninfodef"
            value="versioninfo"/>

        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="map.html"
            token="Distributermap"
            value="map"/>


        <replace dir="${build.dir}/xdocs/docs/manual/other"
            includes="project.html"
            token="Projectdef"
            value="project"/>


    	<replace dir="${build.dir}/xdocs/docs/manual/other"
        	includes="debug.html"
        	token="Debugdef"
        	value="debug"/>
  	
  </target>

  <target name="check-sfuser" unless="sfuser">
            <fail message="Please specify SourceForge user name using -Dsfuser=joeuser"/>
  </target>

  <target name="submit-xdocs" depends="check-sfuser" description="updates project web site">
        <!-- requires scp with project admin private keys available and sfuser set   -->

                  <exec executable="scp">
                          <arg line="${build.dir}/xdocs/docs/manual/other/*.html ${sfuser}@shell.sourceforge.net:/home/groups/a/an/ant-contrib/htdocs"/>
                  </exec>
  </target>

  <target name="submit-coverage" depends="check-sfuser" description="updates project web site coverage map">
      <exec executable="scp">
              <arg line="-r -C ${build.dir}/coverage/report/* ${sfuser}@shell.sourceforge.net:/home/groups/a/an/ant-contrib/htdocs/cpptasks/coverage"/>
      </exec>
  </target>



  <target name="xdocs-clean"
          description="--> cleans up xdocs directories">
    <delete dir="${build.dir}/xdocs" />
  </target>


  <target name="style">
    <mkdir dir="src/site/xdoc"/>
    <xslt style="src/taskdocs/resources/net/sf/antcontrib/taskdocs/type.xslt"
            baseDir="target/site/antdocs" includes="*.xml" processor="trax"
            destDir="src/site/xdoc" extension=".xml" force="true"/>

  </target>

</project>