summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2005-11-18 21:02:34 +0000
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2005-11-18 21:02:34 +0000
commit1381c87965ab669820a4a7b48c09aca026f5b478 (patch)
tree947d5ba097efbc93fae515fdae35e626c1be7bef
downloadcpptasks-parallel-1381c87965ab669820a4a7b48c09aca026f5b478.tar.gz
cpptasks-parallel-1381c87965ab669820a4a7b48c09aca026f5b478.tar.bz2
cpptasks-parallel-1381c87965ab669820a4a7b48c09aca026f5b478.tar.xz
cpptasks-parallel-1381c87965ab669820a4a7b48c09aca026f5b478.zip
-rw-r--r--.cvsignore4
-rw-r--r--CVS/Entries10
-rw-r--r--CVS/Entries.Log4
-rw-r--r--CVS/Repository1
-rw-r--r--CVS/Root1
-rw-r--r--LICENSE202
-rw-r--r--NOTICE6
-rw-r--r--PATCHES25
-rw-r--r--build.xml745
-rw-r--r--pom.xml80
-rw-r--r--samples/.cvsignore1
-rw-r--r--samples/CVS/Entries8
-rw-r--r--samples/CVS/Repository1
-rw-r--r--samples/CVS/Root1
-rw-r--r--samples/blas.ant185
-rw-r--r--samples/check.ant249
-rw-r--r--samples/cppunit.ant559
-rw-r--r--samples/qtunit.ant238
-rw-r--r--samples/xercesc.ant1113
-rw-r--r--samples/xpcom.ant120
-rw-r--r--src/CVS/Entries4
-rw-r--r--src/CVS/Entries.Log2
-rw-r--r--src/CVS/Repository1
-rw-r--r--src/CVS/Root1
-rw-r--r--src/cpptasks.mf7
-rw-r--r--src/cpptasks.tasks1
-rw-r--r--src/cpptasks.types6
-rw-r--r--src/net/CVS/Entries1
-rw-r--r--src/net/CVS/Repository1
-rw-r--r--src/net/CVS/Root1
-rw-r--r--src/net/sf/CVS/Entries1
-rw-r--r--src/net/sf/CVS/Repository1
-rw-r--r--src/net/sf/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/CVS/Entries1
-rw-r--r--src/net/sf/antcontrib/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/AboutCCTask.java49
-rw-r--r--src/net/sf/antcontrib/cpptasks/ArchEnum.java72
-rw-r--r--src/net/sf/antcontrib/cpptasks/CCTask.java1409
-rw-r--r--src/net/sf/antcontrib/cpptasks/CCTaskProgressMonitor.java58
-rw-r--r--src/net/sf/antcontrib/cpptasks/CPUEnum.java71
-rw-r--r--src/net/sf/antcontrib/cpptasks/CUtil.java487
-rw-r--r--src/net/sf/antcontrib/cpptasks/CVS/Entries60
-rw-r--r--src/net/sf/antcontrib/cpptasks/CVS/Entries.Log4
-rw-r--r--src/net/sf/antcontrib/cpptasks/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/CompilerDef.java502
-rw-r--r--src/net/sf/antcontrib/cpptasks/CompilerEnum.java262
-rw-r--r--src/net/sf/antcontrib/cpptasks/CompilerParam.java33
-rw-r--r--src/net/sf/antcontrib/cpptasks/DependencyInfo.java86
-rw-r--r--src/net/sf/antcontrib/cpptasks/DependencyTable.java612
-rw-r--r--src/net/sf/antcontrib/cpptasks/DistributerDef.java243
-rw-r--r--src/net/sf/antcontrib/cpptasks/DistributerMap.java218
-rw-r--r--src/net/sf/antcontrib/cpptasks/DistributerProtocolEnum.java50
-rw-r--r--src/net/sf/antcontrib/cpptasks/FileVisitor.java27
-rw-r--r--src/net/sf/antcontrib/cpptasks/LinkerDef.java525
-rw-r--r--src/net/sf/antcontrib/cpptasks/LinkerEnum.java118
-rw-r--r--src/net/sf/antcontrib/cpptasks/LinkerParam.java33
-rw-r--r--src/net/sf/antcontrib/cpptasks/OSFamilyEnum.java59
-rw-r--r--src/net/sf/antcontrib/cpptasks/ObjectFileCollector.java42
-rw-r--r--src/net/sf/antcontrib/cpptasks/OptimizationEnum.java82
-rw-r--r--src/net/sf/antcontrib/cpptasks/OutputTypeEnum.java48
-rw-r--r--src/net/sf/antcontrib/cpptasks/PrecompileDef.java215
-rw-r--r--src/net/sf/antcontrib/cpptasks/PrecompileExceptDef.java80
-rw-r--r--src/net/sf/antcontrib/cpptasks/ProcessorDef.java668
-rw-r--r--src/net/sf/antcontrib/cpptasks/ProcessorEnumValue.java47
-rw-r--r--src/net/sf/antcontrib/cpptasks/ProcessorParam.java100
-rw-r--r--src/net/sf/antcontrib/cpptasks/RuntimeType.java26
-rw-r--r--src/net/sf/antcontrib/cpptasks/SourceHistory.java51
-rw-r--r--src/net/sf/antcontrib/cpptasks/SubsystemEnum.java34
-rw-r--r--src/net/sf/antcontrib/cpptasks/TargetDef.java228
-rw-r--r--src/net/sf/antcontrib/cpptasks/TargetHistory.java58
-rw-r--r--src/net/sf/antcontrib/cpptasks/TargetHistoryTable.java430
-rw-r--r--src/net/sf/antcontrib/cpptasks/TargetInfo.java127
-rw-r--r--src/net/sf/antcontrib/cpptasks/TargetMatcher.java120
-rw-r--r--src/net/sf/antcontrib/cpptasks/VersionInfo.java671
-rw-r--r--src/net/sf/antcontrib/cpptasks/WarningLevelEnum.java40
-rw-r--r--src/net/sf/antcontrib/cpptasks/antlib.xml22
-rw-r--r--src/net/sf/antcontrib/cpptasks/apple/CVS/Entries3
-rw-r--r--src/net/sf/antcontrib/cpptasks/apple/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/apple/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java574
-rw-r--r--src/net/sf/antcontrib/cpptasks/apple/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java214
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/ADSLibrarian.java159
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/ADSLinker.java166
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/CVS/Entries4
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/arm/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandCCompiler.java134
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandCfgParser.java70
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java219
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java293
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java219
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/BorlandResourceCompiler.java129
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/CBuilderXProjectWriter.java542
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/CVS/Entries12
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/CfgFilenameState.java46
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/ConsumeToSpaceOrNewLine.java30
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/QuoteBranchState.java35
-rw-r--r--src/net/sf/antcontrib/cpptasks/borland/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CVS/Entries4
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranCompiler.java138
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLibrarian.java82
-rw-r--r--src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLinker.java77
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java208
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java122
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java129
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CVS/Entries22
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java122
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineCCompiler.java42
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java437
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompilerConfiguration.java226
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineFortranCompiler.java42
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java408
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinkerConfiguration.java128
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/Compiler.java24
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/CompilerConfiguration.java64
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/LinkType.java154
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/Linker.java80
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/LinkerConfiguration.java33
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCCompiler.java43
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCompiler.java104
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCompiler.java49
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/Processor.java75
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/ProcessorConfiguration.java54
-rw-r--r--src/net/sf/antcontrib/cpptasks/compiler/ProgressMonitor.java31
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries13
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCCompiler.java50
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleCCompiler.java132
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLibrarian.java80
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLinker.java146
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLibrarian.java36
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLinker.java44
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioMIDLCompiler.java112
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProcessor.java90
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProjectWriter.java560
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/DevStudioResourceCompiler.java119
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java409
-rw-r--r--src/net/sf/antcontrib/cpptasks/devstudio/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/AbstractArLibrarian.java107
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java328
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/CVS/Entries10
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java246
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java151
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccLibrarian.java41
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java210
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java299
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java205
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/LdLinker.java57
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Entries7
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/GccCCompiler.java272
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/GccLibrarian.java69
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/GccLinker.java234
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java288
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/GppLinker.java228
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/LdLinker.java83
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Entries7
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java244
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLibrarian.java43
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLinker.java215
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java305
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GppLinker.java210
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/LdLinker.java60
-rw-r--r--src/net/sf/antcontrib/cpptasks/hp/CVS/Entries3
-rw-r--r--src/net/sf/antcontrib/cpptasks/hp/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/hp/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java104
-rw-r--r--src/net/sf/antcontrib/cpptasks/hp/aCCLinker.java100
-rw-r--r--src/net/sf/antcontrib/cpptasks/ibm/CVS/Entries3
-rw-r--r--src/net/sf/antcontrib/cpptasks/ibm/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ibm/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java111
-rw-r--r--src/net/sf/antcontrib/cpptasks/ibm/VisualAgeLinker.java75
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/CVS/Entries6
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/DebugDef.java127
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/ProjectDef.java327
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/ProjectWriter.java53
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/ProjectWriterEnum.java94
-rw-r--r--src/net/sf/antcontrib/cpptasks/ide/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/CVS/Entries10
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java59
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java35
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java36
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java56
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java59
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java36
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java36
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java56
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java51
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java53
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java38
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java46
-rw-r--r--src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java53
-rw-r--r--src/net/sf/antcontrib/cpptasks/mozilla/CVS/Entries3
-rw-r--r--src/net/sf/antcontrib/cpptasks/mozilla/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/mozilla/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/mozilla/XpidlCompiler.java365
-rw-r--r--src/net/sf/antcontrib/cpptasks/mozilla/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Entries10
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCCompiler.java84
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCLinker.java69
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCompiler.java169
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranCompiler.java86
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranLinker.java69
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLibrarian.java254
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLinker.java205
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomProcessor.java169
-rw-r--r--src/net/sf/antcontrib/cpptasks/openwatcom/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/CVS/Entries4
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/OS390CCompiler.java156
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/OS390Linker.java208
-rw-r--r--src/net/sf/antcontrib/cpptasks/os390/OS390Processor.java71
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/CVS/Entries4
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/IccCompiler.java123
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/IccLinker.java209
-rw-r--r--src/net/sf/antcontrib/cpptasks/os400/IccProcessor.java71
-rw-r--r--src/net/sf/antcontrib/cpptasks/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/AbstractParser.java67
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/AbstractParserState.java41
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/BranchState.java46
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/CParser.java78
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/CVS/Entries14
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/CaseInsensitiveLetterState.java87
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/FilenameState.java41
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/FortranParser.java106
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/LetterState.java80
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/Parser.java28
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/PostE.java41
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrCaseInsensitiveLetterState.java83
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrLetterState.java75
-rw-r--r--src/net/sf/antcontrib/cpptasks/parser/package.html28
-rw-r--r--src/net/sf/antcontrib/cpptasks/platforms/CVS/Entries3
-rw-r--r--src/net/sf/antcontrib/cpptasks/platforms/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/platforms/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java364
-rw-r--r--src/net/sf/antcontrib/cpptasks/platforms/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/C89CCompiler.java108
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/C89Linker.java132
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/C89Processor.java116
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/CVS/Entries6
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java119
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/ForteCCLinker.java100
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/ForteCCompiler.java98
-rw-r--r--src/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java98
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/CVS/Entries4
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/ClxxCCompiler.java191
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/ClxxLibrarian.java162
-rw-r--r--src/net/sf/antcontrib/cpptasks/ti/ClxxLinker.java181
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries6
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectCompiler.java280
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectParser.java148
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceCompiler.java347
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceParser.java67
-rw-r--r--src/net/sf/antcontrib/cpptasks/trolltech/package.html27
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/CVS/Entries15
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/CVS/Repository1
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/CVS/Root1
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/CommandLineArgument.java104
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/CompilerArgument.java28
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/ConditionalFileSet.java84
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/ConditionalPath.java75
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/DefineArgument.java38
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/DefineSet.java199
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/FlexLong.java59
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/IncludePath.java38
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/LibrarySet.java290
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/LibraryTypeEnum.java48
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/LinkerArgument.java28
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/SystemIncludePath.java45
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/SystemLibrarySet.java37
-rw-r--r--src/net/sf/antcontrib/cpptasks/types/UndefineArgument.java153
-rw-r--r--sun_checks.xml169
-rw-r--r--test/CVS/Entries1
-rw-r--r--test/CVS/Entries.Log4
-rw-r--r--test/CVS/Repository1
-rw-r--r--test/CVS/Root1
-rw-r--r--test/junit/CVS/Entries2
-rw-r--r--test/junit/CVS/Repository1
-rw-r--r--test/junit/CVS/Root1
-rw-r--r--test/junit/files/CVS/Entries2
-rw-r--r--test/junit/files/CVS/Repository1
-rw-r--r--test/junit/files/CVS/Root1
-rw-r--r--test/junit/files/openshore/CVS/Entries3
-rw-r--r--test/junit/files/openshore/CVS/Repository1
-rw-r--r--test/junit/files/openshore/CVS/Root1
-rw-r--r--test/junit/files/openshore/dependencies.xml911
-rw-r--r--test/junit/files/openshore/history.xml74
-rw-r--r--test/junit/files/xerces-c/CVS/Entries3
-rw-r--r--test/junit/files/xerces-c/CVS/Repository1
-rw-r--r--test/junit/files/xerces-c/CVS/Root1
-rw-r--r--test/junit/files/xerces-c/dependencies.xml3330
-rw-r--r--test/junit/files/xerces-c/history.xml636
-rw-r--r--test/junit/net/CVS/Entries1
-rw-r--r--test/junit/net/CVS/Repository1
-rw-r--r--test/junit/net/CVS/Root1
-rw-r--r--test/junit/net/sf/CVS/Entries1
-rw-r--r--test/junit/net/sf/CVS/Repository1
-rw-r--r--test/junit/net/sf/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/CVS/Entries1
-rw-r--r--test/junit/net/sf/antcontrib/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/CVS/Entries23
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/MockBuildListener.java172
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/MockFileCollector.java90
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestAllClasses.java57
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestCCTask.java128
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestCUtil.java121
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestCompilerDef.java357
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestCompilerEnum.java51
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestDependencyTable.java79
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestLinkerDef.java323
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestLinkerEnum.java41
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestOutputTypeEnum.java39
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestProcessorDef.java278
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestTargetHistoryTable.java141
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestTargetInfo.java134
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/TestXMLConsumer.java100
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Entries2
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/borland/TestBorlandCCompiler.java37
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Entries7
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractCompiler.java85
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractLinker.java89
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractProcessor.java80
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestCommandLineCompilerConfiguration.java59
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestCompilerConfiguration.java68
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/compiler/TestLinkType.java59
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries4
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/TestDevStudioLinker.java44
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudio.java31
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudioLinker.java60
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Entries6
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractArLibrarian.java79
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java247
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCCompiler.java80
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCompatibleCCompiler.java105
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccLinker.java80
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/package.html28
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Entries5
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/TestAbstractParser.java26
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/TestCParser.java197
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/TestFortranParser.java79
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/parser/package.html27
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries4
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectCompiler.java74
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectParser.java58
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/trolltech/package.html27
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/CVS/Entries4
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/CVS/Repository1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/CVS/Root1
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/TestDefineArgument.java124
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/TestLibrarySet.java301
-rw-r--r--test/junit/net/sf/antcontrib/cpptasks/types/package.html28
399 files changed, 41449 insertions, 0 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..90fe913
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,4 @@
+build
+dist
+result.xml
+bin
diff --git a/CVS/Entries b/CVS/Entries
new file mode 100644
index 0000000..d1c4efc
--- /dev/null
+++ b/CVS/Entries
@@ -0,0 +1,10 @@
+/.classpath/1.8/Sat Sep 25 05:10:31 2004//
+/.cvsignore/1.3/Sat Feb 28 19:06:07 2004//
+/.project/1.1/Mon Feb 17 03:18:22 2003//
+/LICENSE/1.1/Sat Feb 28 19:06:07 2004/-kb/
+/NOTICE/1.3/Sat Feb 28 19:12:56 2004/-kb/
+/build.xml/1.51/Fri Jan 21 20:18:55 2005//
+/sun_checks.xml/1.4/Sat Sep 25 05:10:31 2004//
+D/samples////
+D/src////
+D/test////
diff --git a/CVS/Entries.Log b/CVS/Entries.Log
new file mode 100644
index 0000000..eeeea55
--- /dev/null
+++ b/CVS/Entries.Log
@@ -0,0 +1,4 @@
+A D/base-implementations////
+A D/schema////
+R D/schema////
+R D/base-implementations////
diff --git a/CVS/Repository b/CVS/Repository
new file mode 100644
index 0000000..5259986
--- /dev/null
+++ b/CVS/Repository
@@ -0,0 +1 @@
+cpptasks
diff --git a/CVS/Root b/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..44f008a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,6 @@
+This product includes software developed by
+ The Ant-Contrib project (http://ant-contrib.sourceforge.net)
+This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+This product was changed by FreeHEP
+ The FreeHEP project (http://java.freehep.org/).
diff --git a/PATCHES b/PATCHES
new file mode 100644
index 0000000..a2ffaa7
--- /dev/null
+++ b/PATCHES
@@ -0,0 +1,25 @@
+*** Changes marked with FREEHEP.
+freehep-cpptasks-20051015-patched-1.0-SNAPSHOT
+- [DevStudioCompatibleCCompiler] changed /GX into /EHsc (for VC8, and backward compatible with VC7 and VC6).
+- [CommandLineLinker] use absolute paths for filenames if they are shorter than relative paths to overcome windows file length limit.
+- [gcc.AbstractLdLinker] no -Bstatic for Darwin.
+- [CCTask] added log statement to identify linker and compiler.
+- [intel.IntelLinux32CLinker, intel.IntelLinux64CLinker, intel.IntelLinux32Compiler, intel.IntelLinux64Compiler]
+ added with names icpc and ecpc.
+- [LinkerEnum, CompilerEnum] added above linkers and compilers.
+- [intel.IntelLinux32CCompiler, intel.IntelLinux64CCompiler] links to IntelLinux32CLinker and IntelLinux64CLinker.
+- [intel.IntelLinux32Linker, intel.IntelLinux64Linker] changed linker name from icc to icpc and ecc to ecpc for version 8.1 of icc.
+- [sun.ForteCCompiler] Added (suncc)
+- [sun.ForteF77Compiler] Added (sunf77)
+- [CompilerEnum] Added the above (suncc, sunf77).
+- [compaq.CompaqVisualFortranCompiler] removed addition of quotes.
+- [gcc.GccCompatibleCCompiler, gcc.GccCCompiler] moved and modified -fno-rtti code
+- [gcc.GccCompatibleCCompiler] added missing code for -fno-exceptions
+- [gcc.GppLinker, compiler.LinkType] Set "callAddLibrarySets" flag, submitted as bug 1109917 in cpptasks of ant-contrib.
+- [compiler.CommandLineLinker] Check "callAddLibrarySets" flag.
+
+For CVS updates from the original CVS repository:
+- commit latest to svn
+- run cvs up
+- commit again to svn
+
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..ac4cf9b
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,745 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2001-2005 The Ant-Contrib project
+
+ Licensed 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.0b4"/>
+
+ <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"/>
+
+
+ <!--
+ ===================================================================
+ Set the properties related to the source tree
+ ===================================================================
+ -->
+ <property name="src.dir" value="src"/>
+ <property name="java.dir" value="src"/>
+ <property name="tests.java.dir" value="test/junit"/>
+
+ <!--
+ ===================================================================
+ Set the properties for the build area
+ ===================================================================
+ -->
+ <property name="build.dir" value="build"/>
+ <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="dist"/>
+ <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="1.1"
+ source="1.3"
+ 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" manifest="${src.dir}/cpptasks.mf">
+ <fileset dir="." includes="LICENSE NOTICE"/>
+ <fileset dir="${build.classes}"/>
+ <fileset dir="${src.dir}" includes="cpptasks.tasks,cpptasks.types,net/sf/antcontrib/cpptasks/antlib.xml"/>
+ </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="1.1"
+ source="1.3"
+ 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">
+ <junit printsummary="false"
+ fork="true"
+ dir="${tests.java.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.java.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>cpptask.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"/>
+ <move file="${doc.dir}/debugdef.html" tofile="${doc.dir}/debug.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>
+
+
+</project>
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..db27b68
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,80 @@
+<project>
+ <parent>
+ <artifactId>freehep-maven-plugins</artifactId>
+ <groupId>org.freehep</groupId>
+ <version>1.9-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.freehep</groupId>
+ <artifactId>freehep-cpptasks</artifactId>
+ <name>FreeHEP CPPTasks (modified)</name>
+ <version>20051015-patched-0.6.1-SNAPSHOT</version>
+ <description>Library to call native compilers and linkers.</description>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src</directory>
+ <includes>
+ <include>cpptasks.tasks</include>
+ <include>cpptasks.types</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>net.sf.antcontrib.cpptasks.AboutCCTask</mainClass>
+ <packageName>net.sf.antcontrib.cpptasks</packageName>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>jdk1.4</id>
+ <activation>
+ <jdk>1.4</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.6.2</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>jdk1.5+</id>
+ <activation>
+ <jdk>1.5+</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/samples/.cvsignore b/samples/.cvsignore
new file mode 100644
index 0000000..fcb6a2f
--- /dev/null
+++ b/samples/.cvsignore
@@ -0,0 +1 @@
+build
diff --git a/samples/CVS/Entries b/samples/CVS/Entries
new file mode 100644
index 0000000..2d6583e
--- /dev/null
+++ b/samples/CVS/Entries
@@ -0,0 +1,8 @@
+/.cvsignore/1.1/Sun Aug 29 04:52:51 2004//
+/blas.ant/1.1/Fri Apr 30 20:38:47 2004//
+/check.ant/1.1/Fri Apr 30 20:38:47 2004//
+/cppunit.ant/1.10/Tue Aug 24 22:46:09 2004//
+/qtunit.ant/1.1/Wed May 5 02:50:59 2004/-kb/
+/xercesc.ant/1.22/Sat Feb 28 18:58:38 2004//
+/xpcom.ant/1.1/Wed May 5 02:50:59 2004/-kb/
+D
diff --git a/samples/CVS/Repository b/samples/CVS/Repository
new file mode 100644
index 0000000..cee2e7c
--- /dev/null
+++ b/samples/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/samples
diff --git a/samples/CVS/Root b/samples/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/samples/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/samples/blas.ant b/samples/blas.ant
new file mode 100644
index 0000000..45c3691
--- /dev/null
+++ b/samples/blas.ant
@@ -0,0 +1,185 @@
+<?xml version="1.0"?>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+-->
+
+<!--
+
+ build file for generic FORTRAN 77 Basic Linear Algebra Subprograms library
+ (http://www.netlib.org/blas/blas.tgz) and double precision tests
+
+ targets test-dblat2 and test-dblat3 require Ant 1.6
+
+
+
+-->
+<project name="blas" default="test-all">
+
+<property name="base.dir" value="."/>
+<property name="debug" value="true"/>
+<property name="compiler" value="g77"/>
+<property name="src.dir" location="${base.dir}/src"/>
+<property name="tests.dir" location="${base.dir}/tests"/>
+<property name="build.dir" location="build"/>
+<property name="libtype" value="static"/>
+
+<taskdef resource="cpptasks.tasks"/>
+<typedef resource="cpptasks.types"/>
+
+<target name="usage">
+ <echo message="Builds BLAS (http://www.netlib.org/blas)."/>
+ <echo message="Usage:"/>
+ <echo message="ant -f blas.ant -Dsrc.dir=c:/blas -Dtests.dir=c:/blas-tests"/>
+ <echo message=" -Dcompiler=[g77 | df ...]"/>
+ <echo message=" -Dlibtype=[static | shared ...]"/>
+</target>
+
+<target name="get-blas">
+ <get src="http://www.netlib.org/blas/blas.tgz" usetimestamp="true"
+ dest="${base.dir}/blas.tgz"/>
+ <untar src="${base.dir}/blas.tgz" dest="${src.dir}" compression="gzip" overwrite="true"/>
+ <mkdir dir="${tests.dir}"/>
+ <get src="http://www.netlib.org/blas/dblat1" usetimestamp="true"
+ dest="${tests.dir}/dblat1.f"/>
+ <get src="http://www.netlib.org/blas/dblat2" usetimestamp="true"
+ dest="${tests.dir}/dblat2.f"/>
+ <get src="http://www.netlib.org/blas/dblat2d" usetimestamp="true"
+ dest="${tests.dir}/dblat2d"/>
+ <get src="http://www.netlib.org/blas/dblat3" usetimestamp="true"
+ dest="${tests.dir}/dblat3.f"/>
+ <get src="http://www.netlib.org/blas/dblat3d" usetimestamp="true"
+ dest="${tests.dir}/dblat3d"/>
+</target>
+
+<target name="init">
+ <mkdir dir="${build.dir}"/>
+ <property name="obj.dir" value="${build.dir}/obj"/>
+ <mkdir dir="${obj.dir}"/>
+ <property environment="env"/>
+ <!-- in case not set in environment, use an insignificant value -->
+ <property name="env.LD_LIBRARY_PATH" value="."/>
+ <condition property="is-shared"><equals arg1="${libtype}" arg2="shared"/></condition>
+ <condition property="is-gcc">
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g77"/>
+ </or>
+ </condition>
+</target>
+
+<target name="clean">
+ <delete dir="${build.dir}"/>
+</target>
+
+
+<target name="build-lib" depends="init">
+ <cc subsystem="console"
+ outfile="${build.dir}/blas"
+ objdir="${obj.dir}"
+ outtype="${libtype}"
+ debug="${debug}"
+ warnings="diagnostic"
+ optimize="speed"
+ name="${compiler}">
+ <fileset dir="${src.dir}" includes="*.f"/>
+ </cc>
+</target>
+
+<target name="build-dblat1" depends="build-lib">
+ <cc outfile="${build.dir}/dblat1"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="dblat1.exe">
+ <fileset dir="${tests.dir}" includes="dblat1.f"/>
+ <!-- the following line is undesirable and will hopefully be made unnecessary shortly -->
+ <libset libs="g2c, frtbegin" if="is-gcc"/>
+ <libset dir="${build.dir}" type="${libtype}" libs="blas"/>
+ </cc>
+</target>
+
+
+<target name="test-dblat1" depends="build-dblat1">
+ <exec dir="${build.dir}"
+ executable="${dblat1.exe}"
+ failonerror="true"/>
+</target>
+
+<target name="build-dblat2" depends="build-lib">
+ <cc outfile="${build.dir}/dblat2"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="dblat2.exe">
+ <fileset dir="${tests.dir}" includes="dblat2.f"/>
+ <!-- the following line is undesirable and will hopefully be made unnecessary shortly -->
+ <syslibset libs="g2c, frtbegin" if="is-gcc"/>
+ <libset dir="${build.dir}" type="${libtype}" libs="blas"/>
+ </cc>
+</target>
+
+
+<target name="test-dblat2" depends="build-dblat2">
+ <delete file="${build.dir}/DBLAT2.SUMM"/>
+ <!-- requires Ant 1.6 due to the input attribute -->
+ <exec dir="${build.dir}"
+ executable="${dblat2.exe}"
+ failonerror="true"
+ input="${tests.dir}/dblat2d"/>
+ <concat><fileset dir="${build.dir}" includes="DBLAT2.SUMM"/></concat>
+</target>
+
+
+<target name="build-dblat3" depends="build-lib">
+ <cc outfile="${build.dir}/dblat3"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="dblat3.exe">
+ <fileset dir="${tests.dir}" includes="dblat3.f"/>
+ <!-- the following line is undesirable and will hopefully be made unnecessary shortly -->
+ <syslibset libs="g2c, frtbegin" if="is-gcc"/>
+ <libset dir="${build.dir}" type="${libtype}" libs="blas"/>
+ </cc>
+</target>
+
+
+<target name="test-dblat3" depends="build-dblat3">
+ <delete file="${build.dir}/DBLAT3.SUMM"/>
+ <!-- requires Ant 1.6 due to the input attribute -->
+ <exec dir="${build.dir}"
+ executable="${dblat3.exe}"
+ failonerror="true"
+ input="${tests.dir}/dblat3d"/>
+ <concat><fileset dir="${build.dir}" includes="DBLAT3.SUMM"/></concat>
+</target>
+
+
+
+<target name="all" depends="build-dblat1, build-dblat2, build-dblat3"/>
+
+<target name="test-all" depends="test-dblat1, test-dblat2, test-dblat3"/>
+
+</project> \ No newline at end of file
diff --git a/samples/check.ant b/samples/check.ant
new file mode 100644
index 0000000..c0d4271
--- /dev/null
+++ b/samples/check.ant
@@ -0,0 +1,249 @@
+<?xml version="1.0"?>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+-->
+
+<!--
+
+ build file for check 0.8.4 (http://check.sourceforge.net)
+ a C unit test framework.
+
+-->
+<project name="check" default="test-all">
+
+<property name="base.dir" value="."/>
+<property name="debug" value="true"/>
+<property name="compiler" value="gcc"/>
+<property name="src.dir" location="${base.dir}/src"/>
+<property name="tests.dir" location="${base.dir}/tests"/>
+<property name="money.dir" location="${base.dir}/doc/money"/>
+<property name="build.dir" location="build"/>
+<property name="major" value="0"/>
+<property name="minor" value="8"/>
+<property name="build" value="4"/>
+<!-- specify api="unix" or api="win32" override platform default -->
+<property name="api" value="default"/>
+
+<taskdef resource="cpptasks.tasks"/>
+<typedef resource="cpptasks.types"/>
+
+<target name="usage">
+ <echo message="Builds check (http://check.sourceforge.net)."/>
+ <echo message="Usage:"/>
+ <echo message="ant -f cppunit.ant -Dbase.dir=c:/check-0.8.4"/>
+ <echo message=" -Dcompiler=[gcc | msvc | icc | bcc ...]"/>
+</target>
+
+<!--
+ sample versioninfo, targetplatform and distributer to check
+ if definitions are processed, not functional at this time
+-->
+<versioninfo id="check-version"
+ fileversion="0.8.4"
+ compatibilityversion="0.8"/>
+
+<targetplatform id="winbox" arch="pentium4" osfamily="windows"/>
+
+<distributer id="mydistcc" hosts="192.168.18.101 192.168.18.102" protocol="distcc" user="carnold">
+ <map local="c:\" remote="smb://xanadu/c-drive/" remoteseparator="/"/>
+</distributer>
+
+<target name="check-config" depends="init">
+ <available property="configure-available"
+ file="${base.dir}/configure"/>
+ <available property="config-available"
+ file="${base.dir}/config.h"/>
+ <condition property="do-autogen">
+ <not>
+ <or>
+ <isset property="configure-available"/>
+ <isset property="is-windows"/>
+ </or>
+ </not>
+ </condition>
+ <condition property="do-configure">
+ <not>
+ <or>
+ <isset property="config-available"/>
+ <isset property="is-windows"/>
+ </or>
+ </not>
+ </condition>
+</target>
+
+<target name="run-autogen"
+ depends="check-config"
+ if="do-autogen">
+ <exec dir="${base.dir}" executable="bash">
+ <arg value="autogen.sh"/>
+ </exec>
+</target>
+
+
+<target name="run-configure"
+ depends="run-autogen"
+ if="do-configure">
+ <exec dir="${base.dir}" executable="bash">
+ <arg value="configure"/>
+ </exec>
+</target>
+
+<target name="init">
+ <mkdir dir="${build.dir}"/>
+ <property name="obj.dir" value="${build.dir}/obj"/>
+ <mkdir dir="${obj.dir}"/>
+ <condition property="is-gcc">
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g++"/>
+ </or>
+ </condition>
+ <condition property="is-msvc">
+ <or>
+ <equals arg1="${compiler}" arg2="msvc"/>
+ </or>
+ </condition>
+ <condition property="is-windows"><os family="windows"/></condition>
+ <condition property="is-win32">
+ <or>
+ <equals arg1="${api}" arg2="win32"/>
+ <and>
+ <equals arg1="${api}" arg2="default"/>
+ <isset property="is-windows"/>
+ </and>
+ </or>
+ </condition>
+ <property environment="env"/>
+ <!-- in case not set in environment, use an insignificant value -->
+ <property name="env.LD_LIBRARY_PATH" value="."/>
+</target>
+
+<target name="clean">
+ <delete dir="${build.dir}"/>
+</target>
+
+
+<target name="static-lib" depends="run-configure">
+ <mkdir dir="${obj.dir}"/>
+ <cc subsystem="console"
+ outfile="${build.dir}/check"
+ objdir="${obj.dir}"
+ outtype="static"
+ debug="${debug}"
+ warnings="diagnostic"
+ optimize="speed"
+ name="${compiler}">
+ <fileset dir="${src.dir}" includes="*.c"/>
+ <includepath path="${base.dir};${src.dir}"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="HAVE_CONFIG_H"/>
+ <versioninfo refid="check-version"/>
+ </cc>
+</target>
+
+<target name="build-money" depends="static-lib">
+ <cc outfile="${build.dir}/money"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="money.exe">
+ <fileset dir="${money.dir}" includes="*.c"/>
+ <includepath path="${src.dir}"/>
+ <libset dir="${build.dir}" libs="check"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo refid="check-version"/>
+ </cc>
+</target>
+
+
+<target name="test-money" depends="build-money">
+ <exec dir="${build.dir}"
+ executable="${money.exe}"
+ failonerror="false"/>
+</target>
+
+<target name="build-check_check" depends="static-lib">
+
+ <!-- test expected file of test failure not to include
+ path, this change checks that the last 17 characters
+ of the file are check_check_sub.c -->
+ <replace file="${tests.dir}/check_check_master.c"
+ token='strcmp(tr_lfile(tr_fail_array[i])'
+ value="strcmp(strchr(tr_lfile(tr_fail_array[i]), 0) - 17"/>
+
+ <!-- multiple tests expected error message not to include
+ path to source file, changed hardcoded "check_check_fixture.c"
+ to __FILE__ -->
+ <replace file="${tests.dir}/check_check_fixture.c"
+ token='"check_check_fixture.c:'
+ value='__FILE__ ":'/>
+
+ <cc outfile="${build.dir}/check_check"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="check_check.exe">
+ <fileset dir="${tests.dir}" includes="check_check*.c, check_list.c"/>
+ <includepath path="${src.dir};${tests.dir}"/>
+ <libset dir="${build.dir}" libs="check"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo refid="check-version"/>
+ </cc>
+</target>
+
+
+<target name="test-check_check" depends="build-check_check">
+ <exec dir="${tests.dir}"
+ executable="${check_check.exe}"
+ failonerror="true"/>
+</target>
+
+<target name="build-check_stress" depends="static-lib">
+ <cc outfile="${build.dir}/check_stress"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ warnings="diagnostic"
+ name="${compiler}"
+ outputfileproperty="check_stress.exe">
+ <fileset dir="${tests.dir}" includes="check_stress.c"/>
+ <includepath path="${src.dir};${tests.dir}"/>
+ <libset dir="${build.dir}" libs="check"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo refid="check-version"/>
+ </cc>
+</target>
+
+
+<target name="test-check_stress" depends="build-check_stress">
+ <exec dir="${tests.dir}"
+ executable="${check_stress.exe}"
+ failonerror="true"/>
+</target>
+
+
+<target name="all" depends="build-money, build-check_check, build-check_stress"/>
+
+<target name="test-all" depends="test-money, test-check_check, test-check_stress"/>
+
+</project> \ No newline at end of file
diff --git a/samples/cppunit.ant b/samples/cppunit.ant
new file mode 100644
index 0000000..f6b2172
--- /dev/null
+++ b/samples/cppunit.ant
@@ -0,0 +1,559 @@
+<?xml version="1.0"?>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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 name="cppunit" default="test-all-but-qt">
+
+<property name="base.dir" value="."/>
+<property name="debug" value="true"/>
+<property name="compiler" value="gcc"/>
+<property name="src.dir" location="${base.dir}/src"/>
+<property name="examples.dir" location="${base.dir}/examples"/>
+<property name="build.dir" location="build"/>
+<property name="include.dir" location="${base.dir}/include"/>
+<property name="config.dir" location="${base.dir}/config"/>
+<property name="qt.dir" location="/usr/lib/qt3"/>
+<property name="major" value="1"/>
+<property name="minor" value="9"/>
+<property name="build" value="14"/>
+<!-- specify api="unix" or api="win32" override platform default -->
+<property name="api" value="default"/>
+
+<taskdef resource="cpptasks.tasks"/>
+<typedef resource="cpptasks.types"/>
+
+<target name="usage">
+ <echo message="Builds cppunit (http://cppunit.sf.net)."/>
+ <echo message="Usage:"/>
+ <echo message="ant -f cppunit.ant -Dbase.dir=c:/cppunit-1.9.14"/>
+ <echo message=" -Dcompiler=[gcc | msvc | icc | bcc ...]"/>
+ <echo message="Status:"/>
+ <echo message="test-all will pass for gcc and icc on Linux"/>
+ <echo message="test-all-but-qt will pass for gcc on Mac OS/X"/>
+ <echo message="test-all-but-qt will pass for msvc on Windows"/>
+ <echo message="all-but-qt will pass for bcc but test that divide by zero will fail"/>
+ <echo message="test-all-but-qt will pass for gcc and CC on Solaris,"/>
+ <echo message="but may be necessary to add /usr/ccs/bin so &quot;ar&quot; may be found and"/>
+ <echo message="add the location of libstdc++ to LD_LIBRARY_PATH"/>
+</target>
+
+<!--
+ sample versioninfo, targetplatform and distributer to check
+ if definitions are processed, not functional at this time
+-->
+<versioninfo id="cppunit-version"
+ fileversion="1.9.14"
+ productversion="1.9.14"
+ compatibilityversion="1"
+ legalcopyright="Copyright &#xA9; 1996-2000 by Michael Feathers &lt;mfeathers@objectmentor.com&gt;"
+ productname="cppunit"
+ companyname="Cppunit project &lt;http://cppunit.sourceforge.net&gt;"
+ />
+
+<targetplatform id="winbox" arch="pentium4" osfamily="windows"/>
+
+<distributer id="mydistcc" hosts="192.168.18.101 192.168.18.102" protocol="distcc" user="carnold">
+ <map local="c:\" remote="smb://xanadu/c-drive/" remoteseparator="/"/>
+</distributer>
+
+<target name="check-config" depends="init">
+ <available property="configure-available"
+ file="${base.dir}/configure"/>
+ <available property="config-auto-available"
+ file="${include.dir}/cppunit/config-auto.h"/>
+ <condition property="do-autogen">
+ <not>
+ <or>
+ <isset property="configure-available"/>
+ <isset property="is-windows"/>
+ </or>
+ </not>
+ </condition>
+ <condition property="do-configure">
+ <not>
+ <or>
+ <isset property="config-auto-available"/>
+ <isset property="is-windows"/>
+ </or>
+ </not>
+ </condition>
+ <condition property="use-brc">
+ <equals arg1="${compiler}" arg2="bcc"/>
+ </condition>
+</target>
+
+<target name="run-autogen"
+ depends="check-config"
+ if="do-autogen">
+ <exec dir="${base.dir}" executable="bash">
+ <arg value="autogen.sh"/>
+ </exec>
+</target>
+
+
+<target name="run-configure"
+ depends="run-autogen"
+ if="do-configure">
+ <exec dir="${base.dir}" executable="bash">
+ <arg value="configure"/>
+ </exec>
+</target>
+
+<target name="init">
+ <mkdir dir="${build.dir}"/>
+ <property name="obj.dir" value="${build.dir}/obj"/>
+ <mkdir dir="${obj.dir}"/>
+ <condition property="is-gcc">
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g++"/>
+ </or>
+ </condition>
+ <condition property="is-msvc">
+ <or>
+ <equals arg1="${compiler}" arg2="msvc"/>
+ </or>
+ </condition>
+ <condition property="is-windows"><os family="windows"/></condition>
+ <condition property="is-win32">
+ <or>
+ <equals arg1="${api}" arg2="win32"/>
+ <and>
+ <equals arg1="${api}" arg2="default"/>
+ <isset property="is-windows"/>
+ </and>
+ </or>
+ </condition>
+ <property environment="env"/>
+ <!-- in case not set in environment, use an insignificant value -->
+ <property name="env.LD_LIBRARY_PATH" value="."/>
+</target>
+
+<target name="clean">
+ <delete dir="${build.dir}"/>
+</target>
+
+
+<target name="shared-lib" depends="run-configure">
+ <mkdir dir="${obj.dir}/cppunit_shared"/>
+ <mkdir dir="${build.dir}/lib"/>
+ <cc subsystem="console"
+ objdir="${obj.dir}/cppunit_shared"
+ debug="${debug}"
+ outtype="shared"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outfile="${build.dir}/lib/cppunit">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/cppunit"
+ includes="*.cpp" excludes="DllMain.cpp"/>
+ <fileset dir="${src.dir}/cppunit"
+ includes="DllMain.cpp"
+ if="is-windows"/>
+ <includepath path="${include.dir}"/>
+ <libset libs="dl" unless="is-win32"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="CPPUNIT_BUILD_DLL"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo extends="cppunit-version" filedescription="Cppunit shared library"/>
+ <!-- writes shared-lib.cbx -->
+ <project outfile="${base.dir}/shared-lib" type="cbuilderx" name="shared-lib"/>
+ <!-- writes cppunit.dsp -->
+ <project outfile="${base.dir}/cppunit" type="msvc5" name="cppunit"/>
+ <!-- writes cppunit.vcproj -->
+ <project outfile="${base.dir}/cppunit" type="msvc71" name="testdllproj"/>
+ <!-- writes cppunit.xcode -->
+ <project outfile="${base.dir}/cppunit" type="xcode" name="cppunit"/>
+ </cc>
+</target>
+
+<target name="static-lib" depends="run-configure">
+ <mkdir dir="${obj.dir}/cppunit_static"/>
+ <cc subsystem="console"
+ outfile="${build.dir}/cppunit"
+ objdir="${obj.dir}/cppunit_static"
+ outtype="static"
+ debug="${debug}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ name="${compiler}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/cppunit"
+ includes="*.cpp" excludes="DllMain.cpp"/>
+ <includepath path="${include.dir}"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <versioninfo extends="cppunit-version" filedescription="Cppunit static library"/>
+ <!-- writes static-lib.cbx -->
+ <project outfile="${base.dir}/static-lib" type="cbuilderx" name="static-lib"/>
+ <project outfile="${base.dir}/cppunit_static" type="msvc5" name="cppunit"/>
+ </cc>
+</target>
+
+<target name="compile-static-test" depends="static-lib">
+ <mkdir dir="${obj.dir}/cppunittestmain_static"/>
+ <cc outfile="${build.dir}/cppunittestmain_static"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}/cppunittestmain_static"
+ debug="${debug}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ name="${compiler}"
+ outputfileproperty="test-static.exe">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${examples.dir}/cppunittest"
+ includes="*.cpp" excludes="CppUnitTestPlugIn.cpp"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <versioninfo extends="cppunit-version" filedescription="Self tests using static library"/>
+ <project outfile="${base.dir}/static-test" type="cbuilderx" name="static-test"/>
+ <project outfile="${base.dir}/static_test" type="msvc5" name="cppunittestmain"/>
+ </cc>
+</target>
+
+<target name="compile-shared-test" depends="shared-lib">
+ <mkdir dir="${obj.dir}/cppunittestmain_shared_shared"/>
+ <cc outfile="${build.dir}/lib/cppunittestmain_shared"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}/cppunittestmain_shared"
+ debug="${debug}"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outputfileproperty="test.exe">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${examples.dir}/cppunittest"
+ includes="*.cpp" excludes="CppUnitTestPlugIn.cpp"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}/lib" libs="cppunit"/>
+ <defineset define="CPPUNIT_DLL"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <versioninfo extends="cppunit-version" filedescription="Self tests using shared library"/>
+ <project outfile="${base.dir}/shared-test" type="cbuilderx" name="shared-test"/>
+ </cc>
+</target>
+
+<!--
+compile CPPUnit implementation and unit tests into a single executable
+-->
+<target name="compile-mono-test" depends="run-configure">
+ <mkdir dir="${obj.dir}/cppunittestmain_mono"/>
+ <cc outfile="${build.dir}/lib/cppunittestmain"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}/cppunittestmain_mono"
+ debug="${debug}"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outputfileproperty="test.exe">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/cppunit"
+ includes="*.cpp" excludes="DllMain.cpp"/>
+ <libset libs="dl" unless="is-win32"/>
+ <fileset dir="${examples.dir}/cppunittest"
+ includes="*.cpp" excludes="CppUnitTestPlugIn.cpp"/>
+ <includepath path="${include.dir}"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <versioninfo extends="cppunit-version" filedescription="Combined unit tests and implementation"/>
+ <project outfile="${base.dir}/mono-test" type="cbuilderx" name="cppunittestmain_mono"/>
+ </cc>
+</target>
+
+<target name="test-static" depends="compile-static-test">
+ <!-- return value (or Ant's treatment of it) is
+ inconsistent on Linux -->
+ <exec dir="${build.dir}"
+ executable="${test-static.exe}"
+ failonerror="true"/>
+</target>
+
+<target name="test-shared" depends="compile-shared-test">
+ <!-- return value (or Ant's treatment of it) is
+ inconsistent on Linux -->
+ <exec dir="${build.dir}"
+ executable="${build.dir}/lib/cppunittestmain_shared"
+ failonerror="true">
+ <env key="LD_LIBRARY_PATH" value="${build.dir}/lib:${env.LD_LIBRARY_PATH}"/>
+ </exec>
+</target>
+
+<target name="test-mono" depends="compile-mono-test">
+ <exec dir="${build.dir}"
+ executable="${build.dir}/cppunittestmain"
+ failonerror="true"/>
+</target>
+
+<target name="qttestrunner" depends="shared-lib">
+ <mkdir dir="${obj.dir}/qttestrunner"/>
+ <mkdir dir="${build.dir}/qttestrunner"/>
+ <cc outfile="${build.dir}/qttestrunner"
+ outtype="shared"
+ subsystem="console"
+ objdir="${obj.dir}/qttestrunner"
+ exceptions="true"
+ name="${compiler}"
+ rtti="true"
+ optimize="speed"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/qttestrunner" includes="*.cpp"/>
+ <compiler name="uic">
+ <fileset dir="${src.dir}/qttestrunner" includes="*.ui"/>
+ </compiler>
+ <defineset define="_REENTRANT,QT_NO_DEBUG,QT_THREAD_SUPPORT,QT_SHARED,QT_TABLE_SUPPORT"/>
+ <includepath path="${include.dir}"/>
+ <includepath path="${obj.dir}/qttestrunner"/>
+ <includepath path="${qt.dir}/include"/>
+ <libset dir="${build.dir}/lib" libs="cppunit"/>
+ <libset dir="${qt.dir}/lib" libs="qt-mt"/>
+ <libset libs="pthread"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <versioninfo extends="cppunit-version" filedescription="Qt test runner"/>
+ </cc>
+
+</target>
+
+<target name="plugintester" depends="static-lib">
+ <mkdir dir="${obj.dir}/DllPlugInTester"/>
+ <cc outfile="${build.dir}/DllPlugInTester"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}/DllPlugInTester"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ name="${compiler}"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/DllPlugInTester"
+ includes="*.cpp"
+ excludes="DllPlugInTesterTest.cpp"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="dl" unless="is-windows"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-windows"/>
+ <versioninfo extends="cppunit-version" fileversion="Dll Plug-in tester"/>
+ </cc>
+</target>
+
+
+<target name="plugintestertest" depends="plugintester">
+ <mkdir dir="${obj.dir}/DllPlugInTester"/>
+ <cc outfile="${build.dir}/DllPlugInTesterTest"
+ outtype="executable"
+ subsystem="console"
+ objdir="${obj.dir}/DllPlugInTester"
+ name="${compiler}"
+ exceptions="true"
+ optimize="speed"
+ rtti="true"
+ debug="${debug}">
+ <fileset dir="${src.dir}/DllPlugInTester"
+ includes="*.cpp"
+ excludes="DllPlugInTester.cpp"/>
+ <includepath path="${include.dir}"/>
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="dl" unless="is-windows"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-windows"/>
+ <versioninfo extends="cppunit-version" filedescription="Tests for Plugin tester"/>
+ </cc>
+</target>
+
+<target name="test-plugintestertest" depends="plugintestertest">
+ <exec executable="${build.dir}/DllPlugInTesterTest"/>
+</target>
+
+<target name="money" depends="static-lib">
+ <mkdir dir="${obj.dir}/money"/>
+ <cc outfile="${build.dir}/MoneyApp"
+ outtype="executable"
+ subsystem="console"
+ name="${compiler}"
+ objdir="${obj.dir}/money"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${examples.dir}/money"
+ includes="*.cpp"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="dl" unless="is-windows"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo extends="cppunit-version" filedescription="Money example"/>
+ </cc>
+</target>
+
+<target name="test-money" depends="money">
+ <exec executable="${build.dir}/MoneyApp"
+ failonerror="true"/>
+</target>
+
+<target name="hierarchy" depends="static-lib">
+ <mkdir dir="${obj.dir}/hierarchy"/>
+ <cc outfile="${build.dir}/hierarchy"
+ outtype="executable"
+ subsystem="console"
+ name="${compiler}"
+ objdir="${obj.dir}/hierarchy"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${examples.dir}/hierarchy"
+ includes="*.cpp"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="dl" unless="is-windows"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo extends="cppunit-version" filedescription="Hierarchy example"/>
+ </cc>
+</target>
+
+<target name="test-hierarchy" depends="hierarchy">
+ <!-- some tests intentionally fail -->
+ <exec executable="${build.dir}/hierarchy"
+ resultproperty="hierarchy-result"/>
+ <condition property="hierarchy-pass">
+ <equals arg1="${hierarchy-result}" arg2="0"/>
+ </condition>
+ <fail unless="hierarchy-pass"
+ message="hierarchy erroneously passed all tests"/>
+</target>
+
+<target name="simple" depends="static-lib">
+ <mkdir dir="${obj.dir}/simple"/>
+ <cc outfile="${build.dir}/simple"
+ outtype="executable"
+ subsystem="console"
+ name="${compiler}"
+ exceptions="true"
+ optimize="speed"
+ rtti="true"
+ objdir="${obj.dir}/simple"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${examples.dir}/simple"
+ includes="*.cpp" excludes="SimplePlugIn.cpp"/>
+ <includepath path="${include.dir}"/>
+ <!-- original was shared, but changing gives
+ an error loading library -->
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="dl" unless="is-windows"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo extends="cppunit-version" filedescription="Sample plug-in"/>
+ </cc>
+</target>
+
+<target name="test-simple" depends="simple">
+ <!-- some tests intentionally fail -->
+ <exec executable="${build.dir}/simple"
+ resultproperty="simple-result"/>
+ <condition property="simple-pass">
+ <equals arg1="${simple-result}" arg2="0"/>
+ </condition>
+ <!-- fail unless="simple-pass"
+ message="simple erroneously passed all tests"/ -->
+</target>
+
+<target name="dsplugin" depends="static-lib" if="is-windows">
+ <mkdir dir="${obj.dir}/DSPlugIn"/>
+ <!-- DSPlugIn.rc required compiled tlb to be in same directory -->
+ <cc objdir="${src.dir}/msvc6/DSPlugIn"
+ name="midl">
+ <fileset dir="${src.dir}/msvc6/DSPlugIn" includes="*.idl"/>
+ </cc>
+ <cc outfile="${build.dir}/TestRunnerDSPlugIn"
+ outtype="shared"
+ subsystem="gui"
+ objdir="${obj.dir}/DSPlugIn"
+ exceptions="true"
+ name="${compiler}"
+ optimize="speed"
+ rtti="true"
+ debug="${debug}">
+ <compiler name="brc" if="use-brc"/>
+ <compiler name="msrc"/>
+ <fileset dir="${src.dir}/msvc6/DSPlugIn"
+ includes="*.cpp *.rc"/>
+ <compiler name="msrc"/>
+ <includepath path="${include.dir}"/>
+ <libset dir="${build.dir}" libs="cppunit"/>
+ <libset libs="stdc++" if="is-gcc"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <versioninfo refid="cppunit-version"/>
+ </cc>
+</target>
+
+
+
+<target name="all-static" depends="static-lib,
+ plugintestertest,
+ money,
+ hierarchy,
+ simple"/>
+
+<target name="test-all-static" depends="test-static,
+ test-plugintestertest,
+ test-money,
+ test-hierarchy,
+ test-simple"/>
+
+<target name="all-but-qt" depends="shared-lib,all-static"/>
+
+<target name="test-all-but-qt" depends="test-shared,test-all-static"/>
+
+<target name="all-qt" depends="qttestrunner"/>
+
+<target name="test-all-qt" depends="qttestrunner"/>
+
+<target name="all" depends="all-but-qt, all-qt"/>
+
+<target name="test-all" depends="test-all-but-qt, test-all-qt"/>
+
+</project>
diff --git a/samples/qtunit.ant b/samples/qtunit.ant
new file mode 100644
index 0000000..fab89ed
--- /dev/null
+++ b/samples/qtunit.ant
@@ -0,0 +1,238 @@
+<?xml version="1.0"?>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+-->
+
+<!--
+
+Build file for qtunit 0.9.8 (http://www.uwyn.com/projects/qtunit/index.html)
+A Trolltech Qt based unit testing framework.
+-->
+<project name="qtunit" default="test-all">
+
+<property name="base.dir" value="."/>
+<property name="debug" value="true"/>
+<property name="compiler" value="gcc"/>
+<property name="src.dir" location="${base.dir}/src"/>
+<property name="samples.dir" location="${base.dir}/samples"/>
+<property name="build.dir" location="build"/>
+<property name="include.dir" location="${base.dir}/include"/>
+<property name="config.dir" location="${base.dir}/config"/>
+<property name="qt.dir" location="/usr/lib/qt3"/>
+<property name="major" value="0"/>
+<property name="minor" value="9"/>
+<property name="build" value="8"/>
+<!-- specify api="unix" or api="win32" override platform default -->
+<property name="api" value="default"/>
+
+<taskdef resource="cpptasks.tasks"/>
+<typedef resource="cpptasks.types"/>
+
+<target name="usage">
+ <echo message="Builds qtunit 0.9.8 (http://www.uwyn.com/projects/qtunit/index.html)."/>
+ <echo message="Usage:"/>
+ <echo message="ant -f qtunit.ant -Dbase.dir=c:/qtunit-0.9.8"/>
+ <echo message=" -Dcompiler=[gcc | msvc | icc | bcc ...]"/>
+</target>
+
+<target name="init">
+ <mkdir dir="${build.dir}"/>
+ <property name="obj.dir" value="${build.dir}/obj"/>
+ <mkdir dir="${obj.dir}"/>
+ <condition property="is-gcc">
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g++"/>
+ </or>
+ </condition>
+ <condition property="is-msvc">
+ <or>
+ <equals arg1="${compiler}" arg2="msvc"/>
+ </or>
+ </condition>
+ <condition property="is-windows"><os family="windows"/></condition>
+ <condition property="is-win32">
+ <or>
+ <equals arg1="${api}" arg2="win32"/>
+ <and>
+ <equals arg1="${api}" arg2="default"/>
+ <isset property="is-windows"/>
+ </and>
+ </or>
+ </condition>
+ <property environment="env"/>
+ <!-- in case not set in environment, use an insignificant value -->
+ <property name="env.LD_LIBRARY_PATH" value="."/>
+</target>
+
+<target name="clean">
+ <delete dir="${build.dir}"/>
+</target>
+
+
+<target name="build-libqtunit" depends="init">
+ <mkdir dir="${obj.dir}"/>
+
+ <!-- preprocesses .ui and .h files, places generated files on obj.dir -->
+ <cc objdir="${obj.dir}">
+ <!-- runs uic twice and moc once to create *.h, *.cpp and moc_*.cpp files -->
+ <compiler name="uic" inherit="false">
+ <fileset dir="${src.dir}" includes="guirunner/*.ui"/>
+ </compiler>
+ <!-- runs moc only on files with Q_OBJECT -->
+ <compiler name="moc" inherit="false">
+ <fileset dir="${src.dir}" includes="guirunner/*.h, framework/*.h"/>
+ </compiler>
+ </cc>
+
+ <cc subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ outtype="shared"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outfile="${build.dir}/qtunit">
+ <fileset dir="${src.dir}/framework" includes="*.cpp"/>
+ <fileset dir="${src.dir}/guirunner" includes="*.cpp"/>
+ <fileset dir="${src.dir}/textrunner" includes="*.cpp"/>
+ <fileset dir="${obj.dir}" includes="*.cpp"/>
+ <syslibset libs="pthread"/>
+ <syslibset dir="${qt.dir}/lib" libs="qt-mt"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="_REENTRANT,QT_THREAD_SUPPORT, QT_SHARED, QT_TABLET_SUPPORT"/>
+ <defineset define="QT_NO_DEBUG" unless="is-debug"/>
+ <includepath path="${obj.dir}"/>
+ <includepath path="${qt.dir}/include"/>
+ <includepath path="${src.dir};${src.dir}/framework;${src.dir}/guirunner"/>
+ </cc>
+</target>
+
+
+<target name="build-texttestrunner" depends="build-libqtunit">
+ <mkdir dir="${obj.dir}"/>
+ <cc subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ outtype="executable"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outfile="${build.dir}/texttestrunner">
+ <fileset dir="${samples.dir}/texttestrunner" includes="*.cpp"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="_REENTRANT,QT_THREAD_SUPPORT, QT_SHARED, QT_TABLET_SUPPORT"/>
+ <defineset define="QT_NO_DEBUG" unless="is-debug"/>
+ <includepath path="${obj.dir}"/>
+ <includepath path="${src.dir};${src.dir}/framework;${src.dir}/textrunner"/>
+ <includepath path="${qt.dir}/include"/>
+ <libset dir="${build.dir}" libs="qtunit"/>
+ </cc>
+</target>
+
+<target name="build-guitestrunner" depends="build-libqtunit">
+ <mkdir dir="${obj.dir}"/>
+ <cc subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ outtype="executable"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outfile="${build.dir}/guitestrunner">
+ <fileset dir="${samples.dir}/guitestrunner" includes="*.cpp"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="_REENTRANT,QT_THREAD_SUPPORT, QT_SHARED, QT_TABLET_SUPPORT"/>
+ <defineset define="QT_NO_DEBUG" unless="is-debug"/>
+ <includepath path="${obj.dir}"/>
+ <includepath path="${src.dir};${src.dir}/framework;${src.dir}/guirunner"/>
+ <includepath path="${qt.dir}/include"/>
+ <libset dir="${build.dir}" libs="qtunit"/>
+ </cc>
+</target>
+
+
+<target name="build-testmodule" depends="init">
+ <mkdir dir="${obj.dir}"/>
+ <cc subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ outtype="shared"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outputfileproperty="testmodule.so"
+ outfile="${build.dir}/testmodule">
+ <fileset dir="${samples.dir}/testmodule" includes="*.cpp"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="_REENTRANT,QT_THREAD_SUPPORT, QT_SHARED, QT_TABLET_SUPPORT"/>
+ <defineset define="QT_NO_DEBUG" unless="is-debug"/>
+ <includepath path="${src.dir};${src.dir}/framework"/>
+ <includepath path="${qt.dir}/include"/>
+ <libset dir="${build.dir}" libs="qtunit"/>
+ </cc>
+</target>
+
+<target name="test-texttestrunner" depends="build-texttestrunner, build-testmodule">
+ <echo file="${build.dir}/testproject.qpj" message='&lt;PROJECT NAME="testproject"&gt;&lt;MODULE&gt;&lt;FILEPATH&gt;${testmodule.so}&lt;/FILEPATH&gt;&lt;SOURCEPATH&gt;${samples.dir}/testmodule/&lt;/SOURCEPATH&gt;&lt;/MODULE&gt;&lt;/PROJECT&gt;'/>
+ <exec dir="${build.dir}"
+ executable="${build.dir}/texttestrunner"
+ failonerror="false">
+ <env key="LD_LIBRARY_PATH" value="${build.dir}:${env.LD_LIBRARY_PATH}"/>
+ <arg value="${build.dir}/testproject.qpj"/>
+ </exec>
+</target>
+
+
+<target name="build-standalonerunner" depends="build-libqtunit">
+ <mkdir dir="${obj.dir}"/>
+ <cc subsystem="console"
+ objdir="${obj.dir}"
+ debug="${debug}"
+ outtype="executable"
+ name="${compiler}"
+ exceptions="true"
+ rtti="true"
+ optimize="speed"
+ outfile="${build.dir}/standalonerunner">
+ <fileset dir="${samples.dir}/standalonerunner" includes="*.cpp"/>
+ <defineset define="WIN32" if="is-win32"/>
+ <defineset define="_REENTRANT,QT_THREAD_SUPPORT, QT_SHARED, QT_TABLET_SUPPORT"/>
+ <defineset define="QT_NO_DEBUG" unless="is-debug"/>
+ <includepath path="${src.dir};${src.dir}/framework;${src.dir}/textrunner"/>
+ <includepath path="${qt.dir}/include"/>
+ <libset dir="${build.dir}" libs="qtunit"/>
+ </cc>
+</target>
+
+
+<target name="test-standalonerunner" depends="build-standalonerunner">
+ <exec dir="${build.dir}"
+ executable="${build.dir}/standalonerunner"
+ failonerror="false">
+ <env key="LD_LIBRARY_PATH" value="${build.dir}:${env.LD_LIBRARY_PATH}"/>
+ </exec>
+</target>
+
+<target name="all" depends="build-standalonerunner, build-texttestrunner, build-guitestrunner"/>
+
+<target name="test-all" depends="test-standalonerunner, test-texttestrunner, build-guitestrunner"/>
+
+</project>
diff --git a/samples/xercesc.ant b/samples/xercesc.ant
new file mode 100644
index 0000000..2405431
--- /dev/null
+++ b/samples/xercesc.ant
@@ -0,0 +1,1113 @@
+<?xml version="1.0"?>
+
+<!--
+
+Copyright 2001-2004 The Ant-Contrib project
+
+ Licensed 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="main" basedir=".">
+
+ <!-- Give user a chance to override without editing this file
+ (and without typing -D each time it compiles it) -->
+ <property file=".ant.properties" />
+ <property file="${user.home}/.ant.properties" />
+
+ <property name="Name" value="Apache Xerces-C"/>
+ <property name="name" value="xercesc"/>
+ <property name="version" value="1.5"/>
+
+ <property name="compiler" value="gcc"/>
+ <property name="debug" value="true" />
+ <property name="chmod.fail" value="true" />
+ <property name="platform" value="linux"/>
+ <property name="messageloader" value="inmem"/>
+ <property name="netaccessor" value="native"/>
+ <property name="transcoder" value="iconv"/>
+ <property name="thread" value="pthread"/>
+ <property name="subsystem" value="gui"/>
+
+ <!-- property compiler="gcc"/ -->
+
+ <!--
+ ===================================================================
+ Set the properties related to the source tree
+ ===================================================================
+ -->
+ <property name="src.dir" value="."/>
+ <property name="include.dir" value=".."/>
+ <property name="samples.dir" value="../../samples"/>
+ <property name="tests.dir" value="../../tests"/>
+ <property name="scripts.dir" value="scripts"/>
+ <property name="docs.dir" value="doc"/>
+ <property name="tests.dir" value="tests"/>
+ <property name="xml4com.dir" value="../../Build/Win32/xml4com"/>
+
+
+ <!--
+ ===================================================================
+ Set the properties for the build area
+ ===================================================================
+ -->
+
+ <!--
+ <taskdef resource="cpptasks.tasks"/>
+ <typedef resource="cpptasks.types"/>
+ -->
+ <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"/>
+ <typedef name="linker" classname="net.sf.antcontrib.cpptasks.LinkerDef"/>
+ <typedef name="compiler" classname="net.sf.antcontrib.cpptasks.CompilerDef"/>
+
+
+ <target name="pre-init">
+ <condition property="windows">
+ <os family="windows"/>
+ </condition>
+ <condition property="linux">
+ <equals arg1="${platform}" arg2="linux"/>
+ </condition>
+ <condition property="is-debug">
+ <isTrue value="${debug}"/>
+ </condition>
+ <condition property="use-msvc">
+ <equals arg1="${compiler}" arg2="VC6"/>
+ </condition>
+ <condition property="use-gcc">
+ <equals arg1="${compiler}" arg2="gcc"/>
+ </condition>
+ <condition property="use-bcc">
+ <equals arg1="${compiler}" arg2="bcc"/>
+ </condition>
+ <condition property="use-icl">
+ <equals arg1="${compiler}" arg2="icl"/>
+ </condition>
+ <condition property="use-ecl">
+ <equals arg1="${compiler}" arg2="ecl"/>
+ </condition>
+ <condition property="use-icc">
+ <equals arg1="${compiler}" arg2="icc"/>
+ </condition>
+ <condition property="use-ecc">
+ <equals arg1="${compiler}" arg2="ecc"/>
+ </condition>
+ <condition property="use-CC">
+ <equals arg1="${compiler}" arg2="CC"/>
+ </condition>
+ <condition property="use-xlC">
+ <equals arg1="${compiler}" arg2="xlC"/>
+ </condition>
+ <condition property="inmem_messageloader">
+ <equals arg1="${messageloader}" arg2="inmem"/>
+ </condition>
+ <condition property="netaccessor_socket">
+ <equals arg1="${netaccessor}" arg2="socket"/>
+ </condition>
+ <condition property="native_transcoder">
+ <equals arg1="${transcoder}" arg2="native"/>
+ </condition>
+ <condition property="pthread">
+ <equals arg1="${thread}" arg2="pthread"/>
+ </condition>
+ </target>
+
+ <target name="win-debug-init" depends="pre-init" if="is-debug">
+ <property name="winbuild.dir" value="../../Build/Win32/${compiler}/Debug"/>
+ <property name="winbuild.obj.dir" value="${winbuild.dir}/obj"/>
+ </target>
+
+ <target name="exec-link">
+ <exec executable="link"/>
+ </target>
+
+ <target name="exec-link-bogus">
+ <exec executable="link">
+ <arg value="/bogus"/>
+ </exec>
+ </target>
+
+ <target name="win-release-init" depends="pre-init" unless="is-debug">
+ <property name="winbuild.dir" value="../../build/win32/${compiler}/Release"/>
+ <property name="winbuild.obj.dir" value="${winbuild.dir}/obj"/>
+ </target>
+
+ <target name="win-init" depends="win-debug-init,win-release-init" if="windows">
+ <echo message="is windows"/>
+ <property name="win32_transcoder" value=""/>
+ <property name="netaccessor_winsock" value=""/>
+ <property name="win32_msgloader" value=""/>
+ <property name="build.dir" value="${winbuild.dir}"/>
+ <property name="build.obj.dir" value="${winbuild.obj.dir}"/>
+ </target>
+
+ <target name="linux-init" depends="pre-init" if="linux">
+ <echo message="is linux"/>
+ <property name="build.obj.dir" value="../../antobj/LINUX"/>
+ <property name="build.dir" value="../../antlib"/>
+ <property name="netaccessor_socket" value=""/>
+ <property name="inmem_messageloader" value=""/>
+ <property name="pthreads" value=""/>
+ <property name="iconv_transcoder" value=""/>
+ </target>
+
+ <target name="init" depends="win-init,linux-init"/>
+
+ <target name="clean">
+ <delete dir="../../build"/>
+ </target>
+
+ <compiler id="base-msvc" name="msvc">
+ <!-- target Pentium Pro -->
+ <compilerarg value="/G6"/>
+ <!-- display many warnings -->
+ <compilerarg value="/W3"/>
+ <!-- maximize speed -->
+ <compilerarg value="/O2" unless="is-debug"/>
+ <!-- auto-inlining -->
+ <compilerarg value="/Ob2" unless="is-debug"/>
+ <defineset>
+ <define name="_CRTDBG_MAP_ALLOC" if="is-debug"/>
+ </defineset>
+ </compiler>
+
+ <compiler id="msvc" name="msvc" extends="base-msvc" if="use-msvc">
+ <!-- disable Microsoft Extensions -->
+ <compilerarg value="/Za"/>
+ </compiler>
+
+ <compiler id="msvc-with-extensions" extends="base-msvc" if="use-msvc">
+ <!-- enable Microsoft Extensions -->
+ <compilerarg value="/Ze"/>
+ </compiler>
+
+ <compiler id="icl" extends="base-msvc" name="icl" if="use-icl">
+ <!-- disable Microsoft Extensions -->
+ <compilerarg value="/Za"/>
+ </compiler>
+ <compiler id="icl-with-extensions" extends="base-msvc" name="icl" if="use-icl">
+ <!-- enable Microsoft Extensions -->
+ <compilerarg value="/Ze"/>
+ </compiler>
+
+ <compiler id="ecl" extends="base-msvc" name="ecl" if="use-ecl">
+ <!-- disable Microsoft Extensions -->
+ <compilerarg value="/Za"/>
+ </compiler>
+ <compiler id="ecl-with-extensions" extends="base-msvc" name="ecl" if="use-ecl">
+ <!-- enable Microsoft Extensions -->
+ <compilerarg value="/Ze"/>
+ </compiler>
+
+ <compiler id="bcc" name="bcc" if="use-bcc">
+ <!-- target Pentium Pro -->
+ <compilerarg value="-6"/>
+ <!-- zero length empty class member functions -->
+ <compilerarg value="-Vx"/>
+ <compilerarg value="-Ve"/>
+ <!-- align on quad word boundaries -->
+ <compilerarg value="-a8"/>
+ <!-- byte size enums -->
+ <compilerarg value="-b-"/>
+ <compilerarg value="-k"/>
+ <compilerarg value="-y" if="is-debug"/>
+ <compilerarg value="-vi"/>
+ <compilerarg value="-r-" if="is-debug"/>
+ <!-- maximize speed -->
+ <compilerarg value="-O2" unless="is-debug"/>
+ </compiler>
+
+ <compiler id="gcc" name="gcc" if="use-gcc">
+ <compilerarg value="-O" unless="is-debug"/>
+ </compiler>
+
+
+
+
+ <target name="XercesLib" depends="init">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="shared"
+ objdir="${build.obj.dir}" outfile="${build.dir}/xerces-c"
+ multithreaded="true" exceptions="true" subsystem="${subsystem}" dependencyDepth="-1">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <compiler refid="icl"/>
+ <compiler refid="ecl"/>
+ <!-- speciality compiler for a few files that require MS extensions -->
+ <compiler extends="msvc-with-extensions">
+ <fileset dir="${src.dir}">
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/MsgLoaders/Win32/*.cpp" if="win32_msgloader"/>
+ <include name="util/NetAccessors/WinSock/*.cpp" if="netaccessor_winsock"/>
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/Transcoders/Win32/*.cpp" if="win32_transcoder"/>
+ </fileset>
+ </compiler>
+ <compiler extends="icl-with-extensions">
+ <fileset dir="${src.dir}">
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/MsgLoaders/Win32/*.cpp" if="win32_msgloader"/>
+ <include name="util/NetAccessors/WinSock/*.cpp" if="netaccessor_winsock"/>
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/Transcoders/Win32/*.cpp" if="win32_transcoder"/>
+ </fileset>
+ </compiler>
+ <compiler extends="ecl-with-extensions">
+ <fileset dir="${src.dir}">
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/MsgLoaders/Win32/*.cpp" if="win32_msgloader"/>
+ <include name="util/NetAccessors/WinSock/*.cpp" if="netaccessor_winsock"/>
+ <include name="util/Platforms/Win32/*.cpp"/>
+ <include name="util/Transcoders/Win32/*.cpp" if="win32_transcoder"/>
+ </fileset>
+ </compiler>
+ <compiler name="msrc" if="use-msvc">
+ <compilerarg value="/l 0x409"/>
+ <fileset dir="${src.dir}" includes="util/Platforms/Win32/Version.rc"/>
+ </compiler>
+ <compiler name="brc" if="use-bcc" inherit="false">
+ <!-- version.rc includes afxres.h, I don't know why -->
+ <includepath location="c:\msdev6\vc98\include"/>
+ <includepath location="c:\msdev6\vc98\mfc\include"/>
+ <fileset dir="${src.dir}" includes="util/Platforms/Win32/Version.rc"/>
+ </compiler>
+ <compiler if="linux" extends="gcc">
+ <defineset>
+ <define name="_GNU_SOURCE"/>
+ <define name="__USE_GNU"/>
+ </defineset>
+ <fileset dir="${src.dir}" includes="util/Platforms/Linux/*.cpp"/>
+ </compiler>
+ <linker name="gcc" if="use-gcc">
+ <syslibset libs="kernel32,user32,advapi32,ws2_32" if="windows"/>
+ <syslibset libs="pthread" if="pthreads"/>
+ </linker>
+ <!-- base is 0x12000000 -->
+ <linker name="msvc" base="301989888" if="use-msvc">
+ <syslibset libs="kernel32,user32,advapi32,ws2_32"/>
+ </linker>
+ <linker name="icl" base="301989888" if="use-icl">
+ <syslibset libs="kernel32,user32,advapi32,ws2_32"/>
+ </linker>
+ <linker name="bcc" if="use-bcc">
+ <syslibset libs="import32,cw32,ws2_32"/>
+ </linker>
+ <fileset dir="${src.dir}">
+ <include name="dom/*.cpp"/>
+ <include name="framework/*.cpp"/>
+ <include name="idom/*.cpp"/>
+ <include name="internal/*.cpp"/>
+ <include name="parsers/*.cpp"/>
+ <include name="sax/*.cpp"/>
+ <include name="sax2/*.cpp"/>
+ <include name="util/*.cpp"/>
+ <include name="validators/*.cpp"/>
+ <include name="validators/common/*.cpp"/>
+ <include name="validators/datatype/*.cpp"/>
+ <include name="validators/DTD/*.cpp"/>
+ <include name="validators/schema/*.cpp"/>
+ <include name="validators/schema/identity/*.cpp"/>
+ <include name="util/regx/*.cpp"/>
+ <!-- if using MS Visual C,
+ these must be compiled with MS Extension enabled
+ otherwise they can compile with everything else -->
+ <include name="util/Platforms/Win32/*.cpp" if="windows" unless="use-msvc"/>
+ <include name="util/MsgLoaders/Win32/*.cpp" if="win32_msgloader" unless="use-msvc"/>
+ <include name="util/MsgLoaders/InMemory/*.cpp" if="inmem_messageloader"/>
+ <include name="util/NetAccessors/WinSock/*.cpp" if="netaccessor_winsock" unless="use-msvc"/>
+ <include name="util/NetAccessors/Socket/*.cpp" if="netaccessor_socket"/>
+ <include name="util/Transcoders/Win32/*.cpp" if="win32_transcoder" unless="use-msvc"/>
+ <include name="util/Transcoders/Iconv/*.cpp" if="iconv_transcoder"/>
+ <include name="util/Transcoders/ICU/*.cpp" if="icu_transcoder"/>
+ <include name="util/Compilers/GCCDefs.cpp" if="use-gcc"/>
+ </fileset>
+ <!-- parent of the source directory -->
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="PROJ_SAX2"/>
+ <define name="PROJ_XMLPARSER"/>
+ <define name="PROJ_XMLUTIL"/>
+ <define name="PROJ_PARSERS"/>
+ <define name="PROJ_SAX4C"/>
+ <define name="PROJ_DOM"/>
+ <define name="PROJ_VALIDATORS"/>
+ <define name="XML_SINGLEDLL"/>
+ <define name="WIN32" if="windows"/>
+ <define name="_WINDOWS" if="windows"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="XML_USE_WIN32_TRANSCODER" if="win32_transcoder"/>
+ <define name="XML_USE_WIN32_MSGLOADER" if="win32_msgloader"/>
+ <define name="XML_USE_NETACCESSOR_WINSOCK" if="netaccessor_winsock"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ <define name="XML_USE_NATIVE_TRANSCODER" if="native_transcoder"/>
+ <define name="XML_USE_ICU_TRANSCODER" if="icu_transcoder"/>
+ <define name="XML_USE_INMEM_MESSAGELOADER" if="inmem_messageloader"/>
+ <define name="XML_USE_PTHREADS" if="pthreads"/>
+ <define name="XML_USE_NETACCESSOR_SOCKET" if="netaccessor_socket"/>
+ </defineset>
+ </cc>
+
+ </target>
+
+ <target name="CreateDOMDocument" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/CreateDOMDocument"
+ multithreaded="true" exceptions="true">
+ <compiler extends="gcc">
+ <compilerarg value="-fpic"/>
+ <compilerarg value="-w"/>
+ <compilerarg value="-O"/>
+ </compiler>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="CreateDOMDocument/CreateDOMDocument.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="DOMCount" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMCount"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="DOMCount/DOMCount.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="DOMIDTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMIDTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="DOM/DOMIDTest/DOMIDTest.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+
+ <target name="DOMMemTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMMemTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="DOM/DOMMemTest/DOMMemTest.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="DOMPrint" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMPrint"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="DOMPrint/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="DOMTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="DOM/DOMTest/*.cpp"/>
+ <fileset dir="${build.dir}" includes="xerces-c.lib"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+
+ <target name="DOMTraversalTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/DOMTraversalTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="DOM/Traversal/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="EncodingTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/EncodingTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="EncodingTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="EnumVal" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/EnumVal"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="EnumVal/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="IDOMCount" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/IDOMCount"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="IDOMCount/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+
+ </target>
+
+
+ <target name="IDOMMemTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/IDOMMemTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="IDom/IDOMMemTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="IDOMPrint" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/IDOMPrint"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="IDOMPrint/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="IDOMTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/IDOMTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="IDom/IDOMTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="InitTermTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/InitTermTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="InitTermTest/*.cpp"/>
+ <fileset dir="${build.dir}" includes="xerces-c.lib"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="IRangeTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/IRangeTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="IDom/IRangeTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="ITraversal" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/ITraversal"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="IDom/ITraversal/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="MemParse" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/MemParse"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="MemParse/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="PParse" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/PParse"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="PParse/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="RangeTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/RangeTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="DOM/RangeTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="Redirect" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/Redirect"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="Redirect/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="SAX2Count" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/SAX2Count"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="SAX2Count/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="SAXCount" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/SAXCount"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="SAXCount/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="SAXPrint" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/SAXPrint"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="SAXPrint/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="SEnumVal" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/SEnumVal"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="SEnumVal/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="StdInParse" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/StdInParse"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${samples.dir}" includes="StdInParse/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+
+ <target name="ThreadTest" depends="XercesLib">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="executable"
+ objdir="${build.obj.dir}" outfile="${build.dir}/ThreadTest"
+ multithreaded="true" exceptions="true">
+ <compiler refid="gcc"/>
+ <compiler refid="msvc-with-extensions"/>
+ <compiler refid="bcc"/>
+ <linker name="gcc" if="use-gcc"/>
+ <linker name="msvc" if="use-msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${tests.dir}" includes="ThreadTest/*.cpp"/>
+ <includepath location="${include.dir}"/>
+ <defineset>
+ <define name="CONSOLE"/>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ <define name="LINUX" if="linux"/>
+ <define name="_REENTRANT" if="linux"/>
+ </defineset>
+ <libset dir="${build.dir}" libs="xerces-c"/>
+ <syslibset libs="c,stdc++" if="linux"/>
+ </cc>
+ </target>
+
+ <target name="XercesCOM_tlb" depends="init" if="windows">
+ <mkdir dir="${xml4com.dir}"/>
+ <cc debug="${debug}" objdir="${xml4com.dir}" name="midl">
+ <!-- output generated header file to use in next step -->
+ <compilerarg value="/h"/>
+ <compilerarg value="xml4com.h"/>
+ <compilerarg value="/iid"/>
+ <compilerarg value="xml4com_i.c"/>
+ <fileset dir="${src.dir}" includes="com/xml4com.idl"/>
+ <includepath location="${src.dir}/com"/>
+ </cc>
+ </target>
+
+ <target name="XercesCOM" depends="XercesCOM_tlb,XercesLib" if="windows">
+ <mkdir dir="${build.obj.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <cc debug="${debug}" link="shared"
+ objdir="${build.obj.dir}" outfile="${build.dir}/xml4com"
+ multithreaded="true" exceptions="true">
+ <compiler refid="msvc-with-extensions"/>
+ <compiler refid="bcc"/>
+ <compiler name="msrc" if="use-msvc">
+ <compilerarg value="/l 0x409"/>
+ <fileset dir="${src.dir}" includes="com/*.rc"/>
+ </compiler>
+ <precompile prototype="${src.dir}/com/StdAfx.cpp">
+ <except>
+ <fileset dir="${src.dir}" includes="com/XMLDOM*.cpp"/>
+ </except>
+ </precompile>
+ <linker name="msvc"/>
+ <linker name="bcc" if="use-bcc"/>
+ <fileset dir="${src.dir}" includes="com/*.cpp"/>
+ <fileset dir="${build.dir}" includes="xerces-c.lib"/>
+ <includepath location="${xml4com.dir}"/>
+ <includepath location="${include.dir}"/>
+ <includepath location="."/>
+ <defineset>
+ <define name="PLATFORM_WIN32" if="windows"/>
+ </defineset>
+ <syslibset libs="wininet,shlwapi"/>
+ </cc>
+ </target>
+
+
+ <target name="Samples" depends="CreateDOMDocument,DOMCount,
+ DOMPrint,
+ EnumVal,
+ IDOMCount,
+ IDOMPrint,
+ MemParse,
+ PParse,
+ Redirect,SAX2Count,
+ SAXCount,SAXPrint,
+ SEnumVal,StdInParse"/>
+
+ <target name="Tests" depends="DOMIDTest,DOMMemTest,
+ DOMTest,DOMTraversalTest,
+ EncodingTest,IDOMMemTest,
+ IDOMTest,ITraversal,
+ InitTermTest,IRangeTest,
+ RangeTest,ThreadTest"/>
+
+ <target name="XercesAll" depends="Samples,Tests,XercesCOM"/>
+
+ <target name="main"
+ depends="XercesAll" />
+
+</project>
diff --git a/samples/xpcom.ant b/samples/xpcom.ant
new file mode 100644
index 0000000..b1da4b2
--- /dev/null
+++ b/samples/xpcom.ant
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+-->
+
+<!--
+
+Builds Mozilla xpcom/sample
+
+-->
+<project name="xpcom" default="test-all">
+
+<property name="base.dir" value="."/>
+<property name="debug" value="true"/>
+<property name="compiler" value="gcc"/>
+<property name="build.dir" location="build"/>
+<property name="obj.dir" location="${build.dir}/obj"/>
+<!-- specify api="unix" or api="win32" override platform default -->
+<property name="api" value="default"/>
+<property name="mozinclude.dir" location="${base.dir}/dist/include"/>
+<property name="mozlib.dir" location="${base.dir}/dist/lib"/>
+
+<taskdef resource="cpptasks.tasks"/>
+<typedef resource="cpptasks.types"/>
+
+<target name="usage">
+ <echo message="Builds Mozilla xpcom/sample."/>
+ <echo message="Usage:"/>
+ <echo message="ant -f xpcom.ant -Dbase.dir=/home/someuser/mozilla"/>
+ <echo message=" -Dcompiler=[gcc | msvc | icc | bcc ...]"/>
+</target>
+
+<target name="init">
+ <mkdir dir="${build.dir}"/>
+ <property name="obj.dir" value="${build.dir}/obj"/>
+ <mkdir dir="${obj.dir}"/>
+ <condition property="is-gcc">
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g++"/>
+ </or>
+ </condition>
+ <condition property="is-msvc">
+ <or>
+ <equals arg1="${compiler}" arg2="msvc"/>
+ </or>
+ </condition>
+ <condition property="is-windows"><os family="windows"/></condition>
+ <condition property="is-win32">
+ <or>
+ <equals arg1="${api}" arg2="win32"/>
+ <and>
+ <equals arg1="${api}" arg2="default"/>
+ <isset property="is-windows"/>
+ </and>
+ </or>
+ </condition>
+ <property environment="env"/>
+ <!-- in case not set in environment, use an insignificant value -->
+ <property name="env.LD_LIBRARY_PATH" value="."/>
+</target>
+
+<target name="clean">
+ <delete dir="${build.dir}"/>
+</target>
+
+
+<target name="build-xpcomsample" depends="init">
+ <mkdir dir="${obj.dir}"/>
+
+ <!-- compile .idl files, places generated files on obj.dir -->
+ <cc objdir="${obj.dir}">
+ <!-- runs xpidl twice to create .h and .xpt files -->
+ <compiler name="xpidl" inherit="false">
+ <includepath path="${base.dir}/dist/idl"/>
+ <fileset dir="${base.dir}/xpcom/sample" includes="*.idl"/>
+ </compiler>
+ </cc>
+ <cc objdir="${obj.dir}"
+ outtype="shared"
+ outfile="${build.dir}/xpcomsample"
+ rtti="false"
+ exceptions="false">
+ <fileset dir="${base.dir}/xpcom/sample" includes="*.cpp"/>
+ <defineset define="XPCOM_GLUE,HAVE_DEPENDENT_LIBS,MOZILLA_CLIENT"/>
+ <defineset>
+ <define name="OSTYPE" value="Linux2.4"/>
+ <define name="OSARCH" value="Linux"/>
+ </defineset>
+ <defineset if="is-debug" define="DEBUG, _DEBUG, TRACING"/>
+ <includepath path="${obj.dir}"/>
+ <includepath path="${base.dir}/xpcom/sample"/>
+ <includepath path="${mozinclude.dir};${mozinclude.dir}/string:${mozinclude.dir}/xpcom;${mozinclude.dir}/nspr"/>
+ <compilerarg value="-fshort-wchar"/>
+ <compilerarg value="-pthread"/>
+ <libset dir="${mozlib.dir}" libs="xpcomglue, plds4, plc4, nspr4"/>
+ <syslibset libs="pthread, dl, m"/>
+ </cc>
+</target>
+
+
+
+<target name="all" depends="build-xpcomsample"/>
+
+<target name="test-all" depends="build-xpcomsample"/>
+
+</project>
diff --git a/src/CVS/Entries b/src/CVS/Entries
new file mode 100644
index 0000000..7426227
--- /dev/null
+++ b/src/CVS/Entries
@@ -0,0 +1,4 @@
+/cpptasks.mf/1.1/Fri May 10 04:47:34 2002//
+/cpptasks.tasks/1.1/Wed Apr 10 03:31:53 2002//
+/cpptasks.types/1.2/Fri Apr 23 20:15:49 2004//
+D/net////
diff --git a/src/CVS/Entries.Log b/src/CVS/Entries.Log
new file mode 100644
index 0000000..0747779
--- /dev/null
+++ b/src/CVS/Entries.Log
@@ -0,0 +1,2 @@
+A D/etc////
+R D/etc////
diff --git a/src/CVS/Repository b/src/CVS/Repository
new file mode 100644
index 0000000..3c9617e
--- /dev/null
+++ b/src/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src
diff --git a/src/CVS/Root b/src/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/cpptasks.mf b/src/cpptasks.mf
new file mode 100644
index 0000000..a2bf638
--- /dev/null
+++ b/src/cpptasks.mf
@@ -0,0 +1,7 @@
+Manifest-Version: 2.0
+Main-Class: net.sf.antcontrib.cpptasks.AboutCCTask
+
+Name: CCTask
+Implementation-Vendor: Ant-Contrib project
+Implementation-Version: 1.0
+Implementation-Title: Compile and link tasks for Apache Ant
diff --git a/src/cpptasks.tasks b/src/cpptasks.tasks
new file mode 100644
index 0000000..f344583
--- /dev/null
+++ b/src/cpptasks.tasks
@@ -0,0 +1 @@
+cc=net.sf.antcontrib.cpptasks.CCTask
diff --git a/src/cpptasks.types b/src/cpptasks.types
new file mode 100644
index 0000000..5959d6f
--- /dev/null
+++ b/src/cpptasks.types
@@ -0,0 +1,6 @@
+defineset=net.sf.antcontrib.cpptasks.types.DefineSet
+compiler=net.sf.antcontrib.cpptasks.CompilerDef
+linker=net.sf.antcontrib.cpptasks.LinkerDef
+targetplatform=net.sf.antcontrib.cpptasks.TargetDef
+versioninfo=net.sf.antcontrib.cpptasks.VersionInfo
+distributer=net.sf.antcontrib.cpptasks.DistributerDef
diff --git a/src/net/CVS/Entries b/src/net/CVS/Entries
new file mode 100644
index 0000000..04c4303
--- /dev/null
+++ b/src/net/CVS/Entries
@@ -0,0 +1 @@
+D/sf////
diff --git a/src/net/CVS/Repository b/src/net/CVS/Repository
new file mode 100644
index 0000000..e9caa58
--- /dev/null
+++ b/src/net/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net
diff --git a/src/net/CVS/Root b/src/net/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/CVS/Entries b/src/net/sf/CVS/Entries
new file mode 100644
index 0000000..f19339c
--- /dev/null
+++ b/src/net/sf/CVS/Entries
@@ -0,0 +1 @@
+D/antcontrib////
diff --git a/src/net/sf/CVS/Repository b/src/net/sf/CVS/Repository
new file mode 100644
index 0000000..3cf3722
--- /dev/null
+++ b/src/net/sf/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf
diff --git a/src/net/sf/CVS/Root b/src/net/sf/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/CVS/Entries b/src/net/sf/antcontrib/CVS/Entries
new file mode 100644
index 0000000..18d9c65
--- /dev/null
+++ b/src/net/sf/antcontrib/CVS/Entries
@@ -0,0 +1 @@
+D/cpptasks////
diff --git a/src/net/sf/antcontrib/CVS/Repository b/src/net/sf/antcontrib/CVS/Repository
new file mode 100644
index 0000000..b7c2595
--- /dev/null
+++ b/src/net/sf/antcontrib/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib
diff --git a/src/net/sf/antcontrib/CVS/Root b/src/net/sf/antcontrib/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/AboutCCTask.java b/src/net/sf/antcontrib/cpptasks/AboutCCTask.java
new file mode 100644
index 0000000..4f17111
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/AboutCCTask.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+/**
+ * The equivalent of a Help About
+ * run "java -jar cpptasks.jar" to read
+ *
+ * @author Curt Arnold
+ */
+public class AboutCCTask {
+ /**
+ * display identification message and exit
+ *
+ * @param args ignored
+ */
+ public static void main(String args[]) {
+ System.out.println("CCTask: Compile and link task for Apache Ant 1.5 or later\n");
+ System.out.println("Copyright (c) 2002-2004, The Ant-Contrib project.\n");
+ System.out.println("http://sf.net/projects/ant-contrib\n");
+ System.out.println("Licensed under the Apache Software License 2.0");
+ System.out.println("available at http://www.apache.org/licenses/LICENSE-2.0\n");
+ System.out.println("This software is not a product of the");
+ System.out.println("of the Apache Software Foundation and no");
+ System.out.println("endorsement or promotion is implied.\n");
+ System.out.println("THIS SOFTWARE IS PROVIDED 'AS-IS', See");
+ System.out.println("http://www.apache.org/LICENSE for additional");
+ System.out.println("disclaimers.\n");
+ System.out.println("To use:");
+ System.out.println("\tPlace cpptasks.jar into lib directory of Ant 1.5 or later.");
+ System.out.println("\tAdd <taskdef resource=\"cpptasks.tasks\"/> and");
+ System.out.println("\t\t<typedef resource=\"cpptasks.types\"/> to build.xml");
+ System.out.println("Add <cc/>, <compiler/>; and <linker/> elements.");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ArchEnum.java b/src/net/sf/antcontrib/cpptasks/ArchEnum.java
new file mode 100644
index 0000000..0f36405
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ArchEnum.java
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Enumeration of cpu architecture types.
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class ArchEnum
+ extends EnumeratedAttribute {
+ /**
+ * Constructor.
+ *
+ * Set by default to "pentium3"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public ArchEnum() {
+ setValue("pentium3");
+ }
+
+ /**
+ * Gets list of acceptable values.
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ /**
+ * Class initializer.
+ */
+ return new String[] {
+ "i386",
+ "i486",
+ "i586",
+ "i686",
+ "pentium",
+ "pentium-mmx",
+ "pentiumpro",
+ "pentium2",
+ "pentium3",
+ "pentium4",
+ "k6",
+ "k6-2",
+ "k6-3",
+ "athlon",
+ "athlon-tbird",
+ "athlon-4",
+ "athlon-xp",
+ "athlon-mp",
+ "winchip-c6",
+ "winchip2",
+ "c3"};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CCTask.java b/src/net/sf/antcontrib/cpptasks/CCTask.java
new file mode 100644
index 0000000..d4b0db2
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CCTask.java
@@ -0,0 +1,1409 @@
+/*
+ *
+ * Copyright 2001-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.*;
+
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.LinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.ide.ProjectDef;
+import net.sf.antcontrib.cpptasks.types.CompilerArgument;
+import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
+import net.sf.antcontrib.cpptasks.types.DefineSet;
+import net.sf.antcontrib.cpptasks.types.IncludePath;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LinkerArgument;
+import net.sf.antcontrib.cpptasks.types.SystemIncludePath;
+import net.sf.antcontrib.cpptasks.types.SystemLibrarySet;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Environment;
+/**
+ * Compile and link task.
+ *
+ * <p>
+ * This task can compile various source languages and produce executables,
+ * shared libraries (aka DLL's) and static libraries. Compiler adaptors are
+ * currently available for several C/C++ compilers, FORTRAN, MIDL and Windows
+ * Resource files.
+ * </p>
+ *
+ *
+ * <p>
+ * Copyright (c) 2001-2005, The Ant-Contrib project.
+ * </p>
+ *
+ * <p>
+ * Licensed under the Apache Software License 2.0,
+ * http://www.apache.org/licenses/LICENSE-2.0.
+ * </p>
+ *
+ * <p>
+ * For use with Apache Ant 1.5 or later. This software is not a product of the
+ * of the Apache Software Foundation and no endorsement is implied.
+ * </p>
+ *
+ * <p>
+ * THIS SOFTWARE IS PROVIDED 'AS-IS', See http://www.apache.org/licenses/LICENSE-2.0 for
+ * additional disclaimers.
+ * </p>
+ *
+ * To use:
+ * <ol>
+ * <li>Place cpptasks.jar into the lib directory of Ant 1.5 or later.</li>
+ * <li>Add &lt;taskdef resource="cpptasks.tasks"/&gt; and &lt;typedef
+ * resource="cpptasks.types"/&gt; to build.xml.</li>
+ * <li>Add &lt;cc/&gt;, &lt;compiler/&gt; and &lt;linker/&gt elements to
+ * project.</li>
+ * <li>Set path and environment variables to be able to run compiler from
+ * command line.</li>
+ * <li>Build project.</li>
+ * </ol>
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public class CCTask extends Task {
+ private static class SystemLibraryCollector implements FileVisitor {
+ private Hashtable libraries;
+ private Linker linker;
+ public SystemLibraryCollector(Linker linker, Hashtable libraries) {
+ this.linker = linker;
+ this.libraries = libraries;
+ }
+ public void visit(File basedir, String filename) {
+ if (linker.bid(filename) > 0) {
+ File libfile = new File(basedir, filename);
+ String key = linker.getLibraryKey(libfile);
+ libraries.put(key, libfile);
+ }
+ }
+ }
+
+ private static class ProjectFileCollector implements FileVisitor {
+ private final List files;
+ /**
+ * Creates a new ProjectFileCollector.
+ * @param files vector for collected files.
+ */
+ public ProjectFileCollector(List files) {
+ this.files = files;
+ }
+ /**
+ * Called for each file to be considered for collection.
+ * @param parentDir parent directory
+ * @param filename filename within directory
+ */
+ public void visit(File parentDir, String filename) {
+ files.add(new File(parentDir, filename));
+ }
+ }
+
+ private static final ProcessorConfiguration[] EMPTY_CONFIG_ARRAY = new ProcessorConfiguration[0];
+ /**
+ * Builds a Hashtable to targets needing to be rebuilt keyed by compiler
+ * configuration
+ */
+ public static Hashtable getTargetsToBuildByConfiguration(Hashtable targets) {
+ Hashtable targetsByConfig = new Hashtable();
+ Enumeration targetEnum = targets.elements();
+ while (targetEnum.hasMoreElements()) {
+ TargetInfo target = (TargetInfo) targetEnum.nextElement();
+ if (target.getRebuild()) {
+ Vector targetsForSameConfig = (Vector) targetsByConfig
+ .get(target.getConfiguration());
+ if (targetsForSameConfig != null) {
+ targetsForSameConfig.addElement(target);
+ } else {
+ targetsForSameConfig = new Vector();
+ targetsForSameConfig.addElement(target);
+ targetsByConfig.put(target.getConfiguration(),
+ targetsForSameConfig);
+ }
+ }
+ }
+ return targetsByConfig;
+ }
+ /** The compiler definitions. */
+ private Vector _compilers = new Vector();
+ /** The output file type. */
+ // private LinkType _linkType = LinkType.EXECUTABLE;
+ /** The library sets. */
+ private Vector _libsets = new Vector();
+ /** The linker definitions. */
+ private Vector _linkers = new Vector();
+ /** The object directory. */
+ private File _objDir;
+ /** The output file. */
+ private File _outfile;
+ /** The linker definitions. */
+ private final Vector targetPlatforms = new Vector();
+ /** The distributer definitions. */
+ private Vector distributers = new Vector();
+ private final Vector versionInfos = new Vector();
+ private final Vector projects = new Vector();
+ private boolean projectsOnly = false;
+
+
+ /**
+ * If true, stop build on compile failure.
+ */
+ protected boolean failOnError = true;
+
+ /**
+ * Content that appears in <cc>and also in <compiler>are maintained by a
+ * captive CompilerDef instance
+ */
+ private final CompilerDef compilerDef = new CompilerDef();
+ /** The OS390 dataset to build to object to */
+ private String dataset;
+ /**
+ *
+ * Depth of dependency checking
+ *
+ * Values < 0 indicate full dependency checking Values >= 0 indicate
+ * partial dependency checking and for superficial compilation checks. Will
+ * throw BuildException before attempting link
+ */
+ private int dependencyDepth = -1;
+ /**
+ * Content that appears in <cc>and also in <linker>are maintained by a
+ * captive CompilerDef instance
+ */
+ private final LinkerDef linkerDef = new LinkerDef();
+ /**
+ * contains the subsystem, output type and
+ *
+ */
+ private final LinkType linkType = new LinkType();
+ /**
+ * The property name which will be set with the physical filename of the
+ * file that is generated by the linker
+ */
+ private String outputFileProperty;
+ /**
+ * if relentless = true, compilations should attempt to compile as many
+ * files as possible before throwing a BuildException
+ */
+ private boolean relentless;
+ public CCTask() {
+ }
+ /**
+ * Adds a compiler definition or reference.
+ *
+ * @param compiler
+ * compiler
+ * @throws NullPointerException
+ * if compiler is null
+ */
+ public void addConfiguredCompiler(CompilerDef compiler) {
+ if (compiler == null) {
+ throw new NullPointerException("compiler");
+ }
+ compiler.setProject(getProject());
+ _compilers.addElement(compiler);
+ }
+ /**
+ * Adds a compiler command-line arg. Argument will be inherited by all
+ * nested compiler elements that do not have inherit="false".
+ *
+ */
+ public void addConfiguredCompilerArg(CompilerArgument arg) {
+ compilerDef.addConfiguredCompilerArg(arg);
+ }
+ /**
+ * Adds a defineset. Will be inherited by all compiler elements that do not
+ * have inherit="false".
+ *
+ * @param defs
+ * Define set
+ */
+ public void addConfiguredDefineset(DefineSet defs) {
+ compilerDef.addConfiguredDefineset(defs);
+ }
+ /**
+ * Adds a linker definition. The first linker that is not disqualified by
+ * its "if" and "unless" attributes will perform the link. If no child
+ * linker element is active, the linker implied by the cc elements name or
+ * classname attribute will be used.
+ *
+ * @param linker
+ * linker
+ * @throws NullPointerException
+ * if linker is null
+ */
+ public void addConfiguredLinker(LinkerDef linker) {
+ if (linker == null) {
+ throw new NullPointerException("linker");
+ }
+ linker.setProject(getProject());
+ _linkers.addElement(linker);
+ }
+ /**
+ * Adds a linker command-line arg. Argument will be inherited by all nested
+ * linker elements that do not have inherit="false".
+ */
+ public void addConfiguredLinkerArg(LinkerArgument arg) {
+ linkerDef.addConfiguredLinkerArg(arg);
+ }
+ /**
+ * Add an environment variable to the launched process.
+ */
+ public void addEnv(Environment.Variable var) {
+ compilerDef.addEnv(var);
+ linkerDef.addEnv(var);
+ }
+ /**
+ * Adds a source file set.
+ *
+ * Files in these filesets will be auctioned to the available compiler
+ * configurations, with the default compiler implied by the cc element
+ * bidding last. If no compiler is interested in the file, it will be
+ * passed to the linker.
+ *
+ * To have a file be processed by a particular compiler configuration, add
+ * a fileset to the corresponding compiler element.
+ */
+ public void addFileset(ConditionalFileSet srcSet) {
+ compilerDef.addFileset(srcSet);
+ }
+ /**
+ * Adds a library set.
+ *
+ * Library sets will be inherited by all linker elements that do not have
+ * inherit="false".
+ *
+ * @param libset
+ * library set
+ * @throws NullPointerException
+ * if libset is null.
+ */
+ public void addLibset(LibrarySet libset) {
+ if (libset == null) {
+ throw new NullPointerException("libset");
+ }
+ linkerDef.addLibset(libset);
+ }
+ /**
+ * Adds a system library set. Timestamps and locations of system library
+ * sets are not used in dependency analysis.
+ *
+ * Essential libraries (such as C Runtime libraries) should not be
+ * specified since the task will attempt to identify the correct libraries
+ * based on the multithread, debug and runtime attributes.
+ *
+ * System library sets will be inherited by all linker elements that do not
+ * have inherit="false".
+ *
+ * @param libset
+ * library set
+ * @throws NullPointerException
+ * if libset is null.
+ */
+ public void addSyslibset(SystemLibrarySet libset) {
+ if (libset == null) {
+ throw new NullPointerException("libset");
+ }
+ linkerDef.addSyslibset(libset);
+ }
+ /**
+ * Specifies the generation of IDE project file. Experimental.
+ * @param projectDef project file generation specification
+ */
+ public void addProject(final ProjectDef projectDef) {
+ if (projectDef == null) {
+ throw new NullPointerException("projectDef");
+ }
+ projects.addElement(projectDef);
+ }
+ public void setProjectsOnly(final boolean value) {
+ projectsOnly = value;
+ }
+ /**
+ * Checks all targets that are not forced to be rebuilt or are missing
+ * object files to be checked for modified include files
+ *
+ * @returns total number of targets to be rebuilt
+ *
+ */
+ protected int checkForChangedIncludeFiles(Hashtable targets) {
+ int potentialTargets = 0;
+ int definiteTargets = 0;
+ Enumeration targetEnum = targets.elements();
+ while (targetEnum.hasMoreElements()) {
+ TargetInfo target = (TargetInfo) targetEnum.nextElement();
+ if (!target.getRebuild()) {
+ potentialTargets++;
+ } else {
+ definiteTargets++;
+ }
+ }
+ //
+ // If there were remaining targets that
+ // might be out of date
+ //
+ if (potentialTargets > 0) {
+ log("Starting dependency analysis for "
+ + Integer.toString(potentialTargets) + " files.");
+ DependencyTable dependencyTable = new DependencyTable(_objDir);
+ try {
+ dependencyTable.load();
+ } catch (Exception ex) {
+ log("Problem reading dependencies.xml: " + ex.toString());
+ }
+ targetEnum = targets.elements();
+ while (targetEnum.hasMoreElements()) {
+ TargetInfo target = (TargetInfo) targetEnum.nextElement();
+ if (!target.getRebuild()) {
+ if (dependencyTable.needsRebuild(this, target,
+ dependencyDepth)) {
+ target.mustRebuild();
+ }
+ }
+ }
+ dependencyTable.commit(this);
+ }
+ //
+ // count files being rebuilt now
+ //
+ int currentTargets = 0;
+ targetEnum = targets.elements();
+ while (targetEnum.hasMoreElements()) {
+ TargetInfo target = (TargetInfo) targetEnum.nextElement();
+ if (target.getRebuild()) {
+ currentTargets++;
+ }
+ }
+ if (potentialTargets > 0) {
+ log(Integer.toString(potentialTargets - currentTargets
+ + definiteTargets)
+ + " files are up to date.");
+ log(Integer.toString(currentTargets - definiteTargets)
+ + " files to be recompiled from dependency analysis.");
+ }
+ log(Integer.toString(currentTargets) + " total files to be compiled.");
+ return currentTargets;
+ }
+ protected LinkerConfiguration collectExplicitObjectFiles(
+ Vector objectFiles, Vector sysObjectFiles, VersionInfo versionInfo) {
+ //
+ // find the first eligible linker
+ //
+ //
+ ProcessorConfiguration linkerConfig = null;
+ LinkerDef selectedLinkerDef = null;
+ Linker selectedLinker = null;
+ Hashtable sysLibraries = new Hashtable();
+ TargetDef targetPlatform = getTargetPlatform();
+ FileVisitor objCollector = null;
+ FileVisitor sysLibraryCollector = null;
+ for (int i = 0; i < _linkers.size(); i++) {
+ LinkerDef currentLinkerDef = (LinkerDef) _linkers.elementAt(i);
+ if (currentLinkerDef.isActive()) {
+ selectedLinkerDef = currentLinkerDef;
+ selectedLinker = currentLinkerDef.getProcessor().getLinker(
+ linkType);
+ //
+ // skip the linker if it doesn't know how to
+ // produce the specified link type
+ if (selectedLinker != null) {
+ linkerConfig = currentLinkerDef.createConfiguration(this,
+ linkType, linkerDef, targetPlatform, versionInfo);
+ if (linkerConfig != null) {
+ //
+ // create collectors for object files
+ // and system libraries
+ objCollector = new ObjectFileCollector(selectedLinker,
+ objectFiles);
+ sysLibraryCollector = new SystemLibraryCollector(
+ selectedLinker, sysLibraries);
+ //
+ // if the <linker> has embedded <fileset>'s
+ // (such as linker specific libraries)
+ // add them as object files.
+ //
+ if (currentLinkerDef.hasFileSets()) {
+ currentLinkerDef.visitFiles(objCollector);
+ }
+ //
+ // user libraries are just a specialized form
+ // of an object fileset
+ selectedLinkerDef.visitUserLibraries(selectedLinker,
+ objCollector);
+ }
+ break;
+ }
+ }
+ }
+ if (linkerConfig == null) {
+ linkerConfig = linkerDef.createConfiguration(this, linkType, null, targetPlatform, versionInfo);
+ selectedLinker = (Linker) linkerDef.getProcessor().getLinker(
+ linkType);
+ objCollector = new ObjectFileCollector(selectedLinker, objectFiles);
+ sysLibraryCollector = new SystemLibraryCollector(selectedLinker,
+ sysLibraries);
+ }
+ //
+ // unless there was a <linker> element that
+ // explicitly did not inherit files from
+ // containing <cc> element
+ if (selectedLinkerDef == null || selectedLinkerDef.getInherit()) {
+ linkerDef.visitUserLibraries(selectedLinker, objCollector);
+ linkerDef.visitSystemLibraries(selectedLinker, sysLibraryCollector);
+ }
+ //
+ // if there was a <syslibset> in a nested <linker>
+ // evaluate it last so it takes priority over
+ // identically named libs from <cc> element
+ //
+ if (selectedLinkerDef != null) {
+ //
+ // add any system libraries to the hashtable
+ // done in reverse order so the earliest
+ // on the classpath takes priority
+ selectedLinkerDef.visitSystemLibraries(selectedLinker,
+ sysLibraryCollector);
+ }
+ //
+ // copy over any system libraries to the
+ // object files vector
+ //
+ Enumeration sysLibEnum = sysLibraries.elements();
+ while (sysLibEnum.hasMoreElements()) {
+ sysObjectFiles.addElement(sysLibEnum.nextElement());
+ }
+ return (LinkerConfiguration) linkerConfig;
+ }
+ /**
+ * Adds an include path.
+ *
+ * Include paths will be inherited by nested compiler elements that do not
+ * have inherit="false".
+ */
+ public IncludePath createIncludePath() {
+ return compilerDef.createIncludePath();
+ }
+ /**
+ * Specifies precompilation prototype file and exclusions. Inherited by all
+ * compilers that do not have inherit="false".
+ *
+ */
+ public PrecompileDef createPrecompile() throws BuildException {
+ return compilerDef.createPrecompile();
+ }
+ /**
+ * Adds a system include path. Locations and timestamps of files located
+ * using the system include paths are not used in dependency analysis.
+ *
+ *
+ * Standard include locations should not be specified. The compiler
+ * adapters should recognized the settings from the appropriate environment
+ * variables or configuration files.
+ *
+ * System include paths will be inherited by nested compiler elements that
+ * do not have inherit="false".
+ */
+ public SystemIncludePath createSysIncludePath() {
+ return compilerDef.createSysIncludePath();
+ }
+ /**
+ * Executes the task. Compiles the given files.
+ *
+ * @throws BuildException
+ * if someting goes wrong with the build
+ */
+ public void execute() throws BuildException {
+ //
+ // if link type allowed objdir to be defaulted
+ // provide it from outfile
+ if (_objDir == null) {
+ if(_outfile != null) {
+ _objDir = new File(_outfile.getParent());
+ } else {
+ _objDir = new File(".");
+ }
+ }
+
+ //
+ // if the object directory does not exist
+ //
+ if (!_objDir.exists()) {
+ throw new BuildException("Object directory does not exist");
+ }
+ TargetHistoryTable objHistory = new TargetHistoryTable(this, _objDir);
+
+ //
+ // get the first active version info
+ //
+ VersionInfo versionInfo = null;
+ Enumeration versionEnum = versionInfos.elements();
+ while (versionEnum.hasMoreElements()) {
+ versionInfo = (VersionInfo) versionEnum.nextElement();
+ versionInfo = versionInfo.merge();
+ if (versionInfo.isActive()) {
+ break;
+ } else {
+ versionInfo = null;
+ }
+ }
+
+
+ //
+ // determine the eventual linker configuration
+ // (may be null) and collect any explicit
+ // object files or libraries
+ Vector objectFiles = new Vector();
+ Vector sysObjectFiles = new Vector();
+ LinkerConfiguration linkerConfig = collectExplicitObjectFiles(
+ objectFiles, sysObjectFiles, versionInfo);
+
+
+ //
+ // Assemble hashtable of all files
+ // that we know how to compile (keyed by output file name)
+ //
+ Hashtable targets = getTargets(linkerConfig, objectFiles, versionInfo, _outfile);
+ TargetInfo linkTarget = null;
+ //
+ // if output file is not specified,
+ // then skip link step
+ //
+ if (_outfile != null) {
+ linkTarget = getLinkTarget(linkerConfig, objectFiles,
+ sysObjectFiles, targets, versionInfo);
+ }
+
+ if (projects.size() > 0) {
+ ArrayList files = new ArrayList();
+ ProjectFileCollector matcher = new ProjectFileCollector(files);
+ for (int i = 0; i < _compilers.size(); i++) {
+ CompilerDef currentCompilerDef = (CompilerDef) _compilers
+ .elementAt(i);
+ if (currentCompilerDef.isActive()) {
+ if (currentCompilerDef.hasFileSets()) {
+ currentCompilerDef.visitFiles(matcher);
+ }
+ }
+ }
+ compilerDef.visitFiles(matcher);
+
+
+ Enumeration iter = projects.elements();
+ while (iter.hasMoreElements()) {
+ ProjectDef projectDef = (ProjectDef) iter.nextElement();
+ if (projectDef.isActive()) {
+ projectDef.execute(this, files, targets, linkTarget);
+ }
+ }
+ }
+ if (projectsOnly) return;
+
+
+
+ //
+ // mark targets that don't have a history record or
+ // whose source last modification time is not
+ // the same as the history to be rebuilt
+ //
+ objHistory.markForRebuild(targets);
+ CCTaskProgressMonitor monitor = new CCTaskProgressMonitor(objHistory, versionInfo);
+ //
+ // check for changed include files
+ //
+ int rebuildCount = checkForChangedIncludeFiles(targets);
+ if (rebuildCount > 0) {
+ BuildException compileException = null;
+ //
+ // compile all targets with getRebuild() == true
+ //
+ Hashtable targetsByConfig = getTargetsToBuildByConfiguration(targets);
+ //
+ // build array containing Vectors with precompiled generation
+ // steps going first
+ //
+ Vector[] targetVectors = new Vector[targetsByConfig.size()];
+ int index = 0;
+ Enumeration targetVectorEnum = targetsByConfig.elements();
+ while (targetVectorEnum.hasMoreElements()) {
+ Vector targetsForConfig = (Vector) targetVectorEnum
+ .nextElement();
+ //
+ // get the configuration from the first entry
+ //
+ CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
+ .elementAt(0)).getConfiguration();
+ if (config.isPrecompileGeneration()) {
+ targetVectors[index++] = targetsForConfig;
+ }
+ }
+ targetVectorEnum = targetsByConfig.elements();
+ while (targetVectorEnum.hasMoreElements()) {
+ Vector targetsForConfig = (Vector) targetVectorEnum
+ .nextElement();
+ for (int i = 0; i < targetVectors.length; i++) {
+ if (targetVectors[i] == targetsForConfig) {
+ break;
+ }
+ if (targetVectors[i] == null) {
+ targetVectors[i] = targetsForConfig;
+ break;
+ }
+ }
+ }
+ for (int i = 0; i < targetVectors.length; i++) {
+ //
+ // get the targets for this configuration
+ //
+ Vector targetsForConfig = targetVectors[i];
+ //
+ // get the configuration from the first entry
+ //
+ CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
+ .elementAt(0)).getConfiguration();
+ //
+ // prepare the list of source files
+ //
+ String[] sourceFiles = new String[targetsForConfig.size()];
+ Enumeration targetsEnum = targetsForConfig.elements();
+ index = 0;
+ while (targetsEnum.hasMoreElements()) {
+ TargetInfo targetInfo = ((TargetInfo) targetsEnum
+ .nextElement());
+ sourceFiles[index++] = targetInfo.getSources()[0]
+ .toString();
+ }
+ try {
+ config.compile(this, _objDir, sourceFiles, relentless,
+ monitor);
+ } catch (BuildException ex) {
+ if (compileException == null) {
+ compileException = ex;
+ }
+ if (!relentless)
+ break;
+ }
+ }
+ //
+ // save the details of the object file compilation
+ // settings to disk for dependency analysis
+ //
+ try {
+ objHistory.commit();
+ } catch (IOException ex) {
+ this.log("Error writing history.xml: " + ex.toString());
+ }
+ //
+ // if we threw a compile exception and
+ // didn't throw it at the time because
+ // we were relentless then
+ // save the history and
+ // throw the exception
+ //
+ if (compileException != null) {
+ if (failOnError) {
+ throw compileException;
+ } else {
+ log(compileException.getMessage(), Project.MSG_ERR);
+ return;
+ }
+ }
+ }
+ //
+ // if the dependency tree was not fully
+ // evaluated, then throw an exception
+ // since we really didn't do what we
+ // should have done
+ //
+ //
+ if (dependencyDepth >= 0) {
+ throw new BuildException(
+ "All files at depth "
+ + Integer.toString(dependencyDepth)
+ + " from changes successfully compiled.\n"
+ + "Remove or change dependencyDepth to -1 to perform full compilation.");
+ }
+ //
+ // if no link target then
+ // commit the history for the object files
+ // and leave the task
+ if (linkTarget != null) {
+ //
+ // get the history for the link target (may be the same
+ // as the object history)
+ TargetHistoryTable linkHistory = getLinkHistory(objHistory);
+ //
+ // see if it needs to be rebuilt
+ //
+ linkHistory.markForRebuild(linkTarget);
+ //
+ // if it needs to be rebuilt, rebuild it
+ //
+ File output = linkTarget.getOutput();
+ if (linkTarget.getRebuild()) {
+ // FREEHEP
+// log("Starting link");
+ LinkerConfiguration linkConfig = (LinkerConfiguration) linkTarget
+ .getConfiguration();
+ log("Starting link ("+linkConfig.getIdentifier()+")");
+ if (failOnError) {
+ linkConfig.link(this, linkTarget);
+ } else {
+ try {
+ linkConfig.link(this, linkTarget);
+ } catch(BuildException ex) {
+ log(ex.getMessage(), Project.MSG_ERR);
+ return;
+ }
+ }
+ if (outputFileProperty != null)
+ getProject().setProperty(outputFileProperty,
+ output.getAbsolutePath());
+ linkHistory.update(linkTarget);
+ try {
+ linkHistory.commit();
+ } catch (IOException ex) {
+ log("Error writing link history.xml: " + ex.toString());
+ }
+ } else {
+ if (outputFileProperty != null)
+ getProject().setProperty(outputFileProperty,
+ output.getAbsolutePath());
+ }
+ }
+ }
+ /**
+ * Gets the dataset.
+ *
+ * @return Returns a String
+ */
+ public String getDataset() {
+ return dataset;
+ }
+ protected TargetHistoryTable getLinkHistory(TargetHistoryTable objHistory) {
+ File outputFileDir = new File(_outfile.getParent());
+ //
+ // if the output file is being produced in the link
+ // directory, then we can use the same history file
+ //
+ if (_objDir.equals(outputFileDir)) {
+ return objHistory;
+ }
+ return new TargetHistoryTable(this, outputFileDir);
+ }
+ protected TargetInfo getLinkTarget(LinkerConfiguration linkerConfig,
+ Vector objectFiles, Vector sysObjectFiles,
+ Hashtable compileTargets, VersionInfo versionInfo) {
+ //
+ // walk the compile phase targets and
+ // add those sources that have already been
+ // assigned to the linker or
+ // our output files the linker knows how to consume
+ // files the linker knows how to consume
+ //
+ Enumeration compileTargetsEnum = compileTargets.elements();
+ while (compileTargetsEnum.hasMoreElements()) {
+ TargetInfo compileTarget = (TargetInfo) compileTargetsEnum
+ .nextElement();
+ //
+ // output of compile tasks
+ //
+ int bid = linkerConfig.bid(compileTarget.getOutput().toString());
+ if (bid > 0) {
+ objectFiles.addElement(compileTarget.getOutput());
+ }
+ }
+ File[] objectFileArray = new File[objectFiles.size()];
+ objectFiles.copyInto(objectFileArray);
+ File[] sysObjectFileArray = new File[sysObjectFiles.size()];
+ sysObjectFiles.copyInto(sysObjectFileArray);
+ String baseName = _outfile.getName();
+ String[] fullNames = linkerConfig.getOutputFileNames(baseName, versionInfo);
+ File outputFile = new File(_outfile.getParent(), fullNames[0]);
+ return new TargetInfo(linkerConfig, objectFileArray,
+ sysObjectFileArray, outputFile, linkerConfig.getRebuild());
+ }
+ public File getObjdir() {
+ return _objDir;
+ }
+ public File getOutfile() {
+ return _outfile;
+ }
+
+ public TargetDef getTargetPlatform() {
+ return null;
+ }
+ /**
+ * This method collects a Hashtable, keyed by output file name, of
+ * TargetInfo's for every source file that is specified in the filesets of
+ * the <cc>and nested <compiler>elements. The TargetInfo's contain the
+ * appropriate compiler configurations for their possible compilation
+ *
+ */
+ private Hashtable getTargets(LinkerConfiguration linkerConfig,
+ Vector objectFiles, VersionInfo versionInfo, File outputFile) {
+ Hashtable targets = new Hashtable(1000);
+ TargetDef targetPlatform = getTargetPlatform();
+ //
+ // find active (specialized) compilers
+ //
+ Vector biddingProcessors = new Vector(_compilers.size());
+ for (int i = 0; i < _compilers.size(); i++) {
+ CompilerDef currentCompilerDef = (CompilerDef) _compilers
+ .elementAt(i);
+ if (currentCompilerDef.isActive()) {
+ ProcessorConfiguration config = currentCompilerDef
+ .createConfiguration(this, linkType, compilerDef,
+ targetPlatform, versionInfo);
+ //
+ // see if this processor had a precompile child element
+ //
+ PrecompileDef precompileDef = currentCompilerDef
+ .getActivePrecompile(compilerDef);
+ ProcessorConfiguration[] localConfigs = new ProcessorConfiguration[]{config};
+ //
+ // if it does then
+ //
+ if (precompileDef != null) {
+ File prototype = precompileDef.getPrototype();
+ //
+ // will throw exceptions if prototype doesn't exist, etc
+ //
+ if (!prototype.exists()) {
+ throw new BuildException("prototype ("
+ + prototype.toString() + ") does not exist.");
+ }
+ if (prototype.isDirectory()) {
+ throw new BuildException("prototype ("
+ + prototype.toString() + ") is a directory.");
+ }
+ String[] exceptFiles = precompileDef.getExceptFiles();
+ //
+ // create a precompile building and precompile using
+ // variants of the configuration
+ // or return null if compiler doesn't support
+ // precompilation
+ CompilerConfiguration[] configs = ((CompilerConfiguration) config)
+ .createPrecompileConfigurations(prototype,
+ exceptFiles);
+ if (configs != null && configs.length == 2) {
+ //
+ // visit the precompiled file to add it into the
+ // targets list (just like any other file if
+ // compiler doesn't support precompilation)
+ TargetMatcher matcher = new TargetMatcher(this,
+ _objDir,
+ new ProcessorConfiguration[]{configs[0]},
+ linkerConfig, objectFiles, targets, versionInfo);
+
+ matcher.visit(new File(prototype.getParent()),
+ prototype.getName());
+ //
+ // only the configuration that uses the
+ // precompiled header gets added to the bidding list
+ biddingProcessors.addElement(configs[1]);
+ localConfigs = new ProcessorConfiguration[2];
+ localConfigs[0] = configs[1];
+ localConfigs[1] = config;
+ }
+ }
+ //
+ // if the compiler has a fileset
+ // then allow it to add its files
+ // to the set of potential targets
+ if (currentCompilerDef.hasFileSets()) {
+ TargetMatcher matcher = new TargetMatcher(this, _objDir,
+ localConfigs, linkerConfig, objectFiles, targets,
+ versionInfo);
+ currentCompilerDef.visitFiles(matcher);
+ }
+ biddingProcessors.addElement(config);
+ }
+ }
+ //
+ // add fallback compiler at the end
+ //
+ ProcessorConfiguration config = compilerDef.createConfiguration(this,
+ linkType, null, targetPlatform, versionInfo);
+ biddingProcessors.addElement(config);
+ ProcessorConfiguration[] bidders = new ProcessorConfiguration[biddingProcessors
+ .size()];
+ biddingProcessors.copyInto(bidders);
+ //
+ // bid out the <fileset>'s in the cctask
+ //
+ TargetMatcher matcher = new TargetMatcher(this, _objDir, bidders,
+ linkerConfig, objectFiles, targets, versionInfo);
+ compilerDef.visitFiles(matcher);
+
+ if (outputFile != null && versionInfo != null) {
+ boolean isDebug = linkerConfig.isDebug();
+ try {
+ linkerConfig.getLinker().addVersionFiles(versionInfo, linkType,
+ outputFile,
+ isDebug,
+ _objDir, matcher);
+ } catch(IOException ex) {
+ throw new BuildException(ex);
+ }
+ }
+ return targets;
+ }
+ /**
+ * Sets the default compiler adapter. Use the "name" attribute when the
+ * compiler is a supported compiler.
+ *
+ * @param classname
+ * fully qualified classname which implements CompilerAdapter
+ */
+ public void setClassname(String classname) {
+ compilerDef.setClassname(classname);
+ linkerDef.setClassname(classname);
+ }
+ /**
+ * Sets the dataset for OS/390 builds.
+ *
+ * @param dataset
+ * The dataset to set
+ */
+ public void setDataset(String dataset) {
+ this.dataset = dataset;
+ }
+ /**
+ * Enables or disables generation of debug info.
+ */
+ public void setDebug(boolean debug) {
+ compilerDef.setDebug(debug);
+ linkerDef.setDebug(debug);
+ }
+
+ /**
+ * Gets debug state.
+ * @return true if building for debugging
+ */
+ public boolean getDebug() {
+ return compilerDef.getDebug(null, 0);
+ }
+
+ /**
+ * Deprecated.
+ *
+ * Controls the depth of the dependency evaluation. Used to do a quick
+ * check of changes before a full build.
+ *
+ * Any negative value which will perform full dependency checking. Positive
+ * values will truncate dependency checking. A value of 0 will cause only
+ * those files that changed to be recompiled, a value of 1 which cause
+ * files that changed or that explicitly include a file that changed to be
+ * recompiled.
+ *
+ * Any non-negative value will cause a BuildException to be thrown before
+ * attempting a link or completing the task.
+ *
+ */
+ public void setDependencyDepth(int depth) {
+ dependencyDepth = depth;
+ }
+ /**
+ * Enables generation of exception handling code
+ */
+ public void setExceptions(boolean exceptions) {
+ compilerDef.setExceptions(exceptions);
+ }
+ /**
+ * Enables run-time type information.
+ */
+ public void setRtti(boolean rtti) {
+ compilerDef.setRtti(rtti);
+ }
+ // public LinkType getLinkType() {
+ // return linkType;
+ // }
+ /**
+ * Enables or disables incremental linking.
+ *
+ * @param incremental
+ * new state
+ */
+ public void setIncremental(boolean incremental) {
+ linkerDef.setIncremental(incremental);
+ }
+ /**
+ * Set use of libtool.
+ *
+ * If set to true, the "libtool " will be prepended to the command line for
+ * compatible processors
+ *
+ * @param libtool
+ * If true, use libtool.
+ */
+ public void setLibtool(boolean libtool) {
+ compilerDef.setLibtool(libtool);
+ linkerDef.setLibtool(libtool);
+ }
+ /**
+ * Sets the output file type. Supported values "executable", "shared", and
+ * "static". Deprecated, specify outtype instead.
+ *
+ * @deprecated
+ */
+ public void setLink(OutputTypeEnum outputType) {
+ linkType.setOutputType(outputType);
+ }
+ /**
+ * Enables or disables generation of multithreaded code
+ *
+ * @param multi
+ * If true, generated code may be multithreaded.
+ */
+ public void setMultithreaded(boolean multi) {
+ compilerDef.setMultithreaded(multi);
+ }
+ //
+ // keep near duplicate comment at CompilerDef.setName in sync
+ //
+ /**
+ * Sets type of the default compiler and linker.
+ *
+ * <table width="100%" border="1"> <thead>Supported compilers </thead>
+ * <tr>
+ * <td>gcc (default)</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>c++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g77</td>
+ * <td>GNU FORTRAN compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msvc</td>
+ * <td>Microsoft Visual C++</td>
+ * </tr>
+ * <tr>
+ * <td>bcc</td>
+ * <td>Borland C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msrc</td>
+ * <td>Microsoft Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>brc</td>
+ * <td>Borland Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>df</td>
+ * <td>Compaq Visual Fortran Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>midl</td>
+ * <td>Microsoft MIDL Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>icl</td>
+ * <td>Intel C++ compiler for Windows (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecl</td>
+ * <td>Intel C++ compiler for Windows (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>icc</td>
+ * <td>Intel C++ compiler for Linux (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecc</td>
+ * <td>Intel C++ compiler for Linux (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>CC</td>
+ * <td>Sun ONE C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>aCC</td>
+ * <td>HP aC++ C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os390</td>
+ * <td>OS390 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os400</td>
+ * <td>Icc Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>sunc89</td>
+ * <td>Sun C89 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>xlC</td>
+ * <td>VisualAge C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>uic</td>
+ * <td>Qt user interface compiler (creates .h, .cpp and moc_*.cpp files).</td>
+ * </tr>
+ * <tr>
+ * <td>moc</td>
+ * <td>Qt meta-object compiler</td>
+ * </tr>
+ * <tr>
+ * <td>xpidl</td>
+ * <td>Mozilla xpidl compiler (creates .h and .xpt files).</td>
+ * </tr>
+ * <tr>
+ * <td>wcl</td>
+ * <td>OpenWatcom C/C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>wfl</td>
+ * <td>OpenWatcom FORTRAN compiler</td>
+ * </tr>
+ * </table>
+ *
+ */
+ public void setName(CompilerEnum name) {
+ compilerDef.setName(name);
+ Processor compiler = compilerDef.getProcessor();
+ Linker linker = compiler.getLinker(linkType);
+ linkerDef.setProcessor(linker);
+ }
+ /**
+ * Do not propagate old environment when new environment variables are
+ * specified.
+ */
+ public void setNewenvironment(boolean newenv) {
+ compilerDef.setNewenvironment(newenv);
+ linkerDef.setNewenvironment(newenv);
+ }
+ /**
+ * Sets the destination directory for object files.
+ *
+ * Generally this should be a property expression that evaluates to
+ * distinct debug and release object file directories.
+ *
+ * @param dir
+ * object directory
+ */
+ public void setObjdir(File dir) {
+ if (dir == null) {
+ throw new NullPointerException("dir");
+ }
+ _objDir = dir;
+ }
+ /**
+ * Sets the output file name. If not specified, the task will only compile
+ * files and not attempt to link. If an extension is not specified, the
+ * task may use a system appropriate extension and prefix, for example,
+ * outfile="example" may result in "libexample.so" being created.
+ *
+ * @param outfile
+ * output file name
+ */
+ public void setOutfile(File outfile) {
+ //
+ // if file name was empty, skip link step
+ //
+ if (outfile == null || outfile.toString().length() > 0) {
+ _outfile = outfile;
+ }
+ }
+ /**
+ * Specifies the name of a property to set with the physical filename that
+ * is produced by the linker
+ */
+ public void setOutputFileProperty(String outputFileProperty) {
+ this.outputFileProperty = outputFileProperty;
+ }
+ /**
+ * Sets the output file type. Supported values "executable", "shared", and
+ * "static".
+ */
+ public void setOuttype(OutputTypeEnum outputType) {
+ linkType.setOutputType(outputType);
+ }
+
+ /**
+ * Gets output type.
+ * @return output type
+ */
+ public String getOuttype() {
+ return linkType.getOutputType();
+ }
+
+ /**
+ * Sets the project.
+ */
+ public void setProject(Project project) {
+ super.setProject(project);
+ compilerDef.setProject(project);
+ linkerDef.setProject(project);
+ }
+ /**
+ * If set to true, all files will be rebuilt.
+ *
+ * @paran rebuildAll If true, all files will be rebuilt. If false, up to
+ * date files will not be rebuilt.
+ */
+ public void setRebuild(boolean rebuildAll) {
+ compilerDef.setRebuild(rebuildAll);
+ linkerDef.setRebuild(rebuildAll);
+ }
+ /**
+ * If set to true, compilation errors will not stop the task until all
+ * files have been attempted.
+ *
+ * @param relentless
+ * If true, don't stop on the first compilation error
+ *
+ */
+ public void setRelentless(boolean relentless) {
+ this.relentless = relentless;
+ }
+ /**
+ * Sets the type of runtime library, possible values "dynamic", "static".
+ */
+ public void setRuntime(RuntimeType rtlType) {
+ linkType.setStaticRuntime((rtlType.getIndex() == 1));
+ }
+ /**
+ * Sets the nature of the subsystem under which that the program will
+ * execute.
+ *
+ * <table width="100%" border="1"> <thead>Supported subsystems </thead>
+ * <tr>
+ * <td>gui</td>
+ * <td>Graphical User Interface</td>
+ * </tr>
+ * <tr>
+ * <td>console</td>
+ * <td>Command Line Console</td>
+ * </tr>
+ * <tr>
+ * <td>other</td>
+ * <td>Other</td>
+ * </tr>
+ * </table>
+ *
+ * @param subsystem
+ * subsystem
+ * @throws NullPointerException
+ * if subsystem is null
+ */
+ public void setSubsystem(SubsystemEnum subsystem) {
+ if (subsystem == null) {
+ throw new NullPointerException("subsystem");
+ }
+ linkType.setSubsystem(subsystem);
+ }
+
+ /**
+ * Gets subsystem name.
+ * @return Subsystem name
+ */
+ public String getSubsystem() {
+ return linkType.getSubsystem();
+ }
+
+ /**
+ * Enumerated attribute with the values "none", "severe", "default",
+ * "production", "diagnostic", and "failtask".
+ */
+ public void setWarnings(WarningLevelEnum level) {
+ compilerDef.setWarnings(level);
+ }
+
+ /**
+ * Indicates whether the build will continue
+ * even if there are compilation errors; defaults to true.
+ * @param fail if true halt the build on failure
+ */
+ public void setFailonerror(boolean fail) {
+ failOnError = fail;
+ }
+
+ /**
+ * Gets the failonerror flag.
+ * @return the failonerror flag
+ */
+ public boolean getFailonerror() {
+ return failOnError;
+ }
+ /**
+ * Adds a target definition or reference (Non-functional prototype).
+ *
+ * @param target
+ * target
+ * @throws NullPointerException
+ * if compiler is null
+ */
+ public void addConfiguredTarget(TargetDef target) {
+ if (target == null) {
+ throw new NullPointerException("target");
+ }
+ target.setProject(getProject());
+ targetPlatforms.addElement(target);
+ }
+ /**
+ * Adds a distributer definition or reference (Non-functional prototype).
+ *
+ * @param distributer
+ * distributer
+ * @throws NullPointerException
+ * if compiler is null
+ */
+ public void addConfiguredDistributer(DistributerDef distributer) {
+ if (distributer == null) {
+ throw new NullPointerException("distributer");
+ }
+ distributer.setProject(getProject());
+ distributers.addElement(distributer);
+ }
+ /**
+ * Sets optimization.
+ * @param optimization
+ */
+ public void setOptimize(OptimizationEnum optimization) {
+ compilerDef.setOptimize(optimization);
+ }
+
+ /**
+ * Adds desriptive version information to be included in the
+ * generated file. The first active version info block will
+ * be used.
+ */
+ public void addConfiguredVersioninfo(VersionInfo newVersionInfo) {
+ newVersionInfo.setProject(this.getProject());
+ versionInfos.addElement(newVersionInfo);
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CCTaskProgressMonitor.java b/src/net/sf/antcontrib/cpptasks/CCTaskProgressMonitor.java
new file mode 100644
index 0000000..317d6c3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CCTaskProgressMonitor.java
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.IOException;
+
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+public class CCTaskProgressMonitor implements ProgressMonitor {
+ private ProcessorConfiguration config;
+ private TargetHistoryTable history;
+ private VersionInfo versionInfo;
+ private long lastCommit = -1;
+ public CCTaskProgressMonitor(TargetHistoryTable history, VersionInfo versionInfo) {
+ this.history = history;
+ this.versionInfo = versionInfo;
+ }
+ public void finish(ProcessorConfiguration config, boolean normal) {
+ long current = System.currentTimeMillis();
+ if ((current - lastCommit) > 120000) {
+ try {
+ history.commit();
+ lastCommit = System.currentTimeMillis();
+ } catch (IOException ex) {
+ }
+ }
+ }
+ public void progress(String[] sources) {
+ history.update(config, sources, versionInfo);
+ long current = System.currentTimeMillis();
+ if ((current - lastCommit) > 120000) {
+ try {
+ history.commit();
+ lastCommit = current;
+ } catch (IOException ex) {
+ }
+ }
+ }
+ public void start(ProcessorConfiguration config) {
+ if (lastCommit < 0) {
+ lastCommit = System.currentTimeMillis();
+ }
+ this.config = config;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CPUEnum.java b/src/net/sf/antcontrib/cpptasks/CPUEnum.java
new file mode 100644
index 0000000..512ef37
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CPUEnum.java
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Enumeration of cpu types.
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class CPUEnum
+ extends EnumeratedAttribute {
+
+ /**
+ * Constructor.
+ *
+ * Set by default to "pentium3"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public CPUEnum() {
+ setValue("pentium3");
+ }
+
+ /**
+ * Gets list of acceptable values.
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[] {
+ "i386",
+ "i486",
+ "i586",
+ "i686",
+ "pentium",
+ "pentium-mmx",
+ "pentiumpro",
+ "pentium2",
+ "pentium3",
+ "pentium4",
+ "k6",
+ "k6-2",
+ "k6-3",
+ "athlon",
+ "athlon-tbird",
+ "athlon-4",
+ "athlon-xp",
+ "athlon-mp",
+ "winchip-c6",
+ "winchip2",
+ "c3" };
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CUtil.java b/src/net/sf/antcontrib/cpptasks/CUtil.java
new file mode 100644
index 0000000..48fd1d1
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CUtil.java
@@ -0,0 +1,487 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.Environment;
+/**
+ * Some utilities used by the CC and Link tasks.
+ *
+ * @author Adam Murdoch
+ */
+public class CUtil {
+ /**
+ * A class that splits a white-space, comma-separated list into a String
+ * array. Used for task attributes.
+ */
+ public static final class StringArrayBuilder {
+ private String[] _value;
+ public StringArrayBuilder(String value) {
+ // Split the defines up
+ StringTokenizer tokens = new StringTokenizer(value, ", ");
+ Vector vallist = new Vector();
+ while (tokens.hasMoreTokens()) {
+ String val = tokens.nextToken().trim();
+ if (val.length() == 0) {
+ continue;
+ }
+ vallist.addElement(val);
+ }
+ _value = new String[vallist.size()];
+ vallist.copyInto(_value);
+ }
+ public String[] getValue() {
+ return _value;
+ }
+ }
+ /**
+ * Adds the elements of the array to the given vector
+ */
+ public static void addAll(Vector dest, Object[] src) {
+ if (src == null) {
+ return;
+ }
+ for (int i = 0; i < src.length; i++) {
+ dest.addElement(src[i]);
+ }
+ }
+ /**
+ * Checks a array of names for non existent or non directory entries and
+ * nulls them out.
+ *
+ * @return Count of non-null elements
+ */
+ public static int checkDirectoryArray(String[] names) {
+ int count = 0;
+ for (int i = 0; i < names.length; i++) {
+ if (names[i] != null) {
+ File dir = new File(names[i]);
+ if (dir.exists() && dir.isDirectory()) {
+ count++;
+ } else {
+ names[i] = null;
+ }
+ }
+ }
+ return count;
+ }
+ /**
+ * Extracts the basename of a file, removing the extension, if present
+ */
+ public static String getBasename(File file) {
+ String path = file.getPath();
+ // Remove the extension
+ String basename = file.getName();
+ int pos = basename.lastIndexOf('.');
+ if (pos != -1) {
+ basename = basename.substring(0, pos);
+ }
+ return basename;
+ }
+ /**
+ * Gets the parent directory for the executable file name using the current
+ * directory and system executable path
+ *
+ * @param exeName
+ * Name of executable such as "cl.exe"
+ * @return parent directory or null if not located
+ */
+ public static File getExecutableLocation(String exeName) {
+ //
+ // must add current working directory to the
+ // from of the path from the "path" environment variable
+ File currentDir = new File(System.getProperty("user.dir"));
+ if (new File(currentDir, exeName).exists()) {
+ return currentDir;
+ }
+ File[] envPath = CUtil.getPathFromEnvironment("PATH",
+ File.pathSeparator);
+ for (int i = 0; i < envPath.length; i++) {
+ if (new File(envPath[i], exeName).exists()) {
+ return envPath[i];
+ }
+ }
+ return null;
+ }
+ /**
+ * Extracts the parent of a file
+ */
+ public static String getParentPath(String path) {
+ int pos = path.lastIndexOf(File.separator);
+ if (pos <= 0) {
+ return null;
+ }
+ return path.substring(0, pos);
+ }
+ /**
+ * Returns an array of File for each existing directory in the specified
+ * environment variable
+ *
+ * @param envVariable
+ * environment variable name such as "LIB" or "INCLUDE"
+ * @param delim
+ * delimitor used to separate parts of the path, typically ";"
+ * or ":"
+ * @return array of File's for each part that is an existing directory
+ */
+ public static File[] getPathFromEnvironment(String envVariable, String delim) {
+ // OS/4000 does not support the env command.
+ if (System.getProperty("os.name").equals("OS/400"))
+ return new File[]{};
+ Vector osEnv = Execute.getProcEnvironment();
+ String match = envVariable.concat("=");
+ for (Enumeration e = osEnv.elements(); e.hasMoreElements();) {
+ String entry = ((String) e.nextElement()).trim();
+ if (entry.length() > match.length()) {
+ String entryFrag = entry.substring(0, match.length());
+ if (entryFrag.equalsIgnoreCase(match)) {
+ String path = entry.substring(match.length());
+ return parsePath(path, delim);
+ }
+ }
+ }
+ File[] noPath = new File[0];
+ return noPath;
+ }
+ /**
+ * Returns a relative path for the targetFile relative to the base
+ * directory.
+ *
+ * @param canonicalBase
+ * base directory as returned by File.getCanonicalPath()
+ * @param targetFile
+ * target file
+ * @return relative path of target file. Returns targetFile if there were
+ * no commonalities between the base and the target
+ *
+ * @author Curt Arnold
+ */
+ public static String getRelativePath(String base, File targetFile) {
+ try {
+ //
+ // remove trailing file separator
+ //
+ String canonicalBase = base;
+ if (base.charAt(base.length() - 1) == File.separatorChar) {
+ canonicalBase = base.substring(0, base.length() - 1);
+ }
+ //
+ // get canonical name of target and remove trailing separator
+ //
+ String canonicalTarget;
+ if (System.getProperty("os.name").equals("OS/400"))
+ canonicalTarget = targetFile.getPath();
+ else
+ canonicalTarget = targetFile.getCanonicalPath();
+ if (canonicalTarget.charAt(canonicalTarget.length() - 1) == File.separatorChar) {
+ canonicalTarget = canonicalTarget.substring(0, canonicalTarget
+ .length() - 1);
+ }
+ if (canonicalTarget.equals(canonicalBase)) {
+ return ".";
+ }
+ //
+ // see if the prefixes are the same
+ //
+ if (canonicalBase.substring(0, 2).equals("\\\\")) {
+ //
+ // UNC file name, if target file doesn't also start with same
+ // server name, don't go there
+ int endPrefix = canonicalBase.indexOf('\\', 2);
+ String prefix1 = canonicalBase.substring(0, endPrefix);
+ String prefix2 = canonicalTarget.substring(0, endPrefix);
+ if (!prefix1.equals(prefix2)) {
+ return canonicalTarget;
+ }
+ } else {
+ if (canonicalBase.substring(1, 3).equals(":\\")) {
+ int endPrefix = 2;
+ String prefix1 = canonicalBase.substring(0, endPrefix);
+ String prefix2 = canonicalTarget.substring(0, endPrefix);
+ if (!prefix1.equals(prefix2)) {
+ return canonicalTarget;
+ }
+ } else {
+ if (canonicalBase.charAt(0) == '/') {
+ if (canonicalTarget.charAt(0) != '/') {
+ return canonicalTarget;
+ }
+ }
+ }
+ }
+ char separator = File.separatorChar;
+ int lastSeparator = -1;
+ int minLength = canonicalBase.length();
+ if (canonicalTarget.length() < minLength) {
+ minLength = canonicalTarget.length();
+ }
+ int firstDifference = minLength + 1;
+ //
+ // walk to the shorter of the two paths
+ // finding the last separator they have in common
+ for (int i = 0; i < minLength; i++) {
+ if (canonicalTarget.charAt(i) == canonicalBase.charAt(i)) {
+ if (canonicalTarget.charAt(i) == separator) {
+ lastSeparator = i;
+ }
+ } else {
+ firstDifference = lastSeparator + 1;
+ break;
+ }
+ }
+ StringBuffer relativePath = new StringBuffer(50);
+ //
+ // walk from the first difference to the end of the base
+ // adding "../" for each separator encountered
+ //
+ if (canonicalBase.length() > firstDifference) {
+ relativePath.append("..");
+ for (int i = firstDifference; i < canonicalBase.length(); i++) {
+ if (canonicalBase.charAt(i) == separator) {
+ relativePath.append(separator);
+ relativePath.append("..");
+ }
+ }
+ }
+ if (canonicalTarget.length() > firstDifference) {
+ //
+ // append the rest of the target
+ //
+ //
+ if (relativePath.length() > 0) {
+ relativePath.append(separator);
+ }
+ relativePath.append(canonicalTarget.substring(firstDifference));
+ }
+ return relativePath.toString();
+ } catch (IOException ex) {
+ }
+ return targetFile.toString();
+ }
+ public static boolean isActive(Project p, String ifCond, String unlessCond)
+ throws BuildException {
+ if (ifCond != null) {
+ String ifValue = p.getProperty(ifCond);
+ if (ifValue == null) {
+ return false;
+ } else {
+ if (ifValue.equals("false") || ifValue.equals("no")) {
+ throw new BuildException("if condition \"" + ifCond
+ + "\" has suspicious value \"" + ifValue);
+ }
+ }
+ }
+ if (unlessCond != null) {
+ String unlessValue = p.getProperty(unlessCond);
+ if (unlessValue != null) {
+ if (unlessValue.equals("false") || unlessValue.equals("no")) {
+ throw new BuildException("unless condition \"" + unlessCond
+ + "\" has suspicious value \"" + unlessValue);
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Parse a string containing directories into an File[]
+ *
+ * @param path
+ * path string, for example ".;c:\something\include"
+ * @param delim
+ * delimiter, typically ; or :
+ */
+ public static File[] parsePath(String path, String delim) {
+ Vector libpaths = new Vector();
+ int delimPos = 0;
+ for (int startPos = 0; startPos < path.length(); startPos = delimPos
+ + delim.length()) {
+ delimPos = path.indexOf(delim, startPos);
+ if (delimPos < 0) {
+ delimPos = path.length();
+ }
+ //
+ // don't add an entry for zero-length paths
+ //
+ if (delimPos > startPos) {
+ String dirName = path.substring(startPos, delimPos);
+ File dir = new File(dirName);
+ if (dir.exists() && dir.isDirectory()) {
+ libpaths.addElement(dir);
+ }
+ }
+ }
+ File[] paths = new File[libpaths.size()];
+ libpaths.copyInto(paths);
+ return paths;
+ }
+ /**
+ * This method is exposed so test classes can overload and test the
+ * arguments without actually spawning the compiler
+ */
+ public static int runCommand(CCTask task, File workingDir,
+ String[] cmdline, boolean newEnvironment, Environment env)
+ throws BuildException {
+ try {
+ task.log(Commandline.toString(cmdline), Project.MSG_VERBOSE);
+ Execute exe = new Execute(new LogStreamHandler(task,
+ Project.MSG_INFO, Project.MSG_ERR));
+ if (System.getProperty("os.name").equals("OS/390"))
+ exe.setVMLauncher(false);
+ exe.setAntRun(task.getProject());
+ exe.setCommandline(cmdline);
+ exe.setWorkingDirectory(workingDir);
+ if (env != null) {
+ String[] environment = env.getVariables();
+ if (environment != null) {
+ for (int i = 0; i < environment.length; i++) {
+ task.log("Setting environment variable: "
+ + environment[i], Project.MSG_VERBOSE);
+ }
+ }
+ exe.setEnvironment(environment);
+ }
+ exe.setNewenvironment(newEnvironment);
+ return exe.execute();
+ } catch (java.io.IOException exc) {
+ throw new BuildException("Could not launch " + cmdline[0] + ": "
+ + exc, task.getLocation());
+ }
+ }
+ /**
+ * Compares the contents of 2 arrays for equaliy.
+ */
+ public static boolean sameList(Object[] a, Object[] b) {
+ if (a == null || b == null || a.length != b.length) {
+ return false;
+ }
+ for (int i = 0; i < a.length; i++) {
+ if (!a[i].equals(b[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Compares the contents of an array and a Vector for equality.
+ */
+ public static boolean sameList(Vector v, Object[] a) {
+ if (v == null || a == null || v.size() != a.length) {
+ return false;
+ }
+ for (int i = 0; i < a.length; i++) {
+ Object o = a[i];
+ if (!o.equals(v.elementAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Compares the contents of an array and a Vector for set equality. Assumes
+ * input array and vector are sets (i.e. no duplicate entries)
+ */
+ public static boolean sameSet(Object[] a, Vector b) {
+ if (a == null || b == null || a.length != b.size()) {
+ return false;
+ }
+ if (a.length == 0) {
+ return true;
+ }
+ // Convert the array into a set
+ Hashtable t = new Hashtable();
+ for (int i = 0; i < a.length; i++) {
+ t.put(a[i], a[i]);
+ }
+ for (int i = 0; i < b.size(); i++) {
+ Object o = b.elementAt(i);
+ if (t.remove(o) == null) {
+ return false;
+ }
+ }
+ return (t.size() == 0);
+ }
+ /**
+ * Converts a vector to a string array.
+ */
+ public static String[] toArray(Vector src) {
+ String[] retval = new String[src.size()];
+ src.copyInto(retval);
+ return retval;
+ }
+ /**
+ * Replaces any embedded quotes in the string so that the value can be
+ * placed in an attribute in an XML file
+ *
+ * @param attrValue
+ * value to be expressed
+ * @return equivalent attribute literal
+ *
+ */
+ public static String xmlAttribEncode(String attrValue) {
+ int quotePos = attrValue.indexOf('\"');
+ if (quotePos < 0) {
+ return attrValue;
+ }
+ int startPos = 0;
+ StringBuffer buf = new StringBuffer(attrValue.length() + 20);
+ while (quotePos >= 0) {
+ buf.append(attrValue.substring(startPos, quotePos));
+ buf.append("&quot;");
+ startPos = quotePos + 1;
+ quotePos = attrValue.indexOf('\"', startPos);
+ }
+ buf.append(attrValue.substring(startPos));
+ return buf.toString();
+ }
+
+ public final static int FILETIME_EPSILON = 500;
+ /**
+ * Determines whether time1 is earlier than time2
+ * to a degree that file system time truncation is not significant.
+ *
+ * @param time1 long first time value
+ * @param time2 long second time value
+ * @return boolean if first time value is earlier than second time value.
+ * If the values are within the rounding error of the file system return false.
+ */
+ public static boolean isSignificantlyBefore(long time1, long time2) {
+ return (time1 + FILETIME_EPSILON) < time2;
+ }
+ /**
+ * Determines whether time1 is later than time2
+ * to a degree that file system time truncation is not significant.
+ *
+ * @param time1 long first time value
+ * @param time2 long second time value
+ * @return boolean if first time value is later than second time value.
+ * If the values are within the rounding error of the file system return false.
+ */
+ public static boolean isSignificantlyAfter(long time1, long time2) {
+ return time1 > (time2 + FILETIME_EPSILON);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CVS/Entries b/src/net/sf/antcontrib/cpptasks/CVS/Entries
new file mode 100644
index 0000000..b739b7f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CVS/Entries
@@ -0,0 +1,60 @@
+/AboutCCTask.java/1.7/Sat Feb 28 19:04:02 2004//
+/ArchEnum.java/1.2/Fri Apr 23 21:07:56 2004//
+/CCTask.java/1.61/Fri Jan 21 20:18:58 2005//
+/CCTaskProgressMonitor.java/1.8/Tue May 11 03:50:10 2004//
+/CPUEnum.java/1.2/Wed Apr 28 17:23:27 2004//
+/CUtil.java/1.26/Wed May 5 02:50:46 2004//
+/CompilerDef.java/1.33/Thu Jan 20 05:44:22 2005//
+/CompilerEnum.java/1.18/Thu Jul 8 21:30:53 2004//
+/CompilerParam.java/1.2/Sat Feb 28 19:04:02 2004//
+/DependencyInfo.java/1.8/Sat Feb 28 19:04:02 2004//
+/DependencyTable.java/1.20/Fri Jul 9 02:22:37 2004//
+/DistributerDef.java/1.2/Wed Apr 28 17:23:27 2004//
+/DistributerMap.java/1.1/Fri Apr 23 20:15:45 2004//
+/DistributerProtocolEnum.java/1.1/Fri Apr 23 20:15:44 2004//
+/FileVisitor.java/1.6/Sat Feb 28 19:04:02 2004//
+/LinkerDef.java/1.35/Thu Jul 8 21:30:53 2004//
+/LinkerEnum.java/1.16/Thu Jul 8 21:30:53 2004//
+/LinkerParam.java/1.2/Sat Feb 28 19:04:02 2004//
+/OSFamilyEnum.java/1.1/Fri Apr 23 20:15:44 2004//
+/ObjectFileCollector.java/1.4/Sat Feb 28 19:04:02 2004/-ko/
+/OptimizationEnum.java/1.4/Sun May 29 03:51:52 2005//
+/OutputTypeEnum.java/1.6/Sat Feb 28 19:04:02 2004//
+/PrecompileDef.java/1.11/Fri Apr 23 20:15:44 2004//
+/PrecompileExceptDef.java/1.8/Sat Feb 28 19:04:02 2004//
+/ProcessorDef.java/1.26/Tue May 11 03:50:10 2004//
+/ProcessorEnumValue.java/1.5/Sat Feb 28 19:04:02 2004//
+/ProcessorParam.java/1.2/Sat Feb 28 19:04:02 2004//
+/RuntimeType.java/1.4/Sat Feb 28 19:04:02 2004/-ko/
+/SourceHistory.java/1.6/Sat Feb 28 19:04:02 2004//
+/SubsystemEnum.java/1.7/Sat Feb 28 19:04:02 2004//
+/TargetDef.java/1.2/Wed Apr 28 17:23:27 2004//
+/TargetHistory.java/1.8/Sat Feb 28 19:04:02 2004//
+/TargetHistoryTable.java/1.17/Tue May 11 03:50:10 2004//
+/TargetInfo.java/1.9/Sat Feb 28 19:04:02 2004//
+/TargetMatcher.java/1.12/Tue May 11 03:50:10 2004//
+/VersionInfo.java/1.3/Tue May 11 03:50:10 2004//
+/WarningLevelEnum.java/1.2/Tue May 11 03:50:10 2004//
+/antlib.xml/1.1/Sat May 1 01:40:39 2004//
+/package.html/1.1/Fri Apr 23 20:15:44 2004//
+D/apple////
+D/arm////
+D/borland////
+D/compaq////
+D/compiler////
+D/devstudio////
+D/gcc////
+D/hp////
+D/ibm////
+D/ide////
+D/intel////
+D/mozilla////
+D/openwatcom////
+D/os390////
+D/os400////
+D/parser////
+D/platforms////
+D/sun////
+D/ti////
+D/trolltech////
+D/types////
diff --git a/src/net/sf/antcontrib/cpptasks/CVS/Entries.Log b/src/net/sf/antcontrib/cpptasks/CVS/Entries.Log
new file mode 100644
index 0000000..a8df982
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CVS/Entries.Log
@@ -0,0 +1,4 @@
+A D/libtool////
+A D/os////
+R D/os////
+R D/libtool////
diff --git a/src/net/sf/antcontrib/cpptasks/CVS/Repository b/src/net/sf/antcontrib/cpptasks/CVS/Repository
new file mode 100644
index 0000000..e7635c7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks
diff --git a/src/net/sf/antcontrib/cpptasks/CVS/Root b/src/net/sf/antcontrib/cpptasks/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/CompilerDef.java b/src/net/sf/antcontrib/cpptasks/CompilerDef.java
new file mode 100644
index 0000000..1bbdabf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CompilerDef.java
@@ -0,0 +1,502 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.Compiler;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+import net.sf.antcontrib.cpptasks.types.CompilerArgument;
+import net.sf.antcontrib.cpptasks.types.ConditionalPath;
+import net.sf.antcontrib.cpptasks.types.DefineSet;
+import net.sf.antcontrib.cpptasks.types.IncludePath;
+import net.sf.antcontrib.cpptasks.types.SystemIncludePath;
+import net.sf.antcontrib.cpptasks.types.UndefineArgument;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+/**
+ * A compiler definition. compiler elements may be placed either as children of
+ * a cc element or the project element. A compiler element with an id attribute
+ * may be referenced from compiler elements with refid or extends attributes.
+ *
+ * @author Adam Murdoch
+ */
+public final class CompilerDef extends ProcessorDef {
+ /** The source file sets. */
+ private final Vector defineSets = new Vector();
+ private Boolean exceptions;
+ private Boolean rtti;
+ private final Vector includePaths = new Vector();
+ private Boolean multithreaded;
+ private final Vector precompileDefs = new Vector();
+ private final Vector sysIncludePaths = new Vector();
+ private OptimizationEnum optimization;
+ private int warnings = -1;
+ public CompilerDef() {
+ }
+ /**
+ * Adds a compiler command-line arg.
+ */
+ public void addConfiguredCompilerArg(CompilerArgument arg) {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ addConfiguredProcessorArg(arg);
+ }
+ /**
+ * Adds a compiler command-line arg.
+ */
+ public void addConfiguredCompilerParam(CompilerParam param) {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ addConfiguredProcessorParam(param);
+ }
+ /**
+ * Adds a defineset.
+ */
+ public void addConfiguredDefineset(DefineSet defs) {
+ if (defs == null) {
+ throw new NullPointerException("defs");
+ }
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ defineSets.addElement(defs);
+ }
+ /**
+ * Creates an include path.
+ */
+ public IncludePath createIncludePath() {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ IncludePath path = new IncludePath(p);
+ includePaths.addElement(path);
+ return path;
+ }
+ /**
+ * Specifies precompilation prototype file and exclusions.
+ *
+ */
+ public PrecompileDef createPrecompile() throws BuildException {
+ Project p = getProject();
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ PrecompileDef precomp = new PrecompileDef();
+ precomp.setProject(p);
+ precompileDefs.addElement(precomp);
+ return precomp;
+ }
+ /**
+ * Creates a system include path. Locations and timestamps of files located
+ * using the system include paths are not used in dependency analysis.
+ *
+ *
+ * Standard include locations should not be specified. The compiler
+ * adapters should recognized the settings from the appropriate environment
+ * variables or configuration files.
+ */
+ public SystemIncludePath createSysIncludePath() {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ SystemIncludePath path = new SystemIncludePath(p);
+ sysIncludePaths.addElement(path);
+ return path;
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ public UndefineArgument[] getActiveDefines() {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException(
+ "project must be set before this call");
+ }
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getActiveDefines();
+ }
+ Vector actives = new Vector();
+ for (int i = 0; i < defineSets.size(); i++) {
+ DefineSet currentSet = (DefineSet) defineSets.elementAt(i);
+ UndefineArgument[] defines = currentSet.getDefines();
+ for (int j = 0; j < defines.length; j++) {
+ if (defines[j].isActive(p)) {
+ actives.addElement(defines[j]);
+ }
+ }
+ }
+ UndefineArgument[] retval = new UndefineArgument[actives.size()];
+ actives.copyInto(retval);
+ return retval;
+ }
+ /**
+ * Returns the compiler-specific include path.
+ */
+ public String[] getActiveIncludePaths() {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getActiveIncludePaths();
+ }
+ return getActivePaths(includePaths);
+ }
+ private String[] getActivePaths(Vector paths) {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project not set");
+ }
+ Vector activePaths = new Vector(paths.size());
+ for (int i = 0; i < paths.size(); i++) {
+ ConditionalPath path = (ConditionalPath) paths.elementAt(i);
+ if (path.isActive(p)) {
+ String[] pathEntries = path.list();
+ for (int j = 0; j < pathEntries.length; j++) {
+ activePaths.addElement(pathEntries[j]);
+ }
+ }
+ }
+ String[] pathNames = new String[activePaths.size()];
+ activePaths.copyInto(pathNames);
+ return pathNames;
+ }
+ public PrecompileDef getActivePrecompile(CompilerDef ccElement) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getActivePrecompile(ccElement);
+ }
+ PrecompileDef current = null;
+ Enumeration iter = precompileDefs.elements();
+ while (iter.hasMoreElements()) {
+ current = (PrecompileDef) iter.nextElement();
+ if (current.isActive()) {
+ return current;
+ }
+ }
+ CompilerDef extendedDef = (CompilerDef) getExtends();
+ if (extendedDef != null) {
+ current = extendedDef.getActivePrecompile(null);
+ if (current != null) {
+ return current;
+ }
+ }
+ if (ccElement != null && getInherit()) {
+ return ccElement.getActivePrecompile(null);
+ }
+ return null;
+ }
+ public String[] getActiveSysIncludePaths() {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getActiveSysIncludePaths();
+ }
+ return getActivePaths(sysIncludePaths);
+ }
+ public final boolean getExceptions(CompilerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getExceptions(defaultProviders, index);
+ }
+ if (exceptions != null) {
+ return exceptions.booleanValue();
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getExceptions(defaultProviders,
+ index + 1);
+ }
+ }
+ return false;
+ }
+ public final Boolean getRtti(CompilerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getRtti(defaultProviders, index);
+ }
+ if (rtti != null) {
+ return rtti;
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getRtti(defaultProviders,
+ index + 1);
+ }
+ }
+ return null;
+ }
+ public final OptimizationEnum getOptimization(CompilerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getOptimization(defaultProviders, index);
+ }
+ if (optimization != null) {
+ return optimization;
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getOptimization(defaultProviders,
+ index + 1);
+ }
+ }
+ return null;
+ }
+
+ public boolean getMultithreaded(CompilerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getMultithreaded(defaultProviders, index);
+ }
+ if (multithreaded != null) {
+ return multithreaded.booleanValue();
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getMultithreaded(
+ defaultProviders, index + 1);
+ }
+ }
+ return true;
+ }
+ public Processor getProcessor() {
+ Processor processor = super.getProcessor();
+ if (processor == null) {
+ processor = GccCCompiler.getInstance();
+ }
+ if (getLibtool() && processor instanceof CommandLineCompiler) {
+ CommandLineCompiler compiler = (CommandLineCompiler) processor;
+ processor = compiler.getLibtoolCompiler();
+ }
+ return processor;
+ }
+ public int getWarnings(CompilerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((CompilerDef) getCheckedRef(CompilerDef.class,
+ "CompilerDef")).getWarnings(defaultProviders, index);
+ }
+ if (warnings == -1) {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getWarnings(defaultProviders,
+ index + 1);
+ }
+ }
+ return warnings;
+ }
+ /**
+ * Sets the default compiler adapter. Use the "name" attribute when the
+ * compiler is a supported compiler.
+ *
+ * @param classname
+ * fully qualified classname which implements CompilerAdapter
+ */
+ public void setClassname(String classname) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ super.setClassname(classname);
+ Processor proc = getProcessor();
+ if (!(proc instanceof Compiler)) {
+ throw new BuildException(classname + " does not implement Compiler");
+ }
+ }
+ /**
+ * Enables or disables exception support.
+ *
+ * @param exceptions
+ * if true, exceptions are supported.
+ *
+ */
+ public void setExceptions(boolean exceptions) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.exceptions = booleanValueOf(exceptions);
+ }
+
+ /**
+ * Enables or disables run-time type information.
+ *
+ * @param rtti
+ * if true, run-time type information is supported.
+ *
+ */
+ public void setRtti(boolean rtti) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.rtti = booleanValueOf(rtti);
+ }
+
+ /**
+ * Enables or disables generation of multithreaded code. Unless specified,
+ * multithreaded code generation is enabled.
+ *
+ * @param multi
+ * If true, generated code may be multithreaded.
+ */
+ public void setMultithreaded(boolean multithreaded) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.multithreaded = booleanValueOf(multithreaded);
+ }
+ /**
+ * Sets compiler type.
+ *
+ *
+ * <table width="100%" border="1"> <thead>Supported compilers </thead>
+ * <tr>
+ * <td>gcc (default)</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>c++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g77</td>
+ * <td>GNU Fortran compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msvc</td>
+ * <td>Microsoft Visual C++</td>
+ * </tr>
+ * <tr>
+ * <td>bcc</td>
+ * <td>Borland C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msrc</td>
+ * <td>Microsoft Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>brc</td>
+ * <td>Borland Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>df</td>
+ * <td>Compaq Visual Fortran Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>midl</td>
+ * <td>Microsoft MIDL Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>icl</td>
+ * <td>Intel C++ compiler for Windows (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecl</td>
+ * <td>Intel C++ compiler for Windows (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>icc</td>
+ * <td>Intel C++ compiler for Linux (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecc</td>
+ * <td>Intel C++ compiler for Linux (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>CC</td>
+ * <td>Sun ONE C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>aCC</td>
+ * <td>HP aC++ C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os390</td>
+ * <td>OS390 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os400</td>
+ * <td>Icc Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>sunc89</td>
+ * <td>Sun C89 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>xlC</td>
+ * <td>VisualAge C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>uic</td>
+ * <td>Qt user interface compiler</td>
+ * </tr>
+ * <tr>
+ * <td>moc</td>
+ * <td>Qt meta-object compiler</td>
+ * </tr>
+ * <tr>
+ * <td>wcl</td>
+ * <td>OpenWatcom C/C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>wfl</td>
+ * <td>OpenWatcom FORTRAN compiler</td>
+ * </tr>
+ * </table>
+ *
+ */
+ public void setName(CompilerEnum name) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ Compiler compiler = name.getCompiler();
+ setProcessor(compiler);
+ }
+ protected void setProcessor(Processor proc) throws BuildException {
+ try {
+ super.setProcessor((Compiler) proc);
+ } catch (ClassCastException ex) {
+ throw new BuildException(ex);
+ }
+ }
+ /**
+ * Enumerated attribute with the values "none", "severe", "default",
+ * "production", "diagnostic", and "failtask".
+ */
+ public void setWarnings(WarningLevelEnum level) {
+ warnings = level.getIndex();
+ }
+ /**
+ * Sets optimization level.
+ *
+ * @param value optimization level
+ */
+ public void setOptimize(OptimizationEnum value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.optimization = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CompilerEnum.java b/src/net/sf/antcontrib/cpptasks/CompilerEnum.java
new file mode 100644
index 0000000..105892e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CompilerEnum.java
@@ -0,0 +1,262 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import net.sf.antcontrib.cpptasks.arm.ADSCCompiler;
+import net.sf.antcontrib.cpptasks.borland.BorlandCCompiler;
+import net.sf.antcontrib.cpptasks.borland.BorlandResourceCompiler;
+import net.sf.antcontrib.cpptasks.compaq.CompaqVisualFortranCompiler;
+import net.sf.antcontrib.cpptasks.compiler.Compiler;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCCompiler;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioMIDLCompiler;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioResourceCompiler;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+import net.sf.antcontrib.cpptasks.hp.aCCCompiler;
+import net.sf.antcontrib.cpptasks.ibm.VisualAgeCCompiler;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux32CCompiler;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux64CCompiler;
+// FREEHEP
+import net.sf.antcontrib.cpptasks.intel.IntelLinux32Compiler;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux64Compiler;
+import net.sf.antcontrib.cpptasks.intel.IntelWin32CCompiler;
+import net.sf.antcontrib.cpptasks.intel.IntelWin64CCompiler;
+import net.sf.antcontrib.cpptasks.mozilla.XpidlCompiler;
+import net.sf.antcontrib.cpptasks.os390.OS390CCompiler;
+import net.sf.antcontrib.cpptasks.os400.IccCompiler;
+import net.sf.antcontrib.cpptasks.sun.C89CCompiler;
+import net.sf.antcontrib.cpptasks.sun.ForteCCCompiler;
+// FREEHEP
+import net.sf.antcontrib.cpptasks.sun.ForteCCompiler;
+import net.sf.antcontrib.cpptasks.sun.ForteF77Compiler;
+import net.sf.antcontrib.cpptasks.ti.ClxxCCompiler;
+import net.sf.antcontrib.cpptasks.trolltech.MetaObjectCompiler;
+import net.sf.antcontrib.cpptasks.trolltech.UserInterfaceCompiler;
+import net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomCCompiler;
+import net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomFortranCompiler;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * Enumeration of supported compilers
+ *
+ * <table width="100%" border="1"> <thead>Supported compilers </thead>
+ * <tr>
+ * <td>gcc (default)</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>c++</td>
+ * <td>GCC C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>g77</td>
+ * <td>GNU FORTRAN compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msvc</td>
+ * <td>Microsoft Visual C++</td>
+ * </tr>
+ * <tr>
+ * <td>bcc</td>
+ * <td>Borland C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>msrc</td>
+ * <td>Microsoft Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>brc</td>
+ * <td>Borland Resource Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>df</td>
+ * <td>Compaq Visual Fortran Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>midl</td>
+ * <td>Microsoft MIDL Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>icl</td>
+ * <td>Intel C++ compiler for Windows (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecl</td>
+ * <td>Intel C++ compiler for Windows (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>icc</td>
+ * <td>Intel C++ compiler for Linux (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecc</td>
+ * <td>Intel C++ compiler for Linux (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>CC</td>
+ * <td>Sun ONE C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>aCC</td>
+ * <td>HP aC++ C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os390</td>
+ * <td>OS390 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>os400</td>
+ * <td>Icc Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>sunc89</td>
+ * <td>Sun C89 C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>xlC</td>
+ * <td>VisualAge C Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>cl6x</td>
+ * <td>TI TMS320C6000 Optimizing Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>cl55</td>
+ * <td>TI TMS320C55x Optimizing C/C++ Compiler</td>
+ * </tr>
+ * <tr>
+ * <td>armcpp</td>
+ * <td>ARM 32-bit C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>armcc</td>
+ * <td>ARM 32-bit C compiler</td>
+ * </tr>
+ * <tr>
+ * <td>tcpp</td>
+ * <td>ARM 16-bit C++ compiler</td>
+ * </tr>
+ * <tr>
+ * <td>tcc</td>
+ * <td>ARM 16-bit C compiler</td>
+ * </tr>
+ * * <tr>
+ * <td>uic</td>
+ * <td>Qt user interface compiler</td>
+ * </tr>
+ * <tr>
+ * <td>moc</td>
+ * <td>Qt meta-object compiler</td>
+ * </tr>
+ * <tr>
+ * <td>xpidl</td>
+ * <td>Mozilla xpidl compiler (creates .h and .xpt files).</td>
+ * </tr>
+ * <tr>
+ * <td>wcl</td>
+ * <td>OpenWatcom C/C++ compiler (experimental)</td>
+ * </tr>
+ * <tr>
+ * <td>wfl</td>
+ * <td>OpenWatcom FORTRAN compiler (experimental)</td>
+ * </tr>
+ * </table>
+ *
+ * @author Curt Arnold
+ *
+ */
+public class CompilerEnum extends EnumeratedAttribute {
+ private final static ProcessorEnumValue[] compilers = new ProcessorEnumValue[]{
+ new ProcessorEnumValue("gcc", GccCCompiler.getInstance()),
+ new ProcessorEnumValue("g++", GccCCompiler.getGppInstance()),
+ new ProcessorEnumValue("c++", GccCCompiler.getCppInstance()),
+ new ProcessorEnumValue("g77", GccCCompiler.getG77Instance()),
+ new ProcessorEnumValue("msvc", DevStudioCCompiler.getInstance()),
+ new ProcessorEnumValue("bcc", BorlandCCompiler.getInstance()),
+ new ProcessorEnumValue("msrc", DevStudioResourceCompiler
+ .getInstance()),
+ new ProcessorEnumValue("brc", BorlandResourceCompiler.getInstance()),
+ new ProcessorEnumValue("df", CompaqVisualFortranCompiler
+ .getInstance()),
+ new ProcessorEnumValue("midl", DevStudioMIDLCompiler.getInstance()),
+ new ProcessorEnumValue("icl", IntelWin32CCompiler.getInstance()),
+ new ProcessorEnumValue("ecl", IntelWin64CCompiler.getInstance()),
+ new ProcessorEnumValue("icc", IntelLinux32CCompiler.getInstance()),
+ new ProcessorEnumValue("ecc", IntelLinux64CCompiler.getInstance()),
+// FREEHEP
+ new ProcessorEnumValue("icpc", IntelLinux32Compiler.getInstance()),
+ new ProcessorEnumValue("ecpc", IntelLinux64Compiler.getInstance()),
+ new ProcessorEnumValue("CC", ForteCCCompiler.getInstance()),
+// FREEHEP
+ new ProcessorEnumValue("suncc", ForteCCompiler.getInstance()),
+ new ProcessorEnumValue("sunf77", ForteF77Compiler.getInstance()),
+ new ProcessorEnumValue("aCC", aCCCompiler.getInstance()),
+ new ProcessorEnumValue("os390", OS390CCompiler.getInstance()),
+ new ProcessorEnumValue("os400", IccCompiler.getInstance()),
+ new ProcessorEnumValue("sunc89", C89CCompiler.getInstance()),
+ new ProcessorEnumValue("xlC", VisualAgeCCompiler.getInstance()),
+ new ProcessorEnumValue("cl6x", ClxxCCompiler.getCl6xInstance()),
+ new ProcessorEnumValue("cl55", ClxxCCompiler.getCl55Instance()),
+ new ProcessorEnumValue("armcc", ADSCCompiler.getArmCC()),
+ new ProcessorEnumValue("armcpp", ADSCCompiler.getArmCpp()),
+ new ProcessorEnumValue("tcc", ADSCCompiler.getThumbCC()),
+ new ProcessorEnumValue("tcpp", ADSCCompiler.getThumbCpp()),
+ // GCC Cross Compilers
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-gcc",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
+ .getInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-g++",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
+ .getGppInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-c++",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
+ .getCppInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-g77",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
+ .getG77Instance()),
+ // GCC Cross Compilers
+ new ProcessorEnumValue("gcc-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
+ .getInstance()),
+ new ProcessorEnumValue("g++-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
+ .getGppInstance()),
+ new ProcessorEnumValue("c++-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
+ .getCppInstance()),
+ new ProcessorEnumValue("g77-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
+ .getG77Instance()),
+ new ProcessorEnumValue("uic", UserInterfaceCompiler.getInstance()),
+ new ProcessorEnumValue("moc", MetaObjectCompiler.getInstance()),
+ new ProcessorEnumValue("xpidl", XpidlCompiler.getInstance()),
+ new ProcessorEnumValue("wcl", OpenWatcomCCompiler.getInstance()),
+ new ProcessorEnumValue("wfl", OpenWatcomFortranCompiler.getInstance()),
+ };
+ public Compiler getCompiler() {
+ return (Compiler) compilers[getIndex()].getProcessor();
+ }
+ public String[] getValues() {
+ return ProcessorEnumValue.getValues(compilers);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/CompilerParam.java b/src/net/sf/antcontrib/cpptasks/CompilerParam.java
new file mode 100644
index 0000000..8a15a77
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/CompilerParam.java
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+/*******************************************************************************
+ * Place class description here.
+ *
+ * @author inger
+ * @author <additional author>
+ *
+ * @since
+ ******************************************************************************/
+public class CompilerParam extends ProcessorParam {
+ public CompilerParam() {
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/DependencyInfo.java b/src/net/sf/antcontrib/cpptasks/DependencyInfo.java
new file mode 100644
index 0000000..d29826f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/DependencyInfo.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.util.Vector;
+/**
+ * @author Curt Arnold
+ */
+public final class DependencyInfo {
+ /**
+ * Last modified time of this file or anything that it depends on.
+ *
+ * Not persisted since almost any change could invalidate it. Initialized
+ * to long.MIN_VALUE on construction.
+ */
+ private long compositeLastModified;
+ private/* final */String includePathIdentifier;
+ private/* final */String[] includes;
+ private/* final */String source;
+ private/* final */long sourceLastModified;
+ private/* final */String[] sysIncludes;
+ public DependencyInfo(String includePathIdentifier, String source,
+ long sourceLastModified, Vector includes, Vector sysIncludes) {
+ if (source == null) {
+ throw new NullPointerException("source");
+ }
+ if (includePathIdentifier == null) {
+ throw new NullPointerException("includePathIdentifier");
+ }
+ this.source = source;
+ this.sourceLastModified = sourceLastModified;
+ this.includePathIdentifier = includePathIdentifier;
+ this.includes = new String[includes.size()];
+ if (includes.size() == 0) {
+ compositeLastModified = sourceLastModified;
+ } else {
+ includes.copyInto(this.includes);
+ compositeLastModified = Long.MIN_VALUE;
+ }
+ this.sysIncludes = new String[sysIncludes.size()];
+ sysIncludes.copyInto(this.sysIncludes);
+ }
+ /**
+ * Returns the latest modification date of the source or anything that it
+ * depends on.
+ *
+ * @returns the composite lastModified time, returns Long.MIN_VALUE if not
+ * set
+ */
+ public long getCompositeLastModified() {
+ return compositeLastModified;
+ }
+ public String getIncludePathIdentifier() {
+ return includePathIdentifier;
+ }
+ public String[] getIncludes() {
+ String[] includesClone = (String[]) includes.clone();
+ return includesClone;
+ }
+ public String getSource() {
+ return source;
+ }
+ public long getSourceLastModified() {
+ return sourceLastModified;
+ }
+ public String[] getSysIncludes() {
+ String[] sysIncludesClone = (String[]) sysIncludes.clone();
+ return sysIncludesClone;
+ }
+ public void setCompositeLastModified(long lastMod) {
+ compositeLastModified = lastMod;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/DependencyTable.java b/src/net/sf/antcontrib/cpptasks/DependencyTable.java
new file mode 100644
index 0000000..9e57eb1
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/DependencyTable.java
@@ -0,0 +1,612 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+/**
+ * @author Curt Arnold
+ */
+public final class DependencyTable {
+ /**
+ * This class handles populates the TargetHistory hashtable in response to
+ * SAX parse events
+ */
+ private class DependencyTableHandler extends DefaultHandler {
+ private File baseDir;
+ private final DependencyTable dependencyTable;
+ private String includePath;
+ private Vector includes;
+ private String source;
+ private long sourceLastModified;
+ private Vector sysIncludes;
+ /**
+ * Constructor
+ *
+ * @param history
+ * hashtable of TargetHistory keyed by output name
+ * @param outputFiles
+ * existing files in output directory
+ */
+ private DependencyTableHandler(DependencyTable dependencyTable,
+ File baseDir) {
+ this.dependencyTable = dependencyTable;
+ this.baseDir = baseDir;
+ includes = new Vector();
+ sysIncludes = new Vector();
+ source = null;
+ }
+ public void endElement(String namespaceURI, String localName,
+ String qName) throws SAXException {
+ //
+ // if </source> then
+ // create Dependency object and add to hashtable
+ // if corresponding source file exists and
+ // has the same timestamp
+ //
+ if (qName.equals("source")) {
+ if (source != null && includePath != null) {
+ File existingFile = new File(baseDir, source);
+ //
+ // if the file exists and the time stamp is right
+ // preserve the dependency info
+ if (existingFile.exists()) {
+ //
+ // would have expected exact matches
+ // but was seeing some unexpected difference by
+ // a few tens of milliseconds, as long
+ // as the times are within a second
+ long existingLastModified = existingFile.lastModified();
+ if (!CUtil.isSignificantlyAfter(existingLastModified, sourceLastModified) &&
+ !CUtil.isSignificantlyBefore(existingLastModified, sourceLastModified)) {
+ DependencyInfo dependInfo = new DependencyInfo(
+ includePath, source, sourceLastModified,
+ includes, sysIncludes);
+ dependencyTable.putDependencyInfo(source,
+ dependInfo);
+ }
+ }
+ source = null;
+ includes.setSize(0);
+ }
+ } else {
+ //
+ // this causes any <source> elements outside the
+ // scope of an <includePath> to be discarded
+ //
+ if (qName.equals("includePath")) {
+ includePath = null;
+ }
+ }
+ }
+ /**
+ * startElement handler
+ */
+ public void startElement(String namespaceURI, String localName,
+ String qName, Attributes atts) throws SAXException {
+ //
+ // if includes, then add relative file name to vector
+ //
+ if (qName.equals("include")) {
+ includes.addElement(atts.getValue("file"));
+ } else {
+ if (qName.equals("sysinclude")) {
+ sysIncludes.addElement(atts.getValue("file"));
+ } else {
+ //
+ // if source then
+ // capture source file name,
+ // modification time and reset includes vector
+ //
+ if (qName.equals("source")) {
+ source = atts.getValue("file");
+ sourceLastModified = Long.parseLong(atts
+ .getValue("lastModified"), 16);
+ includes.setSize(0);
+ sysIncludes.setSize(0);
+ } else {
+ if (qName.equals("includePath")) {
+ includePath = atts.getValue("signature");
+ }
+ }
+ }
+ }
+ }
+ }
+ public abstract class DependencyVisitor {
+ /**
+ * Previews all the children of this source file.
+ *
+ * May be called multiple times as DependencyInfo's for children are
+ * filled in.
+ *
+ * @return true to continue towards recursion into included files
+ */
+ public abstract boolean preview(DependencyInfo parent,
+ DependencyInfo[] children);
+ /**
+ * Called if the dependency depth exhausted the stack.
+ */
+ public abstract void stackExhausted();
+ /**
+ * Visits the dependency info.
+ *
+ * @returns true to continue towards recursion into included files
+ */
+ public abstract boolean visit(DependencyInfo dependInfo);
+ }
+ public class TimestampChecker extends DependencyVisitor {
+ private boolean noNeedToRebuild;
+ private long outputLastModified;
+ private boolean rebuildOnStackExhaustion;
+ public TimestampChecker(final long outputLastModified,
+ boolean rebuildOnStackExhaustion) {
+ this.outputLastModified = outputLastModified;
+ noNeedToRebuild = true;
+ this.rebuildOnStackExhaustion = rebuildOnStackExhaustion;
+ }
+ public boolean getMustRebuild() {
+ return !noNeedToRebuild;
+ }
+ public boolean preview(DependencyInfo parent, DependencyInfo[] children) {
+ int withCompositeTimes = 0;
+ long parentCompositeLastModified = parent.getSourceLastModified();
+ for (int i = 0; i < children.length; i++) {
+ if (children[i] != null) {
+ //
+ // expedient way to determine if a child forces us to
+ // rebuild
+ //
+ visit(children[i]);
+ long childCompositeLastModified = children[i]
+ .getCompositeLastModified();
+ if (childCompositeLastModified != Long.MIN_VALUE) {
+ withCompositeTimes++;
+ if (childCompositeLastModified > parentCompositeLastModified) {
+ parentCompositeLastModified = childCompositeLastModified;
+ }
+ }
+ }
+ }
+ if (withCompositeTimes == children.length) {
+ parent.setCompositeLastModified(parentCompositeLastModified);
+ }
+ //
+ // may have been changed by an earlier call to visit()
+ //
+ return noNeedToRebuild;
+ }
+ public void stackExhausted() {
+ if (rebuildOnStackExhaustion) {
+ noNeedToRebuild = false;
+ }
+ }
+ public boolean visit(DependencyInfo dependInfo) {
+ if (noNeedToRebuild) {
+ if (CUtil.isSignificantlyAfter(dependInfo.getSourceLastModified(), outputLastModified)
+ || CUtil.isSignificantlyAfter(dependInfo.getCompositeLastModified(), outputLastModified)) {
+ noNeedToRebuild = false;
+ }
+ }
+ //
+ // only need to process the children if
+ // it has not yet been determined whether
+ // we need to rebuild and the composite modified time
+ // has not been determined for this file
+ return noNeedToRebuild
+ && dependInfo.getCompositeLastModified() == Long.MIN_VALUE;
+ }
+ }
+ private/* final */File baseDir;
+ private String baseDirPath;
+ /**
+ * a hashtable of DependencyInfo[] keyed by output file name
+ */
+ private final Hashtable dependencies = new Hashtable();
+ /** The file the cache was loaded from. */
+ private/* final */File dependenciesFile;
+ /** Flag indicating whether the cache should be written back to file. */
+ private boolean dirty;
+ /**
+ * Creates a target history table from dependencies.xml in the prject
+ * directory, if it exists. Otherwise, initializes the dependencies empty.
+ *
+ * @param task
+ * task used for logging history load errors
+ * @param baseDir
+ * output directory for task
+ */
+ public DependencyTable(File baseDir) {
+ if (baseDir == null) {
+ throw new NullPointerException("baseDir");
+ }
+ this.baseDir = baseDir;
+ try {
+ baseDirPath = baseDir.getCanonicalPath();
+ } catch (IOException ex) {
+ baseDirPath = baseDir.toString();
+ }
+ dirty = false;
+ //
+ // load any existing dependencies from file
+ dependenciesFile = new File(baseDir, "dependencies.xml");
+ }
+ public void commit(CCTask task) {
+ //
+ // if not dirty, no need to update file
+ //
+ if (dirty) {
+ //
+ // walk through dependencies to get vector of include paths
+ // identifiers
+ //
+ Vector includePaths = getIncludePaths();
+ //
+ //
+ // write dependency file
+ //
+ try {
+ FileOutputStream outStream = new FileOutputStream(
+ dependenciesFile);
+ OutputStreamWriter streamWriter;
+ //
+ // Early VM's may not have UTF-8 support
+ // fallback to default code page which
+ // "should" be okay unless there are
+ // non ASCII file names
+ String encodingName = "UTF-8";
+ try {
+ streamWriter = new OutputStreamWriter(outStream, "UTF-8");
+ } catch (UnsupportedEncodingException ex) {
+ streamWriter = new OutputStreamWriter(outStream);
+ encodingName = streamWriter.getEncoding();
+ }
+ BufferedWriter writer = new BufferedWriter(streamWriter);
+ writer.write("<?xml version='1.0' encoding='");
+ writer.write(encodingName);
+ writer.write("'?>\n");
+ writer.write("<dependencies>\n");
+ StringBuffer buf = new StringBuffer();
+ Enumeration includePathEnum = includePaths.elements();
+ while (includePathEnum.hasMoreElements()) {
+ writeIncludePathDependencies((String) includePathEnum
+ .nextElement(), writer, buf);
+ }
+ writer.write("</dependencies>\n");
+ writer.close();
+ dirty = false;
+ } catch (IOException ex) {
+ task.log("Error writing " + dependenciesFile.toString() + ":"
+ + ex.toString());
+ }
+ }
+ }
+ /**
+ * Returns an enumerator of DependencyInfo's
+ */
+ public Enumeration elements() {
+ return dependencies.elements();
+ }
+ /**
+ * This method returns a DependencyInfo for the specific source file and
+ * include path identifier
+ *
+ */
+ public DependencyInfo getDependencyInfo(String sourceRelativeName,
+ String includePathIdentifier) {
+ DependencyInfo dependInfo = null;
+ DependencyInfo[] dependInfos = (DependencyInfo[]) dependencies
+ .get(sourceRelativeName);
+ if (dependInfos != null) {
+ for (int i = 0; i < dependInfos.length; i++) {
+ dependInfo = dependInfos[i];
+ if (dependInfo.getIncludePathIdentifier().equals(
+ includePathIdentifier)) {
+ return dependInfo;
+ }
+ }
+ }
+ return null;
+ }
+ private Vector getIncludePaths() {
+ Vector includePaths = new Vector();
+ DependencyInfo[] dependInfos;
+ Enumeration dependenciesEnum = dependencies.elements();
+ while (dependenciesEnum.hasMoreElements()) {
+ dependInfos = (DependencyInfo[]) dependenciesEnum.nextElement();
+ for (int i = 0; i < dependInfos.length; i++) {
+ DependencyInfo dependInfo = dependInfos[i];
+ boolean matchesExisting = false;
+ final String dependIncludePath = dependInfo
+ .getIncludePathIdentifier();
+ Enumeration includePathEnum = includePaths.elements();
+ while (includePathEnum.hasMoreElements()) {
+ if (dependIncludePath.equals(includePathEnum.nextElement())) {
+ matchesExisting = true;
+ break;
+ }
+ }
+ if (!matchesExisting) {
+ includePaths.addElement(dependIncludePath);
+ }
+ }
+ }
+ return includePaths;
+ }
+ public void load() throws IOException, ParserConfigurationException,
+ SAXException {
+ dependencies.clear();
+ if (dependenciesFile.exists()) {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ SAXParser parser = factory.newSAXParser();
+ parser.parse(dependenciesFile, new DependencyTableHandler(this,
+ baseDir));
+ dirty = false;
+ }
+ }
+ /**
+ * Determines if the specified target needs to be rebuilt.
+ *
+ * This task may result in substantial IO as files are parsed to determine
+ * their dependencies
+ */
+ public boolean needsRebuild(CCTask task, TargetInfo target,
+ int dependencyDepth) {
+ // look at any files where the compositeLastModified
+ // is not known, but the includes are known
+ //
+ boolean mustRebuild = false;
+ CompilerConfiguration compiler = (CompilerConfiguration) target
+ .getConfiguration();
+ String includePathIdentifier = compiler.getIncludePathIdentifier();
+ File[] sources = target.getSources();
+ DependencyInfo[] dependInfos = new DependencyInfo[sources.length];
+ long outputLastModified = target.getOutput().lastModified();
+ //
+ // try to solve problem using existing dependency info
+ // (not parsing any new files)
+ //
+ DependencyInfo[] stack = new DependencyInfo[50];
+ boolean rebuildOnStackExhaustion = true;
+ if (dependencyDepth >= 0) {
+ if (dependencyDepth < 50) {
+ stack = new DependencyInfo[dependencyDepth];
+ }
+ rebuildOnStackExhaustion = false;
+ }
+ TimestampChecker checker = new TimestampChecker(outputLastModified,
+ rebuildOnStackExhaustion);
+ for (int i = 0; i < sources.length && !mustRebuild; i++) {
+ File source = sources[i];
+ String relative = CUtil.getRelativePath(baseDirPath, source);
+ DependencyInfo dependInfo = getDependencyInfo(relative,
+ includePathIdentifier);
+ if (dependInfo == null) {
+ task.log("Parsing " + relative, Project.MSG_VERBOSE);
+ dependInfo = parseIncludes(task, compiler, source);
+ }
+ walkDependencies(task, dependInfo, compiler, stack, checker);
+ mustRebuild = checker.getMustRebuild();
+ }
+ return mustRebuild;
+ }
+ public DependencyInfo parseIncludes(CCTask task,
+ CompilerConfiguration compiler, File source) {
+ DependencyInfo dependInfo = compiler.parseIncludes(task, baseDir,
+ source);
+ String relativeSource = CUtil.getRelativePath(baseDirPath, source);
+ putDependencyInfo(relativeSource, dependInfo);
+ return dependInfo;
+ }
+ private void putDependencyInfo(String key, DependencyInfo dependInfo) {
+ //
+ // optimistic, add new value
+ //
+ DependencyInfo[] old = (DependencyInfo[]) dependencies.put(key,
+ new DependencyInfo[]{dependInfo});
+ dirty = true;
+ //
+ // something was already there
+ //
+ if (old != null) {
+ //
+ // see if the include path matches a previous entry
+ // if so replace it
+ String includePathIdentifier = dependInfo
+ .getIncludePathIdentifier();
+ for (int i = 0; i < old.length; i++) {
+ DependencyInfo oldDepend = old[i];
+ if (oldDepend.getIncludePathIdentifier().equals(
+ includePathIdentifier)) {
+ old[i] = dependInfo;
+ dependencies.put(key, old);
+ return;
+ }
+ }
+ //
+ // no match prepend the new entry to the array
+ // of dependencies for the file
+ DependencyInfo[] combined = new DependencyInfo[old.length + 1];
+ combined[0] = dependInfo;
+ for (int i = 0; i < old.length; i++) {
+ combined[i + 1] = old[i];
+ }
+ dependencies.put(key, combined);
+ }
+ return;
+ }
+ public void walkDependencies(CCTask task, DependencyInfo dependInfo,
+ CompilerConfiguration compiler, DependencyInfo[] stack,
+ DependencyVisitor visitor) throws BuildException {
+ //
+ // visit this node
+ // if visit returns true then
+ // visit the referenced include and sysInclude dependencies
+ //
+ if (visitor.visit(dependInfo)) {
+ //
+ // find first null entry on stack
+ //
+ int stackPosition = -1;
+ for (int i = 0; i < stack.length; i++) {
+ if (stack[i] == null) {
+ stackPosition = i;
+ stack[i] = dependInfo;
+ break;
+ } else {
+ //
+ // if we have appeared early in the calling history
+ // then we didn't exceed the criteria
+ if (stack[i] == dependInfo) {
+ return;
+ }
+ }
+ }
+ if (stackPosition == -1) {
+ visitor.stackExhausted();
+ return;
+ }
+ //
+ // locate dependency infos
+ //
+ String[] includes = dependInfo.getIncludes();
+ String includePathIdentifier = compiler.getIncludePathIdentifier();
+ DependencyInfo[] includeInfos = new DependencyInfo[includes.length];
+ for (int i = 0; i < includes.length; i++) {
+ DependencyInfo includeInfo = getDependencyInfo(includes[i],
+ includePathIdentifier);
+ includeInfos[i] = includeInfo;
+ }
+ //
+ // preview with only the already available dependency infos
+ //
+ if (visitor.preview(dependInfo, includeInfos)) {
+ //
+ // now need to fill in the missing DependencyInfos
+ //
+ int missingCount = 0;
+ for (int i = 0; i < includes.length; i++) {
+ if (includeInfos[i] == null) {
+ missingCount++;
+ task.log("Parsing " + includes[i], Project.MSG_VERBOSE);
+ //
+ // If the include filepath is relative
+ // then anchor it the base directory
+ File src = new File(includes[i]);
+ if (!src.isAbsolute()) {
+ src = new File(baseDir, includes[i]);
+ }
+ DependencyInfo includeInfo = parseIncludes(task,
+ compiler, src);
+ includeInfos[i] = includeInfo;
+ }
+ }
+ //
+ // if it passes a review the second time
+ // then recurse into all the children
+ if (missingCount == 0
+ || visitor.preview(dependInfo, includeInfos)) {
+ //
+ // recurse into
+ //
+ for (int i = 0; i < includeInfos.length; i++) {
+ DependencyInfo includeInfo = includeInfos[i];
+ walkDependencies(task, includeInfo, compiler, stack,
+ visitor);
+ }
+ }
+ }
+ stack[stackPosition] = null;
+ }
+ }
+ private void writeDependencyInfo(BufferedWriter writer, StringBuffer buf,
+ DependencyInfo dependInfo) throws IOException {
+ String[] includes = dependInfo.getIncludes();
+ String[] sysIncludes = dependInfo.getSysIncludes();
+ //
+ // if the includes have not been evaluted then
+ // it is not worth our time saving it
+ // and trying to distiguish between files with
+ // no dependencies and those with undetermined dependencies
+ buf.setLength(0);
+ buf.append(" <source file=\"");
+ buf.append(CUtil.xmlAttribEncode(dependInfo.getSource()));
+ buf.append("\" lastModified=\"");
+ buf.append(Long.toHexString(dependInfo.getSourceLastModified()));
+ buf.append("\">\n");
+ writer.write(buf.toString());
+ for (int i = 0; i < includes.length; i++) {
+ buf.setLength(0);
+ buf.append(" <include file=\"");
+ buf.append(CUtil.xmlAttribEncode(includes[i]));
+ buf.append("\"/>\n");
+ writer.write(buf.toString());
+ }
+ for (int i = 0; i < sysIncludes.length; i++) {
+ buf.setLength(0);
+ buf.append(" <sysinclude file=\"");
+ buf.append(CUtil.xmlAttribEncode(sysIncludes[i]));
+ buf.append("\"/>\n");
+ writer.write(buf.toString());
+ }
+ writer.write(" </source>\n");
+ return;
+ }
+ private void writeIncludePathDependencies(String includePathIdentifier,
+ BufferedWriter writer, StringBuffer buf) throws IOException {
+ //
+ // include path element
+ //
+ buf.setLength(0);
+ buf.append(" <includePath signature=\"");
+ buf.append(CUtil.xmlAttribEncode(includePathIdentifier));
+ buf.append("\">\n");
+ writer.write(buf.toString());
+ Enumeration dependenciesEnum = dependencies.elements();
+ while (dependenciesEnum.hasMoreElements()) {
+ DependencyInfo[] dependInfos = (DependencyInfo[]) dependenciesEnum
+ .nextElement();
+ for (int i = 0; i < dependInfos.length; i++) {
+ DependencyInfo dependInfo = dependInfos[i];
+ //
+ // if this is for the same include path
+ // then output the info
+ if (dependInfo.getIncludePathIdentifier().equals(
+ includePathIdentifier)) {
+ writeDependencyInfo(writer, buf, dependInfo);
+ }
+ }
+ }
+ writer.write(" </includePath>\n");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/DistributerDef.java b/src/net/sf/antcontrib/cpptasks/DistributerDef.java
new file mode 100644
index 0000000..f40ac8e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/DistributerDef.java
@@ -0,0 +1,243 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+import java.util.Vector;
+
+/**
+ * Distributed build information (Non-functional prototype).
+ *
+ */
+public final class DistributerDef
+ extends DataType {
+ /**
+ * if property.
+ */
+ private String ifCond;
+
+ /**
+ * unless property.
+ */
+ private String unlessCond;
+
+ /**
+ * hosts.
+ *
+ */
+ private String hosts;
+
+ /**
+ * Protocol.
+ *
+ */
+ private DistributerProtocolEnum protocol;
+
+ /**
+ * Not sure what this is.
+ */
+ private int tcpCork;
+
+ /**
+ * user name.
+ */
+ private String user;
+
+ /**
+ * local to remote file name maps.
+ */
+ private final Vector maps = new Vector();
+
+ /**
+ * Constructor.
+ *
+ */
+ public DistributerDef() {
+ }
+
+ /**
+ * Required by documentation generator.
+ */
+ public void execute() {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+
+ /**
+ * Returns true if the if and unless conditions (if any) are
+ * satisfied.
+ * @return true if definition is active.
+ */
+ public boolean isActive() {
+ return CUtil.isActive(getProject(), ifCond, unlessCond);
+ }
+
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(final String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The define will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public void setIf(final String propName) {
+ ifCond = propName;
+ }
+
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location. If
+ * specified, no other attributes should be specified.
+ * @param r reference name
+ */
+ public void setRefid(final Reference r) {
+ super.setRefid(r);
+ }
+
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(final String propName) {
+ unlessCond = propName;
+ }
+
+ /**
+ * Gets hosts.
+ * @return hosts, may be null.
+ *
+ */
+ public String getHosts() {
+ if (isReference()) {
+ DistributerDef refDistributer = (DistributerDef)
+ getCheckedRef(DistributerDef.class,
+ "DistributerDef");
+ return refDistributer.getHosts();
+ }
+ return hosts;
+ }
+
+ /**
+ * Gets tcp cork.
+ * @return TCP_CORK value.
+ *
+ */
+ public int getTcpcork() {
+ if (isReference()) {
+ DistributerDef refDistributer = (DistributerDef)
+ getCheckedRef(DistributerDef.class,
+ "DistributerDef");
+ return refDistributer.getTcpcork();
+ }
+ return tcpCork;
+ }
+
+ /**
+ * Gets protocol.
+ * @return protocol, may be null.
+ *
+ */
+ public DistributerProtocolEnum getProtocol() {
+ if (isReference()) {
+ DistributerDef refDistributer = (DistributerDef)
+ getCheckedRef(DistributerDef.class,
+ "DistributerDef");
+ return refDistributer.getProtocol();
+ }
+ return protocol;
+ }
+
+ /**
+ * Sets hosts.
+ * @param value new value
+ */
+ public void setHosts(final String value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ hosts = value;
+ }
+
+ /**
+ * Sets TCP_CORK value.
+ * @param value new value
+ */
+ public void setTcpcork(final int value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ tcpCork = value;
+ }
+
+ /**
+ * Sets protocol.
+ * @param value new value
+ */
+ public void setProtocol(final DistributerProtocolEnum value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ protocol = value;
+ }
+
+ /**
+ * Local to remote filename maps.
+ * @return new map
+ */
+ public DistributerMap createMap() {
+ DistributerMap map = new DistributerMap();
+ map.setProject(getProject());
+ maps.addElement(map);
+ return map;
+ }
+
+ /**
+ * Sets remote user name.
+ * @param value user name
+ */
+ public void setUser(final String value) {
+ user = value;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/DistributerMap.java b/src/net/sf/antcontrib/cpptasks/DistributerMap.java
new file mode 100644
index 0000000..ec0f4a4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/DistributerMap.java
@@ -0,0 +1,218 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.DataType;
+
+/**
+ * Local to remote filename mapping (Experimental).
+ *
+ */
+public final class DistributerMap
+ extends DataType {
+ /**
+ * if property.
+ */
+ private String ifCond;
+
+ /**
+ * unless property.
+ */
+ private String unlessCond;
+
+ /**
+ * local directory name.
+ *
+ */
+ private File localName;
+
+ /**
+ * Canonical local file name.
+ */
+ private String canonicalPath;
+
+ /**
+ * remote name.
+ *
+ */
+ private String remoteName;
+
+ /**
+ * Separator (/ or \) character on remote system.
+ */
+ private char remoteSeparator = File.separatorChar;
+
+ /**
+ * hosts that for which this map is valid.
+ *
+ */
+ private String hosts;
+
+ /**
+ * Constructor.
+ *
+ */
+ public DistributerMap() {
+ }
+
+ /**
+ * Required by documentation generator.
+ */
+ public void execute() {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+
+ /**
+ * Returns true if the if and unless conditions (if any) are
+ * satisfied.
+ *
+ * @return true if this object is active.
+ */
+ public boolean isActive() {
+ return CUtil.isActive(getProject(), ifCond, unlessCond);
+ }
+
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * This object will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public void setIf(final String propName) {
+ ifCond = propName;
+ }
+
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(final String propName) {
+ unlessCond = propName;
+ }
+
+ /**
+ * Gets local directory.
+ * @return local directory, may be null.
+ *
+ */
+ public File getLocal() {
+ return localName;
+ }
+
+ /**
+ * Gets remote name for directory.
+ * @return remote name, may be null.
+ *
+ */
+ public String getRemote() {
+ return remoteName;
+ }
+
+ /**
+ * Converts the local file name to the remote name for the same file.
+ *
+ * @param host host
+ * @param localFile local file
+ * @return remote name for local file, null if unknown.
+ */
+ public String toRemote(final String host, final File localFile) {
+ if (remoteName != null
+ && (hosts == null || hosts.indexOf(host) >= 0)) {
+ try {
+ String canonical = localFile.getCanonicalPath();
+ if (canonical.startsWith(canonicalPath)) {
+ if (isActive()) {
+ return remoteName
+ + canonical.substring(canonicalPath.length()).replace(File.
+ separatorChar, remoteSeparator);
+ }
+ }
+ } catch (IOException ex) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets local directory for base of mapping.
+ *
+ * @param value value
+ */
+ public void setLocal(final File value) {
+ if (value == null) {
+ throw new NullPointerException("value");
+ }
+ if (value.exists() && !value.isDirectory()) {
+ throw new BuildException("local should be a directory");
+ }
+ localName = value;
+ try {
+ canonicalPath = localName.getCanonicalPath();
+ } catch (IOException ex) {
+ throw new BuildException(ex);
+ }
+ }
+
+ /**
+ * Sets remote name for directory.
+ * @param value remote name for directory
+ */
+ public void setRemote(final String value) {
+ remoteName = value;
+ }
+
+ /**
+ * Sets the separator character (/ or \) for the remote system.
+ * @param value separator character
+ */
+ public void setRemoteSeparator(final String value) {
+ if (value != null && value.length() != 1) {
+ throw new BuildException("remote separator must be a single character");
+ }
+ remoteSeparator = value.charAt(0);
+ }
+
+ /**
+ * Sets hosts for which this mapping is valid.
+ *
+ * @param value hosts
+ */
+ public void setHosts(final String value) {
+ hosts = value;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/DistributerProtocolEnum.java b/src/net/sf/antcontrib/cpptasks/DistributerProtocolEnum.java
new file mode 100644
index 0000000..7d3734d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/DistributerProtocolEnum.java
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Distributer prococol names (experimental).
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class DistributerProtocolEnum
+ extends EnumeratedAttribute {
+ /**
+ * Constructor.
+ *
+ * Set by default to "distcc"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public DistributerProtocolEnum() {
+ setValue("distcc");
+ }
+
+ /**
+ * Gets list of acceptable values.
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[] {
+ "distcc",
+ "ssh"};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/FileVisitor.java b/src/net/sf/antcontrib/cpptasks/FileVisitor.java
new file mode 100644
index 0000000..c59f04f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/FileVisitor.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * An abstract class implemented to walk over the fileset members of a
+ * ProcessorDef
+ */
+public interface FileVisitor {
+ abstract void visit(File parentDir, String filename) throws BuildException;
+}
diff --git a/src/net/sf/antcontrib/cpptasks/LinkerDef.java b/src/net/sf/antcontrib/cpptasks/LinkerDef.java
new file mode 100644
index 0000000..a9a77bf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/LinkerDef.java
@@ -0,0 +1,525 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.gcc.GccLinker;
+import net.sf.antcontrib.cpptasks.types.FlexLong;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LinkerArgument;
+import net.sf.antcontrib.cpptasks.types.SystemLibrarySet;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.FlexInteger;
+/**
+ * A linker definition. linker elements may be placed either as children of a
+ * cc element or the project element. A linker element with an id attribute may
+ * be referenced by linker elements with refid or extends attributes.
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public class LinkerDef extends ProcessorDef {
+ private long base;
+ private String entry;
+ private Boolean fixed;
+ private Boolean incremental;
+ private final Vector librarySets = new Vector();
+ private Boolean map;
+ private int stack;
+ private final Vector sysLibrarySets = new Vector();
+ /**
+ * Default constructor
+ *
+ * @see java.lang.Object#Object()
+ */
+ public LinkerDef() {
+ base = -1;
+ stack = -1;
+ }
+ private void addActiveLibrarySet(Project project, Vector libsets,
+ Vector srcSets) {
+ Enumeration srcenum = srcSets.elements();
+ while (srcenum.hasMoreElements()) {
+ LibrarySet set = (LibrarySet) srcenum.nextElement();
+ if (set.isActive(project)) {
+ libsets.addElement(set);
+ }
+ }
+ }
+ private void addActiveSystemLibrarySets(Project project, Vector libsets) {
+ addActiveLibrarySet(project, libsets, sysLibrarySets);
+ }
+ private void addActiveUserLibrarySets(Project project, Vector libsets) {
+ addActiveLibrarySet(project, libsets, librarySets);
+ }
+ /**
+ * Adds a linker command-line arg.
+ */
+ public void addConfiguredLinkerArg(LinkerArgument arg) {
+ addConfiguredProcessorArg(arg);
+ }
+ /**
+ * Adds a compiler command-line arg.
+ */
+ public void addConfiguredLinkerParam(LinkerParam param) {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ addConfiguredProcessorParam(param);
+ }
+ /**
+ * Adds a system library set.
+ */
+ public void addLibset(LibrarySet libset) {
+ if (isReference()) {
+ throw super.noChildrenAllowed();
+ }
+ if (libset == null) {
+ throw new NullPointerException("libset");
+ }
+ librarySets.addElement(libset);
+ }
+ /**
+ * Adds a system library set.
+ */
+ public void addSyslibset(SystemLibrarySet libset) {
+ if (isReference()) {
+ throw super.noChildrenAllowed();
+ }
+ if (libset == null) {
+ throw new NullPointerException("libset");
+ }
+ sysLibrarySets.addElement(libset);
+ }
+
+
+ public ProcessorConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef baseDef,
+ TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+ //
+ // must combine some local context (the linkType)
+ // with the referenced element
+ //
+ // get a pointer to the definition (either local or referenced)
+ ProcessorDef thisDef = this;
+ if (isReference()) {
+ thisDef = ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef"));
+ }
+ //
+ // find the appropriate processor (combines local linkType
+ // with possibly remote linker name)
+ Processor proc = getProcessor();
+ proc = proc.getLinker(linkType);
+ ProcessorDef[] defaultProviders = getDefaultProviders(baseDef);
+ return proc.createConfiguration(task, linkType, defaultProviders,
+ thisDef, targetPlatform, versionInfo);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /**
+ * Returns an array of active library sets for this linker definition.
+ */
+ public LibrarySet[] getActiveLibrarySets(LinkerDef[] defaultProviders,
+ int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getActiveUserLibrarySets(defaultProviders, index);
+ }
+ Project p = getProject();
+ Vector libsets = new Vector();
+ for (int i = index; i < defaultProviders.length; i++) {
+ defaultProviders[i].addActiveUserLibrarySets(p, libsets);
+ defaultProviders[i].addActiveSystemLibrarySets(p, libsets);
+ }
+ addActiveUserLibrarySets(p, libsets);
+ addActiveSystemLibrarySets(p, libsets);
+ LibrarySet[] sets = new LibrarySet[libsets.size()];
+ libsets.copyInto(sets);
+ return sets;
+ }
+ /**
+ * Returns an array of active library sets for this linker definition.
+ */
+ public LibrarySet[] getActiveSystemLibrarySets(
+ LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getActiveUserLibrarySets(defaultProviders, index);
+ }
+ Project p = getProject();
+ Vector libsets = new Vector();
+ for (int i = index; i < defaultProviders.length; i++) {
+ defaultProviders[i].addActiveSystemLibrarySets(p, libsets);
+ }
+ addActiveSystemLibrarySets(p, libsets);
+ LibrarySet[] sets = new LibrarySet[libsets.size()];
+ libsets.copyInto(sets);
+ return sets;
+ }
+ /**
+ * Returns an array of active library sets for this linker definition.
+ */
+ public LibrarySet[] getActiveUserLibrarySets(LinkerDef[] defaultProviders,
+ int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getActiveUserLibrarySets(defaultProviders, index);
+ }
+ Project p = getProject();
+ Vector libsets = new Vector();
+ for (int i = index; i < defaultProviders.length; i++) {
+ defaultProviders[i].addActiveUserLibrarySets(p, libsets);
+ }
+ addActiveUserLibrarySets(p, libsets);
+ LibrarySet[] sets = new LibrarySet[libsets.size()];
+ libsets.copyInto(sets);
+ return sets;
+ }
+ public long getBase(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getBase(defaultProviders, index);
+ }
+ if (base <= 0) {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getBase(defaultProviders,
+ index + 1);
+ }
+ }
+ return base;
+ }
+ public Boolean getFixed(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getFixed(defaultProviders, index);
+ }
+ if (fixed == null) {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getFixed(defaultProviders,
+ index + 1);
+ }
+ }
+ return fixed;
+ }
+ public boolean getIncremental(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getIncremental(defaultProviders, index);
+ }
+ if (incremental != null) {
+ return incremental.booleanValue();
+ }
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getIncremental(defaultProviders, index + 1);
+ }
+ return false;
+ }
+ public boolean getMap(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getMap(defaultProviders, index);
+ }
+ if (map != null) {
+ return map.booleanValue();
+ }
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getMap(defaultProviders, index + 1);
+ }
+ return false;
+ }
+ public String getEntry(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getEntry(defaultProviders, index);
+ }
+ if (entry != null) {
+ return entry;
+ }
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getEntry(defaultProviders, index + 1);
+ }
+ return null;
+ }
+
+ public Processor getProcessor() {
+ Linker linker = (Linker) super.getProcessor();
+ if (linker == null) {
+ linker = GccLinker.getInstance();
+ }
+ if (getLibtool() && linker instanceof CommandLineLinker) {
+ CommandLineLinker cmdLineLinker = (CommandLineLinker) linker;
+ linker = cmdLineLinker.getLibtoolLinker();
+ }
+ return linker;
+ }
+ public int getStack(LinkerDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((LinkerDef) getCheckedRef(LinkerDef.class, "LinkerDef"))
+ .getStack(defaultProviders, index);
+ }
+ if (stack < 0) {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getStack(defaultProviders,
+ index + 1);
+ }
+ }
+ return stack;
+ }
+ /**
+ * Sets the base address. May be specified in either decimal or hex.
+ *
+ * @param base
+ * base address
+ *
+ */
+ public void setBase(FlexLong base) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.base = base.longValue();
+ }
+ /**
+ * Sets the starting address.
+ *
+ * @param name
+ * function name
+ */
+ public void setEntry(String entry) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.entry = entry;
+ }
+ /**
+ * If true, marks the file to be loaded only at its preferred address.
+ */
+ public void setFixed(boolean fixed) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.fixed = booleanValueOf(fixed);
+ }
+ /**
+ * If true, allows incremental linking.
+ *
+ */
+ public void setIncremental(boolean incremental) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.incremental = booleanValueOf(incremental);
+ }
+ /**
+ * If set to true, a map file will be produced.
+ */
+ public void setMap(boolean map) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.map = booleanValueOf(map);
+ }
+ /**
+ * Sets linker type.
+ *
+ *
+ * <table width="100%" border="1"> <thead>Supported linkers </thead>
+ * <tr>
+ * <td>gcc</td>
+ * <td>Gcc Linker</td>
+ * </tr>
+ * <tr>
+ * <td>g++</td>
+ * <td>G++ Linker</td>
+ * </tr>
+ * <tr>
+ * <td>ld</td>
+ * <td>Ld Linker</td>
+ * </tr>
+ * <tr>
+ * <td>ar</td>
+ * <td>Gcc Librarian</td>
+ * </tr>
+ * <tr>
+ * <td>msvc</td>
+ * <td>Microsoft Linker</td>
+ * </tr>
+ * <tr>
+ * <td>bcc</td>
+ * <td>Borland Linker</td>
+ * </tr>
+ * <tr>
+ * <td>df</td>
+ * <td>Compaq Visual Fortran Linker</td>
+ * </tr>
+ * <tr>
+ * <td>icl</td>
+ * <td>Intel Linker for Windows (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecl</td>
+ * <td>Intel Linker for Windows (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>icc</td>
+ * <td>Intel Linker for Linux (IA-32)</td>
+ * </tr>
+ * <tr>
+ * <td>ecc</td>
+ * <td>Intel Linker for Linux (IA-64)</td>
+ * </tr>
+ * <tr>
+ * <td>CC</td>
+ * <td>Sun ONE Linker</td>
+ * </tr>
+ * <tr>
+ * <td>aCC</td>
+ * <td>HP aC++ Linker</td>
+ * </tr>
+ * <tr>
+ * <td>os390</td>
+ * <td>OS390 Linker</td>
+ * </tr>
+ * <tr>
+ * <td>os390batch</td>
+ * <td>OS390 Linker</td>
+ * </tr>
+ * <tr>
+ * <td>os400</td>
+ * <td>IccLinker</td>
+ * </tr>
+ * <tr>
+ * <td>sunc89</td>
+ * <td>C89 Linker</td>
+ * </tr>
+ * <tr>
+ * <td>xlC</td>
+ * <td>VisualAge Linker</td>
+ * </tr>
+ * <tr>
+ * <td>wcl</td>
+ * <td>OpenWatcom C/C++ linker</td>
+ * </tr>
+ * <tr>
+ * <td>wfl</td>
+ * <td>OpenWatcom FORTRAN linker</td>
+ * </tr>
+ * </table>
+ *
+ */
+ public void setName(LinkerEnum name) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ Linker linker = name.getLinker();
+ super.setProcessor(linker);
+ }
+ protected void setProcessor(Processor proc) throws BuildException {
+ Linker linker = null;
+ if (proc instanceof Linker) {
+ linker = (Linker) proc;
+ } else {
+ LinkType linkType = new LinkType();
+ linker = proc.getLinker(linkType);
+ }
+ super.setProcessor(linker);
+ }
+ /**
+ * Sets stack size in bytes.
+ */
+ public void setStack(FlexInteger stack) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.stack = stack.intValue();
+ }
+ public void visitSystemLibraries(Linker linker, FileVisitor libraryVisitor) {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ LinkerDef master = ((LinkerDef) getCheckedRef(LinkerDef.class,
+ "Linker"));
+ master.visitSystemLibraries(linker, libraryVisitor);
+ } else {
+ //
+ // if this linker extends another,
+ // visit its libraries first
+ //
+ LinkerDef extendsDef = (LinkerDef) getExtends();
+ if (extendsDef != null) {
+ extendsDef.visitSystemLibraries(linker, libraryVisitor);
+ }
+ if (sysLibrarySets.size() > 0) {
+ File[] libpath = linker.getLibraryPath();
+ for (int i = 0; i < sysLibrarySets.size(); i++) {
+ LibrarySet set = (LibrarySet) sysLibrarySets.elementAt(i);
+ if (set.isActive(p)) {
+ set.visitLibraries(p, linker, libpath,
+ libraryVisitor);
+ }
+ }
+ }
+ }
+ }
+ public void visitUserLibraries(Linker linker, FileVisitor libraryVisitor) {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ LinkerDef master = ((LinkerDef) getCheckedRef(LinkerDef.class,
+ "Linker"));
+ master.visitUserLibraries(linker, libraryVisitor);
+ } else {
+ //
+ // if this linker extends another,
+ // visit its libraries first
+ //
+ LinkerDef extendsDef = (LinkerDef) getExtends();
+ if (extendsDef != null) {
+ extendsDef.visitUserLibraries(linker, libraryVisitor);
+ }
+ //
+ // visit the user libraries
+ //
+ if (librarySets.size() > 0) {
+ File[] libpath = linker.getLibraryPath();
+ for (int i = 0; i < librarySets.size(); i++) {
+ LibrarySet set = (LibrarySet) librarySets.elementAt(i);
+ if (set.isActive(p)) {
+ set.visitLibraries(p, linker, libpath,
+ libraryVisitor);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/LinkerEnum.java b/src/net/sf/antcontrib/cpptasks/LinkerEnum.java
new file mode 100644
index 0000000..c5b47bc
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/LinkerEnum.java
@@ -0,0 +1,118 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import net.sf.antcontrib.cpptasks.arm.ADSLinker;
+import net.sf.antcontrib.cpptasks.borland.BorlandLinker;
+import net.sf.antcontrib.cpptasks.compaq.CompaqVisualFortranLinker;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+import net.sf.antcontrib.cpptasks.gcc.GccLinker;
+import net.sf.antcontrib.cpptasks.gcc.GppLinker;
+import net.sf.antcontrib.cpptasks.gcc.LdLinker;
+import net.sf.antcontrib.cpptasks.hp.aCCLinker;
+import net.sf.antcontrib.cpptasks.ibm.VisualAgeLinker;
+// FREEHEP
+import net.sf.antcontrib.cpptasks.intel.IntelLinux32CLinker;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux64CLinker;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux32Linker;
+import net.sf.antcontrib.cpptasks.intel.IntelLinux64Linker;
+import net.sf.antcontrib.cpptasks.intel.IntelWin32Linker;
+import net.sf.antcontrib.cpptasks.os390.OS390Linker;
+import net.sf.antcontrib.cpptasks.os400.IccLinker;
+import net.sf.antcontrib.cpptasks.sun.C89Linker;
+import net.sf.antcontrib.cpptasks.sun.ForteCCLinker;
+import net.sf.antcontrib.cpptasks.ti.ClxxLinker;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomCLinker;
+import net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomFortranLinker;
+
+/**
+ * Enumeration of supported linkers
+ *
+ * @author Curt Arnold
+ *
+ */
+public class LinkerEnum extends EnumeratedAttribute {
+ private final static ProcessorEnumValue[] linkers = new ProcessorEnumValue[]{
+ new ProcessorEnumValue("gcc", GccLinker.getInstance()),
+ new ProcessorEnumValue("g++", GppLinker.getInstance()),
+ new ProcessorEnumValue("ld", LdLinker.getInstance()),
+ new ProcessorEnumValue("ar", GccLibrarian.getInstance()),
+ new ProcessorEnumValue("msvc", DevStudioLinker.getInstance()),
+ new ProcessorEnumValue("bcc", BorlandLinker.getInstance()),
+ new ProcessorEnumValue("df", CompaqVisualFortranLinker
+ .getInstance()),
+ new ProcessorEnumValue("icl", IntelWin32Linker.getInstance()),
+ new ProcessorEnumValue("ecl", IntelWin32Linker.getInstance()),
+ new ProcessorEnumValue("icc", IntelLinux32Linker.getInstance()),
+ new ProcessorEnumValue("ecc", IntelLinux64Linker.getInstance()),
+// FREEHEP
+ new ProcessorEnumValue("icpc", IntelLinux32Linker.getInstance()),
+ new ProcessorEnumValue("ecpc", IntelLinux64Linker.getInstance()),
+ new ProcessorEnumValue("CC", ForteCCLinker.getInstance()),
+ new ProcessorEnumValue("aCC", aCCLinker.getInstance()),
+ new ProcessorEnumValue("os390", OS390Linker.getInstance()),
+ new ProcessorEnumValue("os390batch", OS390Linker
+ .getDataSetInstance()),
+ new ProcessorEnumValue("os400", IccLinker.getInstance()),
+ new ProcessorEnumValue("sunc89", C89Linker.getInstance()),
+ new ProcessorEnumValue("xlC", VisualAgeLinker.getInstance()),
+ new ProcessorEnumValue("cl6x", ClxxLinker.getCl6xInstance()),
+ new ProcessorEnumValue("cl55", ClxxLinker.getCl55Instance()),
+ new ProcessorEnumValue("armcc", ADSLinker.getInstance()),
+ new ProcessorEnumValue("armcpp", ADSLinker.getInstance()),
+ new ProcessorEnumValue("tcc", ADSLinker.getInstance()),
+ new ProcessorEnumValue("tcpp", ADSLinker.getInstance()),
+ // gcc cross compilers
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-gcc",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLinker
+ .getInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-g++",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GppLinker
+ .getInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-ld",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.LdLinker
+ .getInstance()),
+ new ProcessorEnumValue(
+ "sparc-sun-solaris2-ar",
+ net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLibrarian
+ .getInstance()),
+ new ProcessorEnumValue("gcc-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccLinker
+ .getInstance()),
+ new ProcessorEnumValue("g++-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GppLinker
+ .getInstance()),
+ new ProcessorEnumValue("ld-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.LdLinker.getInstance()),
+ new ProcessorEnumValue("ar-cross",
+ net.sf.antcontrib.cpptasks.gcc.cross.GccLibrarian
+ .getInstance()),
+ new ProcessorEnumValue("wcl", OpenWatcomCLinker.getInstance()),
+ new ProcessorEnumValue("wfl", OpenWatcomFortranLinker.getInstance()),
+ };
+ public Linker getLinker() {
+ return (Linker) linkers[getIndex()].getProcessor();
+ }
+ public String[] getValues() {
+ return ProcessorEnumValue.getValues(linkers);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/LinkerParam.java b/src/net/sf/antcontrib/cpptasks/LinkerParam.java
new file mode 100644
index 0000000..3dae933
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/LinkerParam.java
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+/*******************************************************************************
+ * Place class description here.
+ *
+ * @author inger
+ * @author <additional author>
+ *
+ * @since
+ ******************************************************************************/
+public class LinkerParam extends ProcessorParam {
+ public LinkerParam() {
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/OSFamilyEnum.java b/src/net/sf/antcontrib/cpptasks/OSFamilyEnum.java
new file mode 100644
index 0000000..68ebd82
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/OSFamilyEnum.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Enumeration of cpu types.
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class OSFamilyEnum
+ extends EnumeratedAttribute {
+ /**
+ * Constructor.
+ *
+ * Set by default to "pentium3"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public OSFamilyEnum() {
+ setValue("windows");
+ }
+
+ /**
+ * Gets list of acceptable values.
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[] {
+ "windows",
+ "dos",
+ "mac",
+ "unix",
+ "netware",
+ "os/2",
+ "tandem",
+ "win9x",
+ "z/os",
+ "os/400",
+ "openvms"};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ObjectFileCollector.java b/src/net/sf/antcontrib/cpptasks/ObjectFileCollector.java
new file mode 100644
index 0000000..fd4cda5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ObjectFileCollector.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Collects object files for the link step.
+ *
+ *
+ */
+public final class ObjectFileCollector implements FileVisitor {
+ private final Vector files;
+ private final Linker linker;
+ public ObjectFileCollector(Linker linker, Vector files) {
+ this.linker = linker;
+ this.files = files;
+ }
+ public void visit(File parentDir, String filename) throws BuildException {
+ int bid = linker.bid(filename);
+ if (bid >= 1) {
+ files.addElement(new File(parentDir, filename));
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/OptimizationEnum.java b/src/net/sf/antcontrib/cpptasks/OptimizationEnum.java
new file mode 100644
index 0000000..042822e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/OptimizationEnum.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Enumeration of optimization levels (experimental).
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class OptimizationEnum
+ extends EnumeratedAttribute {
+ /**
+ * Constructor.
+ *
+ * Set by default to "speed"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public OptimizationEnum() {
+ setValue("speed");
+ }
+
+ /**
+ * Gets list of acceptable values.
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[] {
+ "none",
+ "size",
+ "minimal",
+ "speed",
+ "full",
+ "aggressive",
+ "extreme",
+ "unsafe"
+ };
+ }
+
+ /**
+ * Is size optimized.
+ * @return boolean true if size is optimized.
+ */
+ public boolean isSize() {
+ return "size".equals(getValue());
+ }
+
+ /**
+ * Is speed optimized.
+ * @return boolean true if speed is optimized.
+ */
+ public boolean isSpeed() {
+ return !isSize() && !isNoOptimization();
+ }
+
+ /**
+ * Is no optimization performed.
+ * @return boolean true if no optimization is performed.
+ */
+ public boolean isNoOptimization() {
+ return "none".equals(getValue());
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/OutputTypeEnum.java b/src/net/sf/antcontrib/cpptasks/OutputTypeEnum.java
new file mode 100644
index 0000000..873a99c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/OutputTypeEnum.java
@@ -0,0 +1,48 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * Enumeration of supported subsystems
+ *
+ * @author Curt Arnold
+ *
+ */
+public class OutputTypeEnum extends EnumeratedAttribute {
+ /**
+ * Constructor
+ *
+ * Set by default to "executable"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public OutputTypeEnum() {
+ setValue("executable");
+ }
+ /**
+ * Gets list of acceptable values
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[]{"executable", // executable program
+ "plugin", // plugin module
+ "shared", // dynamically linkable module
+ "static" // convenience library
+ };
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/PrecompileDef.java b/src/net/sf/antcontrib/cpptasks/PrecompileDef.java
new file mode 100644
index 0000000..4dd9831
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/PrecompileDef.java
@@ -0,0 +1,215 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.types.DataType;
+/**
+ * An element that specifies a prototype file and rules for source files that
+ * should not use precompiled headers
+ *
+ * @author Curt Arnold
+ */
+public final class PrecompileDef extends DataType {
+ private final Vector exceptSets = new Vector();
+ private String ifCond;
+ /**
+ * Directory of prototype file
+ */
+ private File prototype = new File("stdafx.cpp");
+ private String unlessCond;
+ /**
+ * Constructor
+ *
+ */
+ public PrecompileDef() {
+ }
+ /**
+ * Method used by PrecompileExceptDef to add exception set to
+ * PrecompileDef.
+ */
+ public void appendExceptFileSet(ConditionalFileSet exceptSet) {
+ exceptSet.setProject(getProject());
+ exceptSets.addElement(exceptSet);
+ }
+ /**
+ * Adds filesets that specify files that should not be processed with
+ * precompiled headers enabled.
+ *
+ * @param exceptSet
+ * FileSet specify files that should not be processed with
+ * precompiled headers enabled.
+ */
+ public PrecompileExceptDef createExcept() {
+ return new PrecompileExceptDef(this);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ public String[] getExceptFiles() {
+ PrecompileDef ref = getRef();
+ if (ref != null) {
+ return ref.getExceptFiles();
+ }
+ if (exceptSets.size() == 0) {
+ return new String[0];
+ }
+ Project p = getProject();
+ String[] exceptFiles = null;
+ Enumeration setEnum = exceptSets.elements();
+ while (setEnum.hasMoreElements()) {
+ ConditionalFileSet exceptSet = (ConditionalFileSet) setEnum
+ .nextElement();
+ if (exceptSet.isActive()) {
+ DirectoryScanner scanner = exceptSet
+ .getDirectoryScanner(p);
+ String[] scannerFiles = scanner.getIncludedFiles();
+ if (exceptFiles == null) {
+ exceptFiles = scannerFiles;
+ } else {
+ if (scannerFiles.length > 0) {
+ String[] newFiles = new String[exceptFiles.length
+ + scannerFiles.length];
+ for (int i = 0; i < exceptFiles.length; i++) {
+ newFiles[i] = exceptFiles[i];
+ }
+ int index = exceptFiles.length;
+ for (int i = 0; i < scannerFiles.length; i++) {
+ newFiles[index++] = scannerFiles[i];
+ }
+ exceptFiles = newFiles;
+ }
+ }
+ }
+ }
+ if (exceptFiles == null) {
+ exceptFiles = new String[0];
+ }
+ return exceptFiles;
+ }
+ /**
+ * Gets prototype source file
+ *
+ */
+ public File getPrototype() {
+ PrecompileDef ref = getRef();
+ if (ref != null) {
+ return ref.getPrototype();
+ }
+ return prototype;
+ }
+ private PrecompileDef getRef() {
+ if (isReference()) {
+ return ((PrecompileDef) getCheckedRef(PrecompileDef.class,
+ "PrecompileDef"));
+ }
+ return null;
+ }
+ public boolean isActive() {
+ boolean isActive = CUtil.isActive(getProject(), ifCond, unlessCond);
+ if (!isActive) {
+ PrecompileDef ref = getRef();
+ if (ref != null) {
+ return ref.isActive();
+ }
+ }
+ return isActive;
+ }
+ /**
+ * Sets a description of the current data type.
+ */
+ public void setDescription(String desc) {
+ super.setDescription(desc);
+ }
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+ /**
+ * Set the 'if' condition.
+ *
+ * The processor will be ignored unless the property is defined.
+ *
+ * The value of property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * isActive() is evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Sets file to precompile.
+ *
+ * Should be a source file that includes only one unguarded header file.
+ * Default value is "stdafx.cpp".
+ *
+ * @param prototype
+ * file path for prototype source file
+ */
+ public void setPrototype(File prototype) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ if (prototype == null) {
+ throw new NullPointerException("prototype");
+ }
+ this.prototype = prototype;
+ }
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location.
+ *
+ * @param ref
+ * Reference to other element
+ *
+ */
+ public void setRefid(org.apache.tools.ant.types.Reference ref) {
+ super.setRefid(ref);
+ }
+ /**
+ * Set the 'unless' condition. If named property exists at execution time,
+ * the processor will be ignored.
+ *
+ * Value of property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when isActive is called.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/PrecompileExceptDef.java b/src/net/sf/antcontrib/cpptasks/PrecompileExceptDef.java
new file mode 100644
index 0000000..c6c7da7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/PrecompileExceptDef.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Specifies files that should not be compiled using precompiled headers.
+ *
+ * @author Curt Arnold
+ */
+public final class PrecompileExceptDef {
+ private ConditionalFileSet localSet = null;
+ /**
+ * Collection of <fileset>contained by definition
+ */
+ private PrecompileDef owner;
+ /**
+ * Constructor
+ *
+ */
+ public PrecompileExceptDef(PrecompileDef owner) {
+ this.owner = owner;
+ }
+ /**
+ * Adds filesets that specify files that should not be processed using
+ * precompiled headers.
+ *
+ * @param exceptSet
+ * FileSet specify files that should not be processed with
+ * precompiled headers enabled.
+ */
+ public void addFileset(ConditionalFileSet exceptSet) {
+ owner.appendExceptFileSet(exceptSet);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /**
+ * Sets the base-directory
+ */
+ public void setDir(File dir) throws BuildException {
+ if (localSet == null) {
+ localSet = new ConditionalFileSet();
+ owner.appendExceptFileSet(localSet);
+ }
+ localSet.setDir(dir);
+ }
+ /**
+ * Comma or space separated list of file patterns that should not be
+ * compiled using precompiled headers.
+ *
+ * @param includes
+ * the string containing the include patterns
+ */
+ public void setIncludes(String includes) {
+ if (localSet == null) {
+ localSet = new ConditionalFileSet();
+ owner.appendExceptFileSet(localSet);
+ }
+ localSet.setIncludes(includes);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ProcessorDef.java b/src/net/sf/antcontrib/cpptasks/ProcessorDef.java
new file mode 100644
index 0000000..24c1a1f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ProcessorDef.java
@@ -0,0 +1,668 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.types.CommandLineArgument;
+import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Environment;
+import org.apache.tools.ant.types.Reference;
+/**
+ * An abstract compiler/linker definition.
+ *
+ * @author Curt Arnold
+ */
+public abstract class ProcessorDef extends DataType {
+ /**
+ * Returns the equivalent Boolean object for the specified value
+ *
+ * Equivalent to Boolean.valueOf in JDK 1.4
+ *
+ * @param val
+ * boolean value
+ * @return Boolean.TRUE or Boolean.FALSE
+ */
+ protected static Boolean booleanValueOf(boolean val) {
+ if (val) {
+ return Boolean.TRUE;
+ }
+ return Boolean.FALSE;
+ }
+ /**
+ * if true, targets will be built for debugging
+ */
+ private Boolean debug;
+ private Environment env = null;
+ /**
+ * Reference for "extends" processor definition
+ */
+ private Reference extendsRef = null;
+ /**
+ * Name of property that must be present or definition will be ignored. May
+ * be null.
+ */
+ private String ifProp;
+ /**
+ * if true, processor definition inherits values from containing <cc>
+ * element
+ */
+ private boolean inherit;
+ private Boolean libtool = null;
+ protected boolean newEnvironment = false;
+ /**
+ * Processor.
+ */
+ private Processor processor;
+ /**
+ * Collection of <compilerarg>or <linkerarg>contained by definition
+ */
+ private final Vector processorArgs = new Vector();
+ /**
+ * Collection of <compilerparam>or <linkerparam>contained by definition
+ */
+ private final Vector processorParams = new Vector();
+ /**
+ * if true, all targets will be unconditionally rebuilt
+ */
+ private Boolean rebuild;
+ /**
+ * Collection of <fileset>contained by definition
+ */
+ private final Vector srcSets = new Vector();
+ /**
+ * Name of property that if present will cause definition to be ignored.
+ * May be null.
+ */
+ private String unlessProp;
+ /**
+ * Constructor
+ *
+ */
+ protected ProcessorDef() throws NullPointerException {
+ inherit = true;
+ }
+ /**
+ * Adds a <compilerarg>or <linkerarg>
+ *
+ * @param arg
+ * command line argument, must not be null
+ * @throws NullPointerException
+ * if arg is null
+ * @throws BuildException
+ * if this definition is a reference
+ */
+ protected void addConfiguredProcessorArg(CommandLineArgument arg)
+ throws NullPointerException, BuildException {
+ if (arg == null) {
+ throw new NullPointerException("arg");
+ }
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ processorArgs.addElement(arg);
+ }
+ /**
+ * Adds a <compilerarg>or <linkerarg>
+ *
+ * @param arg
+ * command line argument, must not be null
+ * @throws NullPointerException
+ * if arg is null
+ * @throws BuildException
+ * if this definition is a reference
+ */
+ protected void addConfiguredProcessorParam(ProcessorParam param)
+ throws NullPointerException, BuildException {
+ if (param == null) {
+ throw new NullPointerException("param");
+ }
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ processorParams.addElement(param);
+ }
+ /**
+ * Add an environment variable to the launched process.
+ */
+ public void addEnv(Environment.Variable var) {
+ if (env == null) {
+ env = new Environment();
+ }
+ env.addVariable(var);
+ }
+ /**
+ * Adds a source file set.
+ *
+ * Files in these set will be processed by this configuration and will not
+ * participate in the auction.
+ *
+ * @param srcSet
+ * Fileset identifying files that should be processed by this
+ * processor
+ * @throws BuildException
+ * if processor definition is a reference
+ */
+ public void addFileset(ConditionalFileSet srcSet) throws BuildException {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ srcSet.setProject(getProject());
+ srcSets.addElement(srcSet);
+ }
+ /**
+ * Creates a configuration
+ *
+ * @param baseDef
+ * reference to def from containing <cc>element, may be null
+ * @return configuration
+ *
+ */
+ public ProcessorConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef baseDef,
+ TargetDef targetPlatform, VersionInfo versionInfo) {
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).createConfiguration(task, linkType,
+ baseDef, targetPlatform, versionInfo);
+ }
+ ProcessorDef[] defaultProviders = getDefaultProviders(baseDef);
+ Processor proc = getProcessor();
+ return proc.createConfiguration(task, linkType, defaultProviders, this, targetPlatform, versionInfo);
+ }
+ /**
+ * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * are active for the current project settings.
+ *
+ * @return active compiler arguments
+ */
+ public CommandLineArgument[] getActiveProcessorArgs() {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getActiveProcessorArgs();
+ }
+ Vector activeArgs = new Vector(processorArgs.size());
+ for (int i = 0; i < processorArgs.size(); i++) {
+ CommandLineArgument arg = (CommandLineArgument) processorArgs
+ .elementAt(i);
+ if (arg.isActive(p)) {
+ activeArgs.addElement(arg);
+ }
+ }
+ CommandLineArgument[] array = new CommandLineArgument[activeArgs.size()];
+ activeArgs.copyInto(array);
+ return array;
+ }
+ /**
+ * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * are active for the current project settings.
+ *
+ * @return active compiler arguments
+ */
+ public ProcessorParam[] getActiveProcessorParams() {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException("project must be set");
+ }
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getActiveProcessorParams();
+ }
+ Vector activeParams = new Vector(processorParams.size());
+ for (int i = 0; i < processorParams.size(); i++) {
+ ProcessorParam param = (ProcessorParam) processorParams
+ .elementAt(i);
+ if (param.isActive(p)) {
+ activeParams.addElement(param);
+ }
+ }
+ ProcessorParam[] array = new ProcessorParam[activeParams.size()];
+ activeParams.copyInto(array);
+ return array;
+ }
+ /**
+ * Gets boolean indicating debug build
+ *
+ * @param defaultProviders
+ * array of ProcessorDef's in descending priority
+ * @param index
+ * index to first element in array that should be considered
+ * @return if true, built targets for debugging
+ */
+ public boolean getDebug(ProcessorDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getDebug(defaultProviders, index);
+ }
+ if (debug != null) {
+ return debug.booleanValue();
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getDebug(defaultProviders,
+ index + 1);
+ }
+ }
+ return false;
+ }
+ /**
+ * Creates an chain of objects which provide default values in descending
+ * order of significance.
+ *
+ * @param baseDef
+ * corresponding ProcessorDef from CCTask, will be last element
+ * in array unless inherit = false
+ * @return default provider array
+ *
+ */
+ protected final ProcessorDef[] getDefaultProviders(ProcessorDef baseDef) {
+ ProcessorDef extendsDef = getExtends();
+ Vector chain = new Vector();
+ while (extendsDef != null && !chain.contains(extendsDef)) {
+ chain.addElement(extendsDef);
+ extendsDef = extendsDef.getExtends();
+ }
+ if (baseDef != null && getInherit()) {
+ chain.addElement(baseDef);
+ }
+ ProcessorDef[] defaultProviders = new ProcessorDef[chain.size()];
+ chain.copyInto(defaultProviders);
+ return defaultProviders;
+ }
+ /**
+ * Gets the ProcessorDef specified by the extends attribute
+ *
+ * @return Base ProcessorDef, null if extends is not specified
+ * @throws BuildException
+ * if reference is not same type object
+ */
+ public ProcessorDef getExtends() throws BuildException {
+ if (extendsRef != null) {
+ Object obj = extendsRef.getReferencedObject(getProject());
+ if (!getClass().isInstance(obj)) {
+ throw new BuildException("Referenced object "
+ + extendsRef.getRefId() + " not correct type, is "
+ + obj.getClass().getName() + " should be "
+ + getClass().getName());
+ }
+ return (ProcessorDef) obj;
+ }
+ return null;
+ }
+ /**
+ * Gets the inherit attribute. If the inherit value is true, this processor
+ * definition will inherit default values from the containing <cc>element.
+ *
+ * @return if true then properties from the containing <cc>element are
+ * used.
+ */
+ public final boolean getInherit() {
+ return inherit;
+ }
+ public boolean getLibtool() {
+ if (libtool != null) {
+ return libtool.booleanValue();
+ }
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getLibtool();
+ }
+ ProcessorDef extendsDef = getExtends();
+ if (extendsDef != null) {
+ return extendsDef.getLibtool();
+ }
+ return false;
+ }
+ /**
+ * Obtains the appropriate processor (compiler, linker)
+ *
+ * @return processor
+ */
+ protected Processor getProcessor() {
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getProcessor();
+ }
+ //
+ // if a processor has not been explicitly set
+ // then may be set by an extended definition
+ if (processor == null) {
+ ProcessorDef extendsDef = getExtends();
+ if (extendsDef != null) {
+ return extendsDef.getProcessor();
+ }
+ }
+ return processor;
+ }
+ /**
+ * Gets a boolean value indicating whether all targets must be rebuilt
+ * regardless of dependency analysis.
+ *
+ * @param defaultProviders
+ * array of ProcessorDef's in descending priority
+ * @param index
+ * index to first element in array that should be considered
+ * @return true if all targets should be rebuilt.
+ */
+ public boolean getRebuild(ProcessorDef[] defaultProviders, int index) {
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).getRebuild(defaultProviders, index);
+ }
+ if (rebuild != null) {
+ return rebuild.booleanValue();
+ } else {
+ if (defaultProviders != null && index < defaultProviders.length) {
+ return defaultProviders[index].getRebuild(defaultProviders,
+ index + 1);
+ }
+ }
+ return false;
+ }
+ /**
+ * Returns true if the processor definition contains embedded file set
+ * definitions
+ *
+ * @return true if processor definition contains embedded filesets
+ */
+ public boolean hasFileSets() {
+ if (isReference()) {
+ return ((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).hasFileSets();
+ }
+ return srcSets.size() > 0;
+ }
+ /**
+ * Determine if this def should be used.
+ *
+ * Definition will be active if the "if" variable (if specified) is set and
+ * the "unless" variable (if specified) is not set and that all reference
+ * or extended definitions are active
+ *
+ * @return true if processor is active
+ * @throws IllegalStateException
+ * if not properly initialized
+ * @throws BuildException
+ * if "if" or "unless" variable contains suspicious values
+ * "false" or "no" which indicates possible confusion
+ */
+ public boolean isActive() throws BuildException, IllegalStateException {
+ Project project = getProject();
+ if (!CUtil.isActive(project, ifProp, unlessProp)) {
+ return false;
+ }
+ if (isReference()) {
+ if (!((ProcessorDef) getCheckedRef(ProcessorDef.class,
+ "ProcessorDef")).isActive()) {
+ return false;
+ }
+ }
+ //
+ // walk through any extended definitions
+ //
+ ProcessorDef[] defaultProviders = getDefaultProviders(null);
+ for (int i = 0; i < defaultProviders.length; i++) {
+ if (!defaultProviders[i].isActive()) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Sets the class name for the adapter. Use the "name" attribute when the
+ * tool is supported.
+ *
+ * @param className
+ * full class name
+ *
+ */
+ public void setClassname(String className) throws BuildException {
+ Object proc = null;
+ try {
+ Class implClass = ProcessorDef.class.getClassLoader().loadClass(
+ className);
+ try {
+ Method getInstance = implClass.getMethod("getInstance",
+ new Class[0]);
+ proc = getInstance.invoke(null, new Object[0]);
+ } catch (Exception ex) {
+ proc = implClass.newInstance();
+ }
+ } catch (Exception ex) {
+ throw new BuildException(ex);
+ }
+ setProcessor((Processor) proc);
+ }
+ /**
+ * If set true, all targets will be built for debugging.
+ *
+ * @param debug
+ * true if targets should be built for debugging
+ * @throws BuildException
+ * if processor definition is a reference
+ */
+ public void setDebug(boolean debug) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.debug = booleanValueOf(debug);
+ }
+ /**
+ * Sets a description of the current data type.
+ */
+ public void setDescription(String desc) {
+ super.setDescription(desc);
+ }
+ /**
+ * Specifies that this element extends the element with id attribute with a
+ * matching value. The configuration will be constructed from the settings
+ * of this element, element referenced by extends, and the containing cc
+ * element.
+ *
+ * @param extendsRef
+ * Reference to the extended processor definition.
+ * @throws BuildException
+ * if this processor definition is a reference
+ */
+ public void setExtends(Reference extendsRef) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.extendsRef = extendsRef;
+ }
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The configuration will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setIf(String propName) {
+ ifProp = propName;
+ }
+ /**
+ * If inherit has the default value of true, defines, includes and other
+ * settings from the containing <cc>element will be inherited.
+ *
+ * @param inherit
+ * new value
+ * @throws BuildException
+ * if processor definition is a reference
+ */
+ public void setInherit(boolean inherit) throws BuildException {
+ if (isReference()) {
+ throw super.tooManyAttributes();
+ }
+ this.inherit = inherit;
+ }
+ /**
+ * Set use of libtool.
+ *
+ * If set to true, the "libtool " will be prepended to the command line
+ *
+ * @param libtool
+ * If true, use libtool.
+ */
+ public void setLibtool(boolean libtool) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.libtool = booleanValueOf(libtool);
+ }
+ /**
+ * Do not propagate old environment when new environment variables are
+ * specified.
+ */
+ public void setNewenvironment(boolean newenv) {
+ newEnvironment = newenv;
+ }
+ /**
+ * Sets the processor
+ *
+ * @param processor
+ * processor, may not be null.
+ * @throws BuildException
+ * if ProcessorDef is a reference
+ * @throws NullPointerException
+ * if processor is null
+ */
+ protected void setProcessor(Processor processor) throws BuildException,
+ NullPointerException {
+ if (processor == null) {
+ throw new NullPointerException("processor");
+ }
+ if (isReference()) {
+ throw super.tooManyAttributes();
+ }
+ if (env == null && !newEnvironment) {
+ this.processor = processor;
+ } else {
+ this.processor = processor.changeEnvironment(newEnvironment, env);
+ }
+ }
+ /**
+ * If set true, all targets will be unconditionally rebuilt.
+ *
+ * @param rebuild
+ * if true, rebuild all targets.
+ * @throws BuildException
+ * if processor definition is a reference
+ */
+ public void setRebuild(boolean rebuild) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.rebuild = booleanValueOf(rebuild);
+ }
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location. If
+ * specified, no other attributes or child content should be specified,
+ * other than "if", "unless" and "description".
+ *
+ * @param ref
+ * Reference to other element
+ *
+ */
+ public void setRefid(org.apache.tools.ant.types.Reference ref) {
+ super.setRefid(ref);
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the configuration will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessProp = propName;
+ }
+ /**
+ * This method calls the FileVistor's visit function for every file in the
+ * processors definition
+ *
+ * @param visitor
+ * object whose visit method is called for every file
+ */
+ public void visitFiles(FileVisitor visitor) {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException(
+ "project must be set before this call");
+ }
+ if (isReference()) {
+ ((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef"))
+ .visitFiles(visitor);
+ }
+ //
+ // if this processor extends another,
+ // visit its files first
+ //
+ ProcessorDef extendsDef = getExtends();
+ if (extendsDef != null) {
+ extendsDef.visitFiles(visitor);
+ }
+
+ for (int i = 0; i < srcSets.size(); i++) {
+ ConditionalFileSet srcSet = (ConditionalFileSet) srcSets
+ .elementAt(i);
+ if (srcSet.isActive()) {
+ // Find matching source files
+ DirectoryScanner scanner = srcSet.getDirectoryScanner(p);
+ // Check each source file - see if it needs compilation
+ String[] fileNames = scanner.getIncludedFiles();
+ File parentDir = scanner.getBasedir();
+ for (int j = 0; j < fileNames.length; j++) {
+ String currentFile = fileNames[j];
+ visitor.visit(parentDir, currentFile);
+ }
+ }
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ProcessorEnumValue.java b/src/net/sf/antcontrib/cpptasks/ProcessorEnumValue.java
new file mode 100644
index 0000000..9096183
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ProcessorEnumValue.java
@@ -0,0 +1,47 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+/**
+ * One entry in the arrays used by the CompilerEnum and LinkerEnum classes.
+ *
+ * @author Curt Arnold
+ * @see CompilerEnum
+ * @see LinkerEnum
+ *
+ */
+public class ProcessorEnumValue {
+ public static String[] getValues(ProcessorEnumValue[] processors) {
+ String[] values = new String[processors.length];
+ for (int i = 0; i < processors.length; i++) {
+ values[i] = processors[i].getName();
+ }
+ return values;
+ }
+ private String name;
+ private Processor processor;
+ public ProcessorEnumValue(String name, Processor processor) {
+ this.name = name;
+ this.processor = processor;
+ }
+ public String getName() {
+ return name;
+ }
+ public Processor getProcessor() {
+ return processor;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ProcessorParam.java b/src/net/sf/antcontrib/cpptasks/ProcessorParam.java
new file mode 100644
index 0000000..1b0c613
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ProcessorParam.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+/*******************************************************************************
+ * Place class description here.
+ *
+ * @author inger
+ * @author <additional author>
+ *
+ * @since
+ ******************************************************************************/
+public class ProcessorParam {
+ private String ifCond;
+ private String name;
+ private String unlessCond;
+ private String value;
+ public ProcessorParam() {
+ }
+ public String getName() {
+ return name;
+ }
+ public String getValue() {
+ return value;
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ */
+ public boolean isActive(org.apache.tools.ant.Project p) {
+ if (value == null) {
+ return false;
+ }
+ if (ifCond != null && p.getProperty(ifCond) == null) {
+ return false;
+ } else if (unlessCond != null && p.getProperty(unlessCond) != null) {
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The argument will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Specifies relative location of argument on command line. "start" will
+ * place argument at start of command line, "mid" will place argument after
+ * all "start" arguments but before filenames, "end" will place argument
+ * after filenames.
+ *
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the argument will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+ /**
+ * Specifies the string that should appear on the command line. The
+ * argument will be quoted if it contains embedded blanks. Use multiple
+ * arguments to avoid quoting.
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/RuntimeType.java b/src/net/sf/antcontrib/cpptasks/RuntimeType.java
new file mode 100644
index 0000000..6590098
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/RuntimeType.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * Enumerated attribute with the values "dynamic" and "static",
+ */
+public class RuntimeType extends EnumeratedAttribute {
+ public String[] getValues() {
+ return new String[]{"dynamic", "static"};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/SourceHistory.java b/src/net/sf/antcontrib/cpptasks/SourceHistory.java
new file mode 100644
index 0000000..4ffd38f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/SourceHistory.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.IOException;
+/**
+ * The history of a source file used to build a target
+ *
+ * @author Curt Arnold
+ */
+public final class SourceHistory {
+ private/* final */long lastModified;
+ private/* final */String relativePath;
+ /**
+ * Constructor
+ */
+ public SourceHistory(String relativePath, long lastModified) {
+ if (relativePath == null) {
+ throw new NullPointerException("relativePath");
+ }
+ this.relativePath = relativePath;
+ this.lastModified = lastModified;
+ }
+ public String getAbsolutePath(File baseDir) {
+ try {
+ return new File(baseDir, relativePath).getCanonicalPath();
+ } catch (IOException ex) {
+ }
+ return relativePath;
+ }
+ public long getLastModified() {
+ return lastModified;
+ }
+ public String getRelativePath() {
+ return relativePath;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/SubsystemEnum.java b/src/net/sf/antcontrib/cpptasks/SubsystemEnum.java
new file mode 100644
index 0000000..19dd207
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/SubsystemEnum.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * Enumeration of supported subsystems
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class SubsystemEnum extends EnumeratedAttribute {
+ private final static String[] values = new String[]{"gui", "console",
+ "other"};
+ public SubsystemEnum() {
+ setValue("gui");
+ }
+ public String[] getValues() {
+ return (String[]) values.clone();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/TargetDef.java b/src/net/sf/antcontrib/cpptasks/TargetDef.java
new file mode 100644
index 0000000..70263ad
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/TargetDef.java
@@ -0,0 +1,228 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ * Information on the execution platforms for the generated code.
+ * (Non-functional prototype)
+ *
+ */
+public final class TargetDef
+ extends DataType {
+ /**
+ * if property.
+ */
+ private String ifCond;
+
+ /**
+ * unless property.
+ */
+ private String unlessCond;
+
+ /**
+ * cpu.
+ *
+ */
+ private CPUEnum cpu;
+
+ /**
+ * architecture.
+ *
+ */
+ private ArchEnum arch;
+
+ /**
+ * OS Family.
+ *
+ */
+ private OSFamilyEnum osFamily;
+
+ /**
+ * Constructor.
+ *
+ */
+ public TargetDef() {
+ }
+
+ /**
+ * Bogus method required for documentation generation.
+ */
+ public void execute() {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ * @return true if active
+ */
+ public boolean isActive() {
+ return CUtil.isActive(getProject(), ifCond, unlessCond);
+ }
+
+ /**
+ * Sets a description of the current data type.
+ * @param desc description
+ */
+ public void setDescription(final String desc) {
+ super.setDescription(desc);
+ }
+
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(final String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The define will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public void setIf(final String propName) {
+ ifCond = propName;
+ }
+
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location. If
+ * specified, no other attributes should be specified.
+ * @param r id of referenced target
+ */
+ public void setRefid(final Reference r) {
+ super.setRefid(r);
+ }
+
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(final String propName) {
+ unlessCond = propName;
+ }
+
+ /**
+ * Gets cpu.
+ * @return cpu, may be null.
+ *
+ */
+ public CPUEnum getCpu() {
+ if (isReference()) {
+ TargetDef refPlatform = (TargetDef)
+ getCheckedRef(TargetDef.class,
+ "TargetDef");
+ return refPlatform.getCpu();
+ }
+ return cpu;
+ }
+
+ /**
+ * Gets arch.
+ * @return arch, may be null.
+ *
+ */
+ public ArchEnum getArch() {
+ if (isReference()) {
+ TargetDef refPlatform = (TargetDef)
+ getCheckedRef(TargetDef.class,
+ "TargetDef");
+ return refPlatform.getArch();
+ }
+ return arch;
+ }
+
+ /**
+ * Gets operating system family.
+ * @return os family, may be null.
+ *
+ */
+ public OSFamilyEnum getOsfamily() {
+ if (isReference()) {
+ TargetDef refPlatform = (TargetDef)
+ getCheckedRef(TargetDef.class,
+ "TargetDef");
+ return refPlatform.getOsfamily();
+ }
+ return osFamily;
+ }
+
+ /**
+ * Sets preferred cpu, but does not use cpu specific instructions.
+ * @param value new value
+ */
+ public void setCpu(final CPUEnum value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ cpu = value;
+ }
+
+ /**
+ * Sets cpu architecture, compiler may use cpu specific instructions.
+ * @param value new value
+ */
+ public void setArch(final ArchEnum value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ if (cpu != null) {
+ throw tooManyAttributes();
+ }
+ arch = value;
+ }
+
+ /**
+ * Sets operating system family.
+ * @param value new value
+ */
+ public void setOsfamily(final OSFamilyEnum value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ if (cpu != null) {
+ throw tooManyAttributes();
+ }
+ osFamily = value;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/TargetHistory.java b/src/net/sf/antcontrib/cpptasks/TargetHistory.java
new file mode 100644
index 0000000..b797170
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/TargetHistory.java
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+/**
+ * A description of a file built or to be built
+ */
+public final class TargetHistory {
+ private/* final */String config;
+ private/* final */String output;
+ private/* final */long outputLastModified;
+ private/* final */SourceHistory[] sources;
+ /**
+ * Constructor from build step
+ */
+ public TargetHistory(String config, String output, long outputLastModified,
+ SourceHistory[] sources) {
+ if (config == null) {
+ throw new NullPointerException("config");
+ }
+ if (sources == null) {
+ throw new NullPointerException("source");
+ }
+ if (output == null) {
+ throw new NullPointerException("output");
+ }
+ this.config = config;
+ this.output = output;
+ this.outputLastModified = outputLastModified;
+ this.sources = (SourceHistory[]) sources.clone();
+ }
+ public String getOutput() {
+ return output;
+ }
+ public long getOutputLastModified() {
+ return outputLastModified;
+ }
+ public String getProcessorConfiguration() {
+ return config;
+ }
+ public SourceHistory[] getSources() {
+ SourceHistory[] clone = (SourceHistory[]) sources.clone();
+ return clone;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/TargetHistoryTable.java b/src/net/sf/antcontrib/cpptasks/TargetHistoryTable.java
new file mode 100644
index 0000000..bdab94c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/TargetHistoryTable.java
@@ -0,0 +1,430 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+
+import org.apache.tools.ant.BuildException;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+/**
+ * A history of the compiler and linker settings used to build the files in the
+ * same directory as the history.
+ *
+ * @author Curt Arnold
+ */
+public final class TargetHistoryTable {
+ /**
+ * This class handles populates the TargetHistory hashtable in response to
+ * SAX parse events
+ */
+ private class TargetHistoryTableHandler extends DefaultHandler {
+ private final File baseDir;
+ private String config;
+ private final Hashtable history;
+ private String output;
+ private long outputLastModified;
+ private final Vector sources = new Vector();
+ /**
+ * Constructor
+ *
+ * @param history
+ * hashtable of TargetHistory keyed by output name
+ * @param outputFiles
+ * existing files in output directory
+ */
+ private TargetHistoryTableHandler(Hashtable history, File baseDir) {
+ this.history = history;
+ config = null;
+ output = null;
+ this.baseDir = baseDir;
+ }
+ public void endElement(String namespaceURI, String localName,
+ String qName) throws SAXException {
+ //
+ // if </target> then
+ // create TargetHistory object and add to hashtable
+ // if corresponding output file exists and
+ // has the same timestamp
+ //
+ if (qName.equals("target")) {
+ if (config != null && output != null) {
+ File existingFile = new File(baseDir, output);
+ //
+ // if the corresponding files doesn't exist or has a
+ // different
+ // modification time, then discard this record
+ if (existingFile.exists()) {
+ //
+ // would have expected exact time stamps
+ // but have observed slight differences
+ // in return value for multiple evaluations of
+ // lastModified(). Check if times are within
+ // a second
+ long existingLastModified = existingFile.lastModified();
+ if (!CUtil.isSignificantlyBefore(existingLastModified, outputLastModified)
+ && !CUtil.isSignificantlyAfter(existingLastModified, outputLastModified)) {
+ SourceHistory[] sourcesArray = new SourceHistory[sources
+ .size()];
+ sources.copyInto(sourcesArray);
+ TargetHistory targetHistory = new TargetHistory(
+ config, output, outputLastModified,
+ sourcesArray);
+ history.put(output, targetHistory);
+ }
+ }
+ }
+ output = null;
+ sources.setSize(0);
+ } else {
+ //
+ // reset config so targets not within a processor element
+ // don't pick up a previous processors signature
+ //
+ if (qName.equals("processor")) {
+ config = null;
+ }
+ }
+ }
+ /**
+ * startElement handler
+ */
+ public void startElement(String namespaceURI, String localName,
+ String qName, Attributes atts) throws SAXException {
+ //
+ // if sourceElement
+ //
+ if (qName.equals("source")) {
+ String sourceFile = atts.getValue("file");
+ long sourceLastModified = Long.parseLong(atts
+ .getValue("lastModified"), 16);
+ sources.addElement(new SourceHistory(sourceFile,
+ sourceLastModified));
+ } else {
+ //
+ // if <target> element,
+ // grab file name and lastModified values
+ // TargetHistory object will be created in endElement
+ //
+ if (qName.equals("target")) {
+ sources.setSize(0);
+ output = atts.getValue("file");
+ outputLastModified = Long.parseLong(atts
+ .getValue("lastModified"), 16);
+ } else {
+ //
+ // if <processor> element,
+ // grab signature attribute
+ //
+ if (qName.equals("processor")) {
+ config = atts.getValue("signature");
+ }
+ }
+ }
+ }
+ }
+ /** Flag indicating whether the cache should be written back to file. */
+ private boolean dirty;
+ /**
+ * a hashtable of TargetHistory's keyed by output file name
+ */
+ private final Hashtable history = new Hashtable();
+ /** The file the cache was loaded from. */
+ private/* final */File historyFile;
+ private/* final */File outputDir;
+ private String outputDirPath;
+ /**
+ * Creates a target history table from history.xml in the output directory,
+ * if it exists. Otherwise, initializes the history table empty.
+ *
+ * @param task
+ * task used for logging history load errors
+ * @param outputDir
+ * output directory for task
+ */
+ public TargetHistoryTable(CCTask task, File outputDir)
+ throws BuildException {
+ if (outputDir == null) {
+ throw new NullPointerException("outputDir");
+ }
+ if (!outputDir.isDirectory()) {
+ throw new BuildException("Output directory is not a directory");
+ }
+ if (!outputDir.exists()) {
+ throw new BuildException("Output directory does not exist");
+ }
+ this.outputDir = outputDir;
+ try {
+ outputDirPath = outputDir.getCanonicalPath();
+ } catch (IOException ex) {
+ outputDirPath = outputDir.toString();
+ }
+ //
+ // load any existing history from file
+ // suppressing any records whose corresponding
+ // file does not exist, is zero-length or
+ // last modified dates differ
+ historyFile = new File(outputDir, "history.xml");
+ if (historyFile.exists()) {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ try {
+ SAXParser parser = factory.newSAXParser();
+ parser.parse(historyFile, new TargetHistoryTableHandler(
+ history, outputDir));
+ } catch (Exception ex) {
+ //
+ // a failure on loading this history is not critical
+ // but should be logged
+ task.log("Error reading history.xml: " + ex.toString());
+ }
+ } else {
+ //
+ // create empty history file for identifying new files by last
+ // modified
+ // timestamp comperation (to compare with
+ // System.currentTimeMillis() don't work on Unix, because it
+ // maesure timestamps only in seconds).
+ //
+ try {
+ FileOutputStream outputStream = new FileOutputStream(
+ historyFile);
+ byte[] historyElement = new byte[]{0x3C, 0x68, 0x69, 0x73,
+ 0x74, 0x6F, 0x72, 0x79, 0x2F, 0x3E};
+ outputStream.write(historyElement);
+ outputStream.close();
+ } catch (IOException ex) {
+ throw new BuildException("Can't create history file", ex);
+ }
+ }
+ }
+ public void commit() throws IOException {
+ //
+ // if not dirty, no need to update file
+ //
+ if (dirty) {
+ //
+ // build (small) hashtable of config id's in history
+ //
+ Hashtable configs = new Hashtable(20);
+ Enumeration elements = history.elements();
+ while (elements.hasMoreElements()) {
+ TargetHistory targetHistory = (TargetHistory) elements
+ .nextElement();
+ String configId = targetHistory.getProcessorConfiguration();
+ if (configs.get(configId) == null) {
+ configs.put(configId, configId);
+ }
+ }
+ FileOutputStream outStream = new FileOutputStream(historyFile);
+ OutputStreamWriter outWriter;
+ //
+ // early VM's don't support UTF-8 encoding
+ // try and fallback to the default encoding
+ // otherwise
+ String encodingName = "UTF-8";
+ try {
+ outWriter = new OutputStreamWriter(outStream, "UTF-8");
+ } catch (UnsupportedEncodingException ex) {
+ outWriter = new OutputStreamWriter(outStream);
+ encodingName = outWriter.getEncoding();
+ }
+ BufferedWriter writer = new BufferedWriter(outWriter);
+ writer.write("<?xml version='1.0' encoding='");
+ writer.write(encodingName);
+ writer.write("'?>\n");
+ writer.write("<history>\n");
+ StringBuffer buf = new StringBuffer(200);
+ Enumeration configEnum = configs.elements();
+ while (configEnum.hasMoreElements()) {
+ String configId = (String) configEnum.nextElement();
+ buf.setLength(0);
+ buf.append(" <processor signature=\"");
+ buf.append(CUtil.xmlAttribEncode(configId));
+ buf.append("\">\n");
+ writer.write(buf.toString());
+ elements = history.elements();
+ while (elements.hasMoreElements()) {
+ TargetHistory targetHistory = (TargetHistory) elements
+ .nextElement();
+ if (targetHistory.getProcessorConfiguration().equals(
+ configId)) {
+ buf.setLength(0);
+ buf.append(" <target file=\"");
+ buf.append(CUtil.xmlAttribEncode(targetHistory
+ .getOutput()));
+ buf.append("\" lastModified=\"");
+ buf.append(Long.toHexString(targetHistory
+ .getOutputLastModified()));
+ buf.append("\">\n");
+ writer.write(buf.toString());
+ SourceHistory[] sourceHistories = targetHistory
+ .getSources();
+ for (int i = 0; i < sourceHistories.length; i++) {
+ buf.setLength(0);
+ buf.append(" <source file=\"");
+ buf.append(CUtil.xmlAttribEncode(sourceHistories[i]
+ .getRelativePath()));
+ buf.append("\" lastModified=\"");
+ buf.append(Long.toHexString(sourceHistories[i]
+ .getLastModified()));
+ buf.append("\"/>\n");
+ writer.write(buf.toString());
+ }
+ writer.write(" </target>\n");
+ }
+ }
+ writer.write(" </processor>\n");
+ }
+ writer.write("</history>\n");
+ writer.close();
+ dirty = false;
+ }
+ }
+ public TargetHistory get(String configId, String outputName) {
+ TargetHistory targetHistory = (TargetHistory) history.get(outputName);
+ if (targetHistory != null) {
+ if (!targetHistory.getProcessorConfiguration().equals(configId)) {
+ targetHistory = null;
+ }
+ }
+ return targetHistory;
+ }
+ public void markForRebuild(Hashtable targetInfos) {
+ Enumeration targetInfoEnum = targetInfos.elements();
+ while (targetInfoEnum.hasMoreElements()) {
+ markForRebuild((TargetInfo) targetInfoEnum.nextElement());
+ }
+ }
+ public void markForRebuild(TargetInfo targetInfo) {
+ //
+ // if it must already be rebuilt, no need to check further
+ //
+ if (!targetInfo.getRebuild()) {
+ TargetHistory history = get(targetInfo.getConfiguration()
+ .toString(), targetInfo.getOutput().getName());
+ if (history == null) {
+ targetInfo.mustRebuild();
+ } else {
+ SourceHistory[] sourceHistories = history.getSources();
+ File[] sources = targetInfo.getSources();
+ if (sourceHistories.length != sources.length) {
+ targetInfo.mustRebuild();
+ } else {
+ Hashtable sourceMap = new Hashtable(sources.length);
+ for (int i = 0; i < sources.length; i++) {
+ try {
+ sourceMap.put(sources[i].getCanonicalPath(), sources[i]);
+ } catch(IOException ex) {
+ sourceMap.put(sources[i].getAbsolutePath(), sources[i]);
+ }
+ }
+ for (int i = 0; i < sourceHistories.length; i++) {
+ //
+ // relative file name, must absolutize it on output
+ // directory
+ //
+ String absPath = sourceHistories[i].getAbsolutePath(outputDir);
+ File match = (File) sourceMap.get(absPath);
+ if (match != null) {
+ try {
+ match = (File) sourceMap.get(new File(absPath).getCanonicalPath());
+ } catch(IOException ex) {
+ targetInfo.mustRebuild();
+ break;
+ }
+ }
+ if (match == null || match.lastModified() != sourceHistories[i].getLastModified()) {
+ targetInfo.mustRebuild();
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ public void update(ProcessorConfiguration config, String[] sources, VersionInfo versionInfo) {
+ String configId = config.getIdentifier();
+ String[] onesource = new String[1];
+ String[] outputNames;
+ for (int i = 0; i < sources.length; i++) {
+ onesource[0] = sources[i];
+ outputNames = config.getOutputFileNames(sources[i], versionInfo);
+ for (int j = 0; j < outputNames.length; j++) {
+ update(configId, outputNames[j], onesource);
+ }
+ }
+ }
+ private void update(String configId, String outputName, String[] sources) {
+ File outputFile = new File(outputDir, outputName);
+ //
+ // if output file doesn't exist or predates the start of the
+ // compile step (most likely a compilation error) then
+ // do not write add a history entry
+ //
+ if (outputFile.exists() &&
+ !CUtil.isSignificantlyBefore(outputFile.lastModified(), historyFile.lastModified())) {
+ dirty = true;
+ history.remove(outputName);
+ SourceHistory[] sourceHistories = new SourceHistory[sources.length];
+ for (int i = 0; i < sources.length; i++) {
+ File sourceFile = new File(sources[i]);
+ long lastModified = sourceFile.lastModified();
+ String relativePath = CUtil.getRelativePath(outputDirPath,
+ sourceFile);
+ sourceHistories[i] = new SourceHistory(relativePath,
+ lastModified);
+ }
+ TargetHistory newHistory = new TargetHistory(configId, outputName,
+ outputFile.lastModified(), sourceHistories);
+ history.put(outputName, newHistory);
+ }
+ }
+ public void update(TargetInfo linkTarget) {
+ File outputFile = linkTarget.getOutput();
+ String outputName = outputFile.getName();
+ //
+ // if output file doesn't exist or predates the start of the
+ // compile or link step (most likely a compilation error) then
+ // do not write add a history entry
+ //
+ if (outputFile.exists()
+ && !CUtil.isSignificantlyBefore(outputFile.lastModified(),historyFile.lastModified())) {
+ dirty = true;
+ history.remove(outputName);
+ SourceHistory[] sourceHistories = linkTarget
+ .getSourceHistories(outputDirPath);
+ TargetHistory newHistory = new TargetHistory(linkTarget
+ .getConfiguration().getIdentifier(), outputName, outputFile
+ .lastModified(), sourceHistories);
+ history.put(outputName, newHistory);
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/TargetInfo.java b/src/net/sf/antcontrib/cpptasks/TargetInfo.java
new file mode 100644
index 0000000..8fd5bb4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/TargetInfo.java
@@ -0,0 +1,127 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+/**
+ * A description of a file built or to be built
+ */
+public final class TargetInfo {
+ private static final File[] emptyFileArray = new File[0];
+ private/* final */ProcessorConfiguration config;
+ private/* final */File output;
+ private boolean rebuild;
+ private/* final */File[] sources;
+ private File[] sysSources;
+ public TargetInfo(ProcessorConfiguration config, File[] sources,
+ File[] sysSources, File output, boolean rebuild) {
+ if (config == null) {
+ throw new NullPointerException("config");
+ }
+ if (sources == null) {
+ throw new NullPointerException("sources");
+ }
+ if (output == null) {
+ throw new NullPointerException("output");
+ }
+ this.config = config;
+ this.sources = (File[]) sources.clone();
+ if (sysSources == null) {
+ this.sysSources = emptyFileArray;
+ } else {
+ this.sysSources = (File[]) sysSources.clone();
+ }
+ this.output = output;
+ this.rebuild = rebuild;
+ //
+ // if the output doesn't exist, must rebuild it
+ //
+ if (!output.exists()) {
+ rebuild = true;
+ }
+ }
+ public String[] getAllSourcePaths() {
+ String[] paths = new String[sysSources.length + sources.length];
+ for (int i = 0; i < sysSources.length; i++) {
+ paths[i] = sysSources[i].toString();
+ }
+ int offset = sysSources.length;
+ for (int i = 0; i < sources.length; i++) {
+ paths[offset + i] = sources[i].toString();
+ }
+ return paths;
+ }
+ public File[] getAllSources() {
+ File[] allSources = new File[sources.length + sysSources.length];
+ for (int i = 0; i < sysSources.length; i++) {
+ allSources[i] = sysSources[i];
+ }
+ int offset = sysSources.length;
+ for (int i = 0; i < sources.length; i++) {
+ allSources[i + offset] = sources[i];
+ }
+ return allSources;
+ }
+ public ProcessorConfiguration getConfiguration() {
+ return config;
+ }
+ public File getOutput() {
+ return output;
+ }
+ public boolean getRebuild() {
+ return rebuild;
+ }
+ /**
+ * Returns an array of SourceHistory objects (contains relative path and
+ * last modified time) for the source[s] of this target
+ */
+ public SourceHistory[] getSourceHistories(String basePath) {
+ SourceHistory[] histories = new SourceHistory[sources.length];
+ for (int i = 0; i < sources.length; i++) {
+ String relativeName = CUtil.getRelativePath(basePath, sources[i]);
+ long lastModified = sources[i].lastModified();
+ histories[i] = new SourceHistory(relativeName, lastModified);
+ }
+ return histories;
+ }
+ public String[] getSourcePaths() {
+ String[] paths = new String[sources.length];
+ for (int i = 0; i < sources.length; i++) {
+ paths[i] = sources[i].toString();
+ }
+ return paths;
+ }
+ public File[] getSources() {
+ File[] clone = (File[]) sources.clone();
+ return clone;
+ }
+ public String[] getSysSourcePaths() {
+ String[] paths = new String[sysSources.length];
+ for (int i = 0; i < sysSources.length; i++) {
+ paths[i] = sysSources[i].toString();
+ }
+ return paths;
+ }
+ public File[] getSysSources() {
+ File[] clone = (File[]) sysSources.clone();
+ return clone;
+ }
+ public void mustRebuild() {
+ this.rebuild = true;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/TargetMatcher.java b/src/net/sf/antcontrib/cpptasks/TargetMatcher.java
new file mode 100644
index 0000000..9260f77
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/TargetMatcher.java
@@ -0,0 +1,120 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * This class matches each visited file with an appropriate compiler
+ *
+ * @author Curt Arnold
+ */
+public final class TargetMatcher implements FileVisitor {
+ private LinkerConfiguration linker;
+ private Vector objectFiles;
+ private File outputDir;
+ private ProcessorConfiguration[] processors;
+ private final File sourceFiles[] = new File[1];
+ private Hashtable targets;
+ private VersionInfo versionInfo;
+ private CCTask task;
+ public TargetMatcher(CCTask task, File outputDir,
+ ProcessorConfiguration[] processors, LinkerConfiguration linker,
+ Vector objectFiles, Hashtable targets,
+ VersionInfo versionInfo) {
+ this.task = task;
+ this.outputDir = outputDir;
+ this.processors = processors;
+ this.targets = targets;
+ this.linker = linker;
+ this.objectFiles = objectFiles;
+ this.versionInfo = versionInfo;
+ }
+ public void visit(File parentDir, String filename) throws BuildException {
+ File fullPath = new File(parentDir, filename);
+ //
+ // see if any processor wants to bid
+ // on this one
+ ProcessorConfiguration selectedCompiler = null;
+ int bid = 0;
+ if (processors != null) {
+ for (int k = 0; k < processors.length; k++) {
+ int newBid = processors[k].bid(fullPath.toString());
+ if (newBid > bid) {
+ bid = newBid;
+ selectedCompiler = processors[k];
+ }
+ }
+ }
+ //
+ // no processor interested in file
+ // log diagnostic message
+ if (bid <= 0) {
+ if (linker != null) {
+ int linkerbid = linker.bid(filename);
+ if (linkerbid > 0) {
+ objectFiles.addElement(fullPath);
+ if (linkerbid == 1) {
+ task.log("Unrecognized file type " + fullPath.toString()
+ + " will be passed to linker");
+ }
+ }
+ }
+ } else {
+ //
+ // get output file name
+ //
+ String[] outputFileNames = selectedCompiler
+ .getOutputFileNames(filename, versionInfo);
+ sourceFiles[0] = fullPath;
+ //
+ // if there is some output for this task
+ // (that is a source file and not an header file)
+ //
+ for (int i = 0; i < outputFileNames.length; i++) {
+ //
+ // see if the same output file has already been registered
+ //
+ TargetInfo previousTarget = (TargetInfo) targets
+ .get(outputFileNames[i]);
+ if (previousTarget == null) {
+ targets.put(outputFileNames[i], new TargetInfo(
+ selectedCompiler, sourceFiles, null, new File(
+ outputDir, outputFileNames[i]),
+ selectedCompiler.getRebuild()));
+ } else {
+ if (!previousTarget.getSources()[0].equals(sourceFiles[0])) {
+ StringBuffer builder = new StringBuffer(
+ "Output filename conflict: ");
+ builder.append(outputFileNames[i]);
+ builder.append(" would be produced from ");
+ builder.append(previousTarget.getSources()[0]
+ .toString());
+ builder.append(" and ");
+ builder.append(filename);
+ throw new BuildException(builder.toString());
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/VersionInfo.java b/src/net/sf/antcontrib/cpptasks/VersionInfo.java
new file mode 100644
index 0000000..3e70707
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/VersionInfo.java
@@ -0,0 +1,671 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ * Version Information.
+ *
+ * This information is applied in a platform specific manner
+ * to embed version information into executable images. This
+ * behavior is new and subject to change.
+ *
+ * On the Microsoft Windows platform, a resource is generated and added
+ * to the set of files to be compiled. A resource compiler must
+ * be specified to compile the generated file.
+ *
+ * On Unix platforms, versioninfo is currently not used.
+ * Future versions may append fileversion to the output file name,
+ * use compatibility version for -soname and possibly create
+ * symbolic links.
+ */
+public final class VersionInfo extends DataType {
+ /**
+ * if property.
+ */
+ private String ifCond;
+ /**
+ * unless property.
+ */
+ private String unlessCond;
+
+ /**
+ * extends property.
+ */
+ private Reference extendsRef;
+
+ /**
+ * file version.
+ *
+ */
+ private String fileVersion;
+ /**
+ * Product version.
+ *
+ */
+ private String productVersion;
+ /**
+ * file language.
+ *
+ */
+ private String language;
+
+ /**
+ * comments.
+ *
+ */
+ private String fileComments;
+ /**
+ * Company name.
+ *
+ */
+ private String companyName;
+ /**
+ * Description.
+ *
+ */
+ private String fileDescription;
+ /**
+ * internal name.
+ */
+ private String internalName;
+ /**
+ * legal copyright.
+ *
+ */
+ private String legalCopyright;
+ /**
+ * legal trademark.
+ *
+ */
+ private String legalTrademarks;
+ /**
+ * original filename.
+ *
+ */
+ private String originalFilename;
+ /**
+ * private build.
+ *
+ */
+ private String privateBuild;
+ /**
+ * product name.
+ *
+ */
+ private String productName;
+ /**
+ * Special build
+ */
+ private String specialBuild;
+ /**
+ * compatibility version
+ *
+ */
+ private String compatibilityVersion;
+
+ /**
+ * prerease build.
+ *
+ */
+ private Boolean prerelease;
+
+ /**
+ * prerease build.
+ *
+ */
+ private Boolean patched;
+
+
+ /**
+ * Constructor.
+ *
+ */
+ public VersionInfo() {
+ }
+
+ /**
+ * Private constructor for merge.
+ * @param stack list of version infos with most significant first.
+ */
+ private VersionInfo(final Vector stack) {
+ VersionInfo source = null;
+ for(int i = stack.size() - 1; i >= 0; i--) {
+ source = (VersionInfo) stack.elementAt(i);
+ if (source.getIf() != null) {
+ ifCond = source.getIf();
+ }
+ if (source.getUnless() != null) {
+ unlessCond = source.getUnless();
+ }
+ if (source.getFileversion() != null) {
+ fileVersion = source.getFileversion();
+ }
+ if (source.getProductversion() != null) {
+ productVersion = source.getProductversion();
+ }
+ if (source.getLanguage() != null) {
+ language = source.getLanguage();
+ }
+ if (source.getFilecomments() != null) {
+ fileComments = source.getFilecomments();
+ }
+ if (source.getCompanyname() != null) {
+ companyName = source.getCompanyname();
+ }
+ if (source.getFiledescription() != null) {
+ fileDescription = source.getFiledescription();
+ }
+ if (source.getInternalname() != null) {
+ internalName = source.getInternalname();
+ }
+ if (source.getLegalcopyright() != null) {
+ legalCopyright = source.getLegalcopyright();
+ }
+ if (source.getLegaltrademarks() != null) {
+ legalTrademarks = source.getLegaltrademarks();
+ }
+ if (source.getOriginalfilename() != null) {
+ originalFilename = source.getOriginalfilename();
+ }
+ if (source.getPrivatebuild() != null) {
+ privateBuild = source.getPrivatebuild();
+ }
+ if (source.getProductname() != null) {
+ productName = source.getProductname();
+ }
+ if (source.getSpecialbuild() != null) {
+ specialBuild = source.getSpecialbuild();
+ }
+ if (source.getCompatibilityversion() != null) {
+ compatibilityVersion = source.getCompatibilityversion();
+ }
+ if (source.getPrerelease() != null) {
+ prerelease = source.getPrerelease();
+ }
+ if (source.getPatched() != null) {
+ patched = source.getPatched();
+ }
+ }
+ setProject(source.getProject());
+ }
+
+ /**
+ * Returns a VersionInfo that reflects the state of
+ * @return
+ */
+ public VersionInfo merge() {
+ if (isReference()) {
+ VersionInfo refVersion = (VersionInfo)
+ getCheckedRef(VersionInfo.class,
+ "VersionInfo");
+ return refVersion.merge();
+ }
+ Reference currentRef = this.getExtends();
+ if (currentRef == null) {
+ return this;
+ }
+ Vector stack = new Vector(5);
+ stack.addElement(this);
+ while (currentRef != null) {
+ Object obj = currentRef.getReferencedObject(getProject());
+ if (obj instanceof VersionInfo) {
+ VersionInfo current = (VersionInfo) obj;
+ if (current.isReference()) {
+ current = (VersionInfo)
+ current.getCheckedRef(VersionInfo.class,
+ "VersionInfo");
+ }
+ if (stack.contains(current)) {
+ throw this.circularReference();
+ }
+ stack.addElement(current);
+ currentRef = current.getExtends();
+ } else {
+ throw new BuildException("Referenced element "
+ + currentRef.getRefId() + " is not a versioninfo.");
+ }
+ }
+ return new VersionInfo(stack);
+ }
+ /**
+ * Methods is required for documentation generation, throws
+ * exception if called.
+ *
+ * @throws org.apache.tools.ant.BuildException if called
+ */
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ *
+ * @exception BuildException
+ * throws build exception if name is not set
+ */
+ public final boolean isActive() throws BuildException {
+ return CUtil.isActive(getProject(), ifCond, unlessCond);
+ }
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+
+ public Reference getExtends() {
+ return this.extendsRef;
+ }
+ /**
+ * Specifies that this element extends the element with id attribute with a
+ * matching value. The configuration will be constructed from the settings
+ * of this element, element referenced by extends, and the containing cc
+ * element.
+ *
+ * @param extendsRef
+ * Reference to the extended processor definition.
+ * @throws BuildException
+ * if this processor definition is a reference
+ */
+ public void setExtends(Reference extendsRef) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ this.extendsRef = extendsRef;
+ }
+
+ /**
+ * Gets if property name.
+ * @return property name, may be null.
+ */
+ public final String getIf() {
+ return ifCond;
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The define will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public final void setIf(String propName) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ ifCond = propName;
+ }
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location. If
+ * specified, no other attributes should be specified.
+ *
+ */
+ public void setRefid(Reference r) throws BuildException {
+ super.setRefid(r);
+ }
+ /**
+ * Gets if property name.
+ * @return property name, may be null.
+ */
+ public final String getUnless() {
+ return unlessCond;
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public final void setUnless(String propName) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ unlessCond = propName;
+ }
+ /**
+ * Gets file version.
+ * @return file version, may be null.
+ *
+ */
+ public String getFileversion() {
+ return fileVersion;
+ }
+ /**
+ * Gets Product version.
+ * @return product version, may be null
+ */
+ public String getProductversion() {
+ return productVersion;
+ }
+ /**
+ * Gets compatibility version.
+ * @return compatibility version, may be null
+ */
+ public String getCompatibilityversion() {
+ return compatibilityVersion;
+ }
+ /**
+ * Gets file language, should be an IETF RFC 3066 identifier, for example, en-US.
+ * @return language, may be null.
+ */
+ public String getLanguage() {
+ return language;
+ }
+
+ /**
+ * Gets comments.
+ * @return comments, may be null.
+ */
+ public String getFilecomments() {
+ return fileComments;
+ }
+ /**
+ * Gets Company name.
+ * @return company name, may be null.
+ */
+ public String getCompanyname() {
+ return companyName;
+ }
+ /**
+ * Gets Description.
+ * @return description, may be null.
+ */
+ public String getFiledescription() {
+ return fileDescription;
+ }
+ /**
+ * Gets internal name.
+ * @return internal name, may be null.
+ */
+ public String getInternalname() {
+ return internalName;
+ }
+ /**
+ * Gets legal copyright.
+ * @return legal copyright, may be null.
+ */
+ public String getLegalcopyright() {
+ return legalCopyright;
+ }
+ /**
+ * Gets legal trademark.
+ * @return legal trademark, may be null;
+ */
+ public String getLegaltrademarks() {
+ return legalTrademarks;
+ }
+ /**
+ * Gets original filename.
+ * @return original filename, may be null.
+ */
+ public String getOriginalfilename() {
+ return originalFilename;
+ }
+ /**
+ * Gets private build.
+ * @return private build, may be null.
+ */
+ public String getPrivatebuild() {
+ return privateBuild;
+ }
+ /**
+ * Gets prerelease.
+ * @return prerelease, may be null.
+ */
+ public Boolean getPrerelease() {
+ return prerelease;
+ }
+ /**
+ * Gets patched.
+ * @return patched, may be null.
+ */
+ public Boolean getPatched() {
+ return patched;
+ }
+ /**
+ * Gets product name.
+ * @return product name, may be null.
+ */
+ public String getProductname() {
+ return productName;
+ }
+ /**
+ * Special build
+ * @return special build, may be null.
+ */
+ public String getSpecialbuild() {
+ return specialBuild;
+ }
+
+ /**
+ * Sets file version.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setFileversion(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ fileVersion = value;
+ }
+ /**
+ * Sets product version.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setProductversion(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ productVersion = value;
+ }
+ /**
+ * Sets compatibility version.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setCompatibilityversion(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ compatibilityVersion = value;
+ }
+ /**
+ * Sets language.
+ * @param value new value, should be an IETF RFC 3066 language identifier.
+ * @throws BuildException if specified with refid
+ */
+ public void setLanguage(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ language = value;
+ }
+ /**
+ * Sets comments.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setFilecomments(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ fileComments = value;
+ }
+
+ /**
+ * Sets file description.
+ * @param value new value
+ */
+ public void setFiledescription(String value) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ fileDescription = value;
+ }
+
+ /**
+ * Sets company name.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setCompanyname(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ companyName = value;
+ }
+
+
+ /**
+ * Sets internal name. Internal name will automatically be
+ * specified from build step, only set this value if
+ * intentionally overriding that value.
+ *
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setInternalname(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ internalName = value;
+ }
+
+ /**
+ * Sets legal copyright.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setLegalcopyright(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ legalCopyright = value;
+ }
+ /**
+ * Sets legal trademark.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setLegaltrademarks(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ legalTrademarks = value;
+ }
+ /**
+ * Sets original name. Only set this value if
+ * intentionally overriding the value from the build set.
+ *
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setOriginalfilename(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ originalFilename = value;
+ }
+ /**
+ * Sets private build.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setPrivatebuild(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ privateBuild = value;
+ }
+ /**
+ * Sets prerelease.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setPrerelease(boolean value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ if (value) {
+ prerelease = Boolean.TRUE;
+ } else {
+ prerelease = Boolean.FALSE;
+ }
+ }
+ /**
+ * Sets prerelease.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setPatched(boolean value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ if (value) {
+ patched = Boolean.TRUE;
+ } else {
+ patched = Boolean.FALSE;
+ }
+ }
+ /**
+ * Sets product name.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setProductname(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ productName= value;
+ }
+ /**
+ * Sets private build.
+ * @param value new value
+ * @throws BuildException if specified with refid
+ */
+ public void setSpecialbuild(String value) throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ specialBuild = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/WarningLevelEnum.java b/src/net/sf/antcontrib/cpptasks/WarningLevelEnum.java
new file mode 100644
index 0000000..6ba8489
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/WarningLevelEnum.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+
+/**
+ * Enumerated attribute with the values "none", "severe", "default",
+ * "production", "diagnostic", and "failtask".
+ */
+public final class WarningLevelEnum extends EnumeratedAttribute {
+ /**
+ * Constructor.
+ *
+ */
+ public WarningLevelEnum() {
+ setValue("default");
+ }
+ /**
+ * Get allowable values.
+ * @return allowable values
+ */
+ public String[] getValues() {
+ return new String[]{"none", "severe", "default", "production",
+ "diagnostic", "aserror"};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/antlib.xml b/src/net/sf/antcontrib/cpptasks/antlib.xml
new file mode 100644
index 0000000..5f8af42
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/antlib.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+ <!--
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ -->
+ <antlib>
+ <taskdef resource="cpptasks.tasks" />
+ <typedef resource="cpptasks.types" />
+ </antlib>
+ \ No newline at end of file
diff --git a/src/net/sf/antcontrib/cpptasks/apple/CVS/Entries b/src/net/sf/antcontrib/cpptasks/apple/CVS/Entries
new file mode 100644
index 0000000..5690dd9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/apple/CVS/Entries
@@ -0,0 +1,3 @@
+/XcodeProjectWriter.java/1.5/Fri Jan 28 15:50:24 2005//
+/package.html/1.1/Tue Jul 13 03:31:03 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/apple/CVS/Repository b/src/net/sf/antcontrib/cpptasks/apple/CVS/Repository
new file mode 100644
index 0000000..aeac1e7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/apple/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/apple
diff --git a/src/net/sf/antcontrib/cpptasks/apple/CVS/Root b/src/net/sf/antcontrib/cpptasks/apple/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/apple/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java b/src/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java
new file mode 100644
index 0000000..7f21bec
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java
@@ -0,0 +1,574 @@
+/*
+ *
+ * Copyright 2004-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.apple;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+import net.sf.antcontrib.cpptasks.ide.ProjectDef;
+import net.sf.antcontrib.cpptasks.ide.ProjectWriter;
+
+/**
+ * Writes a Apple Xcode project directory.
+ *
+ * Status: Collects file list but does not pick up libraries and settings from
+ * project.
+ *
+ * @author curta
+ */
+public final class XcodeProjectWriter
+ implements ProjectWriter {
+
+ /**
+ * Next object identifier for project file.
+ */
+ private int nextID = 0x08FB7796;
+
+ /**
+ * Constructor.
+ *
+ */
+ public XcodeProjectWriter() {
+ }
+
+ /**
+ * Get next unique ID.
+ * @return unique ID
+ */
+ private String getUniqueID() {
+ return Integer.toString(nextID++, 16) + "FE84155DC02AAC07";
+ }
+
+ /**
+ * Writes a project definition file.
+ *
+ * @param fileName
+ * File name base, writer may append appropriate extension
+ * @param task
+ * cc task for which to write project
+ * @param projectDef
+ * project element
+ * @param targets
+ * compilation targets
+ * @param linkTarget
+ * link target
+ * @throws IOException
+ * if error writing project file
+ */
+ public void writeProject(final File fileName,
+ final CCTask task,
+ final ProjectDef projectDef,
+ final List sources,
+ final Hashtable targets,
+ final TargetInfo linkTarget) throws IOException {
+
+ File xcodeDir = new File(fileName + ".xcode");
+ if (!projectDef.getOverwrite() && xcodeDir.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + xcodeDir.toString());
+ }
+
+ CommandLineCompilerConfiguration compilerConfig =
+ getBaseCompilerConfiguration(targets);
+ if (compilerConfig == null) {
+ throw new BuildException(
+ "Unable to find compilation target using GNU C++ compiler");
+ }
+
+ String projectName = projectDef.getName();
+ if (projectName == null) {
+ projectName = fileName.getName();
+ }
+ final String basePath = fileName.getAbsoluteFile().getParent();
+
+ xcodeDir.mkdir();
+
+ File xcodeProj = new File(xcodeDir, "project.pbxproj");
+
+ //
+ // assume that all C++ compiles can use the
+ // same settings
+ //
+ CommandLineCompilerConfiguration gccConfig = null;
+
+ Vector sourceList = new Vector(targets.size());
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo info = (TargetInfo) targetIter.next();
+ File[] targetsources = info.getSources();
+ for (int i = 0; i < targetsources.length; i++) {
+ sourceList.addElement(new SourceEntry(targetsources[i],
+ getUniqueID(), getUniqueID()));
+ }
+ ProcessorConfiguration procConfig = info.getConfiguration();
+ if (procConfig instanceof CommandLineCompilerConfiguration
+ && gccConfig == null) {
+ gccConfig = (CommandLineCompilerConfiguration) procConfig;
+ }
+ }
+ SourceEntry[] sortedSources = new SourceEntry[sourceList.size()];
+ sourceList.copyInto(sortedSources);
+ Arrays.sort(sortedSources, new Comparator() {
+ public int compare(final Object o1, final Object o2) {
+ return ( (SourceEntry) o1).getFile().getName().compareTo( ( (
+ SourceEntry) o2).getFile().getName());
+ }
+ });
+ File outFile = task.getOutfile();
+
+ Writer writer = new BufferedWriter(new FileWriter(xcodeProj));
+
+ writer.write("// !$*UTF8*$!\n");
+ writer.write(" {\n");
+ writer.write(" archiveVersion = 1;\n");
+ writer.write(" classes = {\n");
+ writer.write(" };\n");
+ writer.write(" objectVersion = 39;\n");
+ writer.write(" objects = {\n");
+ writer.write(" 014CEA520018CE5811CA2923 = {\n");
+ writer.write(" buildRules = (\n");
+ writer.write(" );\n");
+ writer.write(" buildSettings = {\n");
+ writer.write(" COPY_PHASE_STRIP = NO;\n");
+ writer.write(" DEBUGGING_SYMBOLS = YES;\n");
+ writer.write(" GCC_DYNAMIC_NO_PIC = NO;\n");
+ writer.write(" GCC_ENABLE_FIX_AND_CONTINUE = YES;\n");
+ writer.write(" GCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n");
+ writer.write(" GCC_OPTIMIZATION_LEVEL = 0;\n");
+ writer.write(" OPTIMIZATION_CFLAGS = \"-O0\";\n");
+ writer.write(" ZERO_LINK = YES;\n");
+ writer.write(" };\n");
+ writer.write(" isa = PBXBuildStyle;\n");
+ writer.write(" name = Development;\n");
+ writer.write(" };\n");
+ writer.write(" 014CEA530018CE5811CA2923 = {\n");
+ writer.write(" buildRules = (\n");
+ writer.write(" );\n");
+ writer.write(" buildSettings = {\n");
+ writer.write(" COPY_PHASE_STRIP = YES;\n");
+ writer.write(" GCC_ENABLE_FIX_AND_CONTINUE = NO;\n");
+ writer.write(" ZERO_LINK = NO;\n");
+ writer.write(" };\n");
+ writer.write(" isa = PBXBuildStyle;\n");
+ writer.write(" name = Deployment;\n");
+ writer.write(" };\n");
+ writer.write("// 010\n");
+ writer.write("// 011\n");
+ writer.write("// 012\n");
+ writer.write("// 013\n");
+ writer.write("// 014\n");
+ writer.write("// 080\n");
+ writer.write("// 081\n");
+ writer.write("// 082\n");
+ writer.write("// 083\n");
+ writer.write("// 084\n");
+ writer.write(" 08FB7793FE84155DC02AAC07 = {\n");
+ writer.write(" buildSettings = {\n");
+ writer.write(" };\n");
+ writer.write(" buildStyles = (\n");
+ writer.write(" 014CEA520018CE5811CA2923,\n");
+ writer.write(" 014CEA530018CE5811CA2923,\n");
+ writer.write(" );\n");
+ writer.write(" hasScannedForEncodings = 1;\n");
+ writer.write(" isa = PBXProject;\n");
+ writer.write(" mainGroup = 08FB7794FE84155DC02AAC07;\n");
+ writer.write(" projectDirPath = \"\";\n");
+ writer.write(" targets = (\n");
+ writer.write(" D2AAC0620554660B00DB518D,\n");
+ writer.write(" );\n");
+ writer.write(" };\n");
+ writer.write(" 08FB7794FE84155DC02AAC07 = {\n");
+ writer.write(" children = (\n");
+ writer.write(" 08FB7795FE84155DC02AAC07,\n");
+ writer.write(" 1AB674ADFE9D54B511CA2CBB,\n");
+ writer.write(" );\n");
+ writer.write(" isa = PBXGroup;\n");
+ writer.write(" name = ");
+ writer.write(outFile.getName());
+ writer.write(";\n");
+ writer.write(" refType = 4;\n");
+ writer.write(" sourceTree = \"<group>\";\n");
+ writer.write(" };\n");
+ writer.write(" 08FB7795FE84155DC02AAC07 = {\n");
+ writer.write(" children = (\n");
+
+ //
+ // source ID's go here
+ //
+ for (int i = 0; i < sortedSources.length; i++) {
+ writer.write(" ");
+ writer.write(sortedSources[i].getSourceID());
+ writer.write(",\n");
+ }
+
+ writer.write(" );\n");
+ writer.write(" isa = PBXGroup;\n");
+ writer.write(" name = Source;\n");
+ writer.write(" refType = 4;\n");
+ writer.write(" sourceTree = \"<group>\";\n");
+ writer.write(" };\n");
+
+ for (int i = 0; i < sortedSources.length; i++) {
+ //
+ // source definition
+ //
+ SourceEntry entry = sortedSources[i];
+ writer.write(" ");
+ writer.write(entry.getSourceID());
+ writer.write(" = {\n");
+ writer.write(" fileEncoding = 4;\n");
+ writer.write(" isa = PBXFileReference;\n");
+ String sourceName = entry.getFile().getName();
+ if (sourceName.endsWith(".c")) {
+ writer.write(" lastKnownFileType = sourcecode.c.c;\n");
+ } else {
+ writer.write(" lastKnownFileType = sourcecode.cpp.cpp;\n");
+ }
+
+ String relativePath = CUtil.getRelativePath(basePath, entry.getFile());
+ if (!relativePath.equals(sourceName)) {
+ writer.write(" name = ");
+ writer.write(sourceName);
+ writer.write(";\n");
+ }
+ writer.write(" path = ");
+ writer.write(relativePath);
+ writer.write(";\n");
+ writer.write(" refType = 4;\n");
+ writer.write(" sourceTree = \"<group>\";\n");
+ writer.write(" };\n");
+
+ //
+ // build definition
+ //
+ writer.write(" ");
+ writer.write(entry.getBuildID());
+ writer.write(" = {\n");
+ writer.write(" fileRef = ");
+ writer.write(entry.getSourceID());
+ writer.write(";\n");
+ writer.write(" isa = PBXBuildFile;\n");
+ writer.write(" settings = {\n");
+ writer.write(" };\n");
+ writer.write(" };\n");
+
+ }
+ writer.write("// 080\n");
+ writer.write("// 081\n");
+ writer.write("// 082\n");
+ writer.write("// 083\n");
+ writer.write("// 084\n");
+ writer.write("// 1A0\n");
+ writer.write("// 1A1\n");
+ writer.write("// 1A2\n");
+ writer.write("// 1A3\n");
+ writer.write("// 1A4\n");
+ writer.write(" 1AB674ADFE9D54B511CA2CBB = {\n");
+ writer.write(" children = (\n");
+ writer.write(" D2AAC0630554660B00DB518D,\n");
+ writer.write(" );\n");
+ writer.write(" isa = PBXGroup;\n");
+ writer.write(" name = Products;\n");
+ writer.write(" refType = 4;\n");
+ writer.write(" sourceTree = \"<group>\";\n");
+ writer.write(" };\n");
+ writer.write("// 1A0\n");
+ writer.write("// 1A1\n");
+ writer.write("// 1A2\n");
+ writer.write("// 1A3\n");
+ writer.write("// 1A4\n");
+ writer.write("// D20\n");
+ writer.write("// D21\n");
+ writer.write("// D22\n");
+ writer.write("// D23\n");
+ writer.write("// D24\n");
+ writer.write(" D2AAC0600554660B00DB518D = {\n");
+ writer.write(" buildActionMask = 2147483647;\n");
+ writer.write(" files = (\n");
+ writer.write(" );\n");
+ writer.write(" isa = PBXHeadersBuildPhase;\n");
+ writer.write(" runOnlyForDeploymentPostprocessing = 0;\n");
+ writer.write(" };\n");
+ writer.write(" D2AAC0610554660B00DB518D = {\n");
+ writer.write(" buildActionMask = 2147483647;\n");
+ writer.write(" files = (\n");
+
+ //
+ // build ID's
+ //
+ for (int i = 0; i < sortedSources.length; i++) {
+ writer.write(" ");
+ writer.write(sortedSources[i].getBuildID());
+ writer.write(",\n");
+ }
+ writer.write(" );\n");
+ writer.write(" isa = PBXSourcesBuildPhase;\n");
+ writer.write(" runOnlyForDeploymentPostprocessing = 0;\n");
+ writer.write(" };\n");
+ writer.write(" D2AAC0620554660B00DB518D = {\n");
+ writer.write(" buildPhases = (\n");
+ writer.write(" D2AAC0600554660B00DB518D,\n");
+ writer.write(" D2AAC0610554660B00DB518D,\n");
+ writer.write(" );\n");
+ writer.write(" buildRules = (\n");
+ writer.write(" );\n");
+ writer.write(" buildSettings = {\n");
+ writer.write(" DYLIB_COMPATIBILITY_VERSION = 1;\n");
+ writer.write(" DYLIB_CURRENT_VERSION = 1;\n");
+ //
+ // write preprocessor macros
+ //
+ if (gccConfig != null) {
+ String[] options = gccConfig.getPreArguments();
+ boolean hasD = false;
+ for (int i = 0; i < options.length; i++) {
+ if (options[i].startsWith("-D")) {
+ if (!hasD) {
+ writer.write(" GCC_PREPROCESSOR_DEFINITIONS = \"");
+ hasD = true;
+ } else {
+ writer.write(" ");
+ }
+ writer.write(options[i].substring(2));
+ }
+ }
+ if (hasD) {
+ writer.write("\";\n");
+ }
+ }
+ writer.write(" GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;\n");
+ writer.write(" GCC_WARN_UNKNOWN_PRAGMAS = NO;\n");
+ if (gccConfig != null) {
+ File[] includes = gccConfig.getIncludePath();
+ if (includes.length > 0) {
+ writer.write(" HEADER_SEARCH_PATHS = \"");
+ for (int i = 0; i < includes.length; i++) {
+ if (i > 0) {
+ writer.write(" ");
+ }
+ writer.write(CUtil.getRelativePath(basePath, includes[i]));
+ }
+ writer.write("\";\n");
+ }
+ }
+
+
+ String[] linkerArgs = null;
+ ProcessorConfiguration linkConfig = linkTarget.getConfiguration();
+ if (linkConfig instanceof CommandLineLinkerConfiguration) {
+ linkerArgs = ((CommandLineLinkerConfiguration) linkConfig).getPreArguments();
+ }
+
+
+ writer.write(" INSTALL_PATH = /usr/local/lib;\n");
+ if (linkerArgs != null) {
+ boolean hasLibPath = false;
+ for (int i = 0; i < linkerArgs.length; i++) {
+ if (linkerArgs[i].startsWith("-L")) {
+ if (!hasLibPath) {
+ writer.write(" LIBRARY_SEARCH_PATHS = \"");
+ hasLibPath = true;
+ } else {
+ writer.write(" ");
+ }
+ writer.write(linkerArgs[i].substring(2));
+ }
+ }
+ if (hasLibPath) {
+ writer.write("\";\n");
+ }
+ }
+ writer.write(" LIBRARY_STYLE = DYNAMIC;\n");
+ writer.write(" OTHER_CFLAGS = \"\";\n");
+ writer.write(" OTHER_LDFLAGS = \"");
+ if (linkerArgs != null) {
+ String prepend = "";
+ for (int i = 0; i < linkerArgs.length; i++) {
+ if (!linkerArgs[i].startsWith("-L")) {
+ writer.write(prepend);
+ writer.write(linkerArgs[i]);
+ prepend = " ";
+ }
+ }
+ }
+ writer.write("\";\n");
+ writer.write(" OTHER_REZFLAGS = \"\";\n");
+ writer.write(" PRODUCT_NAME = testbsd;\n");
+ writer.write(" SECTORDER_FLAGS = \"\";\n");
+ writer.write(" WARNING_CFLAGS = \"-Wmost\";\n");
+ writer.write(" };\n");
+ writer.write(" dependencies = (\n");
+ writer.write(" );\n");
+ writer.write(" isa = PBXNativeTarget;\n");
+
+ writer.write(" name = ");
+ writer.write(outFile.getName());
+ writer.write(";\n");
+ writer.write(" productName = ");
+ writer.write(outFile.getName());
+ writer.write(";\n");
+ writer.write(" productReference = D2AAC0630554660B00DB518D;\n");
+
+ String productType = "com.apple.product-type.library.dynamic";
+ String prefix = "lib";
+ String suffix = ".dylib";
+ String explicitFileType = "compiled.mach-o.dylib";
+ String outType = task.getOuttype();
+ if ("executable".equals(outType)) {
+ productType = "com.apple.product-type.tool";
+ prefix = "";
+ suffix = "";
+ explicitFileType = "compiled.mach-o.executable";
+ } else if ("static".equals(outType)) {
+ productType = "com.apple.product-type.library.static";
+ suffix = ".a";
+ explicitFileType = "archive.ar";
+ }
+ writer.write(" productType = \"");
+ writer.write(productType);
+ writer.write("\";\n");
+ writer.write(" };\n");
+ writer.write(" D2AAC0630554660B00DB518D = {\n");
+
+ writer.write(" explicitFileType = \"");
+ writer.write(explicitFileType);
+ writer.write("\";\n");
+ writer.write(" includeInIndex = 0;\n");
+ writer.write(" isa = PBXFileReference;\n");
+ writer.write(" path = ");
+ writer.write(outFile.getName());
+ writer.write(suffix);
+ writer.write(";\n");
+ writer.write(" refType = 3;\n");
+ writer.write(" sourceTree = BUILT_PRODUCTS_DIR;\n");
+ writer.write(" };\n");
+ writer.write(" };\n");
+ writer.write(" rootObject = 08FB7793FE84155DC02AAC07;\n");
+ writer.write(" }\n");
+
+ writer.close();
+ }
+
+ /**
+ * Gets the first recognized compiler from the
+ * compilation targets.
+ * @param targets compilation targets
+ * @return representative (hopefully) compiler configuration
+ */
+ private CommandLineCompilerConfiguration
+ getBaseCompilerConfiguration(Hashtable targets) {
+ //
+ // find first target with an GNU C++ compilation
+ //
+ CommandLineCompilerConfiguration compilerConfig = null;
+ //
+ // get the first target and assume that it is representative
+ //
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo targetInfo = (TargetInfo) targetIter.next();
+ ProcessorConfiguration config = targetInfo.getConfiguration();
+ String identifier = config.getIdentifier();
+ //
+ // for the first cl compiler
+ //
+ if (config instanceof CommandLineCompilerConfiguration) {
+ compilerConfig = (CommandLineCompilerConfiguration) config;
+ if (compilerConfig.getCompiler() instanceof GccCCompiler) {
+ return compilerConfig;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Source file with 96-bit source and build ID's.
+ */
+ private static final class SourceEntry {
+ /**
+ * Source file.
+ */
+ private final File file;
+
+ /**
+ * Source ID.
+ */
+ private final String sourceID;
+
+ /**
+ * Build step ID.
+ */
+ private final String buildID;
+
+ /**
+ * Constructor.
+ * @param fileArg source file
+ * @param sourceIDArg source ID
+ * @param buildIDArg build step ID
+ */
+ public SourceEntry(final File fileArg,
+ final String sourceIDArg,
+ final String buildIDArg) {
+ file = fileArg;
+ sourceID = sourceIDArg;
+ buildID = buildIDArg;
+ }
+
+ /**
+ * Get source file.
+ * @return source file
+ */
+ public File getFile() {
+ return file;
+ }
+
+ /**
+ * Get source ID.
+ * @return source ID
+ */
+ public String getSourceID() {
+ return sourceID;
+ }
+
+ /**
+ * Get build step ID.
+ * @return build step ID
+ */
+ public String getBuildID() {
+ return buildID;
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/apple/package.html b/src/net/sf/antcontrib/cpptasks/apple/package.html
new file mode 100644
index 0000000..43a2ac3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/apple/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Project writer for Apple Xcode
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java b/src/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java
new file mode 100644
index 0000000..15c4f7e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.arm;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the ARM C Compilers
+ *
+ * See Doc No: ARM DUI 0151A, Issued: Nov 2001 at
+ * http://www.arm.com/arm/User_Guides?OpenDocument
+ *
+ * @author Curt Arnold
+ *
+ */
+public class ADSCCompiler extends CommandLineCCompiler {
+ /**
+ * Header file extensions
+ */
+ private static final String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ /**
+ * Source file extensions
+ */
+ private static final String[] sourceExtensions = new String[]{".c", ".cc",
+ ".cpp", ".cxx", ".c++"};
+ /**
+ * Singleton for ARM 32-bit C compiler
+ */
+ private static final ADSCCompiler armcc = new ADSCCompiler("armcc", false,
+ null);
+ /**
+ * Singleton for ARM 32-bit C++ compiler
+ */
+ private static final ADSCCompiler armcpp = new ADSCCompiler("armcpp",
+ false, null);
+ /**
+ * Singleton for ARM 16-bit C compiler
+ */
+ private static final ADSCCompiler tcc = new ADSCCompiler("tcc", false, null);
+ /**
+ * Singleton for ARM 16-bit C++ compiler
+ */
+ private static final ADSCCompiler tcpp = new ADSCCompiler("tcpp", false,
+ null);
+ /**
+ * Singleton for ARM 32-bit C compiler
+ */
+ public static ADSCCompiler getArmCC() {
+ return armcc;
+ }
+ /**
+ * Singleton for ARM 32-bit C++ compiler
+ */
+ public static ADSCCompiler getArmCpp() {
+ return armcpp;
+ }
+ /**
+ * Singleton for ARM 16-bit C compiler
+ */
+ public static ADSCCompiler getThumbCC() {
+ return tcpp;
+ }
+ /**
+ * Singleton for ARM 16-bit C++ compiler
+ */
+ public static ADSCCompiler getThumbCpp() {
+ return tcpp;
+ }
+ private static void quoteFile(StringBuffer buf, String outPath) {
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ }
+ /**
+ * Private constructor
+ *
+ * @param command
+ * executable name
+ * @param newEnvironment
+ * Change environment
+ * @param env
+ * New environment
+ */
+ private ADSCCompiler(String command, boolean newEnvironment, Environment env) {
+ super(command, "-vsn", sourceExtensions, headerExtensions, ".o", false,
+ null, newEnvironment, env);
+ }
+ /**
+ * Adds command switches for generic configuration options
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#addImpliedArgs(java.util.Vector,
+ * boolean, boolean, boolean,
+ * net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ protected void addImpliedArgs(Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ if (debug) {
+ args.addElement("-g");
+ }
+ //
+ // didn't see anything about producing
+ // anything other than executables in the docs
+ if (linkType.isExecutable()) {
+ } else if (linkType.isSharedLibrary()) {
+ }
+ }
+ /**
+ * Adds flags that customize the warnings reported
+ *
+ * Compiler does not appear to have warning levels but ability to turn off
+ * specific errors by explicit switches, could fabricate levels by
+ * prioritizing errors.
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#addWarningSwitch(java.util.Vector,
+ * int)
+ */
+ protected void addWarningSwitch(Vector args, int warnings) {
+ }
+ /**
+ * Add command line options for preprocessor macro
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getDefineSwitch(java.lang.StringBuffer,
+ * java.lang.String, java.lang.String)
+ */
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("-D");
+ buffer.append(define);
+ if (value != null) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ /**
+ * ARMINC environment variable contains the default include path
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getEnvironmentIncludePath()
+ */
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("ARMINC", ";");
+ }
+ /**
+ * Returns command line option to specify include directory
+ *
+ */
+ protected String getIncludeDirSwitch(String source) {
+ StringBuffer buf = new StringBuffer("-I");
+ quoteFile(buf, source);
+ return buf.toString();
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return ADSLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return ADSLinker.getDllInstance();
+ }
+ return ADSLinker.getInstance();
+ }
+ /**
+ * Maximum command line length
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getMaximumCommandLength()
+ */
+ public int getMaximumCommandLength() {
+ return 1000;
+ }
+ /*
+ * Adds command to undefine preprocessor macro
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getUndefineSwitch(java.lang.StringBuffer,
+ * java.lang.String)
+ */
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ buffer.append("-U");
+ buffer.append(define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/arm/ADSLibrarian.java b/src/net/sf/antcontrib/cpptasks/arm/ADSLibrarian.java
new file mode 100644
index 0000000..65c430f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/ADSLibrarian.java
@@ -0,0 +1,159 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.arm;
+
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for ARM Librarian
+ *
+ * @author Curt Arnold
+ */
+public class ADSLibrarian extends CommandLineLinker {
+
+ private static final ADSLibrarian instance = new ADSLibrarian();
+
+ public static ADSLibrarian getInstance() {
+ return instance;
+ }
+
+ private ADSLibrarian()
+ {
+ super("armar",null,
+ new String[] { ".o" }, new String[0], ".lib", false, null);
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addBase(long, java.util.Vector)
+ */
+ protected void addBase(long base, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addFixed(java.lang.Boolean, java.util.Vector)
+ */
+ protected void addFixed(Boolean fixed, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addImpliedArgs(boolean, net.sf.antcontrib.cpptasks.compiler.LinkType, java.util.Vector)
+ */
+ protected void addImpliedArgs(
+ boolean debug,
+ LinkType linkType,
+ Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addIncremental(boolean, java.util.Vector)
+ */
+ protected void addIncremental(boolean incremental, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addMap(boolean, java.util.Vector)
+ */
+ protected void addMap(boolean map, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addStack(int, java.util.Vector)
+ */
+ protected void addStack(int stack, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getCommandFileSwitch(java.lang.String)
+ */
+ protected String getCommandFileSwitch(String commandFile) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPath()
+ */
+ public File[] getLibraryPath() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPatterns(java.lang.String[])
+ */
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return new String[0];
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType linkType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getMaximumCommandLength()
+ */
+ protected int getMaximumCommandLength() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getOutputFileSwitch(java.lang.String)
+ */
+ protected String[] getOutputFileSwitch(String outputFile) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#isCaseSensitive()
+ */
+ public boolean isCaseSensitive() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/arm/ADSLinker.java b/src/net/sf/antcontrib/cpptasks/arm/ADSLinker.java
new file mode 100644
index 0000000..fda52fa
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/ADSLinker.java
@@ -0,0 +1,166 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.arm;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the ARM Linker
+ *
+ * @author CurtA
+ */
+public class ADSLinker extends CommandLineLinker {
+ private static final ADSLinker dllInstance = new ADSLinker(".o");
+ private static final ADSLinker instance = new ADSLinker(".axf");
+ public static ADSLinker getDllInstance() {
+ return dllInstance;
+ }
+ public static ADSLinker getInstance() {
+ return instance;
+ }
+ private ADSLinker(String outputSuffix) {
+ super("armlink", "-vsn", new String[]{".o", ".lib", ".res"},
+ new String[]{".map", ".pdb", ".lnk"}, outputSuffix, false, null);
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addBase(long,
+ * java.util.Vector)
+ */
+ protected void addBase(long base, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addFixed(java.lang.Boolean,
+ * java.util.Vector)
+ */
+ protected void addFixed(Boolean fixed, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addImpliedArgs(boolean,
+ * net.sf.antcontrib.cpptasks.compiler.LinkType, java.util.Vector)
+ */
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (debug) {
+ args.addElement("-debug");
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addIncremental(boolean,
+ * java.util.Vector)
+ */
+ protected void addIncremental(boolean incremental, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addMap(boolean,
+ * java.util.Vector)
+ */
+ protected void addMap(boolean map, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addStack(int,
+ * java.util.Vector)
+ */
+ protected void addStack(int stack, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * May have to make this String array return
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getCommandFileSwitch(java.lang.String)
+ */
+ protected String getCommandFileSwitch(String commandFile) {
+ return "-via" + commandFile;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPath()
+ */
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("ARMLIB", ";");
+ }
+ /*
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPatterns(java.lang.String[])
+ */
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ //
+ // TODO: looks like bad extension
+ //
+ return new String[]{".o"};
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType linkType) {
+ return this;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getMaximumCommandLength()
+ */
+ protected int getMaximumCommandLength() {
+ return 1024;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getOutputFileSwitch(java.lang.String)
+ */
+ protected String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-output", outputFile};
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#isCaseSensitive()
+ */
+ public boolean isCaseSensitive() {
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/arm/CVS/Entries b/src/net/sf/antcontrib/cpptasks/arm/CVS/Entries
new file mode 100644
index 0000000..afd7834
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/CVS/Entries
@@ -0,0 +1,4 @@
+/ADSCCompiler.java/1.3/Fri Apr 23 20:15:46 2004//
+/ADSLibrarian.java/1.4/Thu Apr 22 08:06:54 2004//
+/ADSLinker.java/1.4/Thu Apr 22 08:06:54 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/arm/CVS/Repository b/src/net/sf/antcontrib/cpptasks/arm/CVS/Repository
new file mode 100644
index 0000000..43a1f4e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/arm
diff --git a/src/net/sf/antcontrib/cpptasks/arm/CVS/Root b/src/net/sf/antcontrib/cpptasks/arm/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/arm/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandCCompiler.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandCCompiler.java
new file mode 100644
index 0000000..fd9c657
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandCCompiler.java
@@ -0,0 +1,134 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.PrecompilingCommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Borland(r) C/C++ compiler.
+ *
+ * @author Curt Arnold
+ */
+public class BorlandCCompiler extends PrecompilingCommandLineCCompiler {
+ private static final String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ private static final String[] sourceExtensions = new String[]{".c", ".cc",
+ ".cpp", ".cxx", ".c++"};
+ private static final BorlandCCompiler instance = new BorlandCCompiler(
+ false, null);
+ public static BorlandCCompiler getInstance() {
+ return instance;
+ }
+ private BorlandCCompiler(boolean newEnvironment, Environment env) {
+ super("bcc32", "--version", sourceExtensions, headerExtensions, ".obj", false,
+ null, newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ //
+ // turn off compiler autodependency since
+ // we do it ourselves
+ args.addElement("-X");
+ if (exceptions) {
+ args.addElement("-x");
+ } else {
+ args.addElement("-x-");
+ }
+ if (multithreaded) {
+ args.addElement("-tWM");
+ }
+ if (debug) {
+ args.addElement("-Od");
+ args.addElement("-v");
+ } else {
+ if (optimization != null) {
+ if (optimization.isSpeed()) {
+ args.addElement("-O1");
+ } else {
+ if (optimization.isSpeed()) {
+ args.addElement("-O2");
+ } else {
+ if (optimization.isNoOptimization()) {
+ args.addElement("-Od");
+ }
+ }
+ }
+ }
+ }
+ if (rtti != null && !rtti.booleanValue()) {
+ args.addElement("-RT-");
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ BorlandProcessor.addWarningSwitch(args, level);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new BorlandCCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ protected CompilerConfiguration createPrecompileGeneratingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude) {
+ String[] additionalArgs = new String[]{"-H=" + lastInclude, "-Hc"};
+ return new CommandLineCompilerConfiguration(baseConfig, additionalArgs,
+ null, true);
+ }
+ protected CompilerConfiguration createPrecompileUsingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude, String[] exceptFiles) {
+ String[] additionalArgs = new String[]{"-Hu"};
+ return new CommandLineCompilerConfiguration(baseConfig, additionalArgs,
+ exceptFiles, false);
+ }
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ BorlandProcessor.getDefineSwitch(buffer, define, value);
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return BorlandProcessor.getEnvironmentPath("bcc32", 'I',
+ new String[]{"..\\include"});
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return BorlandProcessor.getIncludeDirSwitch("-I", includeDir);
+ }
+ public Linker getLinker(LinkType type) {
+ return BorlandLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ BorlandProcessor.getUndefineSwitch(buffer, define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandCfgParser.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandCfgParser.java
new file mode 100644
index 0000000..a452b1b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandCfgParser.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.parser.AbstractParser;
+import net.sf.antcontrib.cpptasks.parser.AbstractParserState;
+import net.sf.antcontrib.cpptasks.parser.LetterState;
+import net.sf.antcontrib.cpptasks.parser.WhitespaceOrLetterState;
+/**
+ * A parser that paths from a borland cfg file
+ *
+ * @author Curt Arnold
+ */
+public final class BorlandCfgParser extends AbstractParser {
+ private AbstractParserState newLineState;
+ private final Vector path = new Vector();
+ /**
+ *
+ *
+ */
+ public BorlandCfgParser(char switchChar) {
+ //
+ // a quoted path (-I"some path")
+ // doesn't end till a close quote and will be abandoned
+ // if a new line is encountered first
+ //
+ AbstractParserState quote = new CfgFilenameState(this, new char[]{'"'});
+ //
+ // an unquoted path (-Ic:\borland\include)
+ // ends at the first space or new line
+ AbstractParserState unquote = new CfgFilenameState(this, new char[]{
+ ' ', '\n', '\r'});
+ AbstractParserState quoteBranch = new QuoteBranchState(this, quote,
+ unquote);
+ AbstractParserState toNextSwitch = new ConsumeToSpaceOrNewLine(this);
+ AbstractParserState switchState = new LetterState(this, switchChar,
+ quoteBranch, toNextSwitch);
+ newLineState = new WhitespaceOrLetterState(this, '-', switchState);
+ }
+ public void addFilename(String include) {
+ path.addElement(include);
+ }
+ public AbstractParserState getNewLineState() {
+ return newLineState;
+ }
+ public String[] parsePath(Reader reader) throws IOException {
+ path.setSize(0);
+ super.parse(reader);
+ String[] retval = new String[path.size()];
+ path.copyInto(retval);
+ return retval;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java
new file mode 100644
index 0000000..6693ab9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java
@@ -0,0 +1,219 @@
+/*
+ *
+ * Copyright 2002-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the Borland(r) tlib Librarian
+ *
+ * @author Curt Arnold
+ */
+public class BorlandLibrarian extends CommandLineLinker {
+ private static final BorlandLibrarian instance = new BorlandLibrarian();
+ public static BorlandLibrarian getInstance() {
+ return instance;
+ }
+ private BorlandLibrarian() {
+ super("tlib", "--version", new String[]{".obj"}, new String[0], ".lib", false,
+ null);
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ protected String getCommandFileSwitch(String cmdFile) {
+ //
+ // tlib requires quotes around paths containing -
+ // ilink32 doesn't like them
+ StringBuffer buf = new StringBuffer("@");
+ BorlandProcessor.quoteFile(buf, cmdFile);
+ return buf.toString();
+ }
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return BorlandProcessor.getLibraryPatterns(libnames, libType);
+ }
+ public Linker getLinker(LinkType type) {
+ return BorlandLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ public String[] getOutputFileSwitch(String outFile) {
+ return BorlandProcessor.getOutputFileSwitch(outFile);
+ }
+ public boolean isCaseSensitive() {
+ return BorlandProcessor.isCaseSensitive();
+ }
+ /**
+ * Gets identifier for the linker.
+ *
+ * TLIB will lockup when attempting to get version
+ * information. Since the Librarian version isn't critical
+ * just return a stock response.
+ */
+ public String getIdentifier() {
+ return "TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation";
+ }
+
+ /**
+ * Prepares argument list for exec command.
+ *
+ * @param outputFile
+ * linker output file
+ * @param sourceFiles
+ * linker input files (.obj, .o, .res)
+ * @param args
+ * linker arguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareArguments(
+ CCTask task,
+ String outputDir,
+ String outputName,
+ String[] sourceFiles,
+ CommandLineLinkerConfiguration config) {
+ String[] preargs = config.getPreArguments();
+ String[] endargs = config.getEndArguments();
+ StringBuffer buf = new StringBuffer();
+ Vector execArgs = new Vector(preargs.length + endargs.length + 10
+ + sourceFiles.length);
+
+ execArgs.addElement(this.getCommand());
+ String outputFileName = new File(outputDir, outputName).toString();
+ execArgs.addElement(quoteFilename(buf, outputFileName));
+
+ for (int i = 0; i < preargs.length; i++) {
+ execArgs.addElement(preargs[i]);
+ }
+
+ //
+ // add a place-holder for page size
+ //
+ int pageSizeIndex = execArgs.size();
+ execArgs.addElement(null);
+
+ int objBytes = 0;
+
+ for (int i = 0; i < sourceFiles.length; i++) {
+ String last4 = sourceFiles[i]
+ .substring(sourceFiles[i].length() - 4).toLowerCase();
+ if (last4.equals(".def")) {
+ } else {
+ if (last4.equals(".res")) {
+ } else {
+ if (last4.equals(".lib")) {
+ } else {
+ execArgs.addElement("+" + quoteFilename(buf, sourceFiles[i]));
+ objBytes += new File(sourceFiles[i]).length();
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < endargs.length; i++) {
+ execArgs.addElement(endargs[i]);
+ }
+
+ String[] execArguments = new String[execArgs.size()];
+ execArgs.copyInto(execArguments);
+
+ int minPageSize = objBytes >> 16;
+ int pageSize = 0;
+ for(int i = 4; i <= 15; i++) {
+ pageSize = 1 << i;
+ if (pageSize > minPageSize) break;
+ }
+ execArguments[pageSizeIndex] = "/P" + Integer.toString(pageSize);
+
+ return execArguments;
+ }
+
+ /**
+ * Prepares argument list to execute the linker using a response file.
+ *
+ * @param outputFile
+ * linker output file
+ * @param args
+ * output of prepareArguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareResponseFile(File outputFile, String[] args)
+ throws IOException {
+ String[] cmdargs = BorlandProcessor.prepareResponseFile(outputFile, args, " & \n");
+ cmdargs[cmdargs.length - 1] = getCommandFileSwitch(cmdargs[cmdargs.length -1]);
+ return cmdargs;
+ }
+
+ /**
+ * Builds a library
+ *
+ */
+ public void link(CCTask task,
+ File outputFile,
+ String[] sourceFiles,
+ CommandLineLinkerConfiguration config)
+ throws BuildException
+ {
+ //
+ // delete any existing library
+ outputFile.delete();
+ //
+ // build a new library
+ super.link(task, outputFile, sourceFiles, config);
+ }
+
+ /**
+ * Encloses problematic file names within quotes.
+ * @param buf string buffer
+ * @param filename source file name
+ * @returns filename potentially enclosed in quotes.
+ */
+ protected String quoteFilename(StringBuffer buf,String filename) {
+ buf.setLength(0);
+ BorlandProcessor.quoteFile(buf, filename);
+ return buf.toString();
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java
new file mode 100644
index 0000000..315761f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java
@@ -0,0 +1,293 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.platforms.WindowsPlatform;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the Borland(r) ilink32 linker
+ *
+ * @author Curt Arnold
+ */
+public final class BorlandLinker extends CommandLineLinker {
+ private static final BorlandLinker dllLinker = new BorlandLinker(".dll");
+ private static final BorlandLinker instance = new BorlandLinker(".exe");
+ public static BorlandLinker getInstance() {
+ return instance;
+ }
+ private BorlandLinker(String outputSuffix) {
+ super("ilink32", "-r", new String[]{".obj", ".lib", ".res"},
+ new String[]{".map", ".pdb", ".lnk"}, outputSuffix, false, null);
+ }
+ protected void addBase(long base, Vector args) {
+ if (base >= 0) {
+ String baseAddr = Long.toHexString(base);
+ args.addElement("-b:" + baseAddr);
+ }
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (linkType.isExecutable()) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("/ap");
+ } else {
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("/Tpe");
+ }
+ }
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("/Tpd");
+ args.addElement("/Gi");
+ }
+ if (debug) {
+ args.addElement("-v");
+ }
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ protected void addMap(boolean map, Vector args) {
+ if (!map) {
+ args.addElement("-x");
+ }
+ }
+ protected void addStack(int stack, Vector args) {
+ if (stack >= 0) {
+ String stackStr = Integer.toHexString(stack);
+ args.addElement("-S:" + stackStr);
+ }
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ public String getIdentifier() {
+ return "Borland Linker";
+ }
+ public File[] getLibraryPath() {
+ return BorlandProcessor.getEnvironmentPath("ilink32", 'L',
+ new String[]{"..\\lib"});
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return BorlandProcessor.getLibraryPatterns(libnames, libType);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return BorlandLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ public String[] getOutputFileSwitch(String outFile) {
+ return BorlandProcessor.getOutputFileSwitch(outFile);
+ }
+ protected String getStartupObject(LinkType linkType) {
+ if (linkType.isSharedLibrary()) {
+ return "c0d32.obj";
+ }
+ if (linkType.isSubsystemGUI()) {
+ return "c0w32.obj";
+ }
+ if (linkType.isSubsystemConsole()) {
+ return "c0x32.obj";
+ }
+ return null;
+ }
+ public boolean isCaseSensitive() {
+ return BorlandProcessor.isCaseSensitive();
+ }
+ /**
+ * Prepares argument list for exec command.
+ *
+ * @param outputFile
+ * linker output file
+ * @param sourceFiles
+ * linker input files (.obj, .o, .res)
+ * @param args
+ * linker arguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareArguments(
+ CCTask task,
+ String outputDir,
+ String outputName,
+ String[] sourceFiles,
+ CommandLineLinkerConfiguration config) {
+ String[] preargs = config.getPreArguments();
+ String[] endargs = config.getEndArguments();
+ Vector execArgs = new Vector(preargs.length + endargs.length + 10
+ + sourceFiles.length);
+ execArgs.addElement(this.getCommand());
+ for (int i = 0; i < preargs.length; i++) {
+ execArgs.addElement(preargs[i]);
+ }
+ for (int i = 0; i < endargs.length; i++) {
+ execArgs.addElement(endargs[i]);
+ }
+ //
+ // see if the input files have any known startup obj files
+ //
+ String startup = null;
+ for (int i = 0; i < sourceFiles.length; i++) {
+ String filename = new File(sourceFiles[i]).getName().toLowerCase();
+ if (startup != null && filename.substring(0, 2).equals("c0")
+ && filename.substring(3, 5).equals("32")
+ && filename.substring(filename.length() - 4).equals(".obj")) {
+ startup = sourceFiles[i];
+ }
+ }
+ //
+ // c0w32.obj, c0x32.obj or c0d32.obj depending on
+ // link type
+ if (startup == null) {
+ startup = config.getStartupObject();
+ }
+ execArgs.addElement(startup);
+ Vector resFiles = new Vector();
+ Vector libFiles = new Vector();
+ String defFile = null;
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < sourceFiles.length; i++) {
+ String last4 = sourceFiles[i]
+ .substring(sourceFiles[i].length() - 4).toLowerCase();
+ if (last4.equals(".def")) {
+ defFile = quoteFilename(buf, sourceFiles[i]);
+ } else {
+ if (last4.equals(".res")) {
+ resFiles.addElement(quoteFilename(buf, sourceFiles[i]));
+ } else {
+ if (last4.equals(".lib")) {
+ libFiles.addElement(quoteFilename(buf, sourceFiles[i]));
+ } else {
+ execArgs.addElement(quoteFilename(buf, sourceFiles[i]));
+ }
+ }
+ }
+ }
+ //
+ // output file name
+ //
+ String outputFileName = new File(outputDir, outputName).toString();
+ execArgs.addElement("," + quoteFilename(buf, outputFileName));
+ if (config.getMap()) {
+ int lastPeriod = outputFileName.lastIndexOf('.');
+ String mapName;
+ if (lastPeriod < outputFileName.length() - 4) {
+ mapName = outputFileName + ".map";
+ } else {
+ mapName = outputFileName.substring(0, lastPeriod) + ".map";
+ }
+ execArgs.addElement("," + quoteFilename(buf, mapName) + ",");
+ } else {
+ execArgs.addElement(",,");
+ }
+ //
+ // add all the libraries
+ //
+ Enumeration libEnum = libFiles.elements();
+ boolean hasImport32 = false;
+ boolean hasCw32 = false;
+ while (libEnum.hasMoreElements()) {
+ String libName = (String) libEnum.nextElement();
+ if (libName.equalsIgnoreCase("import32.lib")) {
+ hasImport32 = true;
+ }
+ if (libName.equalsIgnoreCase("cw32.lib")) {
+ hasImport32 = true;
+ }
+ execArgs.addElement(quoteFilename(buf, libName));
+ }
+ if (!hasCw32) {
+ execArgs.addElement(quoteFilename(buf, "cw32.lib"));
+ }
+ if (!hasImport32) {
+ execArgs.addElement(quoteFilename(buf, "import32.lib"));
+ }
+ if (defFile == null) {
+ execArgs.addElement(",,");
+ } else {
+ execArgs.addElement("," + quoteFilename(buf, defFile) + ",");
+ }
+ Enumeration resEnum = resFiles.elements();
+ while (resEnum.hasMoreElements()) {
+ String resName = (String) resEnum.nextElement();
+ execArgs.addElement(quoteFilename(buf, resName));
+ }
+ String[] execArguments = new String[execArgs.size()];
+ execArgs.copyInto(execArguments);
+ return execArguments;
+ }
+ /**
+ * Prepares argument list to execute the linker using a response file.
+ *
+ * @param outputFile
+ * linker output file
+ * @param args
+ * output of prepareArguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareResponseFile(File outputFile, String[] args)
+ throws IOException {
+ String cmdargs[] = BorlandProcessor.prepareResponseFile(outputFile, args, " + \n");
+ cmdargs[cmdargs.length - 1] = getCommandFileSwitch(cmdargs[cmdargs.length -1]);
+ return cmdargs;
+ }
+
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param executableName name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ */
+ public void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher) throws IOException {
+ WindowsPlatform.addVersionFiles(versionInfo, linkType, outputFile, isDebug, objDir, matcher);
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java
new file mode 100644
index 0000000..bbfeba8
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java
@@ -0,0 +1,219 @@
+/*
+ *
+ * Copyright 2002-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Vector;
+import java.io.FileWriter;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+/**
+ * A add-in class for Borland(r) processor adapters
+ *
+ *
+ */
+public final class BorlandProcessor {
+ public static void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w-");
+ break;
+ case 5 :
+ args.addElement("-w!");
+ break;
+ default :
+ args.addElement("-w");
+ break;
+ }
+ }
+ public static void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("-D");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ /**
+ * This method extracts path information from the appropriate .cfg file in
+ * the install directory.
+ *
+ * @param toolName
+ * Tool name, for example, "bcc32", "brc32", "ilink32"
+ * @param switchChar
+ * Command line switch character, for example "L" for libraries
+ * @param defaultRelativePaths
+ * default paths relative to executable directory
+ * @return path
+ */
+ public static File[] getEnvironmentPath(String toolName, char switchChar,
+ String[] defaultRelativePath) {
+ if (toolName == null) {
+ throw new NullPointerException("toolName");
+ }
+ if (defaultRelativePath == null) {
+ throw new NullPointerException("defaultRelativePath");
+ }
+ String[] path = defaultRelativePath;
+ File exeDir = CUtil.getExecutableLocation(toolName + ".exe");
+ if (exeDir != null) {
+ File cfgFile = new File(exeDir, toolName + ".cfg");
+ if (cfgFile.exists()) {
+ try {
+ Reader reader = new BufferedReader(new FileReader(cfgFile));
+ BorlandCfgParser cfgParser = new BorlandCfgParser(
+ switchChar);
+ path = cfgParser.parsePath(reader);
+ reader.close();
+ } catch (IOException ex) {
+ //
+ // could be logged
+ //
+ }
+ }
+ } else {
+ //
+ // if can't find the executable,
+ // assume current directory to resolve relative paths
+ //
+ exeDir = new File(System.getProperty("user.dir"));
+ }
+ int nonExistant = 0;
+ File[] resourcePath = new File[path.length];
+ for (int i = 0; i < path.length; i++) {
+ resourcePath[i] = new File(path[i]);
+ if (!resourcePath[i].isAbsolute()) {
+ resourcePath[i] = new File(exeDir, path[i]);
+ }
+ //
+ // if any of the entries do not exist or are
+ // not directories, null them out
+ if (!(resourcePath[i].exists() && resourcePath[i].isDirectory())) {
+ resourcePath[i] = null;
+ nonExistant++;
+ }
+ }
+ //
+ // if there were some non-existant or non-directory
+ // entries in the configuration file then
+ // create a shorter array
+ if (nonExistant > 0) {
+ File[] culled = new File[resourcePath.length - nonExistant];
+ int index = 0;
+ for (int i = 0; i < resourcePath.length; i++) {
+ if (resourcePath[i] != null) {
+ culled[index++] = resourcePath[i];
+ }
+ }
+ resourcePath = culled;
+ }
+ return resourcePath;
+ }
+ public static String getIncludeDirSwitch(String includeOption,
+ String includeDir) {
+ StringBuffer buf = new StringBuffer(includeOption);
+ quoteFile(buf, includeDir);
+ return buf.toString();
+ }
+ public static String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length];
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(libnames[i]);
+ buf.append(".lib");
+ patterns[i] = buf.toString();
+ }
+ return patterns;
+ }
+ public static String[] getOutputFileSwitch(String outFile) {
+ return new String[0];
+ }
+ public static void getUndefineSwitch(StringBuffer buffer, String define) {
+ buffer.append("-U");
+ buffer.append(define);
+ }
+ public static boolean isCaseSensitive() {
+ return false;
+ }
+ public static void quoteFile(StringBuffer buf, String outPath) {
+ if (outPath.charAt(0) != '\"'
+ && (outPath.indexOf(' ') >= 0
+ || outPath.indexOf('-') >= 0
+ || outPath.indexOf('/') >= 0)) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ }
+
+ /**
+ * Prepares argument list to execute the linker using a response file.
+ *
+ * @param outputFile
+ * linker output file
+ * @param args
+ * output of prepareArguments
+ * @return arguments for runTask
+ */
+ public static String[] prepareResponseFile(File outputFile,
+ String[] args,
+ String continuation)
+ throws IOException {
+ String baseName = outputFile.getName();
+ File commandFile = new File(outputFile.getParent(), baseName + ".rsp");
+ FileWriter writer = new FileWriter(commandFile);
+ for (int i = 1; i < args.length - 1; i++) {
+ writer.write(args[i]);
+ //
+ // if either the current argument ends with
+ // or next argument starts with a comma then
+ // don't split the line
+ if (args[i].endsWith(",") || args[i + 1].startsWith(",")) {
+ writer.write(' ');
+ } else {
+ //
+ // split the line to make it more readable
+ //
+ writer.write(continuation);
+ }
+ }
+ //
+ // write the last argument
+ //
+ if (args.length > 1) {
+ writer.write(args[args.length - 1]);
+ }
+ writer.close();
+ String[] execArgs = new String[2];
+ execArgs[0] = args[0];
+ //
+ // left for the caller to decorate
+ execArgs[1] = commandFile.toString();
+ return execArgs;
+ }
+
+ private BorlandProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/BorlandResourceCompiler.java b/src/net/sf/antcontrib/cpptasks/borland/BorlandResourceCompiler.java
new file mode 100644
index 0000000..debfa2b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/BorlandResourceCompiler.java
@@ -0,0 +1,129 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Borland(r) brc32 Resource compiler.
+ *
+ * @author Curt Arnold
+ */
+public class BorlandResourceCompiler extends CommandLineCompiler {
+ private static final BorlandResourceCompiler instance = new BorlandResourceCompiler(
+ false, null);
+ public static BorlandResourceCompiler getInstance() {
+ return instance;
+ }
+ private BorlandResourceCompiler(boolean newEnvironment, Environment env) {
+ super("brc32", "c:\\__bogus\\__bogus.rc", new String[]{".rc"},
+ new String[]{".h", ".hpp", ".inl"}, ".res", false, null,
+ newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ //
+ // compile only
+ //
+ args.addElement("-r");
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new BorlandResourceCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ public void compile(CCTask task, File outputDir, String[] sourceFiles,
+ String[] args, String[] endArgs, boolean relentless,
+ CommandLineCompilerConfiguration config, ProgressMonitor monitor)
+ throws BuildException {
+ super.compile(task, outputDir, sourceFiles, args, endArgs, relentless,
+ config, monitor);
+ }
+ /**
+ * The include parser for C will work just fine, but we didn't want to
+ * inherit from CommandLineCCompiler
+ */
+ protected Parser createParser(File source) {
+ return new CParser();
+ }
+ protected int getArgumentCountPerInputFile() {
+ return 2;
+ }
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("-d");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return BorlandProcessor.getEnvironmentPath("brc32", 'i',
+ new String[]{"..\\include"});
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return BorlandProcessor.getIncludeDirSwitch("-i", includeDir);
+ }
+ protected String getInputFileArgument(File outputDir, String filename,
+ int index) {
+ if (index == 0) {
+ String[] outputFileNames = getOutputFileNames(filename, null);
+ String fullOutputName = new File(outputDir, outputFileNames[0])
+ .toString();
+ return "-fo" + fullOutputName;
+ }
+ return filename;
+ }
+ public Linker getLinker(LinkType type) {
+ return BorlandLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+ protected int getTotalArgumentLengthForInputFile(File outputDir,
+ String inputFile) {
+ String arg1 = getInputFileArgument(outputDir, inputFile, 0);
+ String arg2 = getInputFileArgument(outputDir, inputFile, 1);
+ return arg1.length() + arg2.length() + 2;
+ }
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/CBuilderXProjectWriter.java b/src/net/sf/antcontrib/cpptasks/borland/CBuilderXProjectWriter.java
new file mode 100644
index 0000000..dfe5ec6
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/CBuilderXProjectWriter.java
@@ -0,0 +1,542 @@
+/*
+ *
+ * Copyright 2004-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+import net.sf.antcontrib.cpptasks.ide.ProjectDef;
+import net.sf.antcontrib.cpptasks.ide.ProjectWriter;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.Serializer;
+import org.apache.xml.serialize.XMLSerializer;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * Writes a CBuilderX 1.0 project file.
+ *
+ * @author curta
+ *
+ */
+public final class CBuilderXProjectWriter
+ implements ProjectWriter {
+ /**
+ * Constructor.
+ */
+ public CBuilderXProjectWriter() {
+ }
+
+ /**
+ * Writes a project definition file.
+ *
+ * @param fileName
+ * project name for file, should has .cbx extension
+ * @param task
+ * cc task for which to write project
+ * @param projectDef
+ * project element
+ * @param sources source files
+ * @param targets compilation targets
+ * @param linkTarget link target
+ * @throws IOException if I/O error
+ * @throws SAXException if XML serialization error
+ */
+ public void writeProject(final File fileName,
+ final CCTask task,
+ final ProjectDef projectDef,
+ final List sources,
+ final Hashtable targets,
+ final TargetInfo linkTarget) throws
+ IOException,
+ SAXException {
+
+ String projectName = projectDef.getName();
+ if (projectName == null) {
+ projectName = fileName.getName();
+ }
+ final String basePath = fileName.getAbsoluteFile().getParent();
+
+ File projectFile = new File(fileName + ".cbx");
+ if (!projectDef.getOverwrite() && projectFile.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + projectFile.toString());
+ }
+
+ CommandLineCompilerConfiguration compilerConfig =
+ getBaseCompilerConfiguration(targets);
+ if (compilerConfig == null) {
+ throw new BuildException(
+ "Unable to generate C++ BuilderX project when gcc or bcc is not used.");
+ }
+
+ OutputStream outStream = new FileOutputStream(projectFile);
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true);
+ Serializer serializer = new XMLSerializer(outStream, format);
+ ContentHandler content = serializer.asContentHandler();
+ content.startDocument();
+ AttributesImpl emptyAttrs = new AttributesImpl();
+ content.startElement(null, "project", "project", emptyAttrs);
+ PropertyWriter propertyWriter = new PropertyWriter(content);
+ propertyWriter.write("build.config", "active", "0");
+ propertyWriter.write("build.config", "count", "0");
+ propertyWriter.write("build.config", "excludedefaultforzero", "0");
+ propertyWriter.write("build.config.0", "builddir", "Debug");
+ propertyWriter.write("build.config.0", "key", "Debug_Build");
+ propertyWriter.write("build.config.0", "linux.builddir",
+ "linux/Debug_Build");
+ propertyWriter.write("build.config.0", "settings.MinGW",
+ "default;debug");
+ propertyWriter.write("build.config.0", "settings.gnuc++",
+ "default;debug");
+ propertyWriter.write("build.config.0", "settings.intellinia32",
+ "default;debug");
+ propertyWriter.write("build.config.0", "settings.mswin32",
+ "default;debug");
+ propertyWriter.write("build.config.0", "type", "Toolset");
+ propertyWriter.write("build.config.0", "win32.builddir",
+ "windows/Debug_Build");
+ propertyWriter.write("build.node", "name", projectDef.getName());
+ final String buildType = getBuildType(task);
+ propertyWriter.write("build.node", "type", buildType);
+ propertyWriter.write("build.platform", "active",
+ getActivePlatform(task));
+ propertyWriter.write("build.platform", "linux.Debug_Build.toolset",
+ "gnuc++");
+ propertyWriter.write("build.platform", "linux.Release_Build.toolset",
+ "gnuc++");
+ propertyWriter.write("build.platform", "linux.default", "gnuc++");
+ propertyWriter.write("build.platform", "linux.gnuc++.enabled", "1");
+ propertyWriter.write("build.platform", "linux.mswin32.enabled", "1");
+ propertyWriter.write("build.platform", "linux.win32b.enabled", "1");
+ propertyWriter.write("build.platform", "solaris.default", "gnuc++");
+ propertyWriter.write("build.platform", "solaris.enabled", "1");
+ String toolset = getWin32Toolset(compilerConfig);
+ propertyWriter.write("build.platform", "win32.default", toolset);
+ propertyWriter.write("build.platform", "win32." + toolset + ".enabled", "1");
+
+ propertyWriter.write("cbproject", "version", "X.1.0");
+ if ("dllproject".equals(buildType)) {
+ propertyWriter.write("gnuc++.g++compile",
+ "option.fpic_using_GOT.enabled", "1");
+ propertyWriter.write("gnuc++.g++link", "option.shared.enabled", "1");
+ propertyWriter.write("intellinia32.icc", "option.minus_Kpic.enabled",
+ "1");
+ propertyWriter.write("intellinia32.icclink",
+ "option.minus_shared.enabled", "1");
+ }
+ //
+ // assume the first target is representative of all compilation tasks
+ //
+ writeCompileOptions(basePath, propertyWriter, compilerConfig);
+ writeLinkOptions(basePath, propertyWriter, linkTarget);
+ propertyWriter.write("linux.gnuc++.Debug_Build", "saved", "1");
+ if ("dllproject".equals(buildType)) {
+ propertyWriter.write("runtime", "ExcludeDefaultForZero", "1");
+ //propertyWriter.write("unique", "id", "852");
+ } else if ("exeproject".equals(buildType)) {
+ propertyWriter.write("runtime.0", "BuildTargetOnRun",
+ "com.borland.cbuilder.build."
+ + "CBProjectBuilder$ProjectBuildAction;make");
+ propertyWriter.write("runtime.0", "ConfigurationName",
+ projectDef.getName());
+ propertyWriter.write("runtime.0", "RunnableType",
+ "com.borland.cbuilder.runtime.ExecutableRunner");
+ }
+ AttributesImpl fileAttributes = new AttributesImpl();
+ fileAttributes.addAttribute(null, "path", "path", "#PCDATA", "");
+ AttributesImpl gccAttributes = null;
+ if (!"g++".equals(compilerConfig.getCommand())) {
+ gccAttributes = new AttributesImpl();
+ gccAttributes.addAttribute(null, "category", "category", "#PCDATA",
+ "build.basecmd");
+ gccAttributes.addAttribute(null, "name", "name", "#PCDATA",
+ "linux.gnuc++.Debug_Build.g++_key");
+ gccAttributes.addAttribute(null, "value", "value", "#PCDATA",
+ compilerConfig.getCommand());
+ }
+
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo info = (TargetInfo) targetIter.next();
+ File[] targetsources = info.getSources();
+ for (int i = 0; i < targetsources.length; i++) {
+ String relativePath = CUtil.getRelativePath(basePath,
+ targetsources[i]);
+ fileAttributes.setValue(0, relativePath);
+ content.startElement(null, "file", "file", fileAttributes);
+
+ //
+ // if file ends with .c, use gcc instead of g++
+ //
+ if (gccAttributes != null) {
+ content.startElement(null, "property", "property", gccAttributes);
+ content.endElement(null, "property", "property");
+ }
+ content.endElement(null, "file", "file");
+ }
+ }
+ content.endElement(null, "project", "project");
+ content.endDocument();
+ }
+
+ /**
+ * Gets build type from link target.
+ * @param task CCTask current task
+ * @return String build type
+ */
+ private String getBuildType(final CCTask task) {
+ String outType = task.getOuttype();
+ if ("executable".equals(outType)) {
+ return "exeproject";
+ } else if ("static".equals(outType)) {
+ return "libraryproject";
+ }
+ return "dllproject";
+ }
+
+ /**
+ * Gets active platform.
+ * @param task CCTask cc task
+ * @return String platform identifier
+ */
+ private String getActivePlatform(final CCTask task) {
+ String osName = System.getProperty("os.name").toLowerCase(Locale.US);
+ if (osName.indexOf("windows") >= 0) {
+ return "win32";
+ }
+ return "linux";
+ }
+
+ private String getWin32Toolset(final CommandLineCompilerConfiguration compilerConfig) {
+ if (compilerConfig != null && compilerConfig.getCompiler() instanceof BorlandCCompiler) {
+ return "win32b";
+ }
+ return "MinGW";
+ }
+
+ /**
+ * Utility class to generate property elements.
+ */
+ private static class PropertyWriter {
+ /**
+ * Content handler.
+ */
+ private ContentHandler content;
+
+ /**
+ * Attributes list.
+ */
+ private AttributesImpl propertyAttributes;
+
+ /**
+ * Constructor.
+ *
+ * @param contentHandler ContentHandler content handler
+ */
+ public PropertyWriter(final ContentHandler contentHandler) {
+ content = contentHandler;
+ propertyAttributes = new AttributesImpl();
+ propertyAttributes.addAttribute(null, "category", "category",
+ "#PCDATA", "");
+ propertyAttributes
+ .addAttribute(null, "name", "name", "#PCDATA", "");
+ propertyAttributes.addAttribute(null, "value", "value", "#PCDATA",
+ "");
+ }
+
+ /**
+ * Write property element.
+ *
+ * @param category String category
+ * @param name String property name
+ * @param value String property value
+ * @throws SAXException if I/O error or illegal content
+ */
+ public final void write(final String category,
+ final String name,
+ final String value) throws SAXException {
+ propertyAttributes.setValue(0, category);
+ propertyAttributes.setValue(1, name);
+ propertyAttributes.setValue(2, value);
+ content.startElement(null, "property", "property",
+ propertyAttributes);
+ content.endElement(null, "property", "property");
+ }
+ }
+
+ /**
+ * Gets the first recognized compiler from the
+ * compilation targets.
+ * @param targets compilation targets
+ * @return representative (hopefully) compiler configuration
+ */
+ private CommandLineCompilerConfiguration
+ getBaseCompilerConfiguration(final Hashtable targets) {
+ //
+ // find first target with an gcc or bcc compilation
+ //
+ CommandLineCompilerConfiguration compilerConfig = null;
+ //
+ // get the first target and assume that it is representative
+ //
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo targetInfo = (TargetInfo) targetIter.next();
+ ProcessorConfiguration config = targetInfo.getConfiguration();
+ String identifier = config.getIdentifier();
+ //
+ // for the first gcc or bcc compiler
+ //
+ if (config instanceof CommandLineCompilerConfiguration) {
+ compilerConfig = (CommandLineCompilerConfiguration) config;
+ if (compilerConfig.getCompiler() instanceof GccCCompiler ||
+ compilerConfig.getCompiler() instanceof BorlandCCompiler) {
+ return compilerConfig;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Writes elements corresponding to compilation options.
+ *
+ * @param baseDir String base directory
+ * @param writer PropertyWriter property writer
+ * @param compilerConfig representative configuration
+ * @throws SAXException if I/O error or illegal content
+ */
+ private void writeCompileOptions(final String baseDir,
+ final PropertyWriter writer,
+ final CommandLineCompilerConfiguration
+ compilerConfig) throws SAXException {
+ boolean isBcc = false;
+ boolean isUnix = true;
+ String compileID = "linux.Debug_Build.gnuc++.g++compile";
+ if (compilerConfig.getCompiler() instanceof BorlandCCompiler) {
+ compileID = "win32.Debug_Build.win32b.bcc32";
+ isUnix = false;
+ isBcc = true;
+ }
+
+ File[] includePath = compilerConfig.getIncludePath();
+ int includeIndex = 1;
+ if (isUnix) {
+ writer.write(compileID,
+ "option.I.arg." + (includeIndex++),
+ "/usr/include");
+ writer.write(compileID,
+ "option.I.arg." + (includeIndex++),
+ "/usr/include/g++-3");
+ }
+ for (int i = 0; i < includePath.length; i++) {
+ String relPath = CUtil.getRelativePath(baseDir, includePath[i]);
+ writer.write(compileID,
+ "option.I.arg." + (includeIndex++),
+ relPath);
+ }
+ if (includePath.length > 0) {
+ writer.write(compileID,
+ "option.I.enabled",
+ "1");
+ }
+
+ String defineBase = "option.D_MACRO_VALUE";
+ if (isBcc) {
+ defineBase = "option.D";
+ }
+ String defineOption = defineBase + ".arg.";
+ int defineIndex = 1;
+ int undefineIndex = 1;
+ String[] preArgs = compilerConfig.getPreArguments();
+ for (int i = 0; i < preArgs.length; i++) {
+ if (preArgs[i].startsWith("-D")) {
+ writer.write(compileID,
+ defineOption + (defineIndex++),
+ preArgs[i].substring(2));
+ } else if (preArgs[i].startsWith("-U")) {
+ writer.write(compileID,
+ "option.U.arg."
+ + (undefineIndex++), preArgs[i]
+ .substring(2));
+ } else if (!(preArgs[i].startsWith("-I")
+ || preArgs[i].startsWith("-o"))) {
+ //
+ // any others (-g, -fno-rtti, -w, -Wall, etc)
+ //
+ writer.write(compileID,
+ "option." + preArgs[i].substring(1) + ".enabled",
+ "1");
+ }
+ }
+ if (defineIndex > 1) {
+ writer.write(compileID,
+ defineBase + ".enabled",
+ "1");
+ }
+ if (undefineIndex > 1) {
+ writer.write(compileID,
+ "option.U.enabled",
+ "1");
+ }
+ }
+
+ /**
+ * Writes elements corresponding to link options.
+ *
+ * @param baseDir String base directory
+ * @param writer PropertyWriter property writer
+ * @param linkTarget TargetInfo link target
+ * @throws SAXException if I/O error or illegal content
+ */
+ private void
+ writeLinkOptions(final String baseDir,
+ final PropertyWriter writer,
+ final TargetInfo linkTarget) throws SAXException {
+ if (linkTarget != null) {
+ ProcessorConfiguration config = linkTarget.getConfiguration();
+ if (config instanceof CommandLineLinkerConfiguration) {
+ CommandLineLinkerConfiguration linkConfig =
+ (CommandLineLinkerConfiguration) config;
+
+ if (linkConfig.getLinker() instanceof BorlandLinker) {
+ String linkID = "win32.Debug_Build.win32b.ilink32";
+ writeIlinkArgs(writer, linkID, linkConfig.getPreArguments());
+ writeIlinkArgs(writer, linkID, linkConfig.getEndArguments());
+ writer.write(linkID, "param.libfiles.1", "cw32mt.lib");
+ writer.write(linkID, "param.libfiles.2", "import32.lib");
+ int libIndex = 3;
+ String[] libNames = linkConfig.getLibraryNames();
+ for(int i = 0; i < libNames.length; i++) {
+ writer.write(linkID, "param.libfiles." + (libIndex++),
+ libNames[i]);
+ }
+ String startup = linkConfig.getStartupObject();
+ if (startup != null) {
+ writer.write(linkID, "param.objfiles.1", startup);
+ }
+ } else {
+ String linkID = "linux.Debug_Build.gnuc++.g++link";
+ writeLdArgs(writer, linkID, linkConfig.getPreArguments());
+ writeLdArgs(writer, linkID, linkConfig.getEndArguments());
+ }
+ }
+ }
+ }
+
+ /**
+ * Writes ld linker options to project file.
+ *
+ * @param writer PropertyWriter property writer
+ * @param linkID String linker identifier
+ * @param preArgs String[] linker arguments
+ * @throws SAXException thrown if unable to write option
+ */
+ private void writeLdArgs(final PropertyWriter writer,
+ final String linkID,
+ final String[] preArgs) throws SAXException {
+ int objnameIndex = 1;
+ int libnameIndex = 1;
+ int libpathIndex = 1;
+ for (int i = 0; i < preArgs.length; i++) {
+ if (preArgs[i].startsWith("-o")) {
+ writer.write(linkID,
+ "option.o.arg."
+ + (objnameIndex++), preArgs[i]
+ .substring(2));
+ } else if (preArgs[i].startsWith("-l")) {
+ writer.write(linkID,
+ "option.l.arg."
+ + (libnameIndex++), preArgs[i]
+ .substring(2));
+ } else if (preArgs[i].startsWith("-L")) {
+ writer.write(linkID,
+ "option.L.arg."
+ + (libpathIndex++), preArgs[i]
+ .substring(2));
+ } else {
+ //
+ // any others
+ //
+ writer.write(linkID, "option." + preArgs[i].substring(1) + ".enabled",
+ "1");
+ }
+ }
+ if (objnameIndex > 1) {
+ writer.write(linkID,
+ "option.o.enabled",
+ "1");
+ }
+ if (libnameIndex > 1) {
+ writer.write(linkID,
+ "option.l.enabled",
+ "1");
+ }
+ if (libpathIndex > 1) {
+ writer.write(linkID,
+ "option.L.enabled",
+ "1");
+ }
+ }
+
+ /**
+ * Writes ilink32 linker options to project file.
+ *
+ * @param writer PropertyWriter property writer
+ * @param linkID String linker identifier
+ * @param preArgs String[] linker arguments
+ * @throws SAXException thrown if unable to write option
+ */
+ private void writeIlinkArgs(final PropertyWriter writer,
+ final String linkID,
+ final String[] args) throws SAXException {
+ for (int i = 0; i < args.length; i++) {
+ if (args[i].charAt(0) == '/' || args[i].charAt(0) == '-') {
+ int equalsPos = args[i].indexOf('=');
+ if (equalsPos > 0) {
+ String option = "option." + args[i].substring(0, equalsPos -1);
+ writer.write(linkID,
+ option + ".enabled",
+ "1");
+ writer.write(linkID,
+ option + ".value",
+ args[i].substring(equalsPos + 1));
+ } else {
+ writer.write(linkID, "option." + args[i].substring(1) + ".enabled", "1");
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/CVS/Entries b/src/net/sf/antcontrib/cpptasks/borland/CVS/Entries
new file mode 100644
index 0000000..f185634
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/CVS/Entries
@@ -0,0 +1,12 @@
+/BorlandCCompiler.java/1.17/Fri Apr 23 20:15:46 2004//
+/BorlandCfgParser.java/1.7/Sat Feb 28 19:00:01 2004//
+/BorlandLibrarian.java/1.19/Sun Feb 13 04:58:21 2005//
+/BorlandLinker.java/1.23/Tue Mar 1 22:33:39 2005//
+/BorlandProcessor.java/1.19/Sun Feb 13 04:58:21 2005//
+/BorlandResourceCompiler.java/1.22/Tue May 11 03:50:12 2004//
+/CBuilderXProjectWriter.java/1.8/Mon Aug 15 14:51:54 2005//
+/CfgFilenameState.java/1.6/Sat Feb 28 19:00:01 2004//
+/ConsumeToSpaceOrNewLine.java/1.6/Sat Feb 28 19:00:01 2004//
+/QuoteBranchState.java/1.6/Sat Feb 28 19:00:01 2004//
+/package.html/1.1/Sat Jun 26 02:45:17 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/borland/CVS/Repository b/src/net/sf/antcontrib/cpptasks/borland/CVS/Repository
new file mode 100644
index 0000000..c06cbfe
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/borland
diff --git a/src/net/sf/antcontrib/cpptasks/borland/CVS/Root b/src/net/sf/antcontrib/cpptasks/borland/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/borland/CfgFilenameState.java b/src/net/sf/antcontrib/cpptasks/borland/CfgFilenameState.java
new file mode 100644
index 0000000..82767cb
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/CfgFilenameState.java
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import net.sf.antcontrib.cpptasks.parser.AbstractParser;
+import net.sf.antcontrib.cpptasks.parser.AbstractParserState;
+import net.sf.antcontrib.cpptasks.parser.FilenameState;
+public class CfgFilenameState extends FilenameState {
+ private char terminator;
+ public CfgFilenameState(AbstractParser parser, char[] terminators) {
+ super(parser, terminators);
+ terminator = terminators[0];
+ }
+ public AbstractParserState consume(char ch) {
+ //
+ // if a ';' is encountered then
+ // close the previous filename by sending a
+ // recognized terminator to our super class
+ // and stay in this state for more filenamese
+ if (ch == ';') {
+ super.consume(terminator);
+ return this;
+ }
+ AbstractParserState newState = super.consume(ch);
+ //
+ // change null (consume to end of line)
+ // to look for next switch character
+ if (newState == null) {
+ newState = getParser().getNewLineState();
+ }
+ return newState;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/ConsumeToSpaceOrNewLine.java b/src/net/sf/antcontrib/cpptasks/borland/ConsumeToSpaceOrNewLine.java
new file mode 100644
index 0000000..5656af8
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/ConsumeToSpaceOrNewLine.java
@@ -0,0 +1,30 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import net.sf.antcontrib.cpptasks.parser.AbstractParser;
+import net.sf.antcontrib.cpptasks.parser.AbstractParserState;
+public class ConsumeToSpaceOrNewLine extends AbstractParserState {
+ public ConsumeToSpaceOrNewLine(AbstractParser parser) {
+ super(parser);
+ }
+ public AbstractParserState consume(char ch) {
+ if (ch == ' ' || ch == '\t' || ch == '\n') {
+ return getParser().getNewLineState();
+ }
+ return this;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/QuoteBranchState.java b/src/net/sf/antcontrib/cpptasks/borland/QuoteBranchState.java
new file mode 100644
index 0000000..ec3bc84
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/QuoteBranchState.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import net.sf.antcontrib.cpptasks.parser.AbstractParser;
+import net.sf.antcontrib.cpptasks.parser.AbstractParserState;
+public class QuoteBranchState extends AbstractParserState {
+ private AbstractParserState quote;
+ private AbstractParserState unquote;
+ public QuoteBranchState(AbstractParser parser, AbstractParserState quote,
+ AbstractParserState unquote) {
+ super(parser);
+ this.quote = quote;
+ this.unquote = unquote;
+ }
+ public AbstractParserState consume(char ch) {
+ if (ch == '"') {
+ return quote;
+ }
+ return unquote.consume(ch);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/borland/package.html b/src/net/sf/antcontrib/cpptasks/borland/package.html
new file mode 100644
index 0000000..a91e91f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/borland/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Adapter for Borland tools.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CVS/Entries b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Entries
new file mode 100644
index 0000000..e1816aa
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Entries
@@ -0,0 +1,4 @@
+/CompaqVisualFortranCompiler.java/1.14/Fri Apr 23 20:15:49 2004//
+/CompaqVisualFortranLibrarian.java/1.12/Thu Apr 22 08:06:54 2004//
+/CompaqVisualFortranLinker.java/1.11/Sat Feb 28 19:00:15 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CVS/Repository b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Repository
new file mode 100644
index 0000000..002b6a4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/compaq
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CVS/Root b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranCompiler.java b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranCompiler.java
new file mode 100644
index 0000000..fc4c4ce
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranCompiler.java
@@ -0,0 +1,138 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compaq;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineFortranCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Compaq(r) Visual Fortran compiler.
+ *
+ * @author Curt Arnold
+ */
+public class CompaqVisualFortranCompiler extends CommandLineFortranCompiler {
+ private static final CompaqVisualFortranCompiler[] instance = new CompaqVisualFortranCompiler[]{new CompaqVisualFortranCompiler(
+ false, null)};
+ public static CompaqVisualFortranCompiler getInstance() {
+ return instance[0];
+ }
+ private CompaqVisualFortranCompiler(boolean newEnvironment, Environment env) {
+ super("DF", null, new String[]{".f90", ".for", ".f"}, new String[]{
+ ".i", ".i90", ".fpp", ".inc", ".bak", ".exe"}, ".obj", false,
+ null, newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("/nologo");
+ args.addElement("/compile_only");
+ if (debug) {
+ args.addElement("/debug:full");
+ args.addElement("/define:_DEBUG");
+ } else {
+ args.addElement("/debug:none");
+ args.addElement("/define:NDEBUG");
+ }
+ if (multithreaded) {
+ args.addElement("/threads");
+ args.addElement("/define:_MT");
+ } else {
+ args.addElement("/nothreads");
+ }
+ boolean staticRuntime = linkType.isStaticRuntime();
+ if (staticRuntime) {
+ args.addElement("/libs:static");
+ } else {
+ args.addElement("/libs:dll");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("/dll");
+ args.addElement("/define:_DLL");
+ }
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("/nowarn");
+ break;
+ case 1 :
+ break;
+ case 2 :
+ break;
+ case 3 :
+ args.addElement("/warn:usage");
+ break;
+ case 4 :
+ args.addElement("/warn:all");
+ break;
+ case 5 :
+ args.addElement("/warn:errors");
+ break;
+ }
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new CompaqVisualFortranCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ protected void getDefineSwitch(StringBuffer buf, String define, String value) {
+ buf.append("/define:");
+ buf.append(define);
+ if (value != null && value.length() > 0) {
+ buf.append('=');
+ buf.append(value);
+ }
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ";");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ StringBuffer buf = new StringBuffer("/include:");
+// FREEHEP: quotes seems to confuse the compiler.
+// if (includeDir.indexOf(' ') >= 0) {
+// buf.append('"');
+// buf.append(includeDir);
+// buf.append('"');
+// } else {
+ buf.append(includeDir);
+// }
+ return buf.toString();
+ }
+ public Linker getLinker(LinkType type) {
+ return CompaqVisualFortranLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ protected void getUndefineSwitch(StringBuffer buf, String define) {
+ buf.append("/undefine:");
+ buf.append(define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLibrarian.java b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLibrarian.java
new file mode 100644
index 0000000..2488619
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLibrarian.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compaq;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioLibrarian;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioProcessor;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the Compaq(r) Visual Fortran Librarian
+ *
+ * @author Curt Arnold
+ */
+public class CompaqVisualFortranLibrarian extends CommandLineLinker {
+ private static final CompaqVisualFortranLibrarian instance = new CompaqVisualFortranLibrarian();
+ public static CompaqVisualFortranLibrarian getInstance() {
+ return instance;
+ }
+ private CompaqVisualFortranLibrarian() {
+ super("lib", "/bogus", new String[]{".obj"}, new String[0], ".lib",
+ false, null);
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ args.addElement("/nologo");
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ protected String getCommandFileSwitch(String commandFile) {
+ return DevStudioProcessor.getCommandFileSwitch(commandFile);
+ }
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return new String[0];
+ }
+ public Linker getLinker(LinkType type) {
+ return CompaqVisualFortranLinker.getInstance().getLinker(type);
+ }
+ protected int getMaximumCommandLength() {
+ return DevStudioLibrarian.getInstance().getMaximumCommandLength();
+ }
+ protected String[] getOutputFileSwitch(String outputFile) {
+ return DevStudioLibrarian.getInstance().getOutputFileSwitch(outputFile);
+ }
+ public boolean isCaseSensitive() {
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLinker.java b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLinker.java
new file mode 100644
index 0000000..c8930f9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranLinker.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compaq;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLinker;
+/**
+ * Adapter for the Compaq(r) Visual Fortran linker.
+ *
+ * @author Curt Arnold
+ */
+public final class CompaqVisualFortranLinker extends DevStudioCompatibleLinker {
+ private static final CompaqVisualFortranLinker dllLinker = new CompaqVisualFortranLinker(
+ ".dll");
+ private static final CompaqVisualFortranLinker instance = new CompaqVisualFortranLinker(
+ ".exe");
+ public static CompaqVisualFortranLinker getInstance() {
+ return instance;
+ }
+ private CompaqVisualFortranLinker(String outputSuffix) {
+ super("DF", "__bogus__.xxx", outputSuffix);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ args.addElement("/NOLOGO");
+ boolean staticRuntime = linkType.isStaticRuntime();
+ if (staticRuntime) {
+ args.addElement("/libs:static");
+ } else {
+ args.addElement("/libs:dll");
+ }
+ if (debug) {
+ args.addElement("/debug");
+ } else {
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("/dll");
+ } else {
+ args.addElement("/exe");
+ }
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return CompaqVisualFortranLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ StringBuffer buf = new StringBuffer("/OUT:");
+ if (outputFile.indexOf(' ') >= 0) {
+ buf.append('"');
+ buf.append(outputFile);
+ buf.append('"');
+ } else {
+ buf.append(outputFile);
+ }
+ return new String[]{buf.toString()};
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java
new file mode 100644
index 0000000..e61bd64
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java
@@ -0,0 +1,208 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.CompilerDef;
+import net.sf.antcontrib.cpptasks.DependencyInfo;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+/**
+ * An abstract compiler implementation.
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public abstract class AbstractCompiler extends AbstractProcessor
+ implements
+ Compiler {
+ private static final String[] emptyIncludeArray = new String[0];
+ private String outputSuffix;
+ protected AbstractCompiler(String[] sourceExtensions,
+ String[] headerExtensions, String outputSuffix) {
+ super(sourceExtensions, headerExtensions);
+ this.outputSuffix = outputSuffix;
+ }
+ /**
+ * Checks file name to see if parse should be attempted
+ *
+ * Default implementation returns false for files with extensions '.dll',
+ * 'tlb', '.res'
+ *
+ */
+ protected boolean canParse(File sourceFile) {
+ String sourceName = sourceFile.toString();
+ int lastPeriod = sourceName.lastIndexOf('.');
+ if (lastPeriod >= 0 && lastPeriod == sourceName.length() - 4) {
+ String ext = sourceName.substring(lastPeriod).toUpperCase();
+ if (ext.equals(".DLL") || ext.equals(".TLB") || ext.equals(".RES")) {
+ return false;
+ }
+ }
+ return true;
+ }
+ abstract protected CompilerConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] baseConfigs,
+ CompilerDef specificConfig, TargetDef targetPlatform,
+ VersionInfo versionInfo);
+ public ProcessorConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] baseConfigs,
+ ProcessorDef specificConfig, TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+ if (specificConfig == null) {
+ throw new NullPointerException("specificConfig");
+ }
+ return createConfiguration(task, linkType, baseConfigs,
+ (CompilerDef) specificConfig, targetPlatform, versionInfo);
+ }
+ abstract protected Parser createParser(File sourceFile);
+ protected String getBaseOutputName(String inputFile) {
+ int lastSlash = inputFile.lastIndexOf('/');
+ int lastReverse = inputFile.lastIndexOf('\\');
+ int lastSep = inputFile.lastIndexOf(File.separatorChar);
+ if (lastReverse > lastSlash) {
+ lastSlash = lastReverse;
+ }
+ if (lastSep > lastSlash) {
+ lastSlash = lastSep;
+ }
+ int lastPeriod = inputFile.lastIndexOf('.');
+ if (lastPeriod < 0) {
+ lastPeriod = inputFile.length();
+ }
+ return inputFile.substring(lastSlash + 1, lastPeriod);
+ }
+ public String[] getOutputFileNames(String inputFile, VersionInfo versionInfo) {
+ //
+ // if a recognized input file
+ //
+ if (bid(inputFile) > 1) {
+ String baseName = getBaseOutputName(inputFile);
+ return new String[] { baseName + outputSuffix };
+ }
+ return new String[0];
+ }
+ /**
+ * Returns dependency info for the specified source file
+ *
+ * @param task
+ * task for any diagnostic output
+ * @param source
+ * file to be parsed
+ * @param includePath
+ * include path to be used to resolve included files
+ *
+ * @param sysIncludePath
+ * sysinclude path from build file, files resolved using
+ * sysInclude path will not participate in dependency analysis
+ *
+ * @param envIncludePath
+ * include path from environment variable, files resolved with
+ * envIncludePath will not participate in dependency analysis
+ *
+ * @param baseDir
+ * used to produce relative paths in DependencyInfo
+ * @param includePathIdentifier
+ * used to distinguish DependencyInfo's from different include
+ * path settings
+ *
+ * @author Curt Arnold
+ */
+ public final DependencyInfo parseIncludes(CCTask task, File source,
+ File[] includePath, File[] sysIncludePath, File[] envIncludePath,
+ File baseDir, String includePathIdentifier) {
+ //
+ // if any of the include files can not be identified
+ // change the sourceLastModified to Long.MAX_VALUE to
+ // force recompilation of anything that depends on it
+ long sourceLastModified = source.lastModified();
+ File[] sourcePath = new File[1];
+ sourcePath[0] = new File(source.getParent());
+ Vector onIncludePath = new Vector();
+ Vector onSysIncludePath = new Vector();
+ String baseDirPath;
+ try {
+ baseDirPath = baseDir.getCanonicalPath();
+ } catch (IOException ex) {
+ baseDirPath = baseDir.toString();
+ }
+ String relativeSource = CUtil.getRelativePath(baseDirPath, source);
+ String[] includes = emptyIncludeArray;
+ if (canParse(source)) {
+ Parser parser = createParser(source);
+ try {
+ Reader reader = new BufferedReader(new FileReader(source));
+ parser.parse(reader);
+ includes = parser.getIncludes();
+ } catch (IOException ex) {
+ task.log("Error parsing " + source.toString() + ":"
+ + ex.toString());
+ includes = new String[0];
+ }
+ }
+ for (int i = 0; i < includes.length; i++) {
+ String includeName = includes[i];
+ if (!resolveInclude(includeName, sourcePath, onIncludePath)) {
+ if (!resolveInclude(includeName, includePath, onIncludePath)) {
+ if (!resolveInclude(includeName, sysIncludePath,
+ onSysIncludePath)) {
+ if (!resolveInclude(includeName, envIncludePath,
+ onSysIncludePath)) {
+ //
+ // this should be enough to require us to reparse
+ // the file with the missing include for dependency
+ // information without forcing a rebuild
+ sourceLastModified += 2 * CUtil.FILETIME_EPSILON;
+ }
+ }
+ }
+ }
+ }
+ for (int i = 0; i < onIncludePath.size(); i++) {
+ String relativeInclude = CUtil.getRelativePath(baseDirPath,
+ (File) onIncludePath.elementAt(i));
+ onIncludePath.setElementAt(relativeInclude, i);
+ }
+ for (int i = 0; i < onSysIncludePath.size(); i++) {
+ String relativeInclude = CUtil.getRelativePath(baseDirPath,
+ (File) onSysIncludePath.elementAt(i));
+ onSysIncludePath.setElementAt(relativeInclude, i);
+ }
+ return new DependencyInfo(includePathIdentifier, relativeSource,
+ sourceLastModified, onIncludePath, onSysIncludePath);
+ }
+ protected boolean resolveInclude(String includeName, File[] includePath,
+ Vector onThisPath) {
+ for (int i = 0; i < includePath.length; i++) {
+ File includeFile = new File(includePath[i], includeName);
+ if (includeFile.exists()) {
+ onThisPath.addElement(includeFile);
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java b/src/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java
new file mode 100644
index 0000000..9de9491
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+import java.io.IOException;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerDef;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * An abstract Linker implementation.
+ *
+ * @author Adam Murdoch
+ */
+public abstract class AbstractLinker extends AbstractProcessor
+ implements
+ Linker {
+ public AbstractLinker(String[] objExtensions, String[] ignoredExtensions) {
+ super(objExtensions, ignoredExtensions);
+ }
+ /**
+ * Returns the bid of the processor for the file.
+ *
+ * A linker will bid 1 on any unrecognized file type.
+ *
+ * @param inputFile
+ * filename of input file
+ * @return bid for the file, 0 indicates no interest, 1 indicates that the
+ * processor recognizes the file but doesn't process it (header
+ * files, for example), 100 indicates strong interest
+ */
+ public int bid(String inputFile) {
+ int bid = super.bid(inputFile);
+ switch (bid) {
+ //
+ // unrecognized extension, take the file
+ //
+ case 0 :
+ return 1;
+ //
+ // discard the ignored extensions
+ //
+ case 1 :
+ return 0;
+ }
+ return bid;
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ return this;
+ }
+ abstract protected LinkerConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] baseConfigs,
+ LinkerDef specificConfig, TargetDef targetPlatform,
+ VersionInfo versionInfo);
+ public ProcessorConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] baseConfigs,
+ ProcessorDef specificConfig,
+ TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+ if (specificConfig == null) {
+ throw new NullPointerException("specificConfig");
+ }
+ return createConfiguration(task, linkType, baseConfigs,
+ (LinkerDef) specificConfig, targetPlatform, versionInfo);
+ }
+ public String getLibraryKey(File libfile) {
+ return libfile.getName();
+ }
+ public abstract String[] getOutputFileNames(String fileName, VersionInfo versionInfo);
+
+
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param executableName name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ */
+ public void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher) throws IOException {
+ if (versionInfo == null) {
+ throw new NullPointerException("versionInfo");
+ }
+ if (linkType == null) {
+ throw new NullPointerException("linkType");
+ }
+ if (outputFile == null) {
+ throw new NullPointerException("outputFile");
+ }
+ if (objDir == null) {
+ throw new NullPointerException("objDir");
+ }
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java b/src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java
new file mode 100644
index 0000000..d0cd77b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java
@@ -0,0 +1,129 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import org.apache.tools.ant.types.Environment;
+/**
+ * An abstract processor (compiler/linker) implementation.
+ *
+ * @author Curt Arnold
+ */
+public abstract class AbstractProcessor implements Processor, Cloneable {
+ /**
+ * default bid for a file name that the processor recognizes but does not
+ * process and does not want to fall through to the linker
+ */
+ public final static int DEFAULT_DISCARD_BID = 1;
+ /**
+ * default bid for a file name that the processor desires to process
+ */
+ public final static int DEFAULT_PROCESS_BID = 100;
+ /**
+ * Determines the identification of a command line processor by capture the
+ * first line of its output for a specific command.
+ *
+ * @param command
+ * array of command line arguments starting with executable
+ * name. For example, { "cl" }
+ * @param fallback
+ * start of identifier if there is an error in executing the
+ * command
+ * @return identifier for the processor
+ */
+ protected static String getIdentifier(String[] command, String fallback) {
+ String identifier = fallback;
+ try {
+ String[] cmdout = CaptureStreamHandler.run(command);
+ if (cmdout.length > 0) {
+ identifier = cmdout[0];
+ }
+ } catch (Throwable ex) {
+ identifier = fallback + ":" + ex.toString();
+ }
+ return identifier;
+ }
+ private final String[] headerExtensions;
+ private final String[] sourceExtensions;
+ protected AbstractProcessor(String[] sourceExtensions,
+ String[] headerExtensions) {
+ this.sourceExtensions = (String[]) sourceExtensions.clone();
+ this.headerExtensions = (String[]) headerExtensions.clone();
+ }
+ /**
+ * Returns the bid of the processor for the file.
+ *
+ * @param inputFile
+ * filename of input file
+ * @return bid for the file, 0 indicates no interest, 1 indicates that the
+ * processor recognizes the file but doesn't process it (header
+ * files, for example), 100 indicates strong interest
+ */
+ public int bid(String inputFile) {
+ String lower = inputFile.toLowerCase();
+ for (int i = 0; i < sourceExtensions.length; i++) {
+ if (lower.endsWith(sourceExtensions[i])) {
+ return DEFAULT_PROCESS_BID;
+ }
+ }
+ for (int i = 0; i < headerExtensions.length; i++) {
+ if (lower.endsWith(headerExtensions[i])) {
+ return DEFAULT_DISCARD_BID;
+ }
+ }
+ return 0;
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ return this;
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+ public String[] getHeaderExtensions() {
+ return (String[]) this.headerExtensions.clone();
+ }
+ abstract public String getIdentifier();
+ /**
+ * Gets the target operating system architecture
+ *
+ * @return String target operating system architecture
+ */
+ protected String getOSArch() {
+ return System.getProperty("os.arch");
+ }
+ /**
+ * Gets the target operating system name
+ *
+ * @return String target operating system name
+ */
+ protected String getOSName() {
+ return System.getProperty("os.name");
+ }
+ public String[] getSourceExtensions() {
+ return (String[]) this.sourceExtensions.clone();
+ }
+ /**
+ * Returns true if the target operating system is Mac OS X or Darwin.
+ *
+ * @return boolean
+ */
+ protected boolean isDarwin() {
+ String osName = getOSName();
+ return "Mac OS X".equals(osName);
+ }
+ public final String toString() {
+ return getIdentifier();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CVS/Entries b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Entries
new file mode 100644
index 0000000..7c8c246
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Entries
@@ -0,0 +1,22 @@
+/AbstractCompiler.java/1.26/Tue May 11 03:50:13 2004//
+/AbstractLinker.java/1.28/Tue May 11 03:50:13 2004//
+/AbstractProcessor.java/1.18/Sat Feb 28 19:00:40 2004//
+/CaptureStreamHandler.java/1.12/Sat Feb 28 19:00:40 2004//
+/CommandLineCCompiler.java/1.17/Sat Feb 28 19:00:40 2004//
+/CommandLineCompiler.java/1.27/Tue May 11 03:50:13 2004//
+/CommandLineCompilerConfiguration.java/1.20/Tue Aug 24 22:46:08 2004//
+/CommandLineFortranCompiler.java/1.11/Sat Feb 28 19:00:40 2004//
+/CommandLineLinker.java/1.40/Tue May 11 03:50:13 2004//
+/CommandLineLinkerConfiguration.java/1.20/Tue May 11 03:50:13 2004//
+/Compiler.java/1.9/Sat Feb 28 19:00:40 2004//
+/CompilerConfiguration.java/1.12/Sat Feb 28 19:00:40 2004//
+/LinkType.java/1.16/Tue Jul 13 03:08:37 2004//
+/Linker.java/1.19/Tue May 11 03:50:13 2004//
+/LinkerConfiguration.java/1.11/Tue May 11 03:50:13 2004//
+/PrecompilingCommandLineCCompiler.java/1.9/Sat Feb 28 19:00:40 2004//
+/PrecompilingCommandLineCompiler.java/1.9/Sat Feb 28 19:00:40 2004//
+/PrecompilingCompiler.java/1.6/Sat Feb 28 19:00:40 2004//
+/Processor.java/1.18/Tue May 11 03:50:13 2004//
+/ProcessorConfiguration.java/1.12/Tue May 11 03:50:13 2004//
+/ProgressMonitor.java/1.4/Sat Feb 28 19:00:40 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CVS/Repository b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Repository
new file mode 100644
index 0000000..bc30bc5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/compiler
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CVS/Root b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java b/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java
new file mode 100644
index 0000000..83c59f7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.util.Vector;
+
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
+/**
+ * Implements ExecuteStreamHandler to capture the output of a Execute to an
+ * array of strings
+ *
+ * @author Curt Arnold
+ */
+public class CaptureStreamHandler implements ExecuteStreamHandler {
+ /**
+ * Runs an executable and captures the output in a String array
+ *
+ * @param cmdline
+ * command line arguments
+ * @return output of process
+ */
+ public static String[] run(String[] cmdline) {
+ CaptureStreamHandler handler = new CaptureStreamHandler();
+ Execute exec = new Execute(handler);
+ exec.setCommandline(cmdline);
+ try {
+ int status = exec.execute();
+ } catch (IOException ex) {
+ }
+ return handler.getOutput();
+ }
+ private InputStream errorStream;
+ private InputStream fromProcess;
+ public CaptureStreamHandler() {
+ }
+ public String[] getOutput() {
+ String[] output;
+ if (fromProcess != null) {
+ Vector lines = new Vector(10);
+ try {
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(errorStream));
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < 100; j++) {
+ String line = reader.readLine();
+ if (line == null) {
+ reader = new BufferedReader(new InputStreamReader(
+ fromProcess));
+ break;
+ }
+ lines.addElement(line);
+ }
+ }
+ } catch (IOException ex) {
+ }
+ output = new String[lines.size()];
+ lines.copyInto(output);
+ return output;
+ }
+ output = new String[0];
+ return output;
+ }
+ /**
+ * Install a handler for the error stream of the subprocess.
+ *
+ * @param is
+ * input stream to read from the error stream from the
+ * subprocess
+ */
+ public void setProcessErrorStream(InputStream is) throws IOException {
+ errorStream = is;
+ }
+ /**
+ * Install a handler for the input stream of the subprocess.
+ *
+ * @param os
+ * output stream to write to the standard input stream of the
+ * subprocess
+ */
+ public void setProcessInputStream(OutputStream os) throws IOException {
+ os.close();
+ }
+ /**
+ * Install a handler for the output stream of the subprocess.
+ *
+ * @param is
+ * input stream to read from the error stream from the
+ * subprocess
+ */
+ public void setProcessOutputStream(InputStream is) throws IOException {
+ fromProcess = is;
+ }
+ /**
+ * Start handling of the streams.
+ */
+ public void start() throws IOException {
+ }
+ /**
+ * Stop handling of the streams - will not be restarted.
+ */
+ public void stop() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCCompiler.java
new file mode 100644
index 0000000..adafa08
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCCompiler.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * An abstract Compiler implementation which uses an external program to
+ * perform the compile.
+ *
+ * @author Adam Murdoch
+ */
+public abstract class CommandLineCCompiler extends CommandLineCompiler {
+ protected CommandLineCCompiler(String command, String identifierArg,
+ String[] sourceExtensions, String[] headerExtensions,
+ String outputSuffix, boolean libtool,
+ CommandLineCCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
+ }
+ protected Parser createParser(File source) {
+ return new CParser();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java
new file mode 100644
index 0000000..a8b7691
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java
@@ -0,0 +1,437 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.CompilerDef;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.types.CommandLineArgument;
+import net.sf.antcontrib.cpptasks.types.UndefineArgument;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;;
+/**
+ * An abstract Compiler implementation which uses an external program to
+ * perform the compile.
+ *
+ * @author Adam Murdoch
+ */
+public abstract class CommandLineCompiler extends AbstractCompiler {
+ private String command;
+ private final Environment env;
+ private String identifier;
+ private String identifierArg;
+ private boolean libtool;
+ private CommandLineCompiler libtoolCompiler;
+ private final boolean newEnvironment;
+ protected CommandLineCompiler(String command, String identifierArg,
+ String[] sourceExtensions, String[] headerExtensions,
+ String outputSuffix, boolean libtool,
+ CommandLineCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(sourceExtensions, headerExtensions, outputSuffix);
+ this.command = command;
+ if (libtool && libtoolCompiler != null) {
+ throw new java.lang.IllegalArgumentException(
+ "libtoolCompiler should be null when libtool is true");
+ }
+ this.libtool = libtool;
+ this.libtoolCompiler = libtoolCompiler;
+ this.identifierArg = identifierArg;
+ this.newEnvironment = newEnvironment;
+ this.env = env;
+ }
+ abstract protected void addImpliedArgs(Vector args, boolean debug,
+ boolean multithreaded, boolean exceptions, LinkType linkType,
+ Boolean rtti, OptimizationEnum optimization);
+ /**
+ * Adds command-line arguments for include directories.
+ *
+ * If relativeArgs is not null will add corresponding relative paths
+ * include switches to that vector (for use in building a configuration
+ * identifier that is consistent between machines).
+ *
+ * @param baseDirPaths
+ * A vector containing the parts of the working directory,
+ * produced by CUtil.DecomposeFile.
+ * @param includeDirs
+ * Array of include directory paths
+ * @param args
+ * Vector of command line arguments used to execute the task
+ * @param relativeArgs
+ * Vector of command line arguments used to build the
+ * configuration identifier
+ */
+ protected void addIncludes(String baseDirPath, File[] includeDirs,
+ Vector args, Vector relativeArgs, StringBuffer includePathId) {
+ for (int i = 0; i < includeDirs.length; i++) {
+ args.addElement(getIncludeDirSwitch(includeDirs[i]
+ .getAbsolutePath()));
+ if (relativeArgs != null) {
+ String relative = CUtil.getRelativePath(baseDirPath,
+ includeDirs[i]);
+ relativeArgs.addElement(getIncludeDirSwitch(relative));
+ if (includePathId != null) {
+ if (includePathId.length() == 0) {
+ includePathId.append("/I");
+ } else {
+ includePathId.append(" /I");
+ }
+ includePathId.append(relative);
+ }
+ }
+ }
+ }
+ abstract protected void addWarningSwitch(Vector args, int warnings);
+ protected void buildDefineArguments(CompilerDef[] defs, Vector args) {
+ //
+ // assume that we aren't inheriting defines from containing <cc>
+ //
+ UndefineArgument[] merged = defs[0].getActiveDefines();
+ for (int i = 1; i < defs.length; i++) {
+ //
+ // if we are inheriting, merge the specific defines with the
+ // containing defines
+ merged = UndefineArgument.merge(defs[i].getActiveDefines(), merged);
+ }
+ StringBuffer buf = new StringBuffer(30);
+ for (int i = 0; i < merged.length; i++) {
+ buf.setLength(0);
+ UndefineArgument current = merged[i];
+ if (current.isDefine()) {
+ getDefineSwitch(buf, current.getName(), current.getValue());
+ } else {
+ getUndefineSwitch(buf, current.getName());
+ }
+ args.addElement(buf.toString());
+ }
+ }
+ /**
+ * Compiles a source file.
+ *
+ * @author Curt Arnold
+ */
+ public void compile(CCTask task, File outputDir, String[] sourceFiles,
+ String[] args, String[] endArgs, boolean relentless,
+ CommandLineCompilerConfiguration config, ProgressMonitor monitor)
+ throws BuildException {
+ BuildException exc = null;
+ //
+ // determine length of executable name and args
+ //
+ String command = getCommand();
+ int baseLength = command.length() + args.length + endArgs.length;
+ if (libtool) {
+ baseLength += 8;
+ }
+ for (int i = 0; i < args.length; i++) {
+ baseLength += args[i].length();
+ }
+ for (int i = 0; i < endArgs.length; i++) {
+ baseLength += endArgs[i].length();
+ }
+ if (baseLength > getMaximumCommandLength()) {
+ throw new BuildException(
+ "Command line is over maximum length without specifying source file");
+ }
+ //
+ // typically either 1 or Integer.MAX_VALUE
+ //
+ int maxInputFilesPerCommand = getMaximumInputFilesPerCommand();
+ int argumentCountPerInputFile = getArgumentCountPerInputFile();
+ for (int sourceIndex = 0; sourceIndex < sourceFiles.length;) {
+ int cmdLength = baseLength;
+ int firstFileNextExec;
+ for (firstFileNextExec = sourceIndex; firstFileNextExec < sourceFiles.length
+ && (firstFileNextExec - sourceIndex) < maxInputFilesPerCommand; firstFileNextExec++) {
+ cmdLength += getTotalArgumentLengthForInputFile(outputDir,
+ sourceFiles[firstFileNextExec]);
+ if (cmdLength >= getMaximumCommandLength())
+ break;
+ }
+ if (firstFileNextExec == sourceIndex) {
+ throw new BuildException(
+ "Extremely long file name, can't fit on command line");
+ }
+ int argCount = args.length + 1 + endArgs.length
+ + (firstFileNextExec - sourceIndex)
+ * argumentCountPerInputFile;
+ if (libtool) {
+ argCount++;
+ }
+ String[] commandline = new String[argCount];
+ int index = 0;
+ if (libtool) {
+ commandline[index++] = "libtool";
+ }
+ commandline[index++] = command;
+ for (int j = 0; j < args.length; j++) {
+ commandline[index++] = args[j];
+ }
+ for (int j = sourceIndex; j < firstFileNextExec; j++) {
+ for (int k = 0; k < argumentCountPerInputFile; k++) {
+ commandline[index++] = getInputFileArgument(outputDir,
+ sourceFiles[j], k);
+ }
+ }
+ for (int j = 0; j < endArgs.length; j++) {
+ commandline[index++] = endArgs[j];
+ }
+ int retval = runCommand(task, outputDir, commandline);
+ if (monitor != null) {
+ String[] fileNames = new String[firstFileNextExec - sourceIndex];
+ for (int j = 0; j < fileNames.length; j++) {
+ fileNames[j] = sourceFiles[sourceIndex + j];
+ }
+ monitor.progress(fileNames);
+ }
+ //
+ // if the process returned a failure code and
+ // we aren't holding an exception from an earlier
+ // interation
+ if (retval != 0 && exc == null) {
+ //
+ // construct the exception
+ //
+ exc = new BuildException(this.getCommand()
+ + " failed with return code " + retval, task
+ .getLocation());
+ //
+ // and throw it now unless we are relentless
+ //
+ if (!relentless) {
+ throw exc;
+ }
+ }
+ sourceIndex = firstFileNextExec;
+ }
+ //
+ // if the compiler returned a failure value earlier
+ // then throw an exception
+ if (exc != null) {
+ throw exc;
+ }
+ }
+ protected CompilerConfiguration createConfiguration(final CCTask task,
+ final LinkType linkType,
+ final ProcessorDef[] baseDefs,
+ final CompilerDef specificDef,
+ final TargetDef targetPlatform,
+ final VersionInfo versionInfo) {
+ Vector args = new Vector();
+ CompilerDef[] defaultProviders = new CompilerDef[baseDefs.length + 1];
+ for (int i = 0; i < baseDefs.length; i++) {
+ defaultProviders[i + 1] = (CompilerDef) baseDefs[i];
+ }
+ defaultProviders[0] = specificDef;
+ Vector cmdArgs = new Vector();
+ //
+ // add command line arguments inherited from <cc> element
+ // any "extends" and finally the specific CompilerDef
+ CommandLineArgument[] commandArgs;
+ for (int i = defaultProviders.length - 1; i >= 0; i--) {
+ commandArgs = defaultProviders[i].getActiveProcessorArgs();
+ for (int j = 0; j < commandArgs.length; j++) {
+ if (commandArgs[j].getLocation() == 0) {
+ args.addElement(commandArgs[j].getValue());
+ } else {
+ cmdArgs.addElement(commandArgs[j]);
+ }
+ }
+ }
+ Vector params = new Vector();
+ //
+ // add command line arguments inherited from <cc> element
+ // any "extends" and finally the specific CompilerDef
+ ProcessorParam[] paramArray;
+ for (int i = defaultProviders.length - 1; i >= 0; i--) {
+ paramArray = defaultProviders[i].getActiveProcessorParams();
+ for (int j = 0; j < paramArray.length; j++) {
+ params.add(paramArray[j]);
+ }
+ }
+ paramArray = (ProcessorParam[]) (params
+ .toArray(new ProcessorParam[params.size()]));
+ boolean multithreaded = specificDef.getMultithreaded(defaultProviders,
+ 1);
+ boolean debug = specificDef.getDebug(baseDefs, 0);
+ boolean exceptions = specificDef.getExceptions(defaultProviders, 1);
+ Boolean rtti = specificDef.getRtti(defaultProviders, 1);
+ OptimizationEnum optimization = specificDef.getOptimization(defaultProviders, 1);
+ this.addImpliedArgs(args, debug, multithreaded, exceptions, linkType, rtti, optimization);
+ //
+ // add all appropriate defines and undefines
+ //
+ buildDefineArguments(defaultProviders, args);
+ //
+ // Want to have distinct set of arguments with relative
+ // path names for includes that are used to build
+ // the configuration identifier
+ //
+ Vector relativeArgs = (Vector) args.clone();
+ //
+ // add all active include and sysincludes
+ //
+ StringBuffer includePathIdentifier = new StringBuffer();
+ File baseDir = specificDef.getProject().getBaseDir();
+ String baseDirPath;
+ try {
+ baseDirPath = baseDir.getCanonicalPath();
+ } catch (IOException ex) {
+ baseDirPath = baseDir.toString();
+ }
+ Vector includePath = new Vector();
+ Vector sysIncludePath = new Vector();
+ for (int i = defaultProviders.length - 1; i >= 0; i--) {
+ String[] incPath = defaultProviders[i].getActiveIncludePaths();
+ for (int j = 0; j < incPath.length; j++) {
+ includePath.addElement(incPath[j]);
+ }
+ incPath = defaultProviders[i].getActiveSysIncludePaths();
+ for (int j = 0; j < incPath.length; j++) {
+ sysIncludePath.addElement(incPath[j]);
+ }
+ }
+ File[] incPath = new File[includePath.size()];
+ for (int i = 0; i < includePath.size(); i++) {
+ incPath[i] = new File((String) includePath.elementAt(i));
+ }
+ File[] sysIncPath = new File[sysIncludePath.size()];
+ for (int i = 0; i < sysIncludePath.size(); i++) {
+ sysIncPath[i] = new File((String) sysIncludePath.elementAt(i));
+ }
+ addIncludes(baseDirPath, incPath, args, relativeArgs,
+ includePathIdentifier);
+ addIncludes(baseDirPath, sysIncPath, args, null, null);
+ StringBuffer buf = new StringBuffer(getIdentifier());
+ for (int i = 0; i < relativeArgs.size(); i++) {
+ buf.append(relativeArgs.elementAt(i));
+ buf.append(' ');
+ }
+ buf.setLength(buf.length() - 1);
+ String configId = buf.toString();
+ int warnings = specificDef.getWarnings(defaultProviders, 0);
+ addWarningSwitch(args, warnings);
+ Enumeration argEnum = cmdArgs.elements();
+ int endCount = 0;
+ while (argEnum.hasMoreElements()) {
+ CommandLineArgument arg = (CommandLineArgument) argEnum
+ .nextElement();
+ switch (arg.getLocation()) {
+ case 1 :
+ args.addElement(arg.getValue());
+ break;
+ case 2 :
+ endCount++;
+ break;
+ }
+ }
+ String[] endArgs = new String[endCount];
+ argEnum = cmdArgs.elements();
+ int index = 0;
+ while (argEnum.hasMoreElements()) {
+ CommandLineArgument arg = (CommandLineArgument) argEnum
+ .nextElement();
+ if (arg.getLocation() == 2) {
+ endArgs[index++] = arg.getValue();
+ }
+ }
+ String[] argArray = new String[args.size()];
+ args.copyInto(argArray);
+ boolean rebuild = specificDef.getRebuild(baseDefs, 0);
+ File[] envIncludePath = getEnvironmentIncludePath();
+ return new CommandLineCompilerConfiguration(this, configId, incPath,
+ sysIncPath, envIncludePath, includePathIdentifier.toString(),
+ argArray, paramArray, rebuild, endArgs);
+ }
+ protected int getArgumentCountPerInputFile() {
+ return 1;
+ }
+ protected final String getCommand() {
+ return command;
+ }
+ abstract protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value);
+ protected abstract File[] getEnvironmentIncludePath();
+ public String getIdentifier() {
+ if (identifier == null) {
+ if (identifierArg == null) {
+ identifier = getIdentifier(new String[]{command}, command);
+ } else {
+ identifier = getIdentifier(
+ new String[]{command, identifierArg}, command);
+ }
+ }
+ return identifier;
+ }
+ abstract protected String getIncludeDirSwitch(String source);
+ protected String getInputFileArgument(File outputDir, String filename,
+ int index) {
+ //
+ // if there is an embedded space,
+ // must enclose in quotes
+ if (filename.indexOf(' ') >= 0) {
+ StringBuffer buf = new StringBuffer("\"");
+ buf.append(filename);
+ buf.append("\"");
+ return buf.toString();
+ }
+ return filename;
+ }
+ protected final boolean getLibtool() {
+ return libtool;
+ }
+ /**
+ * Obtains the same compiler, but with libtool set
+ *
+ * Default behavior is to ignore libtool
+ */
+ public final CommandLineCompiler getLibtoolCompiler() {
+ if (libtoolCompiler != null) {
+ return libtoolCompiler;
+ }
+ return this;
+ }
+ abstract public int getMaximumCommandLength();
+ protected int getMaximumInputFilesPerCommand() {
+ return Integer.MAX_VALUE;
+ }
+ protected int getTotalArgumentLengthForInputFile(File outputDir,
+ String inputFile) {
+ return inputFile.length() + 1;
+ }
+ abstract protected void getUndefineSwitch(StringBuffer buffer, String define);
+ /**
+ * This method is exposed so test classes can overload and test the
+ * arguments without actually spawning the compiler
+ */
+ protected int runCommand(CCTask task, File workingDir, String[] cmdline)
+ throws BuildException {
+ return CUtil.runCommand(task, workingDir, cmdline, newEnvironment, env);
+ }
+ protected final void setCommand(String command) {
+ this.command = command;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompilerConfiguration.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompilerConfiguration.java
new file mode 100644
index 0000000..38492ea
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineCompilerConfiguration.java
@@ -0,0 +1,226 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CompilerParam;
+import net.sf.antcontrib.cpptasks.DependencyInfo;
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * A configuration for a C++ compiler
+ *
+ * @author Curt Arnold
+ */
+public final class CommandLineCompilerConfiguration
+ implements
+ CompilerConfiguration {
+ private/* final */String[] args;
+ private/* final */CommandLineCompiler compiler;
+ private String[] endArgs;
+ //
+ // include path from environment variable not
+ // explicitly stated in Ant script
+ private/* final */File[] envIncludePath;
+ private String[] exceptFiles;
+ private/* final */String identifier;
+ private/* final */File[] includePath;
+ private/* final */String includePathIdentifier;
+ private boolean isPrecompiledHeaderGeneration;
+ private/* final */ProcessorParam[] params;
+ private/* final */boolean rebuild;
+ private/* final */File[] sysIncludePath;
+ public CommandLineCompilerConfiguration(CommandLineCompiler compiler,
+ String identifier, File[] includePath, File[] sysIncludePath,
+ File[] envIncludePath, String includePathIdentifier, String[] args,
+ ProcessorParam[] params, boolean rebuild, String[] endArgs) {
+ if (compiler == null) {
+ throw new NullPointerException("compiler");
+ }
+ if (identifier == null) {
+ throw new NullPointerException("identifier");
+ }
+ if (includePathIdentifier == null) {
+ throw new NullPointerException("includePathIdentifier");
+ }
+ if (args == null) {
+ this.args = new String[0];
+ } else {
+ this.args = (String[]) args.clone();
+ }
+ if (includePath == null) {
+ this.includePath = new File[0];
+ } else {
+ this.includePath = (File[]) includePath.clone();
+ }
+ if (sysIncludePath == null) {
+ this.sysIncludePath = new File[0];
+ } else {
+ this.sysIncludePath = (File[]) sysIncludePath.clone();
+ }
+ if (envIncludePath == null) {
+ this.envIncludePath = new File[0];
+ } else {
+ this.envIncludePath = (File[]) envIncludePath.clone();
+ }
+ this.compiler = compiler;
+ this.params = (ProcessorParam[]) params.clone();
+ this.rebuild = rebuild;
+ this.identifier = identifier;
+ this.includePathIdentifier = includePathIdentifier;
+ this.endArgs = (String[]) endArgs.clone();
+ exceptFiles = null;
+ isPrecompiledHeaderGeneration = false;
+ }
+ public CommandLineCompilerConfiguration(
+ CommandLineCompilerConfiguration base, String[] additionalArgs,
+ String[] exceptFiles, boolean isPrecompileHeaderGeneration) {
+ compiler = base.compiler;
+ identifier = base.identifier;
+ rebuild = base.rebuild;
+ includePath = (File[]) base.includePath.clone();
+ sysIncludePath = (File[]) base.sysIncludePath.clone();
+ endArgs = (String[]) base.endArgs.clone();
+ envIncludePath = (File[]) base.envIncludePath.clone();
+ includePathIdentifier = base.includePathIdentifier;
+ if (exceptFiles != null) {
+ this.exceptFiles = (String[]) exceptFiles.clone();
+ }
+ this.isPrecompiledHeaderGeneration = isPrecompileHeaderGeneration;
+ args = new String[base.args.length + additionalArgs.length];
+ for (int i = 0; i < base.args.length; i++) {
+ args[i] = base.args[i];
+ }
+ int index = base.args.length;
+ for (int i = 0; i < additionalArgs.length; i++) {
+ args[index++] = additionalArgs[i];
+ }
+ }
+ public int bid(String inputFile) {
+ int compilerBid = compiler.bid(inputFile);
+ if (compilerBid > 0 && exceptFiles != null) {
+ for (int i = 0; i < exceptFiles.length; i++) {
+ if (inputFile.equals(exceptFiles[i])) {
+ return 0;
+ }
+ }
+ }
+ return compilerBid;
+ }
+ public void compile(CCTask task, File outputDir, String[] sourceFiles,
+ boolean relentless, ProgressMonitor monitor) throws BuildException {
+ if (monitor != null) {
+ monitor.start(this);
+ }
+ try {
+ compiler.compile(task, outputDir, sourceFiles, args, endArgs,
+ relentless, this, monitor);
+ if (monitor != null) {
+ monitor.finish(this, true);
+ }
+ } catch (BuildException ex) {
+ if (monitor != null) {
+ monitor.finish(this, false);
+ }
+ throw ex;
+ }
+ }
+ /**
+ *
+ * This method may be used to get two distinct compiler configurations, one
+ * for compiling the specified file and producing a precompiled header
+ * file, and a second for compiling other files using the precompiled
+ * header file.
+ *
+ * The last (preferrably only) include directive in the prototype file will
+ * be used to mark the boundary between pre-compiled and normally compiled
+ * headers.
+ *
+ * @param prototype
+ * A source file (for example, stdafx.cpp) that is used to build
+ * the precompiled header file. @returns null if precompiled
+ * headers are not supported or a two element array containing
+ * the precompiled header generation configuration and the
+ * consuming configuration
+ *
+ */
+ public CompilerConfiguration[] createPrecompileConfigurations(
+ File prototype, String[] nonPrecompiledFiles) {
+ if (compiler instanceof PrecompilingCompiler) {
+ return ((PrecompilingCompiler) compiler)
+ .createPrecompileConfigurations(this, prototype,
+ nonPrecompiledFiles);
+ }
+ return null;
+ }
+ /**
+ * Returns a string representation of this configuration. Should be
+ * canonical so that equivalent configurations will have equivalent string
+ * representations
+ */
+ public String getIdentifier() {
+ return identifier;
+ }
+ public String getIncludePathIdentifier() {
+ return includePathIdentifier;
+ }
+ public String[] getOutputFileNames(String inputFile, VersionInfo versionInfo) {
+ return compiler.getOutputFileNames(inputFile, versionInfo);
+ }
+ public CompilerParam getParam(String name) {
+ for (int i = 0; i < params.length; i++) {
+ if (name.equals(params[i].getName()))
+ return (CompilerParam) params[i];
+ }
+ return null;
+ }
+ public ProcessorParam[] getParams() {
+ return params;
+ }
+ public boolean getRebuild() {
+ return rebuild;
+ }
+ public boolean isPrecompileGeneration() {
+ return isPrecompiledHeaderGeneration;
+ }
+ public DependencyInfo parseIncludes(CCTask task, File baseDir, File source) {
+ return compiler.parseIncludes(task, source, includePath,
+ sysIncludePath, envIncludePath, baseDir,
+ getIncludePathIdentifier());
+ }
+ public String toString() {
+ return identifier;
+ }
+ public String[] getPreArguments() {
+ return (String[]) args.clone();
+ }
+ public String[] getEndArguments() {
+ return (String[]) endArgs.clone();
+ }
+ public File[] getIncludePath() {
+ return (File[]) includePath.clone();
+ }
+ public Compiler getCompiler() {
+ return compiler;
+ }
+ public String getCommand() {
+ return compiler.getCommand();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineFortranCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineFortranCompiler.java
new file mode 100644
index 0000000..7b0eed2
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineFortranCompiler.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * An abstract Compiler implementation which uses an external program to
+ * perform the compile.
+ *
+ * @author Curt Arnold
+ */
+public abstract class CommandLineFortranCompiler extends CommandLineCompiler {
+ protected CommandLineFortranCompiler(String command, String identifierArg,
+ String[] sourceExtensions, String[] headerExtensions,
+ String outputSuffix, boolean libtool,
+ CommandLineFortranCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
+ }
+ protected Parser createParser(File source) {
+ return new FortranParser();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
new file mode 100644
index 0000000..77d8df5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
@@ -0,0 +1,408 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.LinkerDef;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.types.CommandLineArgument;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+
+
+/**
+ * An abstract Linker implementation that performs the link via an external
+ * command.
+ *
+ * @author Adam Murdoch
+ */
+public abstract class CommandLineLinker extends AbstractLinker
+{
+ private String command;
+ private Environment env = null;
+ private String identifier;
+ private String identifierArg;
+ private boolean isLibtool;
+ private String[] librarySets;
+ private CommandLineLinker libtoolLinker;
+ private boolean newEnvironment = false;
+ private String outputSuffix;
+
+
+ /** Creates a comand line linker invocation */
+ public CommandLineLinker(String command,
+ String identifierArg,
+ String[] extensions,
+ String[] ignoredExtensions, String outputSuffix,
+ boolean isLibtool, CommandLineLinker libtoolLinker)
+ {
+ super(extensions, ignoredExtensions);
+ this.command = command;
+ this.identifierArg = identifierArg;
+ this.outputSuffix = outputSuffix;
+ this.isLibtool = isLibtool;
+ this.libtoolLinker = libtoolLinker;
+ }
+ protected abstract void addBase(long base, Vector args);
+
+ protected abstract void addFixed(Boolean fixed, Vector args);
+
+ abstract protected void addImpliedArgs(boolean debug,
+ LinkType linkType, Vector args);
+ protected abstract void addIncremental(boolean incremental, Vector args);
+
+ //
+ // Windows processors handle these through file list
+ //
+ protected String[] addLibrarySets(CCTask task, LibrarySet[] libsets, Vector preargs,
+ Vector midargs, Vector endargs) {
+ return null;
+ }
+ protected abstract void addMap(boolean map, Vector args);
+ protected abstract void addStack(int stack, Vector args);
+ protected abstract void addEntry(String entry, Vector args);
+
+ protected LinkerConfiguration createConfiguration(
+ CCTask task,
+ LinkType linkType,
+ ProcessorDef[] baseDefs, LinkerDef specificDef, TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ Vector[] args = new Vector[] { preargs, midargs, endargs };
+
+ LinkerDef[] defaultProviders = new LinkerDef[baseDefs.length+1];
+ defaultProviders[0] = specificDef;
+ for(int i = 0; i < baseDefs.length; i++) {
+ defaultProviders[i+1] = (LinkerDef) baseDefs[i];
+ }
+ //
+ // add command line arguments inherited from <cc> element
+ // any "extends" and finally the specific CompilerDef
+ CommandLineArgument[] commandArgs;
+ for(int i = defaultProviders.length-1; i >= 0; i--) {
+ commandArgs = defaultProviders[i].getActiveProcessorArgs();
+ for(int j = 0; j < commandArgs.length; j++) {
+ args[commandArgs[j].getLocation()].
+ addElement(commandArgs[j].getValue());
+ }
+ }
+
+ Vector params = new Vector();
+ //
+ // add command line arguments inherited from <cc> element
+ // any "extends" and finally the specific CompilerDef
+ ProcessorParam[] paramArray;
+ for (int i = defaultProviders.length - 1; i >= 0; i--) {
+ paramArray = defaultProviders[i].getActiveProcessorParams();
+ for (int j = 0; j < paramArray.length; j++) {
+ params.add(paramArray[j]);
+ }
+ }
+
+ paramArray = (ProcessorParam[])(params.toArray(new ProcessorParam[params.size()]));
+
+ boolean debug = specificDef.getDebug(baseDefs,0);
+
+
+ String startupObject = getStartupObject(linkType);
+
+ addImpliedArgs(debug, linkType, preargs);
+ addIncremental(specificDef.getIncremental(defaultProviders,1), preargs);
+ addFixed(specificDef.getFixed(defaultProviders,1), preargs);
+ addMap(specificDef.getMap(defaultProviders,1), preargs);
+ addBase(specificDef.getBase(defaultProviders,1), preargs);
+ addStack(specificDef.getStack(defaultProviders,1), preargs);
+ addEntry(specificDef.getEntry(defaultProviders, 1), preargs);
+
+ String[] libnames = null;
+ LibrarySet[] libsets = specificDef.getActiveLibrarySets(defaultProviders,1);
+ // FREEHEP: check if runtime was added without any present libs
+ if (linkType.callAddLibrarySets || (libsets.length > 0)) {
+ libnames = addLibrarySets(task, libsets, preargs, midargs, endargs);
+ }
+
+ StringBuffer buf = new StringBuffer(getIdentifier());
+ for (int i = 0; i < 3; i++) {
+ Enumeration argenum = args[i].elements();
+ while (argenum.hasMoreElements()) {
+ buf.append(' ');
+ buf.append(argenum.nextElement().toString());
+ }
+ }
+ String configId = buf.toString();
+
+ String[][] options = new String[][] {
+ new String[args[0].size() + args[1].size()],
+ new String[args[2].size()] };
+ args[0].copyInto(options[0]);
+ int offset = args[0].size();
+ for (int i = 0; i < args[1].size(); i++) {
+ options[0][i+offset] = (String) args[1].elementAt(i);
+ }
+ args[2].copyInto(options[1]);
+
+
+ boolean rebuild = specificDef.getRebuild(baseDefs,0);
+ boolean map = specificDef.getMap(defaultProviders,1);
+
+ //task.log("libnames:"+libnames.length, Project.MSG_VERBOSE);
+ return new CommandLineLinkerConfiguration(this,configId,options,
+ paramArray,
+ rebuild,map, debug,libnames, startupObject);
+ }
+
+ /**
+ * Allows drived linker to decorate linker option.
+ * Override by GccLinker to prepend a "-Wl," to
+ * pass option to through gcc to linker.
+ *
+ * @param buf buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg linker argument
+ */
+ protected String decorateLinkerOption(StringBuffer buf, String arg) {
+ return arg;
+ }
+
+ protected final String getCommand() {
+ return command;
+ }
+ protected abstract String getCommandFileSwitch(String commandFile);
+
+
+ public String getIdentifier() {
+ if(identifier == null) {
+ if (identifierArg == null) {
+ identifier = getIdentifier(new String[] { command }, command);
+ } else {
+ identifier = getIdentifier(new String[] { command, identifierArg },
+ command);
+ }
+ }
+ return identifier;
+ }
+ public final CommandLineLinker getLibtoolLinker() {
+ if (libtoolLinker != null) {
+ return libtoolLinker;
+ }
+ return this;
+ }
+ protected abstract int getMaximumCommandLength();
+
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ return new String[] { baseName + outputSuffix };
+ }
+
+ protected String[] getOutputFileSwitch(CCTask task, String outputFile) {
+ return getOutputFileSwitch(outputFile);
+ }
+ protected abstract String[] getOutputFileSwitch(String outputFile);
+ protected String getStartupObject(LinkType linkType) {
+ return null;
+ }
+
+ /**
+ * Performs a link using a command line linker
+ *
+ */
+ public void link(CCTask task,
+ File outputFile,
+ String[] sourceFiles,
+ CommandLineLinkerConfiguration config)
+ throws BuildException
+ {
+ File parentDir = new File(outputFile.getParent());
+ String parentPath;
+ try {
+ parentPath = parentDir.getCanonicalPath();
+ } catch(IOException ex) {
+ parentPath = parentDir.getAbsolutePath();
+ }
+ String[] execArgs = prepareArguments(task, parentPath,outputFile.getName(),
+ sourceFiles, config);
+ int commandLength = 0;
+ for(int i = 0; i < execArgs.length; i++) {
+ commandLength += execArgs[i].length() + 1;
+ }
+
+ //
+ // if command length exceeds maximum
+ // (1024 for Windows) then create a temporary
+ // file containing everything but the command name
+ if(commandLength >= this.getMaximumCommandLength()) {
+ try {
+ execArgs = prepareResponseFile(outputFile,execArgs);
+ }
+ catch(IOException ex) {
+ throw new BuildException(ex);
+ }
+ }
+
+ int retval = runCommand(task,parentDir,execArgs);
+ //
+ // if the process returned a failure code then
+ // throw an BuildException
+ //
+ if(retval != 0) {
+ //
+ // construct the exception
+ //
+ throw new BuildException(this.getCommand() + " failed with return code " + retval, task.getLocation());
+ }
+
+ }
+
+
+ /**
+ * Prepares argument list for exec command. Will return null
+ * if command line would exceed allowable command line buffer.
+ *
+ * @param outputFile linker output file
+ * @param sourceFiles linker input files (.obj, .o, .res)
+ * @param args linker arguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareArguments(
+ CCTask task,
+ String outputDir,
+ String outputFile,
+ String[] sourceFiles,
+ CommandLineLinkerConfiguration config) {
+
+ String[] preargs = config.getPreArguments();
+ String[] endargs = config.getEndArguments();
+ String outputSwitch[] = getOutputFileSwitch(task, outputFile);
+ int allArgsCount = preargs.length + 1 + outputSwitch.length +
+ sourceFiles.length + endargs.length;
+ if (isLibtool) {
+ allArgsCount++;
+ }
+ String[] allArgs = new String[allArgsCount];
+ int index = 0;
+ if (isLibtool) {
+ allArgs[index++] = "libtool";
+ }
+ allArgs[index++] = this.getCommand();
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < preargs.length; i++) {
+ allArgs[index++] = decorateLinkerOption(buf, preargs[i]);
+ }
+ for (int i = 0; i < outputSwitch.length; i++) {
+ allArgs[index++] = outputSwitch[i];
+ }
+ for (int i = 0; i < sourceFiles.length; i++) {
+ allArgs[index++] = prepareFilename(buf,outputDir,sourceFiles[i]);
+ }
+ for (int i = 0; i < endargs.length; i++) {
+ allArgs[index++] = decorateLinkerOption(buf, endargs[i]);
+ }
+ return allArgs;
+ }
+
+ /**
+ * Processes filename into argument form
+ *
+ */
+ protected String prepareFilename(StringBuffer buf,
+ String outputDir, String sourceFile) {
+ String relativePath = CUtil.getRelativePath(outputDir,
+ new File(sourceFile));
+ // FREEHEP - take the shortest of the two (Windows file length limitation)
+ return quoteFilename(buf, sourceFile.length() > relativePath.length() ? relativePath : sourceFile);
+ }
+
+ /**
+ * Prepares argument list to execute the linker using a
+ * response file.
+ *
+ * @param outputFile linker output file
+ * @param args output of prepareArguments
+ * @return arguments for runTask
+ */
+ protected String[] prepareResponseFile(File outputFile,String[] args) throws IOException
+ {
+ String baseName = outputFile.getName();
+ File commandFile = new File(outputFile.getParent(),baseName + ".rsp");
+ FileWriter writer = new FileWriter(commandFile);
+ int execArgCount = 1;
+ if (isLibtool) {
+ execArgCount++;
+ }
+ String[] execArgs = new String[execArgCount+1];
+ for (int i = 0; i < execArgCount; i++) {
+ execArgs[i] = args[i];
+ }
+ execArgs[execArgCount] = getCommandFileSwitch(commandFile.toString());
+ for(int i = execArgCount; i < args.length; i++) {
+ //
+ // if embedded space and not quoted then
+ // quote argument
+ if (args[i].indexOf(" ") >= 0 && args[i].charAt(0) != '\"') {
+ writer.write('\"');
+ writer.write(args[i]);
+ writer.write("\"\n");
+ } else {
+ writer.write(args[i]);
+ writer.write('\n');
+ }
+ }
+ writer.close();
+ return execArgs;
+ }
+
+
+ protected String quoteFilename(StringBuffer buf,String filename) {
+ if(filename.indexOf(' ') >= 0) {
+ buf.setLength(0);
+ buf.append('\"');
+ buf.append(filename);
+ buf.append('\"');
+ return buf.toString();
+ }
+ return filename;
+ }
+
+ /**
+ * This method is exposed so test classes can overload
+ * and test the arguments without actually spawning the
+ * compiler
+ */
+ protected int runCommand(CCTask task, File workingDir,String[] cmdline)
+ throws BuildException {
+ return CUtil.runCommand(task,workingDir,cmdline, newEnvironment, env);
+ }
+
+ protected final void setCommand(String command) {
+ this.command = command;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinkerConfiguration.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinkerConfiguration.java
new file mode 100644
index 0000000..f0aad67
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinkerConfiguration.java
@@ -0,0 +1,128 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * A configuration for a command line linker
+ *
+ * @author Curt Arnold
+ */
+public final class CommandLineLinkerConfiguration
+ implements
+ LinkerConfiguration {
+ private/* final */String[][] args;
+ private/* final */String identifier;
+ private String[] libraryNames;
+ private/* final */CommandLineLinker linker;
+ private/* final */boolean map;
+ private/* final */ProcessorParam[] params;
+ private/* final */boolean rebuild;
+ private boolean debug;
+ private String startupObject;
+ public CommandLineLinkerConfiguration(CommandLineLinker linker,
+ String identifier, String[][] args, ProcessorParam[] params,
+ boolean rebuild, boolean map, boolean debug, String[] libraryNames,
+ String startupObject) {
+ if (linker == null) {
+ throw new NullPointerException("linker");
+ }
+ if (args == null) {
+ throw new NullPointerException("args");
+ } else {
+ this.args = (String[][]) args.clone();
+ }
+ this.linker = linker;
+ this.params = (ProcessorParam[]) params.clone();
+ this.rebuild = rebuild;
+ this.identifier = identifier;
+ this.map = map;
+ this.debug = debug;
+ if (libraryNames == null) {
+ this.libraryNames = new String[0];
+ } else {
+ this.libraryNames = (String[]) libraryNames.clone();
+ }
+ this.startupObject = startupObject;
+ }
+ public int bid(String filename) {
+ return linker.bid(filename);
+ }
+ public String[] getEndArguments() {
+ String[] clone = (String[]) args[1].clone();
+ return clone;
+ }
+ /**
+ * Returns a string representation of this configuration. Should be
+ * canonical so that equivalent configurations will have equivalent string
+ * representations
+ */
+ public String getIdentifier() {
+ return identifier;
+ }
+ public String[] getLibraryNames() {
+ String[] clone = (String[]) libraryNames.clone();
+ return clone;
+ }
+ public boolean getMap() {
+ return map;
+ }
+ public String[] getOutputFileNames(String inputFile, VersionInfo versionInfo) {
+ return linker.getOutputFileNames(inputFile, versionInfo);
+ }
+ public LinkerParam getParam(String name) {
+ for (int i = 0; i < params.length; i++) {
+ if (name.equals(params[i].getName()))
+ return (LinkerParam) params[i];
+ }
+ return null;
+ }
+ public ProcessorParam[] getParams() {
+ return params;
+ }
+ public String[] getPreArguments() {
+ String[] clone = (String[]) args[0].clone();
+ return clone;
+ }
+ public boolean getRebuild() {
+ return rebuild;
+ }
+ public String getStartupObject() {
+ return startupObject;
+ }
+ public void link(CCTask task, TargetInfo linkTarget) throws BuildException {
+ //
+ // AllSourcePath's include any syslibsets
+ //
+ String[] sourcePaths = linkTarget.getAllSourcePaths();
+ linker.link(task, linkTarget.getOutput(), sourcePaths, this);
+ }
+ public String toString() {
+ return identifier;
+ }
+ public Linker getLinker() {
+ return linker;
+ }
+ public boolean isDebug() {
+ return debug;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/Compiler.java b/src/net/sf/antcontrib/cpptasks/compiler/Compiler.java
new file mode 100644
index 0000000..48bc190
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/Compiler.java
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+/**
+ * A compiler.
+ *
+ * @author Adam Murdoch
+ */
+public interface Compiler extends Processor {
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CompilerConfiguration.java b/src/net/sf/antcontrib/cpptasks/compiler/CompilerConfiguration.java
new file mode 100644
index 0000000..6aba345
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/CompilerConfiguration.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CompilerParam;
+import net.sf.antcontrib.cpptasks.DependencyInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * A configuration for a compiler
+ *
+ * @author Curt Arnold
+ */
+public interface CompilerConfiguration extends ProcessorConfiguration {
+ void compile(CCTask task, File outputDir, String[] sourceFiles,
+ boolean relentless, ProgressMonitor monitor) throws BuildException;
+ /**
+ *
+ * This method may be used to get two distinct compiler configurations, one
+ * for compiling the specified file and producing a precompiled header
+ * file, and a second for compiling other files using the precompiled
+ * header file.
+ *
+ * The last (preferrably only) include directive in the prototype file will
+ * be used to mark the boundary between pre-compiled and normally compiled
+ * headers.
+ *
+ * @param prototype
+ * A source file (for example, stdafx.cpp) that is used to build
+ * the precompiled header file. @returns null if precompiled
+ * headers are not supported or a two element array containing
+ * the precompiled header generation configuration and the
+ * consuming configuration
+ *
+ */
+ CompilerConfiguration[] createPrecompileConfigurations(File prototype,
+ String[] nonPrecompiledFiles);
+ /**
+ * Returns an digest for the include path for the configuration.
+ *
+ * This is used to determine if cached dependency information is invalid
+ * because the include paths have changed
+ */
+ String getIncludePathIdentifier();
+ public CompilerParam getParam(String name);
+ boolean isPrecompileGeneration();
+ DependencyInfo parseIncludes(CCTask task, File baseDir, File source);
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java b/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java
new file mode 100644
index 0000000..d769431
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java
@@ -0,0 +1,154 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import net.sf.antcontrib.cpptasks.OutputTypeEnum;
+import net.sf.antcontrib.cpptasks.SubsystemEnum;
+/**
+ * This class represents the target platform for the compile and link step. The
+ * name is an anachronism and should be changed.
+ *
+ * @author Curt Arnold
+ */
+public class LinkType {
+ private OutputTypeEnum outputType = new OutputTypeEnum();
+ private boolean staticRuntime = false;
+ private SubsystemEnum subsystem = new SubsystemEnum();
+ /**
+ * Constructor
+ *
+ * By default, an gui executable with a dynamically linked runtime
+ *
+ */
+ public LinkType() {
+ }
+ /**
+ * Gets whether the link should produce an executable
+ *
+ * @return boolean
+ */
+ public boolean isExecutable() {
+ String value = outputType.getValue();
+ return value.equals("executable");
+ }
+ /**
+ * Gets whether the link should produce a plugin module.
+ *
+ * @return boolean
+ */
+ public boolean isPluginModule() {
+ String value = outputType.getValue();
+ return value.equals("plugin");
+ }
+ /**
+ * Gets whether the link should produce a shared library.
+ *
+ * @return boolean
+ */
+ public boolean isSharedLibrary() {
+ String value = outputType.getValue();
+ return value.equals("shared") || value.equals("plugin");
+ }
+ /**
+ * Gets whether the link should produce a static library.
+ *
+ * @return boolean
+ */
+ public boolean isStaticLibrary() {
+ String value = outputType.getValue();
+ return value.equals("static");
+ }
+ /**
+ * Gets whether the module should use a statically linked runtime library.
+ *
+ * @return boolean
+ */
+ public boolean isStaticRuntime() {
+ return staticRuntime;
+ }
+ /**
+ * Gets whether the link should produce a module for a console subsystem.
+ *
+ * @return boolean
+ */
+ public boolean isSubsystemConsole() {
+ String value = subsystem.getValue();
+ return value.equals("console");
+ }
+ /**
+ * Gets whether the link should produce a module for a graphical user
+ * interface subsystem.
+ *
+ * @return boolean
+ */
+ public boolean isSubsystemGUI() {
+ String value = subsystem.getValue();
+ return value.equals("gui");
+ }
+ /**
+ * Sets the output type (execuable, shared, etc).
+ *
+ * @param outputType,
+ * may not be null
+ */
+ public void setOutputType(OutputTypeEnum outputType) {
+ if (outputType == null) {
+ throw new IllegalArgumentException("outputType");
+ }
+ this.outputType = outputType;
+ }
+
+ /**
+ * Gets the output type.
+ * @return output type
+ */
+ public String getOutputType() {
+ return outputType.getValue();
+ }
+
+ /**
+ * Requests use of a static runtime library.
+ *
+ * @param staticRuntime
+ * if true, use static runtime library if possible.
+ */
+ public void setStaticRuntime(boolean staticRuntime) {
+ this.staticRuntime = staticRuntime;
+ }
+ /**
+ * Sets the subsystem (gui, console, etc).
+ *
+ * @param subsystem
+ * subsystem, may not be null
+ */
+ public void setSubsystem(SubsystemEnum subsystem) {
+ if (subsystem == null) {
+ throw new IllegalArgumentException("subsystem");
+ }
+ this.subsystem = subsystem;
+ }
+
+ /**
+ * Get subsystem name.
+ * @return subsystem name
+ */
+ public String getSubsystem() {
+ return subsystem.getValue();
+ }
+
+ // FREEHEP: flag
+ public boolean callAddLibrarySets = false;
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/Linker.java b/src/net/sf/antcontrib/cpptasks/compiler/Linker.java
new file mode 100644
index 0000000..672a0e3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/Linker.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+import java.io.IOException;
+
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * A linker for executables, and static and dynamic libraries.
+ *
+ * @author Adam Murdoch
+ */
+public interface Linker extends Processor {
+ /**
+ * Extracts the significant part of a library name to ensure there aren't
+ * collisions
+ */
+ String getLibraryKey(File libname);
+ /**
+ * returns the library path for the linker
+ */
+ File[] getLibraryPath();
+ /**
+ * Returns a set of filename patterns corresponding to library names.
+ *
+ * For example, "advapi32" would be expanded to "advapi32.dll" by
+ * DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by
+ * GccLinker.
+ *
+ * @param libnames
+ * array of library names
+ */
+ String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libraryType);
+ /**
+ * Gets the linker for the specified link type.
+ *
+ * @return appropriate linker or null, will return this if this linker can
+ * handle the specified link type
+ */
+ Linker getLinker(LinkType linkType);
+ /**
+ * Returns true if the linker is case-sensitive
+ */
+ boolean isCaseSensitive();
+
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param executableName name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ */
+ void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher) throws IOException;
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/LinkerConfiguration.java b/src/net/sf/antcontrib/cpptasks/compiler/LinkerConfiguration.java
new file mode 100644
index 0000000..ff7ac5d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/LinkerConfiguration.java
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * A configuration for a linker
+ *
+ * @author Curt Arnold
+ */
+public interface LinkerConfiguration extends ProcessorConfiguration {
+ public LinkerParam getParam(String name);
+ void link(CCTask task, TargetInfo linkTarget) throws BuildException;
+ Linker getLinker();
+ boolean isDebug();
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCCompiler.java
new file mode 100644
index 0000000..2af1a68
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCCompiler.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * A command line C compiler that can utilize precompilation of header files
+ *
+ * @author Curt Arnold
+ */
+public abstract class PrecompilingCommandLineCCompiler
+ extends
+ PrecompilingCommandLineCompiler {
+ protected PrecompilingCommandLineCCompiler(String command,
+ String identifierArg, String[] sourceExtensions,
+ String[] headerExtensions, String outputSuffix, boolean libtool,
+ PrecompilingCommandLineCCompiler libtoolCompiler,
+ boolean newEnvironment, Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
+ }
+ protected Parser createParser(File source) {
+ return new CParser();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCompiler.java
new file mode 100644
index 0000000..3b66597
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCommandLineCompiler.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+/**
+ * A command line C compiler that can utilize precompilation of header files
+ *
+ * @author Curt Arnold
+ */
+public abstract class PrecompilingCommandLineCompiler
+ extends
+ CommandLineCompiler implements PrecompilingCompiler {
+ protected PrecompilingCommandLineCompiler(String command,
+ String identifierArg, String[] sourceExtensions,
+ String[] headerExtensions, String outputSuffix, boolean libtool,
+ PrecompilingCommandLineCompiler libtoolCompiler,
+ boolean newEnvironment, Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
+ }
+ /**
+ *
+ * This method may be used to get two distinct compiler configurations, one
+ * for compiling the specified file and producing a precompiled header
+ * file, and a second for compiling other files using the precompiled
+ * header file.
+ *
+ * The last (preferrably only) include directive in the prototype file will
+ * be used to mark the boundary between pre-compiled and normally compiled
+ * headers.
+ *
+ * @param config
+ * base configuration
+ * @param prototype
+ * A source file (for example, stdafx.cpp) that is used to build
+ * the precompiled header file. @returns null if precompiled
+ * headers are not supported or a two element array containing
+ * the precompiled header generation configuration and the
+ * consuming configuration
+ *
+ */
+ public CompilerConfiguration[] createPrecompileConfigurations(
+ CompilerConfiguration config, File prototype, String[] exceptFiles) {
+ //
+ // cast should success or someone is passing us a configuration
+ // that was prepared by another processor
+ //
+ CommandLineCompilerConfiguration cmdLineConfig = (CommandLineCompilerConfiguration) config;
+ //
+ // parse prototype file to determine last header
+ //
+ Parser parser = createParser(prototype);
+ String[] includes;
+ try {
+ Reader reader = new BufferedReader(new FileReader(prototype));
+ parser.parse(reader);
+ includes = parser.getIncludes();
+ } catch (IOException ex) {
+ throw new BuildException(
+ "Error parsing precompiled header protoype: "
+ + prototype.toString() + ":" + ex.toString());
+ }
+ if (includes.length == 0) {
+ throw new BuildException("Precompiled header prototype: "
+ + prototype.toString()
+ + " does not contain any include directives.");
+ }
+ CompilerConfiguration[] configs = new CompilerConfiguration[2];
+ configs[0] = createPrecompileGeneratingConfig(cmdLineConfig, prototype,
+ includes[0]);
+ configs[1] = createPrecompileUsingConfig(cmdLineConfig, prototype,
+ includes[0], exceptFiles);
+ return configs;
+ }
+ abstract protected CompilerConfiguration createPrecompileGeneratingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude);
+ abstract protected CompilerConfiguration createPrecompileUsingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude, String[] exceptFiles);
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCompiler.java b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCompiler.java
new file mode 100644
index 0000000..f707dc5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/PrecompilingCompiler.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+/**
+ * A compiler that can utilize precompilation of header files
+ *
+ * @author Curt Arnold
+ */
+public interface PrecompilingCompiler {
+ /**
+ *
+ * This method may be used to get two distinct compiler configurations, one
+ * for compiling the specified file and producing a precompiled header
+ * file, and a second for compiling other files using the precompiled
+ * header file.
+ *
+ * The last (preferrably only) include directive in the prototype file will
+ * be used to mark the boundary between pre-compiled and normally compiled
+ * headers.
+ *
+ * @param config
+ * base configuration
+ * @param prototype
+ * A source file (for example, stdafx.cpp) that is used to build
+ * the precompiled header file. @returns null if precompiled
+ * headers are not supported or a two element array containing
+ * the precompiled header generation configuration and the
+ * consuming configuration
+ *
+ */
+ CompilerConfiguration[] createPrecompileConfigurations(
+ CompilerConfiguration config, File prototype,
+ String[] nonPrecompiledFiles);
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/Processor.java b/src/net/sf/antcontrib/cpptasks/compiler/Processor.java
new file mode 100644
index 0000000..d6513f7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/Processor.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * A processor. Base interface for Compiler and Linker
+ *
+ * @author Curt Arnold
+ */
+public interface Processor {
+ /**
+ * Returns a bid indicating the desire of this compiler to process the
+ * file.
+ *
+ * @param inputFile
+ * input file
+ * @return 0 = no interest, 100 = high interest
+ */
+ int bid(String inputFile);
+ Processor changeEnvironment(boolean newEnvironment, Environment env);
+ /**
+ * Returns the compiler configuration for <cc>or <compiler>element.
+ *
+ * @param defaultProviders
+ * When specificConfig corresponds to a <compiler>or linker
+ * element, defaultProvider will be a zero to two element array.
+ * If there is an extends attribute, the first element will be
+ * the referenced ProcessorDef, unless inherit = false, the last
+ * element will be the containing <cc>element
+ * @param specificConfig
+ * A <cc>or <compiler>element.
+ * @return resulting configuration
+ */
+ ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType,
+ ProcessorDef[] defaultProviders, ProcessorDef specificConfig,
+ TargetDef targetPlatform, VersionInfo versionInfo);
+ /**
+ * Retrieve an identifier that identifies the specific version of the
+ * compiler. Compilers with the same identifier should produce the same
+ * output files for the same input files and command line switches.
+ */
+ String getIdentifier();
+ /**
+ * Gets the linker that is associated with this processors
+ */
+ Linker getLinker(LinkType type);
+ /**
+ * Output file name (no path components) corresponding to source file
+ *
+ * @param inputFile
+ * input file
+ * @return output file name or null if no output file or name not
+ * determined by input file
+ */
+ String[] getOutputFileNames(String inputFile, VersionInfo versionInfo);
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/ProcessorConfiguration.java b/src/net/sf/antcontrib/cpptasks/compiler/ProcessorConfiguration.java
new file mode 100644
index 0000000..870fb33
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/ProcessorConfiguration.java
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+/**
+ * A configuration for a C++ compiler, linker or other processor
+ *
+ * @author Curt Arnold
+ */
+public interface ProcessorConfiguration {
+ /**
+ * An indication of how much this compiler would like to process this file
+ *
+ * @return 0 is no interest to process, 100 is strong interest to process
+ */
+ int bid(String filename);
+ /**
+ * Returns a string representation of this configuration. Should be
+ * canonical so that equivalent configurations will have equivalent string
+ * representations
+ */
+ String getIdentifier();
+ /**
+ * Output file name (no path components) corresponding to source file
+ *
+ * @param inputFile
+ * input file
+ * @return output file names or zero-length array if no output file or name not
+ * determined by input file
+ */
+ String[] getOutputFileNames(String inputFile, VersionInfo versionInfo);
+ ProcessorParam[] getParams();
+ /**
+ * If true, all files using this configuration should be rebuilt and any
+ * existing output files should be ignored
+ */
+ boolean getRebuild();
+}
diff --git a/src/net/sf/antcontrib/cpptasks/compiler/ProgressMonitor.java b/src/net/sf/antcontrib/cpptasks/compiler/ProgressMonitor.java
new file mode 100644
index 0000000..9949856
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/compiler/ProgressMonitor.java
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+/**
+ * Interface to receive notification of compile progress
+ *
+ * @author Curt Arnold
+ */
+public interface ProgressMonitor {
+ public void finish(ProcessorConfiguration config, boolean normal);
+ /**
+ * Called to notify monitor of progress
+ *
+ */
+ void progress(String[] sources);
+ public void start(ProcessorConfiguration config);
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries
new file mode 100644
index 0000000..35f1652
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries
@@ -0,0 +1,13 @@
+/DevStudioCCompiler.java/1.21/Sat Feb 28 19:01:00 2004//
+/DevStudioCompatibleCCompiler.java/1.10/Fri Apr 23 20:15:45 2004//
+/DevStudioCompatibleLibrarian.java/1.10/Thu Apr 22 08:06:53 2004//
+/DevStudioCompatibleLinker.java/1.12/Tue May 11 03:50:11 2004//
+/DevStudioLibrarian.java/1.19/Sat Feb 28 19:01:00 2004//
+/DevStudioLinker.java/1.27/Thu Apr 22 13:54:52 2004//
+/DevStudioMIDLCompiler.java/1.20/Tue May 11 03:50:11 2004//
+/DevStudioProcessor.java/1.14/Sat Feb 28 19:01:00 2004//
+/DevStudioProjectWriter.java/1.6/Fri Jan 21 20:18:57 2005//
+/DevStudioResourceCompiler.java/1.19/Tue May 11 03:50:11 2004//
+/VisualStudioNETProjectWriter.java/1.5/Fri Jan 21 20:18:57 2005//
+/package.html/1.1/Sat Jun 26 02:45:17 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository
new file mode 100644
index 0000000..e7764bc
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/devstudio
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Root b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCCompiler.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCCompiler.java
new file mode 100644
index 0000000..6b6c5b5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCCompiler.java
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Microsoft(r) C/C++ Optimizing Compiler
+ *
+ * @author Adam Murdoch
+ */
+public final class DevStudioCCompiler extends DevStudioCompatibleCCompiler {
+ private static final DevStudioCCompiler instance = new DevStudioCCompiler(
+ "cl", false, null);
+ public static DevStudioCCompiler getInstance() {
+ return instance;
+ }
+ private DevStudioCCompiler(String command, boolean newEnvironment,
+ Environment env) {
+ super(command, "/bogus", newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new DevStudioCCompiler(getCommand(), newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ return DevStudioLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleCCompiler.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleCCompiler.java
new file mode 100644
index 0000000..0ac4f77
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleCCompiler.java
@@ -0,0 +1,132 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.PrecompilingCommandLineCCompiler;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * An abstract base class for compilers that are basically command line
+ * compatible with Microsoft(r) C/C++ Optimizing Compiler
+ *
+ * @author Curt Arnold
+ */
+public abstract class DevStudioCompatibleCCompiler
+ extends
+ PrecompilingCommandLineCCompiler {
+ private static String[] mflags = new String[]{
+ //
+ // first four are single-threaded
+ // (runtime=static,debug=false), (..,debug=true),
+ // (runtime=dynamic,debug=true), (..,debug=false), (not supported)
+ // next four are multi-threaded, same sequence
+ "/ML", "/MLd", null, null, "/MT", "/MTd", "/MD", "/MDd"};
+ protected DevStudioCompatibleCCompiler(String command,
+ String identifierArg, boolean newEnvironment, Environment env) {
+ super(command, identifierArg, new String[]{".c", ".cc", ".cpp", ".cxx",
+ ".c++"}, new String[]{".h", ".hpp", ".inl"}, ".obj", false,
+ null, newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("/c");
+ args.addElement("/nologo");
+ if (exceptions) {
+ // FREEHEP changed /GX into /EHsc (for VC8, and backward compatible with VC7 and VC6)
+ args.addElement("/EHsc");
+ }
+ int mindex = 0;
+ if (multithreaded) {
+ mindex += 4;
+ }
+ boolean staticRuntime = linkType.isStaticRuntime();
+ if (!staticRuntime) {
+ mindex += 2;
+ }
+ if (debug) {
+ mindex += 1;
+ args.addElement("/Zi");
+ args.addElement("/Od");
+ args.addElement("/GZ");
+ args.addElement("/D_DEBUG");
+ } else {
+ if (optimization != null) {
+ if (optimization.isSize()) {
+ args.addElement("/O1");
+ }
+ if (optimization.isSpeed()) {
+ args.addElement("/O2");
+ }
+ }
+ args.addElement("/DNDEBUG");
+ }
+ String mflag = mflags[mindex];
+ if (mflag == null) {
+ throw new BuildException(
+ "multithread='false' and runtime='dynamic' not supported");
+ }
+ args.addElement(mflag);
+ if (rtti != null && rtti.booleanValue()) {
+ args.addElement("/GR");
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ DevStudioProcessor.addWarningSwitch(args, level);
+ }
+ protected CompilerConfiguration createPrecompileGeneratingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude) {
+ String[] additionalArgs = new String[]{
+ "/Fp" + CUtil.getBasename(prototype) + ".pch", "/Yc"};
+ return new CommandLineCompilerConfiguration(baseConfig, additionalArgs,
+ null, true);
+ }
+ protected CompilerConfiguration createPrecompileUsingConfig(
+ CommandLineCompilerConfiguration baseConfig, File prototype,
+ String lastInclude, String[] exceptFiles) {
+ String[] additionalArgs = new String[]{
+ "/Fp" + CUtil.getBasename(prototype) + ".pch",
+ "/Yu" + lastInclude};
+ return new CommandLineCompilerConfiguration(baseConfig, additionalArgs,
+ exceptFiles, false);
+ }
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ DevStudioProcessor.getDefineSwitch(buffer, define, value);
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ";");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return DevStudioProcessor.getIncludeDirSwitch(includeDir);
+ }
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ DevStudioProcessor.getUndefineSwitch(buffer, define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLibrarian.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLibrarian.java
new file mode 100644
index 0000000..a5e4b41
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLibrarian.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+/**
+ * Abstract base adapter for librarians with command line options compatible
+ * with the Microsoft(r) Library Manager
+ *
+ * @author Curt Arnold
+ */
+public abstract class DevStudioCompatibleLibrarian extends CommandLineLinker {
+ public DevStudioCompatibleLibrarian(String command, String identifierArg) {
+ super(command, identifierArg, new String[]{".obj"}, new String[0],
+ ".lib", false, null);
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ args.addElement("/nologo");
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ protected String getCommandFileSwitch(String cmdFile) {
+ return "@" + cmdFile;
+ }
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return new String[0];
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ public String[] getOutputFileSwitch(String outFile) {
+ StringBuffer buf = new StringBuffer("/OUT:");
+ if (outFile.indexOf(' ') >= 0) {
+ buf.append('"');
+ buf.append(outFile);
+ buf.append('"');
+ } else {
+ buf.append(outFile);
+ }
+ return new String[]{buf.toString()};
+ }
+ public boolean isCaseSensitive() {
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLinker.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLinker.java
new file mode 100644
index 0000000..8b8e8a6
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLinker.java
@@ -0,0 +1,146 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.platforms.WindowsPlatform;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Abstract base class for linkers that try to mimic the command line arguments
+ * for the Microsoft (r) Incremental Linker
+ *
+ * @author Curt Arnold
+ */
+public abstract class DevStudioCompatibleLinker extends CommandLineLinker {
+ public DevStudioCompatibleLinker(String command, String identifierArg,
+ String outputSuffix) {
+ super(command, identifierArg, new String[]{".obj", ".lib", ".res"},
+ new String[]{".map", ".pdb", ".lnk", ".dll"}, outputSuffix,
+ false, null);
+ }
+ protected void addBase(long base, Vector args) {
+ if (base >= 0) {
+ String baseAddr = Long.toHexString(base);
+ args.addElement("/BASE:0x" + baseAddr);
+ }
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ if (fixed != null) {
+ if (fixed.booleanValue()) {
+ args.addElement("/FIXED");
+ } else {
+ args.addElement("/FIXED:NO");
+ }
+ }
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ args.addElement("/NOLOGO");
+ if (debug) {
+ args.addElement("/DEBUG");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("/DLL");
+ }
+ /*
+ * if(linkType.isSubsystemGUI()) {
+ * args.addElement("/SUBSYSTEM:WINDOWS"); } else {
+ * if(linkType.isSubsystemConsole()) {
+ * args.addElement("/SUBSYSTEM:CONSOLE"); } }
+ */
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ if (incremental) {
+ args.addElement("/INCREMENTAL:YES");
+ } else {
+ args.addElement("/INCREMENTAL:NO");
+ }
+ }
+ protected void addMap(boolean map, Vector args) {
+ if (map) {
+ args.addElement("/MAP");
+ }
+ }
+ protected void addStack(int stack, Vector args) {
+ if (stack >= 0) {
+ String stackStr = Integer.toHexString(stack);
+ args.addElement("/STACK:0x" + stackStr);
+ }
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ if (entry != null) {
+ args.addElement("/ENTRY:" + entry);
+ }
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length];
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(libnames[i]);
+ buf.append(".lib");
+ patterns[i] = buf.toString();
+ }
+ return patterns;
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"/OUT:" + outputFile};
+ }
+ public boolean isCaseSensitive() {
+ return false;
+ }
+
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param executableName name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ */
+ public void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher) throws IOException {
+ WindowsPlatform.addVersionFiles(versionInfo, linkType, outputFile, isDebug, objDir, matcher);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLibrarian.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLibrarian.java
new file mode 100644
index 0000000..bd63f42
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLibrarian.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * Adapter for the Microsoft (r) Library Manager
+ *
+ * @author Curt Arnold
+ */
+public final class DevStudioLibrarian extends DevStudioCompatibleLibrarian {
+ private static final DevStudioLibrarian instance = new DevStudioLibrarian();
+ public static DevStudioLibrarian getInstance() {
+ return instance;
+ }
+ private DevStudioLibrarian() {
+ super("lib", "/bogus");
+ }
+ public Linker getLinker(LinkType type) {
+ return DevStudioLinker.getInstance().getLinker(type);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLinker.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLinker.java
new file mode 100644
index 0000000..826074b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioLinker.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * Adapter for the Microsoft (r) Incremental Linker
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public final class DevStudioLinker extends DevStudioCompatibleLinker {
+ private static final DevStudioLinker dllLinker = new DevStudioLinker(".dll");
+ private static final DevStudioLinker instance = new DevStudioLinker(".exe");
+ public static DevStudioLinker getInstance() {
+ return instance;
+ }
+ private DevStudioLinker(String outputSuffix) {
+ super("link", "/DLL", outputSuffix);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ if (type.isStaticLibrary()) {
+ return DevStudioLibrarian.getInstance();
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioMIDLCompiler.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioMIDLCompiler.java
new file mode 100644
index 0000000..4a7463d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioMIDLCompiler.java
@@ -0,0 +1,112 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * Adapter for the Microsoft (r) MIDL Compiler
+ *
+ * @author Curt Arnold
+ */
+public final class DevStudioMIDLCompiler extends CommandLineCompiler {
+ private static final DevStudioMIDLCompiler instance = new DevStudioMIDLCompiler(
+ false, null);
+ public static DevStudioMIDLCompiler getInstance() {
+ return instance;
+ }
+ private DevStudioMIDLCompiler(boolean newEnvironment, Environment env) {
+ super("midl", null, new String[]{".idl", ".odl"}, new String[]{},
+ ".tlb", false, null, newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ DevStudioProcessor.addWarningSwitch(args, level);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new DevStudioMIDLCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ /**
+ * The include parser for C will work just fine, but we didn't want to
+ * inherit from CommandLineCCompiler
+ */
+ protected Parser createParser(File source) {
+ return new CParser();
+ }
+ protected int getArgumentCountPerInputFile() {
+ return 3;
+ }
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ DevStudioProcessor.getDefineSwitch(buffer, define, value);
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ";");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return DevStudioProcessor.getIncludeDirSwitch(includeDir);
+ }
+ protected String getInputFileArgument(File outputDir, String filename,
+ int index) {
+ switch (index) {
+ case 0 :
+ return "/tlb";
+ case 1 :
+ return new File(outputDir, getOutputFileNames(filename, null)[0])
+ .getAbsolutePath();
+ }
+ return filename;
+ }
+ public Linker getLinker(LinkType type) {
+ return DevStudioLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+ protected int getTotalArgumentLengthForInputFile(File outputDir,
+ String inputFile) {
+ String arg1 = getInputFileArgument(outputDir, inputFile, 0);
+ String arg2 = getInputFileArgument(outputDir, inputFile, 1);
+ String arg3 = getInputFileArgument(outputDir, inputFile, 2);
+ return arg1.length() + arg2.length() + arg3.length() + 3;
+ }
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ DevStudioProcessor.getUndefineSwitch(buffer, define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProcessor.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProcessor.java
new file mode 100644
index 0000000..8257c09
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProcessor.java
@@ -0,0 +1,90 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.util.Vector;
+/**
+ * A add-in class for Microsoft Developer Studio processors
+ *
+ *
+ */
+public class DevStudioProcessor {
+ public static void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("/W0");
+ break;
+ case 1 :
+ args.addElement("/W1");
+ break;
+ case 2 :
+ break;
+ case 3 :
+ args.addElement("/W3");
+ break;
+ case 4 :
+ args.addElement("/W4");
+ break;
+ case 5 :
+ args.addElement("/WX");
+ break;
+ }
+ }
+ public static String getCommandFileSwitch(String cmdFile) {
+ StringBuffer buf = new StringBuffer("@");
+ if (cmdFile.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(cmdFile.replace('/', '\\'));
+ buf.append('\"');
+ } else {
+ buf.append(cmdFile);
+ }
+ return buf.toString();
+ }
+ public static void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("/D");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ public static String getIncludeDirSwitch(String includeDir) {
+ return "/I" + includeDir.replace('/', '\\');
+ }
+ public static String[] getOutputFileSwitch(String outPath) {
+ StringBuffer buf = new StringBuffer("/Fo");
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ String[] retval = new String[]{buf.toString()};
+ return retval;
+ }
+ public static void getUndefineSwitch(StringBuffer buffer, String define) {
+ buffer.append("/U");
+ buffer.append(define);
+ }
+ public static boolean isCaseSensitive() {
+ return false;
+ }
+ private DevStudioProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProjectWriter.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProjectWriter.java
new file mode 100644
index 0000000..94030fb
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioProjectWriter.java
@@ -0,0 +1,560 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.ide.ProjectDef;
+import net.sf.antcontrib.cpptasks.ide.ProjectWriter;
+import org.apache.tools.ant.BuildException;
+
+/**
+ * Writes a Microsoft Visual Studio 97 or Visual Studio 6 project file.
+ *
+ * Status: Collects file list but does not pick
+ * up libraries and settings from project.
+ *
+ * @author curta
+ */
+public final class DevStudioProjectWriter
+ implements ProjectWriter {
+ /**
+ * Visual Studio version.
+ */
+ private String version;
+
+ /**
+ * Constructor.
+ * @param versionArg String Visual Studio version.
+ */
+ public DevStudioProjectWriter(final String versionArg) {
+ this.version = versionArg;
+ }
+
+ /**
+ * Writes a project definition file.
+ * @param fileName File name base, writer may append appropriate extension
+ * @param task cc task for which to write project
+ * @param projectDef project element
+ * @param files source files
+ * @param targets compilation targets
+ * @param linkTarget link target
+ * @throws IOException if error writing project file
+ */
+ public void writeProject(final File fileName,
+ final CCTask task,
+ final ProjectDef projectDef,
+ final List files,
+ final Hashtable targets,
+ final TargetInfo linkTarget) throws IOException {
+
+ //
+ // some characters are apparently not allowed in VS project names
+ // but have not been able to find them documented
+ // limiting characters to alphas, numerics and hyphens
+ StringBuffer projectNameBuf;
+ String projectName = projectDef.getName();
+ if (projectName != null) {
+ projectNameBuf = new StringBuffer(projectName);
+ } else {
+ projectNameBuf = new StringBuffer(fileName.getName());
+ }
+ for (int i = 0; i < projectNameBuf.length(); i++) {
+ final char ch = projectNameBuf.charAt(i);
+ if (!((ch >= 'a' && ch <= 'z')
+ || (ch >= 'A' && ch <= 'Z')
+ || (ch >= '0' && ch <= '9'))) {
+ projectNameBuf.setCharAt(i, '_');
+ }
+ }
+ projectName = projectNameBuf.toString();
+
+ final String basePath = fileName.getAbsoluteFile().getParent();
+
+ File dspFile = new File(fileName + ".dsp");
+ if (!projectDef.getOverwrite() && dspFile.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + dspFile.toString());
+ }
+ File dswFile = new File(fileName + ".dsw");
+ if (!projectDef.getOverwrite() && dswFile.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + dswFile.toString());
+ }
+
+ CommandLineCompilerConfiguration compilerConfig =
+ getBaseCompilerConfiguration(targets);
+ if (compilerConfig == null) {
+ throw new BuildException(
+ "Unable to generate Visual Studio project "
+ + "when Microsoft C++ is not used.");
+ }
+
+ Writer writer = new BufferedWriter(new FileWriter(dspFile));
+ writer.write("# Microsoft Developer Studio Project File - Name=\"");
+ writer.write(projectName);
+ writer.write("\" - Package Owner=<4>\r\n");
+ writer.write(
+ "# Microsoft Developer Studio Generated Build File, Format Version ");
+ writer.write(this.version);
+ writer.write("\r\n");
+ writer.write("# ** DO NOT EDIT **\r\n\r\n");
+ String outputType = task.getOuttype();
+ String subsystem = task.getSubsystem();
+ String configName = projectName;
+ final boolean isDebug = task.getDebug();
+ if (isDebug) {
+ configName += " - Win32 Debug";
+ } else {
+ configName += " - Win32 Release";
+ }
+ String targtype = "Win32 (x86) Dynamic-Link Library";
+ String targid = "0x0102";
+ if ("executable".equals(outputType)) {
+ if ("console".equals(subsystem)) {
+ targtype = "Win32 (x86) Console Application";
+ targid = "0x0103";
+ } else {
+ targtype = "Win32 (x86) Application";
+ targid = "0x0101";
+ }
+ } else if ("static".equals(outputType)) {
+ targtype = "Win32 (x86) Static Library";
+ targid = "0x0104";
+ }
+ writer.write("# TARGTYPE \"");
+ writer.write(targtype);
+ writer.write("\" ");
+ writer.write(targid);
+ writer.write("\r\n\r\nCFG=");
+ writer.write(configName);
+ writer.write("\r\n");
+
+ writeMessage(writer, projectName, configName, targtype);
+
+ writer.write("# Begin Project\r\n");
+ if (version.equals("6.00")) {
+ writer.write("# PROP AllowPerConfigDependencies 0\r\n");
+ }
+ writer.write("# PROP Scc_ProjName \"\"\r\n");
+ writer.write("# PROP Scc_LocalPath \"\"\r\n");
+ writer.write("CPP=cl.exe\r\n");
+ writer.write("MTL=midl.exe\r\n");
+ writer.write("RSC=rc.exe\r\n");
+ writer.write("# PROP BASE Use_MFC 0\r\n");
+
+ writer.write("# PROP BASE Use_Debug_Libraries ");
+ if (isDebug) {
+ writer.write("1\r\n");
+ } else {
+ writer.write("0\r\n");
+ }
+
+ File objDir = task.getObjdir();
+ String objDirPath = CUtil.getRelativePath(basePath, objDir);
+
+ File outFile = task.getOutfile();
+ File buildDir = outFile.getParentFile();
+ String buildDirPath = CUtil.getRelativePath(basePath, buildDir);
+
+ writer.write("# PROP BASE Output_Dir \"");
+ writer.write(buildDirPath);
+ writer.write("\"\r\n");
+ writer.write("# PROP BASE Intermediate_Dir \"");
+ writer.write(objDirPath);
+ writer.write("\"\r\n");
+ writer.write("# PROP BASE Target_Dir \"\"\r\n");
+ writer.write("# PROP Use_MFC 0\r\n");
+ writer.write("# PROP Use_Debug_Libraries ");
+ if (isDebug) {
+ writer.write("1\r\n");
+ } else {
+ writer.write("0\r\n");
+ }
+ writer.write("# PROP Output_Dir \"");
+ writer.write(buildDirPath);
+ writer.write("\"\r\n");
+ writer.write("# PROP Intermediate_Dir \"");
+ writer.write(objDirPath);
+ writer.write("\"\r\n");
+ writer.write("# PROP Target_Dir \"\"\r\n");
+ writeCompileOptions(writer, basePath, compilerConfig);
+ writer.write(
+ "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\r\n");
+ writer.write(
+ "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /o NUL /win32\r\n");
+ writer.write("# ADD BASE RSC /l 0x409 /d \"_DEBUG\"\r\n");
+ writer.write("# ADD RSC /l 0x409 /d \"_DEBUG\"\r\n");
+ writer.write("BSC32=bscmake.exe\r\n");
+ writer.write("# ADD BASE BSC32 /nologo\r\n");
+ writer.write("# ADD BSC32 /nologo\r\n");
+ writer.write("LINK32=link.exe\r\n");
+ writeLinkOptions(writer, basePath, linkTarget, targets);
+ writer.write("# Begin Target\r\n\r\n");
+ writer.write("# Name \"");
+ writer.write(configName);
+ writer.write("\"\r\n");
+
+ File[] sortedSources = getSources(files);
+
+ if (version.equals("6.00")) {
+ final String sourceFilter = "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat";
+ final String headerFilter = "h;hpp;hxx;hm;inl";
+ final String resourceFilter =
+ "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe";
+
+ writer.write("# Begin Group \"Source Files\"\r\n\r\n");
+ writer.write("# PROP Default_Filter \"" + sourceFilter + "\"\r\n");
+
+ for (int i = 0; i < sortedSources.length; i++) {
+ if (!isGroupMember(headerFilter, sortedSources[i])
+ && !isGroupMember(resourceFilter, sortedSources[i])) {
+ writeSource(writer, basePath, sortedSources[i]);
+ }
+ }
+ writer.write("# End Group\r\n");
+
+ writer.write("# Begin Group \"Header Files\"\r\n\r\n");
+ writer.write("# PROP Default_Filter \"" + headerFilter + "\"\r\n");
+
+ for (int i = 0; i < sortedSources.length; i++) {
+ if (isGroupMember(headerFilter, sortedSources[i])) {
+ writeSource(writer, basePath, sortedSources[i]);
+ }
+ }
+ writer.write("# End Group\r\n");
+
+ writer.write("# Begin Group \"Resource Files\"\r\n\r\n");
+ writer.write("# PROP Default_Filter \"" + resourceFilter + "\"\r\n");
+
+ for (int i = 0; i < sortedSources.length; i++) {
+ if (isGroupMember(resourceFilter, sortedSources[i])) {
+ writeSource(writer, basePath, sortedSources[i]);
+ }
+ }
+ writer.write("# End Group\r\n");
+
+ } else {
+ for (int i = 0; i < sortedSources.length; i++) {
+ writeSource(writer, basePath, sortedSources[i]);
+ }
+ }
+
+ writer.write("# End Target\r\n");
+ writer.write("# End Project\r\n");
+ writer.close();
+
+ //
+ // write workspace file
+ //
+ writer = new BufferedWriter(new FileWriter(dswFile));
+
+ writer.write("Microsoft Developer Studio Workspace File, Format Version ");
+ writer.write(version);
+ writer.write("\r\n");
+ writer.write("# WARNING: DO NOT EDIT OR DELETE");
+ writer.write(" THIS WORKSPACE FILE!\r\n\r\n");
+
+ writer.write("############################################");
+ writer.write("###################################\r\n\r\n");
+ writer.write("Project: \"" + projectName + "\"=.\\"
+ + dspFile.getName()
+ + " - Package Owner=<4>\r\n\r\n");
+
+ writer.write("Package=<5>\r\n{{{\r\n}}}\r\n\r\n");
+ writer.write("Package=<4>\r\n{{{\r\n}}}\r\n\r\n");
+ writer.write("######################################");
+ writer.write("#########################################\r\n\r\n");
+
+ writer.write("Global:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}");
+ writer.write("\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n");
+
+ writer.write("########################################");
+ writer.write("#######################################\r\n\r\n");
+ writer.close();
+
+ }
+
+ /**
+ * Returns true if the file has an extension that appears in the group filter.
+ * @param filter String group filter
+ * @param candidate File file
+ * @return boolean true if member of group
+ */
+ private boolean isGroupMember(final String filter, final File candidate) {
+ String fileName = candidate.getName();
+ int lastDot = fileName.lastIndexOf('.');
+ if (lastDot >= 0 && lastDot < fileName.length() - 1) {
+ String extension =
+ ";" + fileName.substring(lastDot + 1).toLowerCase() + ";";
+ String semiFilter = ";" + filter + ";";
+ return semiFilter.indexOf(extension) >= 0;
+ }
+ return false;
+ }
+
+ /**
+ * Writes the entry for one source file in the project.
+ * @param writer Writer writer
+ * @param basePath String base path for project
+ * @param groupMember File project source file
+ * @throws IOException if error writing project file
+ */
+ private void writeSource(final Writer writer,
+ final String basePath,
+ final File groupMember)
+ throws IOException {
+ writer.write("# Begin Source File\r\n\r\nSOURCE=");
+ String relativePath = CUtil.getRelativePath(basePath,
+ groupMember);
+ //
+ // if relative path is just a name (hello.c) then
+ // make it .\hello.c
+ if (!relativePath.startsWith(".")
+ && relativePath.indexOf(":") < 0
+ && !relativePath.startsWith("\\")) {
+ relativePath = ".\\" + relativePath;
+ }
+ writer.write(relativePath);
+ writer.write("\r\n# End Source File\r\n");
+ }
+
+ /**
+ * Get alphabetized array of source files.
+ * @param sourceList list of source files
+ * @return File[] source files
+ */
+ private File[] getSources(final List sourceList) {
+ File[] sortedSources = new File[sourceList.size()];
+ sourceList.toArray(sortedSources);
+ Arrays.sort(sortedSources, new Comparator() {
+ public int compare(final Object o1, final Object o2) {
+ return ((File) o1).getName().compareTo(((File) o2).getName());
+ }
+ });
+ return sortedSources;
+ }
+
+ /**
+ * Writes "This is not a makefile" warning.
+ * @param writer Writer writer
+ * @param projectName String project name
+ * @param configName String configuration name
+ * @param targtype String target type
+ * @throws IOException if error writing project
+ */
+
+ private void writeMessage(final Writer writer,
+ final String projectName,
+ final String configName,
+ final String targtype) throws IOException {
+ writer.write(
+ "!MESSAGE This is not a valid makefile. ");
+ writer.write("To build this project using NMAKE,\r\n");
+ writer.write("!MESSAGE use the Export Makefile command and run\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write("!MESSAGE NMAKE /f \"");
+ writer.write(projectName);
+ writer.write(".mak\".\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write(
+ "!MESSAGE You can specify a configuration when running NMAKE\r\n");
+ writer.write(
+ "!MESSAGE by defining the macro CFG on the command line. ");
+ writer.write("For example:\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write("!MESSAGE NMAKE /f \"");
+ writer.write(projectName);
+ writer.write(".mak\" CFG=\"");
+ writer.write(configName);
+ writer.write("\"\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write("!MESSAGE Possible choices for configuration are:\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write("!MESSAGE \"");
+ writer.write(configName);
+ writer.write("\" (based on \"");
+ writer.write(targtype);
+ writer.write("\")\r\n");
+ writer.write("!MESSAGE \r\n");
+ writer.write("\r\n");
+
+ }
+
+ /**
+ * Gets the first recognized compiler from the
+ * compilation targets.
+ * @param targets compilation targets
+ * @return representative (hopefully) compiler configuration
+ */
+ private CommandLineCompilerConfiguration
+ getBaseCompilerConfiguration(final Hashtable targets) {
+ //
+ // find first target with an DevStudio C compilation
+ //
+ CommandLineCompilerConfiguration compilerConfig = null;
+ //
+ // get the first target and assume that it is representative
+ //
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo targetInfo = (TargetInfo) targetIter.next();
+ ProcessorConfiguration config = targetInfo.getConfiguration();
+ String identifier = config.getIdentifier();
+ //
+ // for the first cl compiler
+ //
+ if (config instanceof CommandLineCompilerConfiguration) {
+ compilerConfig = (CommandLineCompilerConfiguration) config;
+ if (compilerConfig.getCompiler() instanceof DevStudioCCompiler) {
+ return compilerConfig;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Writes compiler options.
+ * @param writer Writer writer
+ * @param baseDir String base directory
+ * @param compilerConfig compiler configuration
+ * @throws IOException if error on writing project
+ */
+ private void writeCompileOptions(final Writer writer,
+ final String baseDir,
+ final CommandLineCompilerConfiguration
+ compilerConfig) throws IOException {
+ StringBuffer baseOptions = new StringBuffer(50);
+ baseOptions.append("# ADD BASE CPP");
+ StringBuffer options = new StringBuffer(50);
+ options.append("# ADD CPP");
+ File[] includePath = compilerConfig.getIncludePath();
+ for (int i = 0; i < includePath.length; i++) {
+ options.append(" /I \"");
+ String relPath = CUtil.getRelativePath(baseDir, includePath[i]);
+ options.append(relPath);
+ options.append('"');
+ }
+
+ String[] preArgs = compilerConfig.getPreArguments();
+ for (int i = 0; i < preArgs.length; i++) {
+ if (preArgs[i].startsWith("/D")) {
+ options.append(" /D ");
+ baseOptions.append(" /D ");
+ String body = preArgs[i].substring(2);
+ if (preArgs[i].indexOf('=') >= 0) {
+ options.append(body);
+ baseOptions.append(body);
+ } else {
+ options.append('"');
+ options.append(body);
+ options.append('"');
+ }
+ } else if (!preArgs[i].startsWith("/I")) {
+ options.append(" ");
+ options.append(preArgs[i]);
+ baseOptions.append(" ");
+ baseOptions.append(preArgs[i]);
+ }
+ }
+ baseOptions.append("\r\n");
+ options.append("\r\n");
+ writer.write(baseOptions.toString());
+ writer.write(options.toString());
+
+ }
+
+ /**
+ * Writes link options.
+ * @param writer Writer writer
+ * @param basePath String base path
+ * @param linkTarget TargetInfo link target
+ * @param targets Hashtable all targets
+ * @throws IOException if unable to write to project file
+ */
+ private void writeLinkOptions(final Writer writer,
+ final String basePath,
+ final TargetInfo linkTarget,
+ final Hashtable targets) throws IOException {
+
+ StringBuffer baseOptions = new StringBuffer(100);
+ StringBuffer options = new StringBuffer(100);
+ baseOptions.append("# ADD BASE LINK32");
+ options.append("# ADD LINK32");
+
+ ProcessorConfiguration config = linkTarget.getConfiguration();
+ if (config instanceof CommandLineLinkerConfiguration) {
+ CommandLineLinkerConfiguration linkConfig =
+ (CommandLineLinkerConfiguration) config;
+
+ File[] linkSources = linkTarget.getAllSources();
+ for (int i = 0; i < linkSources.length; i++) {
+ //
+ // if file was not compiled or otherwise generated
+ //
+ if (targets.get(linkSources[i].getName()) == null) {
+ String relPath = CUtil.getRelativePath(basePath, linkSources[i]);
+ //
+ // if path has an embedded space then
+ // must quote
+ if (relPath.indexOf(' ') > 0) {
+ options.append(" \"");
+ options.append(relPath);
+ options.append("\"");
+ } else {
+ options.append(' ');
+ options.append(relPath);
+ }
+ }
+ }
+ String[] preArgs = linkConfig.getPreArguments();
+ for (int i = 0; i < preArgs.length; i++) {
+ options.append(' ');
+ options.append(preArgs[i]);
+ baseOptions.append(' ');
+ baseOptions.append(preArgs[i]);
+ }
+ String[] endArgs = linkConfig.getEndArguments();
+ for (int i = 0; i < endArgs.length; i++) {
+ options.append(' ');
+ options.append(endArgs[i]);
+ baseOptions.append(' ');
+ baseOptions.append(endArgs[i]);
+ }
+ }
+ baseOptions.append("\r\n");
+ options.append("\r\n");
+ writer.write(baseOptions.toString());
+ writer.write(options.toString());
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioResourceCompiler.java b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioResourceCompiler.java
new file mode 100644
index 0000000..e8c8662
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/DevStudioResourceCompiler.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Microsoft (r) Windows 32 Resource Compiler
+ *
+ * @author Curt Arnold
+ */
+public final class DevStudioResourceCompiler extends CommandLineCompiler {
+ private static final DevStudioResourceCompiler instance = new DevStudioResourceCompiler(
+ false, null);
+ public static DevStudioResourceCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private DevStudioResourceCompiler(boolean newEnvironment, Environment env) {
+ super("rc", null, new String[]{".rc"}, new String[]{".h", ".hpp",
+ ".inl"}, ".res", false, null, newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ if (debug) {
+ args.addElement("/D_DEBUG");
+ } else {
+ args.addElement("/DNDEBUG");
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new DevStudioResourceCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ /**
+ * The include parser for C will work just fine, but we didn't want to
+ * inherit from CommandLineCCompiler
+ */
+ protected Parser createParser(File source) {
+ return new CParser();
+ }
+ protected int getArgumentCountPerInputFile() {
+ return 2;
+ }
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ DevStudioProcessor.getDefineSwitch(buffer, define, value);
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ";");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return DevStudioProcessor.getIncludeDirSwitch(includeDir);
+ }
+ protected String getInputFileArgument(File outputDir, String filename,
+ int index) {
+ if (index == 0) {
+ String outputFileName = getOutputFileNames(filename, null)[0];
+ String fullOutputName = new File(outputDir, outputFileName)
+ .toString();
+ return "/fo" + fullOutputName;
+ }
+ return filename;
+ }
+ public Linker getLinker(LinkType type) {
+ return DevStudioLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+ protected int getTotalArgumentLengthForInputFile(File outputDir,
+ String inputFile) {
+ String arg1 = getInputFileArgument(outputDir, inputFile, 0);
+ String arg2 = getInputFileArgument(outputDir, inputFile, 1);
+ return arg1.length() + arg2.length() + 2;
+ }
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ DevStudioProcessor.getUndefineSwitch(buffer, define);
+ }
+ public String getIdentifier() {
+ return "Microsoft (R) Windows (R) Resource Compiler";
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java b/src/net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java
new file mode 100644
index 0000000..9e6072c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java
@@ -0,0 +1,409 @@
+/*
+ *
+ * Copyright 2004-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.ide.ProjectDef;
+import net.sf.antcontrib.cpptasks.ide.ProjectWriter;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.Serializer;
+import org.apache.xml.serialize.XMLSerializer;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * Writes a Visual Studio.NET project file.
+ * (Visual Studio 5 and 6 project writer is substantially more
+* complete at this point).
+ * @author curta
+ *
+ */
+public final class VisualStudioNETProjectWriter
+ implements ProjectWriter {
+ /**
+ * Version of VisualStudio.NET.
+ */
+ private String version;
+
+ /**
+ * Constructor.
+ * @param versionArg String VisualStudio.NET version
+ */
+ public VisualStudioNETProjectWriter(final String versionArg) {
+ this.version = versionArg;
+ }
+
+ /**
+ * Writes a project definition file.
+ *
+ * @param fileName
+ * project name for file, should has .cbx extension
+ * @param task
+ * cc task for which to write project
+ * @param projectDef
+ * project element
+ * @param sources source files
+ * @param targets compilation targets
+ * @param linkTarget link target
+ * @throws IOException if I/O error
+ * @throws SAXException if XML serialization error
+ */
+ public void writeProject(final File fileName,
+ final CCTask task,
+ final ProjectDef projectDef,
+ final List sources,
+ final Hashtable targets,
+ final TargetInfo linkTarget) throws
+ IOException,
+ SAXException {
+
+ boolean isDebug = task.getDebug();
+
+ String projectName = projectDef.getName();
+ if (projectName == null) {
+ projectName = fileName.getName();
+ }
+
+
+ File dspFile = new File(fileName + ".dsp");
+ if (!projectDef.getOverwrite() && dspFile.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + dspFile.toString());
+ }
+ File dswFile = new File(fileName + ".dsw");
+ if (!projectDef.getOverwrite() && dswFile.exists()) {
+ throw new BuildException("Not allowed to overwrite project file "
+ + dswFile.toString());
+ }
+
+ CommandLineCompilerConfiguration compilerConfig =
+ getBaseCompilerConfiguration(targets);
+ if (compilerConfig == null) {
+ throw new BuildException(
+ "Unable to generate Visual Studio.NET project "
+ + "when Microsoft C++ is not used.");
+ }
+
+ OutputStream outStream = new FileOutputStream(fileName + ".vcproj");
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true);
+ Serializer serializer = new XMLSerializer(outStream, format);
+ ContentHandler content = serializer.asContentHandler();
+ String basePath = fileName.getParentFile().getAbsolutePath();
+ content.startDocument();
+ AttributesImpl emptyAttrs = new AttributesImpl();
+ startElement(content, "VisualStudioProject", new String[] {"ProjectType",
+ "Version", "Name", "SccProjectName", "SccLocalPath"}
+ ,
+ new String[] {"Visual C++", this.version, projectName,
+ "", ""});
+ content.startElement(null, "Platforms", "Platforms", emptyAttrs);
+ startElement(content, "Platform", new String[] {"Name"}
+ , new String[] {"Win32"});
+ content.endElement(null, "Platform", "Platform");
+ content.endElement(null, "Platforms", "Platforms");
+ content.startElement(null, "Configurations", "Configurations", emptyAttrs);
+
+ String[] configValues = new String[] {
+ "Debug|Win32",
+ ".\\Debug",
+ ".\\Debug",
+ "2",
+ "0",
+ "FALSE"};
+ if (!isDebug) {
+ configValues[0] = "Release|Win32";
+ }
+
+ startElement(content, "Configuration",
+ new String[] {"Name", "OutputDirectory",
+ "IntermediateDirectory", "ConfigurationType", "UseOfMFC",
+ "ATLMinimizeCRunTimeLibraryUsage"}
+ , configValues);
+ String[] clValues = new String[] {
+ "VCCLCompilerTool", "0", null, null,
+ "1", "2", ".\\Debug\\testdllproh.pch", ".\\Debug/",
+ ".\\Debug/", ".\\Debug/", "3", "TRUE", "4"};
+ StringBuffer includeDirs = new StringBuffer();
+ StringBuffer defines = new StringBuffer();
+ String[] args = compilerConfig.getPreArguments();
+ for (int i = 0; i < args.length; i++) {
+ if (args[i].startsWith("/I")) {
+ includeDirs.append(args[i].substring(2));
+ includeDirs.append(';');
+ }
+ if (args[i].startsWith("/D")) {
+ defines.append(args[i].substring(2));
+ defines.append(";");
+ }
+ }
+
+ if (includeDirs.length() > 0) {
+ includeDirs.setLength(includeDirs.length() - 1);
+ }
+ if (defines.length() > 0) {
+ defines.setLength(defines.length() - 1);
+ }
+ clValues[2] = includeDirs.toString();
+ clValues[3] = defines.toString();
+
+ startElement(content, "Tool",
+ new String[] {"Name", "Optimization",
+ "AdditionalIncludeDirectories",
+ "PreprocessorDefinitions", "RuntimeLibrary",
+ "UsePrecompiledHeaders", "PrecompiledHeaderFile",
+ "AssemblerListingLocation", "ObjectFile", "WarningLevel",
+ "SuppressStartupBanner", "DebugInformationFormat"}
+ , clValues);
+ content.endElement(null, "Tool", "Tool");
+
+
+ String[] linkerValues = new String[] {"VCLinkerTool", null,
+ ".\\Debug/testdllproj.dll", "1",
+ "TRUE", "TRUE", ".\\Debug\\testdllproh.pdb", "2",
+ ".\\Debug/testdllproj.lib", "1"};
+
+ if (!isDebug) {
+ linkerValues[5] = "FALSE";
+ }
+
+ ProcessorConfiguration config = linkTarget.getConfiguration();
+ if (config instanceof CommandLineLinkerConfiguration) {
+ CommandLineLinkerConfiguration linkConfig =
+ (CommandLineLinkerConfiguration) config;
+
+ File[] linkSources = linkTarget.getAllSources();
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < linkSources.length; i++) {
+ //
+ // if file was not compiled or otherwise generated
+ //
+ if (targets.get(linkSources[i].getName()) == null) {
+ String relPath = CUtil.getRelativePath(basePath, linkSources[i]);
+ //
+ // if path has an embedded space then
+ // must quote
+ if (relPath.indexOf(' ') > 0) {
+ buf.append('\"');
+ buf.append(relPath);
+ buf.append('\"');
+ } else {
+ buf.append(relPath);
+ }
+ buf.append(';');
+ }
+ }
+ if (buf.length() > 0) {
+ buf.setLength(buf.length() - 1);
+ linkerValues[1] = buf.toString();
+ }
+ }
+
+ startElement(content, "Tool",
+ new String[] {"Name",
+ "AdditionalDependencies",
+ "OutputFile",
+ "LinkIncremental",
+ "SuppressStartupBanner",
+ "GenerateDebugInformation",
+ "ProgramDatabaseFile",
+ "SubSystem",
+ "ImportLibrary",
+ "TargetMachine"}
+ , linkerValues);
+ content.endElement(null, "Tool", "Tool");
+ content.endElement(null, "Configuration", "Configuration");
+ content.endElement(null, "Configurations", "Configurations");
+ content.startElement(null, "References", "References", emptyAttrs);
+ content.endElement(null, "References", "References");
+ content.startElement(null, "Files", "Files", emptyAttrs);
+
+
+ File[] sortedSources = new File[sources.size()];
+ sources.toArray(sortedSources);
+ Arrays.sort(sortedSources, new Comparator() {
+ public int compare(final Object o1, final Object o2) {
+ return ((File) o1).getName().compareTo(((File) o2).getName());
+ }
+ });
+
+ writeFilteredSources("Source Files",
+ "cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx",
+ basePath, sortedSources, content);
+
+ writeFilteredSources("Header Files", "h;hpp;hxx;hm;inl;inc;xsd",
+ basePath, sortedSources, content);
+
+ writeFilteredSources("Resource Files",
+ "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx",
+ basePath, sortedSources, content);
+
+ content.endElement(null, "Files", "Files");
+ content.startElement(null, "Globals", "Globals", emptyAttrs);
+ content.endElement(null, "Globals", "Globals");
+ content.endElement(null, "VisualStudioProject", "VisualStudioProject");
+ content.endDocument();
+ }
+
+ /**
+ * Writes a cluster of source files to the project.
+ * @param name name of filter
+ * @param filter file extensions
+ * @param basePath base path for files
+ * @param sortedSources array of source files
+ * @param content generated project
+ * @throws SAXException if invalid content
+ */
+ private void writeFilteredSources(final String name, final String filter,
+ final String basePath,
+ final File[] sortedSources,
+ final ContentHandler content)
+ throws SAXException {
+ AttributesImpl filterAttrs = new AttributesImpl();
+ filterAttrs.addAttribute(null, "Name", "Name", "#PCDATA", name);
+ filterAttrs.addAttribute(null, "Filter", "Filter", "#PCDATA", filter);
+ content.startElement(null, "Filter", "Filter", filterAttrs);
+
+
+ AttributesImpl fileAttrs = new AttributesImpl();
+ fileAttrs.addAttribute(null, "RelativePath", "RelativePath",
+ "#PCDATA", "");
+
+ AttributesImpl fileConfigAttrs = new AttributesImpl();
+ fileConfigAttrs.addAttribute(null, "Name", "Name",
+ "#PCDATA", "Debug|Win32");
+
+ AttributesImpl toolAttrs = new AttributesImpl();
+ toolAttrs.addAttribute(null, "Name", "Name",
+ "#PCDATA", "VCCLCompilerTool");
+ toolAttrs.addAttribute(null, "Optimization", "Optimization",
+ "#PCDATA", "0");
+ toolAttrs.addAttribute(null, "PreprocessorDefinitions",
+ "PreprocessorDefinitions", "#PCDATA",
+ "WIN32;_DEBUG;_WINDOWS;$(NoInherit}");
+
+ for (int i = 0; i < sortedSources.length; i++) {
+ if (isGroupMember(filter, sortedSources[i])) {
+ String relativePath = CUtil.getRelativePath(basePath,
+ sortedSources[i]);
+ fileAttrs.setValue(0, relativePath);
+ content.startElement(null, "File", "File", fileAttrs);
+ content.startElement(null, "FileConfiguration", "FileConfiguration",
+ fileConfigAttrs);
+ content.startElement(null, "Tool", "Tool", toolAttrs);
+ content.endElement(null, "Tool", "Tool");
+ content.endElement(null, "FileConfiguration", "FileConfiguration");
+ content.endElement(null, "File", "File");
+ }
+ }
+ content.endElement(null, "Filter", "Filter");
+
+ }
+
+ /**
+ * Returns true if the file has an extension that appears in the group filter.
+ * @param filter String group filter
+ * @param candidate File file
+ * @return boolean true if member of group
+ */
+ private boolean isGroupMember(final String filter, final File candidate) {
+ String fileName = candidate.getName();
+ int lastDot = fileName.lastIndexOf('.');
+ if (lastDot >= 0 && lastDot < fileName.length() - 1) {
+ String extension =
+ ";" + fileName.substring(lastDot + 1).toLowerCase() + ";";
+ String semiFilter = ";" + filter + ";";
+ return semiFilter.indexOf(extension) >= 0;
+ }
+ return false;
+ }
+
+
+ /**
+ * Start an element.
+ * @param content ContentHandler content handler
+ * @param tagName String tag name
+ * @param attributeNames String[] attribute names
+ * @param attributeValues String[] attribute values
+ * @throws SAXException if error writing element
+ */
+ private void startElement(final ContentHandler content,
+ final String tagName,
+ final String[] attributeNames,
+ final String[] attributeValues)
+ throws SAXException {
+ AttributesImpl attributes = new AttributesImpl();
+ for (int i = 0; i < attributeNames.length; i++) {
+ if (attributeValues[i] != null) {
+ attributes.addAttribute(null, attributeNames[i],
+ attributeNames[i], "#PCDATA", attributeValues[i]);
+ }
+ }
+ content.startElement(null, tagName, tagName, attributes);
+ }
+
+ /**
+ * Gets the first recognized compiler from the
+ * compilation targets.
+ * @param targets compilation targets
+ * @return representative (hopefully) compiler configuration
+ */
+ private CommandLineCompilerConfiguration
+ getBaseCompilerConfiguration(final Hashtable targets) {
+ //
+ // find first target with an DevStudio C compilation
+ //
+ CommandLineCompilerConfiguration compilerConfig = null;
+ //
+ // get the first target and assume that it is representative
+ //
+ Iterator targetIter = targets.values().iterator();
+ while (targetIter.hasNext()) {
+ TargetInfo targetInfo = (TargetInfo) targetIter.next();
+ ProcessorConfiguration config = targetInfo.getConfiguration();
+ String identifier = config.getIdentifier();
+ //
+ // for the first cl compiler
+ //
+ if (config instanceof CommandLineCompilerConfiguration) {
+ compilerConfig = (CommandLineCompilerConfiguration) config;
+ if (compilerConfig.getCompiler() instanceof DevStudioCCompiler) {
+ return compilerConfig;
+ }
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/devstudio/package.html b/src/net/sf/antcontrib/cpptasks/devstudio/package.html
new file mode 100644
index 0000000..46a31b4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/devstudio/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Adapters for Microsoft tools.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/AbstractArLibrarian.java b/src/net/sf/antcontrib/cpptasks/gcc/AbstractArLibrarian.java
new file mode 100644
index 0000000..2e8d4af
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/AbstractArLibrarian.java
@@ -0,0 +1,107 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the "ar" tool
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public abstract class AbstractArLibrarian extends CommandLineLinker {
+ private/* final */
+ String outputPrefix;
+ protected AbstractArLibrarian(String command, String identificationArg,
+ String[] inputExtensions, String[] ignoredExtensions,
+ String outputPrefix, String outputExtension, boolean isLibtool,
+ AbstractArLibrarian libtoolLibrarian) {
+ super(command, identificationArg, inputExtensions, ignoredExtensions,
+ outputExtension, isLibtool, libtoolLibrarian);
+ this.outputPrefix = outputPrefix;
+ }
+ public void addBase(long base, Vector args) {
+ }
+ public void addFixed(Boolean fixed, Vector args) {
+ }
+ public void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ }
+ public void addIncremental(boolean incremental, Vector args) {
+ }
+ public void addMap(boolean map, Vector args) {
+ }
+ public void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return null;
+ }
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return new String[0];
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ String[] baseNames = super.getOutputFileNames(baseName, versionInfo);
+ if (outputPrefix.length() > 0) {
+ for(int i = 0; i < baseNames.length; i++) {
+ baseNames[i] = outputPrefix + baseNames[i];
+ }
+ }
+ return baseNames;
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return GccProcessor.getOutputFileSwitch("rvs", outputFile);
+ }
+ public boolean isCaseSensitive() {
+ return true;
+ }
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ //
+ // if there is an existing library then
+ // we must delete it before executing "ar"
+ if (outputFile.exists()) {
+ if (!outputFile.delete()) {
+ throw new BuildException("Unable to delete "
+ + outputFile.getAbsolutePath());
+ }
+ }
+ //
+ // delegate to CommandLineLinker
+ //
+ super.link(task, outputFile, sourceFiles, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
new file mode 100644
index 0000000..7bd2f97
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
@@ -0,0 +1,328 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Abstract adapter for ld-like linkers
+ *
+ * @author Curt Arnold
+ */
+public abstract class AbstractLdLinker extends CommandLineLinker {
+ private String outputPrefix;
+ protected AbstractLdLinker(String command, String identifierArg,
+ String[] extensions, String[] ignoredExtensions,
+ String outputPrefix, String outputSuffix, boolean isLibtool,
+ AbstractLdLinker libtoolLinker) {
+ super(command, identifierArg, extensions, ignoredExtensions,
+ outputSuffix, isLibtool, libtoolLinker);
+ this.outputPrefix = outputPrefix;
+ }
+ public void addBase(long base, Vector args) {
+ if (base >= 0) {
+ args.addElement("--image-base");
+ args.addElement(Long.toHexString(base));
+ }
+ }
+ public void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (isDarwin()) {
+ if (linkType.isPluginModule()) {
+ args.addElement("-bundle");
+ } else {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-prebind");
+ args.addElement("-dynamiclib");
+ }
+ }
+ } else {
+ if (linkType.isStaticRuntime()) {
+ args.addElement("-static");
+ }
+ if (linkType.isPluginModule()) {
+ args.addElement("-shared");
+ } else {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-shared");
+ }
+ }
+ }
+ }
+ public void addIncremental(boolean incremental, Vector args) {
+ if (incremental) {
+ args.addElement("-i");
+ }
+ }
+ protected int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+ public String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ Vector libnames = new Vector();
+ super.addLibrarySets(task, libsets, preargs, midargs, endargs);
+ LibraryTypeEnum previousLibraryType = null;
+ for (int i = 0; i < libsets.length; i++) {
+ LibrarySet set = libsets[i];
+ File libdir = set.getDir(null);
+ String[] libs = set.getLibs();
+ if (libdir != null) {
+ if (set.getType() != null &&
+ "framework".equals(set.getType().getValue()) &&
+ isDarwin()) {
+ endargs.addElement("-F" + libdir.getAbsolutePath());
+ } else {
+ endargs.addElement("-L" + libdir.getAbsolutePath());
+ }
+ }
+ //
+ // if there has been a change of library type
+ //
+ if (set.getType() != previousLibraryType) {
+ if (set.getType() != null && "static".equals(set.getType().getValue())) {
+ // FREEHEP
+ if (!isDarwin()) {
+ endargs.addElement("-Bstatic");
+ previousLibraryType = set.getType();
+ }
+ } else {
+ if (set.getType() == null ||
+ !"framework".equals(set.getType().getValue()) ||
+ !isDarwin()) {
+ endargs.addElement("-Bdynamic");
+ previousLibraryType = set.getType();
+ }
+ }
+ }
+ StringBuffer buf = new StringBuffer("-l");
+ if (set.getType() != null &&
+ "framework".equals(set.getType().getValue()) &&
+ isDarwin()) {
+ buf.setLength(0);
+ buf.append("-framework ");
+ }
+ int initialLength = buf.length();
+ for (int j = 0; j < libs.length; j++) {
+ //
+ // reset the buffer to just "-l"
+ //
+ buf.setLength(initialLength);
+ //
+ // add the library name
+ buf.append(libs[j]);
+ libnames.addElement(libs[j]);
+ //
+ // add the argument to the list
+ endargs.addElement(buf.toString());
+ }
+ }
+ String rc[] = new String[libnames.size()];
+ for (int i = 0; i < libnames.size(); i++) {
+ rc[i] = (String) libnames.elementAt(i);
+ }
+ return rc;
+ }
+ public void addMap(boolean map, Vector args) {
+ if (map) {
+ args.addElement("-M");
+ }
+ }
+ public void addStack(int stack, Vector args) {
+ if (stack > 0) {
+ args.addElement("--stack");
+ args.addElement(Integer.toString(stack));
+ }
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ if (entry != null) {
+ args.addElement("-e");
+ args.addElement(entry);
+ }
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ throw new IllegalStateException("ld does not support command files");
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("LIB", ":");
+ }
+ public String getLibraryKey(File libfile) {
+ String libname = libfile.getName();
+ int lastDot = libname.lastIndexOf('.');
+ if (lastDot >= 0) {
+ return libname.substring(0, lastDot);
+ }
+ return libname;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ int patternCount = libnames.length;
+ if (libType == null) {
+ patternCount *= 2;
+ }
+ String[] patterns = new String[patternCount];
+ int offset = 0;
+ if (libType == null || "static".equals(libType.getValue())) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ }
+ if (libType != null && "framework".equals(libType.getValue()) && isDarwin()) {
+ for(int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(libnames[i]);
+ buf.append(".framework/");
+ buf.append(libnames[i]);
+ patterns[offset++] = buf.toString();
+ }
+ } else {
+ if (libType == null || !"static".equals(libType.getValue())) {
+ if (isHPUX()) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".sl", patterns,
+ offset);
+ } else {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".so", patterns,
+ offset);
+ }
+ }
+ }
+ return patterns;
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ String[] baseNames = super.getOutputFileNames(baseName, versionInfo);
+ if (outputPrefix.length() > 0) {
+ for(int i = 0; i < baseNames.length; i++) {
+ baseNames[i] = outputPrefix + baseNames[i];
+ }
+ }
+ return baseNames;
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return GccProcessor.getOutputFileSwitch("-o", outputFile);
+ }
+
+ public boolean isCaseSensitive() {
+ return true;
+ }
+ protected boolean isHPUX() {
+ String osname = System.getProperty("os.name").toLowerCase();
+ if (osname.indexOf("hp") >= 0 && osname.indexOf("ux") >= 0) {
+ return true;
+ }
+ return false;
+ }
+ /**
+ * Prepares argument list for exec command. Will return null if command
+ * line would exceed allowable command line buffer.
+ *
+ * @param outputFile
+ * linker output file
+ * @param sourceFiles
+ * linker input files (.obj, .o, .res)
+ * @param args
+ * linker arguments
+ * @return arguments for runTask
+ */
+ public String[] prepareArguments(CCTask task, String outputDir,
+ String outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) {
+ //
+ // need to suppress sources that correspond to
+ // library set entries since they are already
+ // in the argument list
+ String[] libnames = config.getLibraryNames();
+ if (libnames == null || libnames.length == 0) {
+ return super.prepareArguments(task, outputDir, outputFile,
+ sourceFiles, config);
+ }
+ //
+ //
+ // null out any sources that correspond to library names
+ //
+ String[] localSources = (String[]) sourceFiles.clone();
+ int extra = 0;
+ for (int i = 0; i < libnames.length; i++) {
+ String libname = libnames[i];
+ for (int j = 0; j < localSources.length; j++) {
+ if (localSources[j] != null
+ && localSources[j].indexOf(libname) > 0
+ && localSources[j].indexOf("lib") > 0) {
+ String filename = new File(localSources[j]).getName();
+ if (filename.startsWith("lib")
+ && filename.substring(3).startsWith(libname)) {
+ String extension = filename
+ .substring(libname.length() + 3);
+ if (extension.equals(".a") || extension.equals(".so")
+ || extension.equals(".sl")) {
+ localSources[j] = null;
+ extra++;
+ }
+ }
+ }
+ }
+ }
+ if (extra == 0) {
+ return super.prepareArguments(task, outputDir, outputFile,
+ sourceFiles, config);
+ }
+ String[] finalSources = new String[localSources.length - extra];
+ int index = 0;
+ for (int i = 0; i < localSources.length; i++) {
+ if (localSources[i] != null) {
+ finalSources[index++] = localSources[i];
+ }
+ }
+ return super.prepareArguments(task, outputDir, outputFile,
+ finalSources, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/CVS/Entries b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Entries
new file mode 100644
index 0000000..e1419fa
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Entries
@@ -0,0 +1,10 @@
+/AbstractArLibrarian.java/1.16/Tue May 11 03:50:12 2004//
+/AbstractLdLinker.java/1.19/Tue May 11 04:13:57 2004//
+/GccCCompiler.java/1.29/Fri Apr 23 20:15:47 2004//
+/GccCompatibleCCompiler.java/1.14/Fri Apr 23 20:15:47 2004//
+/GccLibrarian.java/1.22/Sat Feb 28 19:01:15 2004//
+/GccLinker.java/1.32/Sat Feb 28 19:01:15 2004//
+/GccProcessor.java/1.15/Fri Apr 23 20:15:47 2004//
+/GppLinker.java/1.2/Sat Feb 28 19:01:15 2004//
+/LdLinker.java/1.7/Sat Feb 28 19:01:15 2004//
+D/cross////
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/CVS/Repository b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Repository
new file mode 100644
index 0000000..f84241b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/gcc
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/CVS/Root b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java b/src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
new file mode 100644
index 0000000..0881055
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
@@ -0,0 +1,246 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * Adapter for the GCC C/C++ compiler
+ *
+ * @author Adam Murdoch
+ */
+public final class GccCCompiler extends GccCompatibleCCompiler {
+ private final static String[] sourceExtensions = new String[]{".c", /* C */
+ ".cc", /* C++ */
+ ".cpp", /* C++ */
+ ".cxx", /* C++ */
+ ".c++", /* C++ */
+ ".i", /* preprocessed C */
+ ".ii", /* preprocessed C++ */
+ ".f", /* FORTRAN */
+ ".for", /* FORTRAN */
+ ".m", /* Objective-C */
+ ".mm", /* Objected-C++ */
+ ".s" /* Assembly */
+ };
+ private final static String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ private static final GccCCompiler cppInstance = new GccCCompiler("c++",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("c++", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler g77Instance = new GccCCompiler("g77",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("g77", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler gppInstance = new GccCCompiler("g++",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("g++", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler instance = new GccCCompiler("gcc",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("gcc", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ /**
+ * Gets c++ adapter
+ */
+ public static GccCCompiler getCppInstance() {
+ return cppInstance;
+ }
+ /**
+ * Gets g77 adapter
+ */
+ public static GccCCompiler getG77Instance() {
+ return g77Instance;
+ }
+ /**
+ * Gets gpp adapter
+ */
+ public static GccCCompiler getGppInstance() {
+ return gppInstance;
+ }
+ /**
+ * Gets gcc adapter
+ */
+ public static GccCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ private boolean isPICMeaningful = true;
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private GccCCompiler(String command, String[] sourceExtensions,
+ String[] headerExtensions, boolean isLibtool,
+ GccCCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(command, null, sourceExtensions, headerExtensions, isLibtool,
+ libtoolCompiler, newEnvironment, env);
+ isPICMeaningful = System.getProperty("os.name").indexOf("Windows") < 0;
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ super.addImpliedArgs(args, debug, multithreaded,
+ exceptions, linkType, rtti, optimization);
+ if (isPICMeaningful && linkType.isSharedLibrary()) {
+ args.addElement("-fPIC");
+ }
+ // FREEHEP -fno-rtti only valid for g++ and c++
+ if (!getCommand().equals("g77") && !getCommand().equals("gcc") && (rtti != null) && !rtti.booleanValue()) {
+ args.addElement("-fno-rtti");
+ }
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new GccCCompiler(getCommand(), this.getSourceExtensions(),
+ this.getHeaderExtensions(), this.getLibtool(),
+ (GccCCompiler) this.getLibtoolCompiler(), newEnvironment,
+ env);
+ }
+ return this;
+ }
+ /**
+ * Create parser to determine dependencies.
+ *
+ * Will create appropriate parser (C++, FORTRAN) based on file extension.
+ *
+ */
+ protected Parser createParser(File source) {
+ if (source != null) {
+ String sourceName = source.getName();
+ int lastDot = sourceName.lastIndexOf('.');
+ if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
+ char afterDot = sourceName.charAt(lastDot + 1);
+ if (afterDot == 'f' || afterDot == 'F') {
+ return new FortranParser();
+ }
+ }
+ }
+ return new CParser();
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ //
+ // construct default include path from machine id and version id
+ //
+ String[] defaultInclude = new String[1];
+ StringBuffer buf = new StringBuffer("/lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ buf.append("/include");
+ defaultInclude[0] = buf.toString();
+ //
+ // read specs file and look for -istart and -idirafter
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] optionValues = GccProcessor.parseSpecs(specs, "*cpp:",
+ new String[]{"-isystem ", "-idirafter "});
+ //
+ // if no entries were found, then use a default path
+ //
+ if (optionValues[0].length == 0 && optionValues[1].length == 0) {
+ optionValues[0] = new String[]{"/usr/local/include",
+ "/usr/include", "/usr/include/win32api"};
+ }
+ //
+ // remove mingw entries.
+ // For MinGW compiles this will mean the
+ // location of the sys includes will be
+ // wrong in dependencies.xml
+ // but that should have no significant effect
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j].indexOf("mingw") > 0) {
+ optionValues[i][j] = null;
+ }
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(optionValues[0]);
+ GccProcessor.convertCygwinFilenames(optionValues[1]);
+ GccProcessor.convertCygwinFilenames(defaultInclude);
+ }
+ int count = CUtil.checkDirectoryArray(optionValues[0]);
+ count += CUtil.checkDirectoryArray(optionValues[1]);
+ count += CUtil.checkDirectoryArray(defaultInclude);
+ includePath = new File[count];
+ int index = 0;
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j] != null) {
+ includePath[index++] = new File(optionValues[i][j]);
+ }
+ }
+ }
+ for (int i = 0; i < defaultInclude.length; i++) {
+ if (defaultInclude[i] != null) {
+ includePath[index++] = new File(defaultInclude[i]);
+ }
+ }
+ }
+ return (File[]) includePath.clone();
+ }
+ public String getIdentifier() throws BuildException {
+ if (identifier == null) {
+ StringBuffer buf;
+ if (getLibtool()) {
+ buf = new StringBuffer("libtool ");
+ } else {
+ buf = new StringBuffer(' ');
+ }
+ buf.append(getCommand());
+ buf.append(' ');
+ buf.append(GccProcessor.getVersion());
+ buf.append(' ');
+ buf.append(GccProcessor.getMachine());
+ identifier = buf.toString();
+ }
+ return identifier;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return GccLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java b/src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java
new file mode 100644
index 0000000..ea42faf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java
@@ -0,0 +1,151 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * Abstract base class for compilers that attempt to be command line compatible
+ * with GCC
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public abstract class GccCompatibleCCompiler extends CommandLineCCompiler {
+ private final static String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ private final static String[] sourceExtensions = new String[]{".c", ".cc",
+ ".cpp", ".cxx", ".c++", ".i", ".f", ".for"};
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ protected GccCompatibleCCompiler(String command, String identifierArg,
+ boolean libtool, GccCompatibleCCompiler libtoolCompiler,
+ boolean newEnvironment, Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ libtool ? ".fo" : ".o", libtool, libtoolCompiler,
+ newEnvironment, env);
+ }
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ protected GccCompatibleCCompiler(String command, String identifierArg,
+ String[] sourceExtensions, String[] headerExtensions,
+ boolean libtool, GccCompatibleCCompiler libtoolCompiler,
+ boolean newEnvironment, Environment env) {
+ super(command, identifierArg, sourceExtensions, headerExtensions,
+ libtool ? ".fo" : ".o", libtool, libtoolCompiler,
+ newEnvironment, env);
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ //
+ // -fPIC is too much trouble
+ // users have to manually add it for
+ // operating systems that make sense
+ //
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ } else {
+ if (optimization != null) {
+ if (optimization.isSize()) {
+ args.addElement("-Os");
+ } else if (optimization.isSpeed()) {
+ if ("full".equals(optimization.getValue())) {
+ args.addElement("-O2");
+ } else {
+ if ("speed".equals(optimization.getValue())) {
+ args.addElement("-O1");
+ } else {
+ args.addElement("-O3");
+ }
+ }
+ }
+ }
+ }
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+// FREEHEP, moved to GccCCompiler
+// if (rtti != null && !rtti.booleanValue()) {
+// args.addElement("-fno-rtti");
+// }
+// FREEHEP
+ if (!exceptions) {
+ args.addElement("-fno-exceptions");
+ }
+
+ }
+ /**
+ * Adds an include path to the command.
+ */
+ public void addIncludePath(String path, Vector cmd) {
+ cmd.addElement("-I" + path);
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 5 :
+ args.addElement("-Werror");
+ /* nobreak */
+ case 4 :
+ args.addElement("-W");
+ /* nobreak */
+ case 3 :
+ args.addElement("-Wall");
+ break;
+ }
+ }
+ public void getDefineSwitch(StringBuffer buffer, String define, String value) {
+ buffer.append("-D");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ":");
+ }
+ public String getIncludeDirSwitch(String includeDir) {
+ return "-I" + includeDir;
+ }
+ public void getUndefineSwitch(StringBuffer buffer, String define) {
+ buffer.append("-U");
+ buffer.append(define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccLibrarian.java b/src/net/sf/antcontrib/cpptasks/gcc/GccLibrarian.java
new file mode 100644
index 0000000..0c6ae4b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccLibrarian.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * Adapter for the 'ar' archiver
+ *
+ * @author Adam Murdoch
+ */
+public final class GccLibrarian extends AbstractArLibrarian {
+ private static String[] objFileExtensions = new String[]{".o"};
+ private static GccLibrarian instance = new GccLibrarian("ar",
+ objFileExtensions, false, new GccLibrarian("ar", objFileExtensions,
+ true, null));
+ public static GccLibrarian getInstance() {
+ return instance;
+ }
+ private GccLibrarian(String command, String[] inputExtensions,
+ boolean isLibtool, GccLibrarian libtoolLibrarian) {
+ super(command, "V", inputExtensions, new String[0], "lib", ".a",
+ isLibtool, libtoolLibrarian);
+ }
+ public Linker getLinker(LinkType type) {
+ return GccLinker.getInstance().getLinker(type);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
new file mode 100644
index 0000000..c4720c8
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
@@ -0,0 +1,210 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * Adapter for the GCC linker
+ *
+ * @author Adam Murdoch
+ */
+public class GccLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle",
+ "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
+ "-static", "-shared", "-symbolic", "-Xlinker",
+ "--export-all-symbols", "-static-libgcc",};
+ private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private static final GccLinker instance = new GccLinker("gcc", objFiles,
+ discardFiles, "", "", false, null);
+ private static final GccLinker machBundleLinker = new GccLinker("gcc",
+ objFiles, discardFiles, "lib", ".bundle", false, null);
+ private static final GccLinker machDllLinker = new GccLinker("gcc",
+ objFiles, discardFiles, "lib", ".dylib", false, null);
+ public static GccLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ protected GccLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GccLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GccLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ case 'v' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ //
+ // construct gcc lib path from machine and version
+ //
+ StringBuffer buf = new StringBuffer("/lib/gcc-lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ //
+ // build default path from gcc and system /lib and /lib/w32api
+ //
+ String[] impliedLibPath = new String[]{buf.toString(),
+ "/lib/w32api", "/lib"};
+ //
+ // read gcc specs file for other library paths
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] libpaths = GccProcessor.parseSpecs(specs, "*link:",
+ new String[]{"%q"});
+ String[] libpath;
+ if (libpaths[0].length > 0) {
+ libpath = new String[libpaths[0].length + 3];
+ int i = 0;
+ for (; i < libpaths[0].length; i++) {
+ libpath[i] = libpaths[0][i];
+ }
+ libpath[i++] = buf.toString();
+ libpath[i++] = "/lib/w32api";
+ libpath[i++] = "/lib";
+ } else {
+ //
+ // if a failure to find any matches then
+ // use some default values for lib path entries
+ libpath = new String[]{"/usr/local/lib/mingw",
+ "/usr/local/lib", "/usr/lib/w32api", "/usr/lib/mingw",
+ "/usr/lib", buf.toString(), "/lib/w32api", "/lib"};
+ }
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i].indexOf("mingw") >= 0) {
+ libpath[i] = null;
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(libpath);
+ }
+ //
+ // check that remaining entries are actual directories
+ //
+ int count = CUtil.checkDirectoryArray(libpath);
+ //
+ // populate return array with remaining entries
+ //
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (isDarwin()) {
+ return machBundleLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (isDarwin()) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java b/src/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java
new file mode 100644
index 0000000..058ef12
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java
@@ -0,0 +1,299 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+/**
+ * A add-in class for Gcc processors
+ *
+ *
+ */
+public class GccProcessor {
+ // the results from gcc -dumpmachine
+ private static String machine;
+ private static String[] specs;
+ // the results from gcc -dumpversion
+ private static String version;
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+ /**
+ * Converts absolute Cygwin file or directory names to the corresponding
+ * Win32 name.
+ *
+ * @param names
+ * array of names, some elements may be null, will be changed in
+ * place.
+ */
+ public static void convertCygwinFilenames(String[] names) {
+ if (names == null) {
+ throw new NullPointerException("names");
+ }
+ File gccDir = CUtil.getExecutableLocation("gcc.exe");
+ if (gccDir != null) {
+ String prefix = gccDir.getAbsolutePath() + "/..";
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < names.length; i++) {
+ String name = names[i];
+ if (name != null && name.length() > 1 && name.charAt(0) == '/') {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(name);
+ names[i] = buf.toString();
+ }
+ }
+ }
+ }
+ public static String[] getLibraryPatterns(String[] libnames) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length * 2];
+ int offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ if (isHPUX()) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".sl", patterns,
+ offset);
+ } else {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".so", patterns,
+ offset);
+ }
+ return patterns;
+ }
+ public static String getMachine() {
+ if (machine == null) {
+ String[] args = new String[]{"gcc", "-dumpmachine"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ machine = "nomachine";
+ } else {
+ machine = cmdout[0];
+ }
+ }
+ return machine;
+ }
+ public static String[] getOutputFileSwitch(String letter, String outputFile) {
+ StringBuffer buf = new StringBuffer();
+ if (outputFile.indexOf(' ') >= 0) {
+ buf.append('"');
+ buf.append(outputFile.replace('\\', '/'));
+ buf.append('"');
+ } else {
+ buf.append(outputFile.replace('\\', '/'));
+ }
+ String[] retval = new String[]{letter, buf.toString()};
+ return retval;
+ }
+ /**
+ * Returns the contents of the gcc specs file.
+ *
+ * The implementation locates gcc.exe in the executable path and then
+ * builds a relative path name from the results of -dumpmachine and
+ * -dumpversion. Attempts to use gcc -dumpspecs to provide this information
+ * resulted in stalling on the Execute.run
+ *
+ * @returns contents of the specs file
+ */
+ public static String[] getSpecs() {
+ if (specs == null) {
+ File gccParent = CUtil.getExecutableLocation("gcc.exe");
+ if (gccParent != null) {
+ //
+ // build a relative path like
+ // ../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
+ //
+ StringBuffer buf = new StringBuffer("../lib/gcc-lib/");
+ buf.append(getMachine());
+ buf.append('/');
+ buf.append(getVersion());
+ buf.append("/specs");
+ //
+ // resolve it relative to the location of gcc.exe
+ //
+ String relativePath = buf.toString();
+ File specsFile = new File(gccParent, relativePath);
+ //
+ // found the specs file
+ //
+ try {
+ //
+ // read the lines in the file
+ //
+ BufferedReader reader = new BufferedReader(new FileReader(
+ specsFile));
+ Vector lines = new Vector(100);
+ String line = reader.readLine();
+ while (line != null) {
+ lines.addElement(line);
+ line = reader.readLine();
+ }
+ specs = new String[lines.size()];
+ lines.copyInto(specs);
+ } catch (IOException ex) {
+ }
+ }
+ }
+ if (specs == null) {
+ specs = new String[0];
+ }
+ return specs;
+ }
+ public static String getVersion() {
+ if (version == null) {
+ String[] args = new String[]{"gcc", "-dumpversion"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ version = "noversion";
+ } else {
+ version = cmdout[0];
+ }
+ }
+ return version;
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ /**
+ * Determines if task is running with cygwin
+ *
+ * @return true if cygwin was detected
+ */
+ public static boolean isCygwin() {
+ return getMachine().indexOf("cygwin") > 0;
+ }
+ private static boolean isHPUX() {
+ String osname = System.getProperty("os.name").toLowerCase();
+ if (osname.indexOf("hp") >= 0 && osname.indexOf("ux") >= 0) {
+ return true;
+ }
+ return false;
+ }
+ /**
+ *
+ * Parses the results of the specs file for a specific processor and
+ * options
+ *
+ * @param specsContent
+ * Contents of specs file as returned from getSpecs
+ * @param specSectionStart
+ * start of spec section, for example "*cpp:"
+ * @param options
+ * command line switches such as "-istart"
+ */
+ public static String[][] parseSpecs(String[] specsContent,
+ String specSectionStart, String[] options) {
+ if (specsContent == null) {
+ throw new NullPointerException("specsContent");
+ }
+ if (specSectionStart == null) {
+ throw new NullPointerException("specSectionStart");
+ }
+ if (options == null) {
+ throw new NullPointerException("option");
+ }
+ String[][] optionValues = new String[options.length][];
+ StringBuffer optionValue = new StringBuffer(40);
+ for (int i = 0; i < specsContent.length; i++) {
+ String specLine = specsContent[i];
+ //
+ // if start of section then start paying attention
+ //
+ if (specLine.startsWith(specSectionStart)) {
+ Vector[] optionVectors = new Vector[options.length];
+ for (int j = 0; j < options.length; j++) {
+ optionVectors[j] = new Vector(10);
+ }
+ //
+ // go to next line and examine contents
+ // and repeat until end of file
+ //
+ for (i++; i < specsContent.length; i++) {
+ specLine = specsContent[i];
+ for (int j = 0; j < options.length; j++) {
+ int optionStart = specLine.indexOf(options[j]);
+ while (optionStart >= 0) {
+ optionValue.setLength(0);
+ //
+ // walk rest of line looking for first non
+ // whitespace
+ // and then next space
+ boolean hasNonBlank = false;
+ int k = optionStart + options[j].length();
+ for (; k < specLine.length(); k++) {
+ //
+ // either a blank or a "}" (close of
+ // conditional)
+ // section will end the path
+ //
+ if (specLine.charAt(k) == ' '
+ || specLine.charAt(k) == '}') {
+ if (hasNonBlank) {
+ break;
+ }
+ } else {
+ hasNonBlank = true;
+ optionValue.append(specLine.charAt(k));
+ }
+ }
+ //
+ // transition back to whitespace
+ // value is over, add it to vector
+ if (hasNonBlank) {
+ optionVectors[j].addElement(optionValue
+ .toString());
+ }
+ //
+ // find next occurance on line
+ //
+ optionStart = specLine.indexOf(options[j], k);
+ }
+ }
+ }
+ //
+ // copy vectors over to option arrays
+ //
+ for (int j = 0; j < options.length; j++) {
+ optionValues[j] = new String[optionVectors[j].size()];
+ optionVectors[j].copyInto(optionValues[j]);
+ }
+ }
+ }
+ //
+ // fill in any missing option values with
+ // a zero-length string array
+ for (int i = 0; i < optionValues.length; i++) {
+ String[] zeroLenArray = new String[0];
+ if (optionValues[i] == null) {
+ optionValues[i] = zeroLenArray;
+ }
+ }
+ return optionValues;
+ }
+ private GccProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
new file mode 100644
index 0000000..84421f1
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
@@ -0,0 +1,205 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+/**
+ * Adapter for the g++ variant of the GCC linker
+ *
+ * @author Stephen M. Webb <stephen.webb@bregmasoft.com>
+ */
+public class GppLinker extends AbstractLdLinker {
+ protected static final String[] discardFiles = new String[0];
+ protected static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final GppLinker dllLinker = new GppLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", false, new GppLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private final static String libPrefix = "libraries: =";
+ protected static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle", "-dylib",
+ "-dynamic", "-dynamiclib", "-nostartfiles", "-nostdlib",
+ "-prebind", "-s", "-static", "-shared", "-symbolic", "-Xlinker"};
+ private static final GppLinker instance = new GppLinker("gcc", objFiles,
+ discardFiles, "", "", false, null);
+ private static final GppLinker machDllLinker = new GppLinker("gcc",
+ objFiles, discardFiles, "lib", ".dylib", false, null);
+ private static final GppLinker machPluginLinker = new GppLinker("gcc",
+ objFiles, discardFiles, "lib", ".bundle", false, null);
+ public static GppLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private String runtimeLibrary;
+ protected GppLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GppLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ if (linkType.isStaticRuntime()) {
+ String[] cmdin = new String[]{"g++", "-print-file-name=libstdc++.a"};
+ String[] cmdout = CaptureStreamHandler.run(cmdin);
+ if (cmdout.length > 0) {
+ runtimeLibrary = cmdout[0];
+ } else {
+ runtimeLibrary = null;
+ }
+ } else {
+ runtimeLibrary = "-lstdc++";
+ }
+ // FREEHEP: set flag
+ linkType.callAddLibrarySets = true;
+ }
+ public String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ String[] rs = super.addLibrarySets(task, libsets, preargs, midargs,
+ endargs);
+ if (runtimeLibrary != null) {
+ endargs.addElement(runtimeLibrary);
+ }
+ return rs;
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GppLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ Vector dirs = new Vector();
+ // Ask GCC where it will look for its libraries.
+ String[] args = new String[]{"g++", "-print-search-dirs"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ for (int i = 0; i < cmdout.length; ++i) {
+ int prefixIndex = cmdout[i].indexOf(libPrefix);
+ if (prefixIndex >= 0) {
+ // Special case DOS-type GCCs like MinGW or Cygwin
+ int s = prefixIndex + libPrefix.length();
+ int t = cmdout[i].indexOf(';', s);
+ while (t > 0) {
+ dirs.addElement(cmdout[i].substring(s, t));
+ s = t + 1;
+ t = cmdout[i].indexOf(';', s);
+ }
+ dirs.addElement(cmdout[i].substring(s));
+ ++i;
+ for (; i < cmdout.length; ++i) {
+ dirs.addElement(cmdout[i]);
+ }
+ }
+ }
+ // Eliminate all but actual directories.
+ String[] libpath = new String[dirs.size()];
+ dirs.copyInto(libpath);
+ int count = CUtil.checkDirectoryArray(libpath);
+ // Build return array.
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; ++i) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machPluginLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/LdLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/LdLinker.java
new file mode 100644
index 0000000..2104e34
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/LdLinker.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * Adapter for the 'ld' linker
+ *
+ * @author Curt Arnold
+ */
+public final class LdLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final LdLinker dllLinker = new LdLinker("ld", objFiles,
+ discardFiles, "lib", ".so", false, new LdLinker("ld", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private static final LdLinker instance = new LdLinker("ld", objFiles,
+ discardFiles, "", "", false, null);
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ public static LdLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private LdLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, LdLinker libtoolLinker) {
+ super(command, "-version", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Entries b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Entries
new file mode 100644
index 0000000..f894f85
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Entries
@@ -0,0 +1,7 @@
+/GccCCompiler.java/1.3/Fri Apr 23 20:15:48 2004//
+/GccLibrarian.java/1.2/Sat Feb 28 19:01:15 2004//
+/GccLinker.java/1.2/Sat Feb 28 19:01:15 2004//
+/GccProcessor.java/1.3/Wed Apr 21 21:47:36 2004//
+/GppLinker.java/1.2/Sat Feb 28 19:01:15 2004//
+/LdLinker.java/1.2/Sat Feb 28 19:01:15 2004//
+D/sparc_sun_solaris2////
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Repository b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Repository
new file mode 100644
index 0000000..28216ad
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/gcc/cross
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Root b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/GccCCompiler.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccCCompiler.java
new file mode 100644
index 0000000..86a8ac7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccCCompiler.java
@@ -0,0 +1,272 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.CompilerParam;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * Adapter for the GCC C/C++ compiler
+ *
+ * @author Adam Murdoch
+ */
+public final class GccCCompiler extends GccCompatibleCCompiler {
+ private final static String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ private final static String[] sourceExtensions = new String[]{".c", /* C */
+ ".cc", /* C++ */
+ ".cpp", /* C++ */
+ ".cxx", /* C++ */
+ ".c++", /* C++ */
+ ".i", /* preprocessed C */
+ ".ii", /* preprocessed C++ */
+ ".f", /* FORTRAN */
+ ".for", /* FORTRAN */
+ ".m", /* Objective-C */
+ ".mm", /* Objected-C++ */
+ ".s" /* Assembly */
+ };
+ private static final GccCCompiler cppInstance = new GccCCompiler("c++",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("c++", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler g77Instance = new GccCCompiler("g77",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("g77", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler gppInstance = new GccCCompiler("g++",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("g++", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ private static final GccCCompiler instance = new GccCCompiler("gcc",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("gcc", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
+ /**
+ * Gets c++ adapter
+ */
+ public static GccCCompiler getCppInstance() {
+ return cppInstance;
+ }
+ /**
+ * Gets g77 adapter
+ */
+ public static GccCCompiler getG77Instance() {
+ return g77Instance;
+ }
+ /**
+ * Gets gpp adapter
+ */
+ public static GccCCompiler getGppInstance() {
+ return gppInstance;
+ }
+ /**
+ * Gets gcc adapter
+ */
+ public static GccCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ private boolean isPICMeaningful = true;
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private GccCCompiler(String command, String[] sourceExtensions,
+ String[] headerExtensions, boolean isLibtool,
+ GccCCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(command, null, sourceExtensions, headerExtensions, isLibtool,
+ libtoolCompiler, newEnvironment, env);
+ isPICMeaningful = System.getProperty("os.name").indexOf("Windows") < 0;
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ super.addImpliedArgs(args, debug, multithreaded,
+ exceptions, linkType, rtti, optimization);
+ if (isPICMeaningful && linkType.isSharedLibrary()) {
+ args.addElement("-fPIC");
+ }
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new GccCCompiler(getCommand(), this.getSourceExtensions(),
+ this.getHeaderExtensions(), this.getLibtool(),
+ (GccCCompiler) this.getLibtoolCompiler(), newEnvironment,
+ env);
+ }
+ return this;
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ GccCCompiler clone = (GccCCompiler) super.clone();
+ return clone;
+ }
+ public void compile(CCTask task, File outputDir, String[] sourceFiles,
+ String[] args, String[] endArgs, boolean relentless,
+ CommandLineCompilerConfiguration config, ProgressMonitor monitor)
+ throws BuildException {
+ try {
+ GccCCompiler clone = (GccCCompiler) this.clone();
+ CompilerParam param = config.getParam("target");
+ if (param != null)
+ clone.setCommand(param.getValue() + "-" + this.getCommand());
+ clone.supercompile(task, outputDir, sourceFiles, args, endArgs,
+ relentless, config, monitor);
+ } catch (CloneNotSupportedException e) {
+ supercompile(task, outputDir, sourceFiles, args, endArgs,
+ relentless, config, monitor);
+ }
+ }
+ /**
+ * Create parser to determine dependencies.
+ *
+ * Will create appropriate parser (C++, FORTRAN) based on file extension.
+ *
+ */
+ protected Parser createParser(File source) {
+ if (source != null) {
+ String sourceName = source.getName();
+ int lastDot = sourceName.lastIndexOf('.');
+ if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
+ char afterDot = sourceName.charAt(lastDot + 1);
+ if (afterDot == 'f' || afterDot == 'F') {
+ return new FortranParser();
+ }
+ }
+ }
+ return new CParser();
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ //
+ // construct default include path from machine id and version id
+ //
+ String[] defaultInclude = new String[1];
+ StringBuffer buf = new StringBuffer("/lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ buf.append("/include");
+ defaultInclude[0] = buf.toString();
+ //
+ // read specs file and look for -istart and -idirafter
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] optionValues = GccProcessor.parseSpecs(specs, "*cpp:",
+ new String[]{"-isystem ", "-idirafter "});
+ //
+ // if no entries were found, then use a default path
+ //
+ if (optionValues[0].length == 0 && optionValues[1].length == 0) {
+ optionValues[0] = new String[]{"/usr/local/include",
+ "/usr/include", "/usr/include/win32api"};
+ }
+ //
+ // remove mingw entries.
+ // For MinGW compiles this will mean the
+ // location of the sys includes will be
+ // wrong in dependencies.xml
+ // but that should have no significant effect
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j].indexOf("mingw") > 0) {
+ optionValues[i][j] = null;
+ }
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(optionValues[0]);
+ GccProcessor.convertCygwinFilenames(optionValues[1]);
+ GccProcessor.convertCygwinFilenames(defaultInclude);
+ }
+ int count = CUtil.checkDirectoryArray(optionValues[0]);
+ count += CUtil.checkDirectoryArray(optionValues[1]);
+ count += CUtil.checkDirectoryArray(defaultInclude);
+ includePath = new File[count];
+ int index = 0;
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j] != null) {
+ includePath[index++] = new File(optionValues[i][j]);
+ }
+ }
+ }
+ for (int i = 0; i < defaultInclude.length; i++) {
+ if (defaultInclude[i] != null) {
+ includePath[index++] = new File(defaultInclude[i]);
+ }
+ }
+ }
+ return (File[]) includePath.clone();
+ }
+ public String getIdentifier() throws BuildException {
+ if (identifier == null) {
+ StringBuffer buf;
+ if (getLibtool()) {
+ buf = new StringBuffer("libtool ");
+ } else {
+ buf = new StringBuffer(' ');
+ }
+ buf.append(getCommand());
+ buf.append(' ');
+ buf.append(GccProcessor.getVersion());
+ buf.append(' ');
+ buf.append(GccProcessor.getMachine());
+ identifier = buf.toString();
+ }
+ return identifier;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return GccLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ private void supercompile(CCTask task, File outputDir,
+ String[] sourceFiles, String[] args, String[] endArgs,
+ boolean relentless, CommandLineCompilerConfiguration config,
+ ProgressMonitor monitor) throws BuildException {
+ super.compile(task, outputDir, sourceFiles, args, endArgs, relentless,
+ config, monitor);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLibrarian.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLibrarian.java
new file mode 100644
index 0000000..c9d28d9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLibrarian.java
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractArLibrarian;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the 'ar' archiver
+ *
+ * @author Adam Murdoch
+ */
+public final class GccLibrarian extends AbstractArLibrarian {
+ private static String[] objFileExtensions = new String[]{".o"};
+ private static GccLibrarian instance = new GccLibrarian("ar",
+ objFileExtensions, false, new GccLibrarian("ar", objFileExtensions,
+ true, null));
+ public static GccLibrarian getInstance() {
+ return instance;
+ }
+ private GccLibrarian(String command, String[] inputExtensions,
+ boolean isLibtool, GccLibrarian libtoolLibrarian) {
+ super(command, "V", inputExtensions, new String[0], "lib", ".a",
+ isLibtool, libtoolLibrarian);
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ GccLibrarian clone = (GccLibrarian) super.clone();
+ return clone;
+ }
+ public Linker getLinker(LinkType type) {
+ return GccLinker.getInstance().getLinker(type);
+ }
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ try {
+ GccLibrarian clone = (GccLibrarian) this.clone();
+ LinkerParam param = config.getParam("target");
+ if (param != null)
+ clone.setCommand(param.getValue() + "-" + this.getCommand());
+ clone.superlink(task, outputFile, sourceFiles, config);
+ } catch (CloneNotSupportedException e) {
+ superlink(task, outputFile, sourceFiles, config);
+ }
+ }
+ private void superlink(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ super.link(task, outputFile, sourceFiles, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLinker.java
new file mode 100644
index 0000000..4347211
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccLinker.java
@@ -0,0 +1,234 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.File;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the GCC linker
+ *
+ * @author Adam Murdoch
+ */
+public class GccLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private static final GccLinker instance = new GccLinker("gcc", objFiles,
+ discardFiles, "", "", false, null);
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle",
+ "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
+ "-static", "-shared", "-symbolic", "-Xlinker",
+ "--export-all-symbols", "-static-libgcc",};
+ private static final GccLinker machBundleLinker = new GccLinker("gcc",
+ objFiles, discardFiles, "lib", ".bundle", false, null);
+ private static final GccLinker machDllLinker = new GccLinker("gcc",
+ objFiles, discardFiles, "lib", ".dylib", false, null);
+ public static GccLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ protected GccLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GccLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ GccLinker clone = (GccLinker) super.clone();
+ return clone;
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GccLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ case 'v' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ //
+ // construct gcc lib path from machine and version
+ //
+ StringBuffer buf = new StringBuffer("/lib/gcc-lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ //
+ // build default path from gcc and system /lib and /lib/w32api
+ //
+ String[] impliedLibPath = new String[]{buf.toString(),
+ "/lib/w32api", "/lib"};
+ //
+ // read gcc specs file for other library paths
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] libpaths = GccProcessor.parseSpecs(specs, "*link:",
+ new String[]{"%q"});
+ String[] libpath;
+ if (libpaths[0].length > 0) {
+ libpath = new String[libpaths[0].length + 3];
+ int i = 0;
+ for (; i < libpaths[0].length; i++) {
+ libpath[i] = libpaths[0][i];
+ }
+ libpath[i++] = buf.toString();
+ libpath[i++] = "/lib/w32api";
+ libpath[i++] = "/lib";
+ } else {
+ //
+ // if a failure to find any matches then
+ // use some default values for lib path entries
+ libpath = new String[]{"/usr/local/lib/mingw",
+ "/usr/local/lib", "/usr/lib/w32api", "/usr/lib/mingw",
+ "/usr/lib", buf.toString(), "/lib/w32api", "/lib"};
+ }
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i].indexOf("mingw") >= 0) {
+ libpath[i] = null;
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(libpath);
+ }
+ //
+ // check that remaining entries are actual directories
+ //
+ int count = CUtil.checkDirectoryArray(libpath);
+ //
+ // populate return array with remaining entries
+ //
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (isDarwin()) {
+ return machBundleLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (isDarwin()) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ try {
+ GccLinker clone = (GccLinker) this.clone();
+ LinkerParam param = config.getParam("target");
+ if (param != null)
+ clone.setCommand(param.getValue() + "-" + this.getCommand());
+ clone.superlink(task, outputFile, sourceFiles, config);
+ } catch (CloneNotSupportedException e) {
+ superlink(task, outputFile, sourceFiles, config);
+ }
+ }
+ private void superlink(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ super.link(task, outputFile, sourceFiles, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java
new file mode 100644
index 0000000..8e35995
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java
@@ -0,0 +1,288 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+
+/**
+ * A add-in class for Gcc processors
+ *
+ *
+ */
+public class GccProcessor {
+ // the results from gcc -dumpmachine
+ private static String machine;
+ private static String[] specs;
+ // the results from gcc -dumpversion
+ private static String version;
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+ /**
+ * Converts absolute Cygwin file or directory names to the corresponding
+ * Win32 name.
+ *
+ * @param names
+ * array of names, some elements may be null, will be changed in
+ * place.
+ */
+ public static void convertCygwinFilenames(String[] names) {
+ if (names == null) {
+ throw new NullPointerException("names");
+ }
+ File gccDir = CUtil.getExecutableLocation("gcc.exe");
+ if (gccDir != null) {
+ String prefix = gccDir.getAbsolutePath() + "/..";
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < names.length; i++) {
+ String name = names[i];
+ if (name != null && name.length() > 1 && name.charAt(0) == '/') {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(name);
+ names[i] = buf.toString();
+ }
+ }
+ }
+ }
+
+ public static String getMachine() {
+ if (machine == null) {
+ String[] args = new String[]{"gcc", "-dumpmachine"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ machine = "nomachine";
+ } else {
+ machine = cmdout[0];
+ }
+ }
+ return machine;
+ }
+ public static String[] getOutputFileSwitch(String letter, String outputFile) {
+ StringBuffer buf = new StringBuffer();
+ if (outputFile.indexOf(' ') >= 0) {
+ buf.append('"');
+ buf.append(outputFile.replace('\\', '/'));
+ buf.append('"');
+ } else {
+ buf.append(outputFile.replace('\\', '/'));
+ }
+ String[] retval = new String[]{letter, buf.toString()};
+ return retval;
+ }
+ /**
+ * Returns the contents of the gcc specs file.
+ *
+ * The implementation locates gcc.exe in the executable path and then
+ * builds a relative path name from the results of -dumpmachine and
+ * -dumpversion. Attempts to use gcc -dumpspecs to provide this information
+ * resulted in stalling on the Execute.run
+ *
+ * @returns contents of the specs file
+ */
+ public static String[] getSpecs() {
+ if (specs == null) {
+ File gccParent = CUtil.getExecutableLocation("gcc.exe");
+ if (gccParent != null) {
+ //
+ // build a relative path like
+ // ../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
+ //
+ StringBuffer buf = new StringBuffer("../lib/gcc-lib/");
+ buf.append(getMachine());
+ buf.append('/');
+ buf.append(getVersion());
+ buf.append("/specs");
+ //
+ // resolve it relative to the location of gcc.exe
+ //
+ String relativePath = buf.toString();
+ File specsFile = new File(gccParent, relativePath);
+ //
+ // found the specs file
+ //
+ try {
+ //
+ // read the lines in the file
+ //
+ BufferedReader reader = new BufferedReader(new FileReader(
+ specsFile));
+ Vector lines = new Vector(100);
+ String line = reader.readLine();
+ while (line != null) {
+ lines.addElement(line);
+ line = reader.readLine();
+ }
+ specs = new String[lines.size()];
+ lines.copyInto(specs);
+ } catch (IOException ex) {
+ }
+ }
+ }
+ if (specs == null) {
+ specs = new String[0];
+ }
+ return specs;
+ }
+ public static String getVersion() {
+ if (version == null) {
+ String[] args = new String[]{"gcc", "-dumpversion"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ version = "noversion";
+ } else {
+ version = cmdout[0];
+ }
+ }
+ return version;
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ /**
+ * Determines if task is running with cygwin
+ *
+ * @return true if cygwin was detected
+ */
+ public static boolean isCygwin() {
+ return getMachine().indexOf("cygwin") > 0;
+ }
+ private static boolean isHPUX() {
+ String osname = System.getProperty("os.name").toLowerCase();
+ if (osname.indexOf("hp") >= 0 && osname.indexOf("ux") >= 0) {
+ return true;
+ }
+ return false;
+ }
+ /**
+ *
+ * Parses the results of the specs file for a specific processor and
+ * options
+ *
+ * @param specsContent
+ * Contents of specs file as returned from getSpecs
+ * @param specSectionStart
+ * start of spec section, for example "*cpp:"
+ * @param options
+ * command line switches such as "-istart"
+ */
+ public static String[][] parseSpecs(String[] specsContent,
+ String specSectionStart, String[] options) {
+ if (specsContent == null) {
+ throw new NullPointerException("specsContent");
+ }
+ if (specSectionStart == null) {
+ throw new NullPointerException("specSectionStart");
+ }
+ if (options == null) {
+ throw new NullPointerException("option");
+ }
+ String[][] optionValues = new String[options.length][];
+ StringBuffer optionValue = new StringBuffer(40);
+ for (int i = 0; i < specsContent.length; i++) {
+ String specLine = specsContent[i];
+ //
+ // if start of section then start paying attention
+ //
+ if (specLine.startsWith(specSectionStart)) {
+ Vector[] optionVectors = new Vector[options.length];
+ for (int j = 0; j < options.length; j++) {
+ optionVectors[j] = new Vector(10);
+ }
+ //
+ // go to next line and examine contents
+ // and repeat until end of file
+ //
+ for (i++; i < specsContent.length; i++) {
+ specLine = specsContent[i];
+ for (int j = 0; j < options.length; j++) {
+ int optionStart = specLine.indexOf(options[j]);
+ while (optionStart >= 0) {
+ optionValue.setLength(0);
+ //
+ // walk rest of line looking for first non
+ // whitespace
+ // and then next space
+ boolean hasNonBlank = false;
+ int k = optionStart + options[j].length();
+ for (; k < specLine.length(); k++) {
+ //
+ // either a blank or a "}" (close of
+ // conditional)
+ // section will end the path
+ //
+ if (specLine.charAt(k) == ' '
+ || specLine.charAt(k) == '}') {
+ if (hasNonBlank) {
+ break;
+ }
+ } else {
+ hasNonBlank = true;
+ optionValue.append(specLine.charAt(k));
+ }
+ }
+ //
+ // transition back to whitespace
+ // value is over, add it to vector
+ if (hasNonBlank) {
+ optionVectors[j].addElement(optionValue
+ .toString());
+ }
+ //
+ // find next occurance on line
+ //
+ optionStart = specLine.indexOf(options[j], k);
+ }
+ }
+ }
+ //
+ // copy vectors over to option arrays
+ //
+ for (int j = 0; j < options.length; j++) {
+ optionValues[j] = new String[optionVectors[j].size()];
+ optionVectors[j].copyInto(optionValues[j]);
+ }
+ }
+ }
+ //
+ // fill in any missing option values with
+ // a zero-length string array
+ for (int i = 0; i < optionValues.length; i++) {
+ String[] zeroLenArray = new String[0];
+ if (optionValues[i] == null) {
+ optionValues[i] = zeroLenArray;
+ }
+ }
+ return optionValues;
+ }
+ private GccProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/GppLinker.java
new file mode 100644
index 0000000..b332c64
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/GppLinker.java
@@ -0,0 +1,228 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the g++ variant of the GCC linker
+ *
+ * @author Stephen M. Webb <stephen.webb@bregmasoft.com>
+ */
+public class GppLinker extends AbstractLdLinker {
+ protected static final String[] discardFiles = new String[0];
+ protected static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final GppLinker dllLinker = new GppLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", false, new GppLinker("gcc", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private final static String libPrefix = "libraries: =";
+ protected static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle", "-dylib",
+ "-dynamic", "-dynamiclib", "-nostartfiles", "-nostdlib",
+ "-prebind", "-s", "-static", "-shared", "-symbolic", "-Xlinker"};
+ private static final GppLinker instance = new GppLinker("gcc", objFiles,
+ discardFiles, "", "", false, null);
+ private static final GppLinker machDllLinker = new GppLinker("gcc",
+ objFiles, discardFiles, "lib", ".dylib", false, null);
+ private static final GppLinker machPluginLinker = new GppLinker("gcc",
+ objFiles, discardFiles, "lib", ".bundle", false, null);
+ public static GppLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private String runtimeLibrary;
+ protected GppLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GppLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ if (linkType.isStaticRuntime()) {
+ String[] cmdin = new String[]{"g++", "-print-file-name=libstdc++.a"};
+ String[] cmdout = CaptureStreamHandler.run(cmdin);
+ if (cmdout.length > 0) {
+ runtimeLibrary = cmdout[0];
+ } else {
+ runtimeLibrary = null;
+ }
+ } else {
+ runtimeLibrary = "-lstdc++";
+ }
+ }
+ public String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ String[] rs = super.addLibrarySets(task, libsets, preargs, midargs,
+ endargs);
+ if (runtimeLibrary != null) {
+ endargs.addElement(runtimeLibrary);
+ }
+ return rs;
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ GppLinker clone = (GppLinker) super.clone();
+ return clone;
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GppLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ Vector dirs = new Vector();
+ // Ask GCC where it will look for its libraries.
+ String[] args = new String[]{"g++", "-print-search-dirs"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ for (int i = 0; i < cmdout.length; ++i) {
+ int prefixIndex = cmdout[i].indexOf(libPrefix);
+ if (prefixIndex >= 0) {
+ // Special case DOS-type GCCs like MinGW or Cygwin
+ int s = prefixIndex + libPrefix.length();
+ int t = cmdout[i].indexOf(';', s);
+ while (t > 0) {
+ dirs.addElement(cmdout[i].substring(s, t));
+ s = t + 1;
+ t = cmdout[i].indexOf(';', s);
+ }
+ dirs.addElement(cmdout[i].substring(s));
+ ++i;
+ for (; i < cmdout.length; ++i) {
+ dirs.addElement(cmdout[i]);
+ }
+ }
+ }
+ // Eliminate all but actual directories.
+ String[] libpath = new String[dirs.size()];
+ dirs.copyInto(libpath);
+ int count = CUtil.checkDirectoryArray(libpath);
+ // Build return array.
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; ++i) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machPluginLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ try {
+ GppLinker clone = (GppLinker) this.clone();
+ LinkerParam param = config.getParam("target");
+ if (param != null)
+ clone.setCommand(param.getValue() + "-" + this.getCommand());
+ clone.superlink(task, outputFile, sourceFiles, config);
+ } catch (CloneNotSupportedException e) {
+ superlink(task, outputFile, sourceFiles, config);
+ }
+ }
+ private void superlink(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ super.link(task, outputFile, sourceFiles, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/LdLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/LdLinker.java
new file mode 100644
index 0000000..26abf8c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/LdLinker.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerParam;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the 'ld' linker
+ *
+ * @author Curt Arnold
+ */
+public final class LdLinker extends AbstractLdLinker {
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final String[] discardFiles = new String[0];
+ private static final LdLinker dllLinker = new LdLinker("ld", objFiles,
+ discardFiles, "lib", ".so", false, new LdLinker("ld", objFiles,
+ discardFiles, "lib", ".so", true, null));
+ private static final LdLinker instance = new LdLinker("ld", objFiles,
+ discardFiles, "", "", false, null);
+ public static LdLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private LdLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, LdLinker libtoolLinker) {
+ super(command, "-version", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ LdLinker clone = (LdLinker) super.clone();
+ return clone;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ try {
+ LdLinker clone = (LdLinker) this.clone();
+ LinkerParam param = config.getParam("target");
+ if (param != null)
+ clone.setCommand(param.getValue() + "-" + this.getCommand());
+ clone.superlink(task, outputFile, sourceFiles, config);
+ } catch (CloneNotSupportedException e) {
+ superlink(task, outputFile, sourceFiles, config);
+ }
+ }
+ private void superlink(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ super.link(task, outputFile, sourceFiles, config);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Entries b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Entries
new file mode 100644
index 0000000..8ff801c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Entries
@@ -0,0 +1,7 @@
+/GccCCompiler.java/1.3/Fri Apr 23 20:15:48 2004//
+/GccLibrarian.java/1.2/Sat Feb 28 19:01:14 2004//
+/GccLinker.java/1.3/Sat Feb 28 19:01:14 2004//
+/GccProcessor.java/1.3/Wed Apr 21 21:48:41 2004//
+/GppLinker.java/1.2/Sat Feb 28 19:01:14 2004//
+/LdLinker.java/1.2/Sat Feb 28 19:01:14 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Repository b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Repository
new file mode 100644
index 0000000..e8ecf70
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Root b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java
new file mode 100644
index 0000000..44dd968
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java
@@ -0,0 +1,244 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+/**
+ * Adapter for the GCC C/C++ compiler
+ *
+ * @author Adam Murdoch
+ */
+public final class GccCCompiler extends GccCompatibleCCompiler {
+ private final static String[] sourceExtensions = new String[]{".c", /* C */
+ ".cc", /* C++ */
+ ".cpp", /* C++ */
+ ".cxx", /* C++ */
+ ".c++", /* C++ */
+ ".i", /* preprocessed C */
+ ".ii", /* preprocessed C++ */
+ ".f", /* FORTRAN */
+ ".for", /* FORTRAN */
+ ".m", /* Objective-C */
+ ".mm", /* Objected-C++ */
+ ".s" /* Assembly */
+ };
+ private final static String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ public static final String CMD_PREFIX = "sparc-sun-solaris2-";
+ private static final GccCCompiler cppInstance = new GccCCompiler(CMD_PREFIX
+ + "c++", sourceExtensions, headerExtensions, false,
+ new GccCCompiler(CMD_PREFIX + "c++", sourceExtensions,
+ headerExtensions, true, null, false, null), false, null);
+ private static final GccCCompiler g77Instance = new GccCCompiler(CMD_PREFIX
+ + "g77", sourceExtensions, headerExtensions, false,
+ new GccCCompiler(CMD_PREFIX + "g77", sourceExtensions,
+ headerExtensions, true, null, false, null), false, null);
+ private static final GccCCompiler gppInstance = new GccCCompiler(CMD_PREFIX
+ + "g++", sourceExtensions, headerExtensions, false,
+ new GccCCompiler(CMD_PREFIX + "g++", sourceExtensions,
+ headerExtensions, true, null, false, null), false, null);
+ private static final GccCCompiler instance = new GccCCompiler(CMD_PREFIX
+ + "gcc", sourceExtensions, headerExtensions, false,
+ new GccCCompiler(CMD_PREFIX + "gcc", sourceExtensions,
+ headerExtensions, true, null, false, null), false, null);
+ /**
+ * Gets c++ adapter
+ */
+ public static GccCCompiler getCppInstance() {
+ return cppInstance;
+ }
+ /**
+ * Gets g77 adapter
+ */
+ public static GccCCompiler getG77Instance() {
+ return g77Instance;
+ }
+ /**
+ * Gets gpp adapter
+ */
+ public static GccCCompiler getGppInstance() {
+ return gppInstance;
+ }
+ /**
+ * Gets gcc adapter
+ */
+ public static GccCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ private boolean isPICMeaningful = true;
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private GccCCompiler(String command, String[] sourceExtensions,
+ String[] headerExtensions, boolean isLibtool,
+ GccCCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super(command, null, sourceExtensions, headerExtensions, isLibtool,
+ libtoolCompiler, newEnvironment, env);
+ isPICMeaningful = System.getProperty("os.name").indexOf("Windows") < 0;
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ super.addImpliedArgs(args, debug, multithreaded,
+ exceptions, linkType, rtti, optimization);
+ if (isPICMeaningful && linkType.isSharedLibrary()) {
+ args.addElement("-fPIC");
+ }
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new GccCCompiler(getCommand(), this.getSourceExtensions(),
+ this.getHeaderExtensions(), this.getLibtool(),
+ (GccCCompiler) this.getLibtoolCompiler(), newEnvironment,
+ env);
+ }
+ return this;
+ }
+ /**
+ * Create parser to determine dependencies.
+ *
+ * Will create appropriate parser (C++, FORTRAN) based on file extension.
+ *
+ */
+ protected Parser createParser(File source) {
+ if (source != null) {
+ String sourceName = source.getName();
+ int lastDot = sourceName.lastIndexOf('.');
+ if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
+ char afterDot = sourceName.charAt(lastDot + 1);
+ if (afterDot == 'f' || afterDot == 'F') {
+ return new FortranParser();
+ }
+ }
+ }
+ return new CParser();
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ //
+ // construct default include path from machine id and version id
+ //
+ String[] defaultInclude = new String[1];
+ StringBuffer buf = new StringBuffer("/lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ buf.append("/include");
+ defaultInclude[0] = buf.toString();
+ //
+ // read specs file and look for -istart and -idirafter
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] optionValues = GccProcessor.parseSpecs(specs, "*cpp:",
+ new String[]{"-isystem ", "-idirafter "});
+ //
+ // if no entries were found, then use a default path
+ //
+ if (optionValues[0].length == 0 && optionValues[1].length == 0) {
+ optionValues[0] = new String[]{"/usr/local/include",
+ "/usr/include", "/usr/include/win32api"};
+ }
+ //
+ // remove mingw entries.
+ // For MinGW compiles this will mean the
+ // location of the sys includes will be
+ // wrong in dependencies.xml
+ // but that should have no significant effect
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j].indexOf("mingw") > 0) {
+ optionValues[i][j] = null;
+ }
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(optionValues[0]);
+ GccProcessor.convertCygwinFilenames(optionValues[1]);
+ GccProcessor.convertCygwinFilenames(defaultInclude);
+ }
+ int count = CUtil.checkDirectoryArray(optionValues[0]);
+ count += CUtil.checkDirectoryArray(optionValues[1]);
+ count += CUtil.checkDirectoryArray(defaultInclude);
+ includePath = new File[count];
+ int index = 0;
+ for (int i = 0; i < optionValues.length; i++) {
+ for (int j = 0; j < optionValues[i].length; j++) {
+ if (optionValues[i][j] != null) {
+ includePath[index++] = new File(optionValues[i][j]);
+ }
+ }
+ }
+ for (int i = 0; i < defaultInclude.length; i++) {
+ if (defaultInclude[i] != null) {
+ includePath[index++] = new File(defaultInclude[i]);
+ }
+ }
+ }
+ return (File[]) includePath.clone();
+ }
+ public String getIdentifier() throws BuildException {
+ if (identifier == null) {
+ StringBuffer buf;
+ if (getLibtool()) {
+ buf = new StringBuffer("libtool ");
+ } else {
+ buf = new StringBuffer(' ');
+ }
+ buf.append(getCommand());
+ buf.append(' ');
+ buf.append(GccProcessor.getVersion());
+ buf.append(' ');
+ buf.append(GccProcessor.getMachine());
+ identifier = buf.toString();
+ }
+ return identifier;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return GccLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLibrarian.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLibrarian.java
new file mode 100644
index 0000000..779fb3d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLibrarian.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractArLibrarian;
+/**
+ * Adapter for the 'ar' archiver
+ *
+ * @author Adam Murdoch
+ */
+public final class GccLibrarian extends AbstractArLibrarian {
+ private static String[] objFileExtensions = new String[]{".o"};
+ private static GccLibrarian instance = new GccLibrarian(
+ GccCCompiler.CMD_PREFIX + "ar", objFileExtensions, false,
+ new GccLibrarian(GccCCompiler.CMD_PREFIX + "ar", objFileExtensions,
+ true, null));
+ public static GccLibrarian getInstance() {
+ return instance;
+ }
+ private GccLibrarian(String command, String[] inputExtensions,
+ boolean isLibtool, GccLibrarian libtoolLibrarian) {
+ super(command, "V", inputExtensions, new String[0], "lib", ".a",
+ isLibtool, libtoolLibrarian);
+ }
+ public Linker getLinker(LinkType type) {
+ return GccLinker.getInstance().getLinker(type);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLinker.java
new file mode 100644
index 0000000..d7dd3db
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccLinker.java
@@ -0,0 +1,215 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+/**
+ * Adapter for the GCC linker
+ *
+ * @author Adam Murdoch
+ */
+public class GccLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle",
+ "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
+ "-static", "-shared", "-symbolic", "-Xlinker",
+ "--export-all-symbols", "-static-libgcc",};
+ private static final GccLinker dllLinker = new GccLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".so", false, new GccLinker(GccCCompiler.CMD_PREFIX + "gcc",
+ objFiles, discardFiles, "lib", ".so", true, null));
+ private static final GccLinker instance = new GccLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "", "",
+ false, null);
+ private static final GccLinker machBundleLinker = new GccLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".bundle", false, null);
+ private static final GccLinker machDllLinker = new GccLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".dylib", false, null);
+ public static GccLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ protected GccLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GccLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GccLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ case 'v' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ //
+ // construct gcc lib path from machine and version
+ //
+ StringBuffer buf = new StringBuffer("/lib/gcc-lib/");
+ buf.append(GccProcessor.getMachine());
+ buf.append('/');
+ buf.append(GccProcessor.getVersion());
+ //
+ // build default path from gcc and system /lib and /lib/w32api
+ //
+ String[] impliedLibPath = new String[]{buf.toString(),
+ "/lib/w32api", "/lib"};
+ //
+ // read gcc specs file for other library paths
+ //
+ String[] specs = GccProcessor.getSpecs();
+ String[][] libpaths = GccProcessor.parseSpecs(specs, "*link:",
+ new String[]{"%q"});
+ String[] libpath;
+ if (libpaths[0].length > 0) {
+ libpath = new String[libpaths[0].length + 3];
+ int i = 0;
+ for (; i < libpaths[0].length; i++) {
+ libpath[i] = libpaths[0][i];
+ }
+ libpath[i++] = buf.toString();
+ libpath[i++] = "/lib/w32api";
+ libpath[i++] = "/lib";
+ } else {
+ //
+ // if a failure to find any matches then
+ // use some default values for lib path entries
+ libpath = new String[]{"/usr/local/lib/mingw",
+ "/usr/local/lib", "/usr/lib/w32api", "/usr/lib/mingw",
+ "/usr/lib", buf.toString(), "/lib/w32api", "/lib"};
+ }
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i].indexOf("mingw") >= 0) {
+ libpath[i] = null;
+ }
+ }
+ //
+ // if cygwin then
+ // we have to prepend location of gcc32
+ // and .. to start of absolute filenames to
+ // have something that will exist in the
+ // windows filesystem
+ if (GccProcessor.isCygwin()) {
+ GccProcessor.convertCygwinFilenames(libpath);
+ }
+ //
+ // check that remaining entries are actual directories
+ //
+ int count = CUtil.checkDirectoryArray(libpath);
+ //
+ // populate return array with remaining entries
+ //
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; i++) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (isDarwin()) {
+ return machBundleLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (isDarwin()) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java
new file mode 100644
index 0000000..8a7a26e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java
@@ -0,0 +1,305 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * A add-in class for Gcc processors
+ *
+ *
+ */
+public class GccProcessor {
+ // the results from gcc -dumpmachine
+ private static String machine;
+ private static String[] specs;
+ // the results from gcc -dumpversion
+ private static String version;
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+ /**
+ * Converts absolute Cygwin file or directory names to the corresponding
+ * Win32 name.
+ *
+ * @param names
+ * array of names, some elements may be null, will be changed in
+ * place.
+ */
+ public static void convertCygwinFilenames(String[] names) {
+ if (names == null) {
+ throw new NullPointerException("names");
+ }
+ File gccDir = CUtil.getExecutableLocation(GccCCompiler.CMD_PREFIX
+ + "gcc.exe");
+ if (gccDir != null) {
+ String prefix = gccDir.getAbsolutePath() + "/..";
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < names.length; i++) {
+ String name = names[i];
+ if (name != null && name.length() > 1 && name.charAt(0) == '/') {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(name);
+ names[i] = buf.toString();
+ }
+ }
+ }
+ }
+ public static String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length * 2];
+ int offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ if (isHPUX()) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".sl", patterns,
+ offset);
+ } else {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".so", patterns,
+ offset);
+ }
+ return patterns;
+ }
+ public static String getMachine() {
+ if (machine == null) {
+ String[] args = new String[]{GccCCompiler.CMD_PREFIX + "gcc",
+ "-dumpmachine"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ machine = "nomachine";
+ } else {
+ machine = cmdout[0];
+ }
+ }
+ return machine;
+ }
+ public static String[] getOutputFileSwitch(String letter, String outputFile) {
+ StringBuffer buf = new StringBuffer();
+ if (outputFile.indexOf(' ') >= 0) {
+ buf.append('"');
+ buf.append(outputFile.replace('\\', '/'));
+ buf.append('"');
+ } else {
+ buf.append(outputFile.replace('\\', '/'));
+ }
+ String[] retval = new String[]{letter, buf.toString()};
+ return retval;
+ }
+ /**
+ * Returns the contents of the gcc specs file.
+ *
+ * The implementation locates gcc.exe in the executable path and then
+ * builds a relative path name from the results of -dumpmachine and
+ * -dumpversion. Attempts to use gcc -dumpspecs to provide this information
+ * resulted in stalling on the Execute.run
+ *
+ * @returns contents of the specs file
+ */
+ public static String[] getSpecs() {
+ if (specs == null) {
+ File gccParent = CUtil
+ .getExecutableLocation(GccCCompiler.CMD_PREFIX + "gcc.exe");
+ if (gccParent != null) {
+ //
+ // build a relative path like
+ // ../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
+ //
+ StringBuffer buf = new StringBuffer("../lib/gcc-lib/");
+ buf.append(getMachine());
+ buf.append('/');
+ buf.append(getVersion());
+ buf.append("/specs");
+ //
+ // resolve it relative to the location of gcc.exe
+ //
+ String relativePath = buf.toString();
+ File specsFile = new File(gccParent, relativePath);
+ //
+ // found the specs file
+ //
+ try {
+ //
+ // read the lines in the file
+ //
+ BufferedReader reader = new BufferedReader(new FileReader(
+ specsFile));
+ Vector lines = new Vector(100);
+ String line = reader.readLine();
+ while (line != null) {
+ lines.addElement(line);
+ line = reader.readLine();
+ }
+ specs = new String[lines.size()];
+ lines.copyInto(specs);
+ } catch (IOException ex) {
+ }
+ }
+ }
+ if (specs == null) {
+ specs = new String[0];
+ }
+ return specs;
+ }
+ public static String getVersion() {
+ if (version == null) {
+ String[] args = new String[]{GccCCompiler.CMD_PREFIX + "gcc",
+ "-dumpversion"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ if (cmdout.length == 0) {
+ version = "noversion";
+ } else {
+ version = cmdout[0];
+ }
+ }
+ return version;
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ /**
+ * Determines if task is running with cygwin
+ *
+ * @return true if cygwin was detected
+ */
+ public static boolean isCygwin() {
+ return getMachine().indexOf("cygwin") > 0;
+ }
+ private static boolean isHPUX() {
+ String osname = System.getProperty("os.name").toLowerCase();
+ if (osname.indexOf("hp") >= 0 && osname.indexOf("ux") >= 0) {
+ return true;
+ }
+ return false;
+ }
+ /**
+ *
+ * Parses the results of the specs file for a specific processor and
+ * options
+ *
+ * @param specsContent
+ * Contents of specs file as returned from getSpecs
+ * @param specSectionStart
+ * start of spec section, for example "*cpp:"
+ * @param options
+ * command line switches such as "-istart"
+ */
+ public static String[][] parseSpecs(String[] specsContent,
+ String specSectionStart, String[] options) {
+ if (specsContent == null) {
+ throw new NullPointerException("specsContent");
+ }
+ if (specSectionStart == null) {
+ throw new NullPointerException("specSectionStart");
+ }
+ if (options == null) {
+ throw new NullPointerException("option");
+ }
+ String[][] optionValues = new String[options.length][];
+ StringBuffer optionValue = new StringBuffer(40);
+ for (int i = 0; i < specsContent.length; i++) {
+ String specLine = specsContent[i];
+ //
+ // if start of section then start paying attention
+ //
+ if (specLine.startsWith(specSectionStart)) {
+ Vector[] optionVectors = new Vector[options.length];
+ for (int j = 0; j < options.length; j++) {
+ optionVectors[j] = new Vector(10);
+ }
+ //
+ // go to next line and examine contents
+ // and repeat until end of file
+ //
+ for (i++; i < specsContent.length; i++) {
+ specLine = specsContent[i];
+ for (int j = 0; j < options.length; j++) {
+ int optionStart = specLine.indexOf(options[j]);
+ while (optionStart >= 0) {
+ optionValue.setLength(0);
+ //
+ // walk rest of line looking for first non
+ // whitespace
+ // and then next space
+ boolean hasNonBlank = false;
+ int k = optionStart + options[j].length();
+ for (; k < specLine.length(); k++) {
+ //
+ // either a blank or a "}" (close of
+ // conditional)
+ // section will end the path
+ //
+ if (specLine.charAt(k) == ' '
+ || specLine.charAt(k) == '}') {
+ if (hasNonBlank) {
+ break;
+ }
+ } else {
+ hasNonBlank = true;
+ optionValue.append(specLine.charAt(k));
+ }
+ }
+ //
+ // transition back to whitespace
+ // value is over, add it to vector
+ if (hasNonBlank) {
+ optionVectors[j].addElement(optionValue
+ .toString());
+ }
+ //
+ // find next occurance on line
+ //
+ optionStart = specLine.indexOf(options[j], k);
+ }
+ }
+ }
+ //
+ // copy vectors over to option arrays
+ //
+ for (int j = 0; j < options.length; j++) {
+ optionValues[j] = new String[optionVectors[j].size()];
+ optionVectors[j].copyInto(optionValues[j]);
+ }
+ }
+ }
+ //
+ // fill in any missing option values with
+ // a zero-length string array
+ for (int i = 0; i < optionValues.length; i++) {
+ String[] zeroLenArray = new String[0];
+ if (optionValues[i] == null) {
+ optionValues[i] = zeroLenArray;
+ }
+ }
+ return optionValues;
+ }
+ private GccProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GppLinker.java
new file mode 100644
index 0000000..45bbea9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GppLinker.java
@@ -0,0 +1,210 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+/**
+ * Adapter for the g++ variant of the GCC linker
+ *
+ * @author Stephen M. Webb <stephen.webb@bregmasoft.com>
+ */
+public class GppLinker extends AbstractLdLinker {
+ protected static final String[] discardFiles = new String[0];
+ protected static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private final static String libPrefix = "libraries: =";
+ protected static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static String[] linkerOptions = new String[]{"-bundle", "-dylib",
+ "-dynamic", "-dynamiclib", "-nostartfiles", "-nostdlib",
+ "-prebind", "-s", "-static", "-shared", "-symbolic", "-Xlinker"};
+ private static final GppLinker dllLinker = new GppLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".so", false, new GppLinker(GccCCompiler.CMD_PREFIX + "gcc",
+ objFiles, discardFiles, "lib", ".so", true, null));
+ private static final GppLinker instance = new GppLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "", "",
+ false, null);
+ private static final GppLinker machDllLinker = new GppLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".dylib", false, null);
+ private static final GppLinker machPluginLinker = new GppLinker(
+ GccCCompiler.CMD_PREFIX + "gcc", objFiles, discardFiles, "lib",
+ ".bundle", false, null);
+ public static GppLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private String runtimeLibrary;
+ protected GppLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, GppLinker libtoolLinker) {
+ super(command, "-dumpversion", extensions, ignoredExtensions,
+ outputPrefix, outputSuffix, isLibtool, libtoolLinker);
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ super.addImpliedArgs(debug, linkType, args);
+ if (getIdentifier().indexOf("mingw") >= 0) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("-mconsole");
+ }
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("-mwindows");
+ }
+ }
+ if (linkType.isStaticRuntime()) {
+ String[] cmdin = new String[]{GccCCompiler.CMD_PREFIX + "g++",
+ "-print-file-name=libstdc++.a"};
+ String[] cmdout = CaptureStreamHandler.run(cmdin);
+ if (cmdout.length > 0) {
+ runtimeLibrary = cmdout[0];
+ } else {
+ runtimeLibrary = null;
+ }
+ } else {
+ runtimeLibrary = "-lstdc++";
+ }
+ }
+ public String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ String[] rs = super.addLibrarySets(task, libsets, preargs, midargs,
+ endargs);
+ if (runtimeLibrary != null) {
+ endargs.addElement(runtimeLibrary);
+ }
+ return rs;
+ }
+ /**
+ * Allows drived linker to decorate linker option. Override by GppLinker to
+ * prepend a "-Wl," to pass option to through gcc to linker.
+ *
+ * @param buf
+ * buffer that may be used and abused in the decoration process,
+ * must not be null.
+ * @param arg
+ * linker argument
+ */
+ public String decorateLinkerOption(StringBuffer buf, String arg) {
+ String decoratedArg = arg;
+ if (arg.length() > 1 && arg.charAt(0) == '-') {
+ switch (arg.charAt(1)) {
+ //
+ // passed automatically by GCC
+ //
+ case 'g' :
+ case 'f' :
+ case 'F' :
+ /* Darwin */
+ case 'm' :
+ case 'O' :
+ case 'W' :
+ case 'l' :
+ case 'L' :
+ case 'u' :
+ break;
+ default :
+ boolean known = false;
+ for (int i = 0; i < linkerOptions.length; i++) {
+ if (linkerOptions[i].equals(arg)) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ buf.setLength(0);
+ buf.append("-Wl,");
+ buf.append(arg);
+ decoratedArg = buf.toString();
+ }
+ break;
+ }
+ }
+ return decoratedArg;
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ Vector dirs = new Vector();
+ // Ask GCC where it will look for its libraries.
+ String[] args = new String[]{GccCCompiler.CMD_PREFIX + "g++",
+ "-print-search-dirs"};
+ String[] cmdout = CaptureStreamHandler.run(args);
+ for (int i = 0; i < cmdout.length; ++i) {
+ int prefixIndex = cmdout[i].indexOf(libPrefix);
+ if (prefixIndex >= 0) {
+ // Special case DOS-type GCCs like MinGW or Cygwin
+ int s = prefixIndex + libPrefix.length();
+ int t = cmdout[i].indexOf(';', s);
+ while (t > 0) {
+ dirs.addElement(cmdout[i].substring(s, t));
+ s = t + 1;
+ t = cmdout[i].indexOf(';', s);
+ }
+ dirs.addElement(cmdout[i].substring(s));
+ ++i;
+ for (; i < cmdout.length; ++i) {
+ dirs.addElement(cmdout[i]);
+ }
+ }
+ }
+ // Eliminate all but actual directories.
+ String[] libpath = new String[dirs.size()];
+ dirs.copyInto(libpath);
+ int count = CUtil.checkDirectoryArray(libpath);
+ // Build return array.
+ libDirs = new File[count];
+ int index = 0;
+ for (int i = 0; i < libpath.length; ++i) {
+ if (libpath[i] != null) {
+ libDirs[index++] = new File(libpath[i]);
+ }
+ }
+ }
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isPluginModule()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machPluginLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ if (type.isSharedLibrary()) {
+ if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
+ return machDllLinker;
+ } else {
+ return dllLinker;
+ }
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/LdLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/LdLinker.java
new file mode 100644
index 0000000..0cc5fbf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/LdLinker.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+/**
+ * Adapter for the 'ld' linker
+ *
+ * @author Curt Arnold
+ */
+public final class LdLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final LdLinker dllLinker = new LdLinker(
+ GccCCompiler.CMD_PREFIX + "ld", objFiles, discardFiles, "lib",
+ ".so", false, new LdLinker(GccCCompiler.CMD_PREFIX + "ld",
+ objFiles, discardFiles, "lib", ".so", true, null));
+ private static final LdLinker instance = new LdLinker(
+ GccCCompiler.CMD_PREFIX + "ld", objFiles, discardFiles, "", "",
+ false, null);
+ public static LdLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private LdLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix,
+ String outputSuffix, boolean isLibtool, LdLinker libtoolLinker) {
+ super(command, "-version", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/hp/CVS/Entries b/src/net/sf/antcontrib/cpptasks/hp/CVS/Entries
new file mode 100644
index 0000000..34e542e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/hp/CVS/Entries
@@ -0,0 +1,3 @@
+/aCCCompiler.java/1.9/Sat Apr 24 19:07:19 2004//
+/aCCLinker.java/1.5/Sat Feb 28 19:01:30 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/hp/CVS/Repository b/src/net/sf/antcontrib/cpptasks/hp/CVS/Repository
new file mode 100644
index 0000000..29df68a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/hp/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/hp
diff --git a/src/net/sf/antcontrib/cpptasks/hp/CVS/Root b/src/net/sf/antcontrib/cpptasks/hp/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/hp/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java b/src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java
new file mode 100644
index 0000000..b603e1d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.hp;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the HP aC++ C++ compiler
+ *
+ * @author Curt Arnold
+ */
+public final class aCCCompiler extends GccCompatibleCCompiler {
+ private static final aCCCompiler instance = new aCCCompiler("aCC", false,
+ null);
+ /**
+ * Gets singleton instance of this class
+ */
+ public static aCCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ /**
+ * Private constructor. Use GccCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private aCCCompiler(String command, boolean newEnvironment, Environment env) {
+ super(command, "-help", false, null, newEnvironment, env);
+ }
+ public void addImpliedArgs(Vector args, boolean debug,
+ boolean multithreaded, boolean exceptions, LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ }
+ /*
+ * if (multithreaded) { args.addElement("-mt"); }
+ */
+ if (linkType.isSharedLibrary()) {
+ args.addElement("+z");
+ }
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 1 :
+ case 2 :
+ args.addElement("+w");
+ break;
+ /*
+ * case 3: case 4: case 5: args.addElement("+w2"); break;
+ */
+ }
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ File ccLoc = CUtil.getExecutableLocation("aCC");
+ if (ccLoc != null) {
+ File compilerIncludeDir = new File(
+ new File(ccLoc, "../include").getAbsolutePath());
+ if (compilerIncludeDir.exists()) {
+ includePath = new File[2];
+ includePath[0] = compilerIncludeDir;
+ }
+ }
+ if (includePath == null) {
+ includePath = new File[1];
+ }
+ includePath[includePath.length - 1] = new File("/usr/include");
+ }
+ return includePath;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return aCCLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/hp/aCCLinker.java b/src/net/sf/antcontrib/cpptasks/hp/aCCLinker.java
new file mode 100644
index 0000000..94f7fc0
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/hp/aCCLinker.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.hp;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+/**
+ * Adapter for Sun (r) Forte(tm) C++ Linker
+ *
+ * @author Curt Arnold
+ */
+public final class aCCLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final aCCLinker arLinker = new aCCLinker("aCC", objFiles,
+ discardFiles, "", ".a");
+ private static final aCCLinker dllLinker = new aCCLinker("aCC", objFiles,
+ discardFiles, "lib", ".sl");
+ private static final aCCLinker instance = new aCCLinker("aCC", objFiles,
+ discardFiles, "", "");
+ public static aCCLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private aCCLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix, String outputSuffix) {
+ super(command, "-help", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, false, null);
+ }
+ public void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (debug) {
+ args.addElement("-g");
+ }
+ /*
+ * if(linkType.isStaticRuntime()) { args.addElement("-static"); }
+ */
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-b");
+ }
+ /*
+ * if (linkType.isStaticLibrary()) { args.addElement("-Wl,-noshared"); }
+ */
+ }
+ public void addIncremental(boolean incremental, Vector args) {
+ /*
+ * if (incremental) { args.addElement("-xidlon"); } else {
+ * args.addElement("-xidloff"); }
+ */
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ File CCloc = CUtil.getExecutableLocation("aCC");
+ if (CCloc != null) {
+ File compilerLib = new File(new File(CCloc, "../lib")
+ .getAbsolutePath());
+ if (compilerLib.exists()) {
+ libDirs = new File[2];
+ libDirs[0] = compilerLib;
+ }
+ }
+ if (libDirs == null) {
+ libDirs = new File[1];
+ }
+ }
+ libDirs[libDirs.length - 1] = new File("/usr/lib");
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return arLinker;
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ibm/CVS/Entries b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Entries
new file mode 100644
index 0000000..fedd0a3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Entries
@@ -0,0 +1,3 @@
+/VisualAgeCCompiler.java/1.12/Sat Apr 24 19:07:19 2004//
+/VisualAgeLinker.java/1.10/Wed Apr 21 05:22:11 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/ibm/CVS/Repository b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Repository
new file mode 100644
index 0000000..6df66d6
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/ibm
diff --git a/src/net/sf/antcontrib/cpptasks/ibm/CVS/Root b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ibm/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java b/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java
new file mode 100644
index 0000000..56b7674
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ibm;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the IBM(r) Visual Age(tm) C++ compiler for AIX(tm)
+ *
+ * @author Curt Arnold
+ */
+public final class VisualAgeCCompiler extends GccCompatibleCCompiler {
+ private static final VisualAgeCCompiler instance = new VisualAgeCCompiler(
+ "xlC", false, null);
+ /**
+ * Gets singleton instance of this class
+ */
+ public static VisualAgeCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ /**
+ * Private constructor. Use getInstance() to get singleton instance of this
+ * class.
+ */
+ private VisualAgeCCompiler(String command, boolean newEnvironment,
+ Environment env) {
+ super(command, "-help", false, null, newEnvironment, env);
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-fpic");
+ }
+ if (rtti != null) {
+ if (rtti.booleanValue()) {
+ args.addElement("-qrtti=all");
+ } else {
+ args.addElement("-qnortti");
+ }
+ }
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 1 :
+ args.addElement("-qflag=s:s");
+ break;
+ case 2 :
+ args.addElement("-qflag=e:e");
+ break;
+ case 3 :
+ args.addElement("-qflag=w:w");
+ break;
+ case 4 :
+ args.addElement("-qflag=i:i");
+ break;
+ case 5 :
+ args.addElement("-qhalt=w:w");
+ break;
+ }
+ }
+ public Linker getLinker(LinkType linkType) {
+ return VisualAgeLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ /**
+ * Gets identifier for the compiler.
+ *
+ * Initial attempt at extracting version information
+ * would lock up. Using a stock response.
+ */
+ public String getIdentifier() {
+ return "VisualAge compiler - unidentified version";
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeLinker.java b/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeLinker.java
new file mode 100644
index 0000000..8e614b3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeLinker.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ibm;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+/**
+ * Adapter for IBM(r) Visual Age(tm) Linker for AIX(tm)
+ *
+ * @author Curt Arnold
+ */
+public final class VisualAgeLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[]{};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final VisualAgeLinker dllLinker = new VisualAgeLinker(
+ "makeC++SharedLib", objFiles, discardFiles, "lib", ".so");
+ private static final VisualAgeLinker instance = new VisualAgeLinker("xlC",
+ objFiles, discardFiles, "", "");
+ public static VisualAgeLinker getInstance() {
+ return instance;
+ }
+ private VisualAgeLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix, String outputSuffix) {
+ //
+ // just guessing that -? might display something useful
+ //
+ super(command, "-?", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, false, null);
+ }
+ public void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (debug) {
+ //args.addElement("-g");
+ }
+ if (linkType.isSharedLibrary()) {
+ //args.addElement("-G");
+ }
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+ /**
+ * Gets identifier for the compiler.
+ *
+ * Initial attempt at extracting version information
+ * would lock up. Using a stock response.
+ */
+ public String getIdentifier() {
+ return "VisualAge linker - unidentified version";
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ide/CVS/Entries b/src/net/sf/antcontrib/cpptasks/ide/CVS/Entries
new file mode 100644
index 0000000..7e1ddbc
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/CVS/Entries
@@ -0,0 +1,6 @@
+/DebugDef.java/1.1/Wed Jan 5 22:13:42 2005//
+/ProjectDef.java/1.6/Fri Jan 21 20:18:57 2005//
+/ProjectWriter.java/1.2/Fri Jan 21 20:18:56 2005//
+/ProjectWriterEnum.java/1.2/Tue Jul 13 03:31:04 2004//
+/package.html/1.1/Sat Jun 26 02:45:17 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/ide/CVS/Repository b/src/net/sf/antcontrib/cpptasks/ide/CVS/Repository
new file mode 100644
index 0000000..cdb7c39
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/ide
diff --git a/src/net/sf/antcontrib/cpptasks/ide/CVS/Root b/src/net/sf/antcontrib/cpptasks/ide/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/ide/DebugDef.java b/src/net/sf/antcontrib/cpptasks/ide/DebugDef.java
new file mode 100644
index 0000000..8ddd04e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/DebugDef.java
@@ -0,0 +1,127 @@
+/*
+*
+* Copyright 2004-2005 The Ant-Contrib project
+*
+* Licensed 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.
+*/
+package net.sf.antcontrib.cpptasks.ide;
+
+import java.io.File;
+
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.Environment;
+import org.apache.tools.ant.types.DataType;
+
+
+/**
+* Specifies a debugging configuration for a project.
+*
+* @author Curt Arnold
+*/
+public final class DebugDef
+ extends DataType {
+
+ /**
+ * Working directory for debug runs.
+ */
+ private File dir;
+ /**
+ * Name of executable.
+ */
+ private String executable;
+ /**
+ * Environment used to hold environment variables.
+ */
+ private Environment env = new Environment();
+ /**
+ * Command line used to hold command line arguments.
+ */
+ private Commandline cmdl = new Commandline();
+
+ /**
+ * Constructor.
+ *
+ */
+ public DebugDef() {
+ }
+
+
+ /**
+ * Set the name of the executable program.
+ * @param value the name of the executable program
+ */
+ public void setExecutable(final String value) {
+ this.executable = value;
+ }
+
+ /**
+ * Get the name of the executable program.
+ * @return the name of the executable program, may be null.
+ */
+ public String getExecutable() {
+ return executable;
+ }
+
+ /**
+ * Set the working directory of the process.
+ * @param d the working directory of the process
+ */
+ public void setDir(final File d) {
+ this.dir = d;
+ }
+
+ /**
+ * Get the working directory of the process.
+ * @return the working directory of the process, may be null.
+ */
+ public File getDir() {
+ return dir;
+ }
+
+ /**
+ * Add an environment variable.
+ *
+ * @param var new environment variable
+ */
+ public void addEnv(final Environment.Variable var) {
+ env.addVariable(var);
+ }
+
+ /**
+ * Get the variable list as an array.
+ * @return array of key=value assignment strings
+ */
+ public String[] getVariables() {
+ return env.getVariables();
+ }
+
+
+ /**
+ * Adds a command-line argument.
+ *
+ * @return new command line argument created
+ */
+ public Commandline.Argument createArg() {
+ return cmdl.createArgument();
+ }
+
+ /**
+ * Returns all arguments defined by <code>addLine</code>,
+ * <code>addValue</code> or the argument object.
+ * @return array of command line arguments, may be zero-length.
+ */
+ public String[] getArguments() {
+ return cmdl.getArguments();
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ide/ProjectDef.java b/src/net/sf/antcontrib/cpptasks/ide/ProjectDef.java
new file mode 100644
index 0000000..53ad254
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/ProjectDef.java
@@ -0,0 +1,327 @@
+/*
+ *
+ * Copyright 2004-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ide;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.List;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+
+/**
+ * Requests the creation of an IDE project file. Experimental.
+ *
+ * Implementation status: msdev5, msdev6 and cbuilderx
+ * generate reasonable project files for simple projects,
+ * xcode and msdev7 and msdev71 capture source file lists and
+ * a few settings.
+ *
+ * @author Curt Arnold
+ */
+public final class ProjectDef
+ extends DataType {
+ /**
+ * Name of property that must be present or definition will be ignored. May
+ * be null.
+ */
+ private String ifProp;
+
+ /**
+ * Name of property that must be absent or definition will be ignored. May
+ * be null.
+ */
+ private String unlessProp;
+
+ /**
+ * Project file name.
+ */
+ private File outFile;
+
+ /**
+ * Project name.
+ */
+ private String name;
+
+ /**
+ * Fail on error.
+ */
+ private boolean failOnError = true;
+
+ /**
+ * Overwrite existing project file.
+ */
+ private boolean overwrite = true;
+
+ /**
+ * Project writer.
+ */
+ private ProjectWriter projectWriter;
+
+ /**
+ * Object directory.
+ *
+ */
+ private File objDir;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ProjectDef() {
+ }
+
+ /**
+ * Set project type.
+ *
+ *
+ * <table width="100%" border="1"> <thead>Supported project formats </thead>
+ * <tr>
+ * <td>cbuilderx</td>
+ * <td>Borland C++BuilderX</td>
+ * </tr>
+ * <tr>
+ * <td>msvc5</td>
+ * <td>Microsoft Visual C++ 97</td>
+ * </tr>
+ * <tr>
+ * <td>msvc6</td>
+ * <td>Microsoft Visual C++ 6</td>
+ * </tr>
+ * <tr>
+ * <td>msvc7</td>
+ * <td>Microsoft Visual C++.NET</td>
+ * </tr>
+ * <tr>
+ * <td>msvc71</td>
+ * <td>Microsoft Visual C++.NET 2003</td>
+ * </tr>
+ * <tr>
+ * <td>xcode</td>
+ * <td>Apple Xcode</td>
+ * </tr>
+ * </table>
+ *
+ * @param value new value
+ */
+ public void setType(final ProjectWriterEnum value) {
+ projectWriter = value.getProjectWriter();
+ }
+
+ /**
+ * Sets the name for the generated project file.
+ *
+ * @param outfile
+ * output file name
+ */
+ public void setOutfile(final File outfile) {
+ //
+ // if file name was empty, skip link step
+ //
+ if (outfile == null || outfile.toString().length() > 0) {
+ outFile = outfile;
+ }
+ }
+
+ /**
+ * Sets whether a failure to write the project file should cause the
+ * task to fail. Default is true.
+ *
+ * @param value new value
+ */
+ public void setFailonerror(final boolean value) {
+ failOnError = value;
+ }
+
+ /**
+ * Sets whether an existing project file should be overwritten,
+ * default is true. If false and the project file exists,
+ * the value of failonerror will determine if the task fails.
+ *
+ * @param value new value
+ */
+ public void setOverwrite(final boolean value) {
+ overwrite = value;
+ }
+
+ /**
+ * Gets whether an existing project file should be overwritten,
+ * default is true. If false and the project file exists,
+ * the value of failonerror will determine if the task fails.
+ *
+ * @return value
+ */
+ public boolean getOverwrite() {
+ return overwrite;
+ }
+
+ /**
+ * Determine if this def should be used.
+ *
+ * Definition will be active if the "if" variable (if specified) is set and
+ * the "unless" variable (if specified) is not set and that all reference
+ * or extended definitions are active
+ *
+ * @return true if processor is active
+ */
+ public boolean isActive() {
+ Project project = getProject();
+ if (!CUtil.isActive(project, ifProp, unlessProp)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Class name for a user-supplied project writer. Use the "type"
+ * attribute to specify built-in project writer implementations.
+ *
+ * @param className
+ * full class name
+ *
+ */
+ public void setClassname(final String className) {
+ Object proc = null;
+ try {
+ Class implClass = ProjectDef.class.getClassLoader().loadClass(
+ className);
+ try {
+ Method getInstance = implClass.getMethod("getInstance",
+ new Class[0]);
+ proc = getInstance.invoke(null, new Object[0]);
+ } catch (Exception ex) {
+ proc = implClass.newInstance();
+ }
+ } catch (Exception ex) {
+ throw new BuildException(ex);
+ }
+ projectWriter = (ProjectWriter) proc;
+ }
+
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The configuration will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setIf(final String propName) {
+ ifProp = propName;
+ }
+
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the configuration will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(final String propName) {
+ unlessProp = propName;
+ }
+
+ /**
+ * Get name.
+ * @return String name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set name.
+ * @param value String name
+ */
+ public void setName(final String value) {
+ name = value;
+ }
+
+ /**
+ * Executes the task. Compiles the given files.
+ *
+ * @param task cc task
+ * @param sources source files (includes headers)
+ * @param targets compilation targets
+ * @param linkTarget link target
+ */
+ public void execute(final CCTask task,
+ final List sources,
+ final Hashtable targets,
+ final TargetInfo linkTarget) {
+ try {
+ projectWriter.writeProject(outFile,
+ task,
+ this,
+ sources,
+ targets,
+ linkTarget);
+ } catch (BuildException ex) {
+ if (failOnError) {
+ throw ex;
+ } else {
+ task.log(ex.toString());
+ }
+ } catch (Exception ex) {
+ if (failOnError) {
+ throw new BuildException(ex);
+ } else {
+ task.log(ex.toString());
+ }
+ }
+ }
+
+ /**
+ * Gets the object files directory.
+ * @return directory, may be null.
+ */
+ public File getObjdir() {
+ return objDir;
+ }
+ /**
+ * Sets the directory used for object files. If not specified,
+ * the object files directory from cc task will be used.
+ * @param oDir object file directory.
+ */
+ public void getObjdir(final File oDir) {
+ this.objDir = oDir;
+ }
+
+ /**
+ * Required by documentation generator.
+ */
+ public void execute() {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ide/ProjectWriter.java b/src/net/sf/antcontrib/cpptasks/ide/ProjectWriter.java
new file mode 100644
index 0000000..c4c144d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/ProjectWriter.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ide;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.List;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.TargetInfo;
+import org.xml.sax.SAXException;
+
+/**
+ * Project writer interface.
+ *
+ * @author curta
+ *
+ */
+public interface ProjectWriter {
+ /**
+ * Write project definition file.
+ * @param baseName File name base, writer may append appropriate extension
+ * @param task task
+ * @param projectDef project element
+ * @param files source and header files
+ * @param targets compilation targets
+ * @param linkTarget link target
+ * @throws IOException if I/O error is encountered
+ * @throws SAXException if I/O error during XML serialization
+ */
+ void writeProject(final File baseName,
+ final CCTask task,
+ final ProjectDef projectDef,
+ final List files,
+ final Hashtable targets,
+ final TargetInfo linkTarget)
+ throws IOException, SAXException;
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ide/ProjectWriterEnum.java b/src/net/sf/antcontrib/cpptasks/ide/ProjectWriterEnum.java
new file mode 100644
index 0000000..43d3af6
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/ProjectWriterEnum.java
@@ -0,0 +1,94 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ide;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import net.sf.antcontrib.cpptasks.apple.XcodeProjectWriter;
+import net.sf.antcontrib.cpptasks.borland.CBuilderXProjectWriter;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioProjectWriter;
+import net.sf.antcontrib.cpptasks.devstudio.VisualStudioNETProjectWriter;
+
+/**
+ * Enumeration of supported project file generators.
+ *
+ * <table width="100%" border="1"> <thead>Supported project generators </thead>
+ * <tr>
+ * <td>cbuilderx</td>
+ * <td>Borland C++BuilderX</td>
+ * </tr>
+ * <tr>
+ * <td>msvc5</td>
+ * <td>Microsoft Visual C++ 97</td>
+ * </tr>
+ * <tr>
+ * <td>msvc6</td>
+ * <td>Microsoft Visual C++ 6</td>
+ * </tr>
+ * <tr>
+ * <td>msvc7</td>
+ * <td>Microsoft Visual C++.NET</td>
+ * </tr>
+ * <tr>
+ * <td>msvc71</td>
+ * <td>Microsoft Visual C++.NET 2003</td>
+ * </tr>
+ * <tr>
+ * <td>xcode</td>
+ * <td>Apple Xcode</td>
+ * </tr>
+ * </table>
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class ProjectWriterEnum
+ extends EnumeratedAttribute {
+ /**
+ * Enumeration values.
+ */
+ private static String[] values = new String[] {
+ "cbuilderx", "msvc5",
+ "msvc6", "msvc7", "msvc71", "xcode"};
+
+ /**
+ * Project writers associated with enumeration values.
+ */
+ private static ProjectWriter[] writers = new ProjectWriter[] {
+ new CBuilderXProjectWriter(), new DevStudioProjectWriter("5.00"),
+ new DevStudioProjectWriter("6.00"),
+ new VisualStudioNETProjectWriter("7.00"),
+ new VisualStudioNETProjectWriter("7.10"),
+ new XcodeProjectWriter()};
+
+ /**
+ * Gets ProjectWriter associated with enumeration value.
+ *
+ * @return project writer
+ */
+ public ProjectWriter getProjectWriter() {
+ return writers[this.getIndex()];
+ }
+
+ /**
+ * Gets acceptible values for enumeration.
+ *
+ * @return acceptible values
+ */
+ public String[] getValues() {
+ return (String[]) values.clone();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ide/package.html b/src/net/sf/antcontrib/cpptasks/ide/package.html
new file mode 100644
index 0000000..ed0de56
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ide/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+IDE project file generation.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries b/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries
new file mode 100644
index 0000000..644406b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries
@@ -0,0 +1,10 @@
+/IntelLinux32CCompiler.java/1.9/Sat Feb 28 19:02:03 2004//
+/IntelLinux32Linker.java/1.7/Sat Feb 28 19:02:03 2004//
+/IntelLinux64CCompiler.java/1.9/Sat Feb 28 19:02:03 2004//
+/IntelLinux64Linker.java/1.6/Sat Feb 28 19:02:03 2004//
+/IntelProcessor.java/1.9/Sat Feb 28 19:02:03 2004//
+/IntelWin32CCompiler.java/1.9/Sat Feb 28 19:02:03 2004//
+/IntelWin32Librarian.java/1.7/Sat Feb 28 19:02:03 2004//
+/IntelWin32Linker.java/1.7/Sat Feb 28 19:02:03 2004//
+/IntelWin64CCompiler.java/1.9/Sat Feb 28 19:02:03 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository b/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository
new file mode 100644
index 0000000..526020a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/intel
diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Root b/src/net/sf/antcontrib/cpptasks/intel/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java
new file mode 100644
index 0000000..1513f23
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Intel (r) C/C++ compiler for IA-32 Linux (r)
+ *
+ * The Intel (r) C/C++ compiler for IA32 Linux mimics the command options for
+ * gcc compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class IntelLinux32CCompiler extends GccCompatibleCCompiler {
+ private static final IntelLinux32CCompiler instance = new IntelLinux32CCompiler(
+ false, new IntelLinux32CCompiler(true, null, false, null), false,
+ null);
+ public static IntelLinux32CCompiler getInstance() {
+ return instance;
+ }
+ private IntelLinux32CCompiler(boolean isLibtool,
+ IntelLinux32CCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super("icc", "-V", isLibtool, libtoolCompiler, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelLinux32CCompiler(getLibtool(),
+ (IntelLinux32CCompiler) getLibtoolCompiler(),
+ newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ // FREEHEP
+ return IntelLinux32CLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java
new file mode 100644
index 0000000..49a8a57
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java
@@ -0,0 +1,35 @@
+// FREEHEP
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+public final class IntelLinux32CLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final IntelLinux32CLinker dllLinker = new IntelLinux32CLinker(
+ "lib", ".so", false, new IntelLinux32CLinker("lib", ".so", true,
+ null));
+ private static final IntelLinux32CLinker instance = new IntelLinux32CLinker(
+ "", "", false, null);
+ public static IntelLinux32CLinker getInstance() {
+ return instance;
+ }
+ private IntelLinux32CLinker(String outputPrefix, String outputSuffix,
+ boolean isLibtool, IntelLinux32CLinker libtoolLinker) {
+ super("icc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix,
+ isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java
new file mode 100644
index 0000000..d4feac3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java
@@ -0,0 +1,36 @@
+// FREEHEP
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+
+public final class IntelLinux32Compiler extends GccCompatibleCCompiler {
+ private static final IntelLinux32Compiler instance = new IntelLinux32Compiler(
+ false, new IntelLinux32Compiler(true, null, false, null), false,
+ null);
+ public static IntelLinux32Compiler getInstance() {
+ return instance;
+ }
+ private IntelLinux32Compiler(boolean isLibtool,
+ IntelLinux32Compiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super("icpc", "-V", isLibtool, libtoolCompiler, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelLinux32Compiler(getLibtool(),
+ (IntelLinux32Compiler) getLibtoolCompiler(),
+ newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ return IntelLinux32Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java
new file mode 100644
index 0000000..e6ddee1
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+/**
+ * Adapter for the Intel (r) Linker for Linux (r) for IA-32
+ *
+ * @author Curt Arnold
+ */
+public final class IntelLinux32Linker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final IntelLinux32Linker dllLinker = new IntelLinux32Linker(
+ "lib", ".so", false, new IntelLinux32Linker("lib", ".so", true,
+ null));
+ private static final IntelLinux32Linker instance = new IntelLinux32Linker(
+ "", "", false, null);
+ public static IntelLinux32Linker getInstance() {
+ return instance;
+ }
+ private IntelLinux32Linker(String outputPrefix, String outputSuffix,
+ boolean isLibtool, IntelLinux32Linker libtoolLinker) {
+// FREEHEP
+ super("icpc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix,
+ isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java
new file mode 100644
index 0000000..1d9f6c5
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Intel (r) C/C++ compiler for IA-64 Linux (r)
+ *
+ * The Intel C/C++ compiler for IA-64 Linux mimics the command options for gcc
+ * compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class IntelLinux64CCompiler extends GccCompatibleCCompiler {
+ private static final IntelLinux64CCompiler instance = new IntelLinux64CCompiler(
+ false, new IntelLinux64CCompiler(true, null, false, null), false,
+ null);
+ public static IntelLinux64CCompiler getInstance() {
+ return instance;
+ }
+ private IntelLinux64CCompiler(boolean isLibtool,
+ IntelLinux64CCompiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super("ecc", "-V", isLibtool, libtoolCompiler, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelLinux64CCompiler(getLibtool(),
+ (IntelLinux64CCompiler) this.getLibtoolCompiler(),
+ newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+// FREEHEP
+ return IntelLinux64CLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java
new file mode 100644
index 0000000..ec25e9e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java
@@ -0,0 +1,36 @@
+// FREEHEP
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+
+public final class IntelLinux64CLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final IntelLinux64CLinker dllLinker = new IntelLinux64CLinker(
+ "lib", ".so", false, new IntelLinux64CLinker("lib", ".so", true,
+ null));
+ private static final IntelLinux64CLinker instance = new IntelLinux64CLinker(
+ "", "", false, null);
+ public static IntelLinux64CLinker getInstance() {
+ return instance;
+ }
+ private IntelLinux64CLinker(String outputPrefix, String outputSuffix,
+ boolean isLibtool, IntelLinux64CLinker libtoolLinker) {
+ super("ecc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix,
+ isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java
new file mode 100644
index 0000000..531de0c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java
@@ -0,0 +1,36 @@
+// FREEHEP
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+
+public final class IntelLinux64Compiler extends GccCompatibleCCompiler {
+ private static final IntelLinux64Compiler instance = new IntelLinux64Compiler(
+ false, new IntelLinux64Compiler(true, null, false, null), false,
+ null);
+ public static IntelLinux64Compiler getInstance() {
+ return instance;
+ }
+ private IntelLinux64Compiler(boolean isLibtool,
+ IntelLinux64Compiler libtoolCompiler, boolean newEnvironment,
+ Environment env) {
+ super("ecpc", "-V", isLibtool, libtoolCompiler, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelLinux64Compiler(getLibtool(),
+ (IntelLinux64Compiler) this.getLibtoolCompiler(),
+ newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ return IntelLinux64Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java
new file mode 100644
index 0000000..6798c3f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
+/**
+ * Adapter for the Intel (r) linker for Linux for IA-64
+ *
+ * @author Curt Arnold
+ */
+public final class IntelLinux64Linker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[0];
+ private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+ ".lib", ".dll", ".so", ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib",
+ ".dll", ".so", ".sl"};
+ private static final IntelLinux64Linker dllLinker = new IntelLinux64Linker(
+ "lib", ".so", false, new IntelLinux64Linker("lib", ".so", true,
+ null));
+ private static final IntelLinux64Linker instance = new IntelLinux64Linker(
+ "", "", false, null);
+ public static IntelLinux64Linker getInstance() {
+ return instance;
+ }
+ private IntelLinux64Linker(String outputPrefix, String outputSuffix,
+ boolean isLibtool, IntelLinux64Linker libtoolLinker) {
+// FREEHEP
+ super("ecpc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix,
+ isLibtool, libtoolLinker);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return GccLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java b/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java
new file mode 100644
index 0000000..ed7c61a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioProcessor;
+/**
+ * A add-in class for Intel (r) compilers and linkers
+ *
+ *
+ */
+public class IntelProcessor {
+ public static void addWarningSwitch(Vector args, int level) {
+ DevStudioProcessor.addWarningSwitch(args, level);
+ }
+ public static String getCommandFileSwitch(String cmdFile) {
+ return DevStudioProcessor.getCommandFileSwitch(cmdFile);
+ }
+ public static void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ DevStudioProcessor.getDefineSwitch(buffer, define, value);
+ }
+ public static String getIncludeDirSwitch(String includeDir) {
+ return DevStudioProcessor.getIncludeDirSwitch(includeDir);
+ }
+ public static String[] getOutputFileSwitch(String outPath) {
+ return DevStudioProcessor.getOutputFileSwitch(outPath);
+ }
+ public static void getUndefineSwitch(StringBuffer buffer, String define) {
+ DevStudioProcessor.getUndefineSwitch(buffer, define);
+ }
+ public static boolean isCaseSensitive() {
+ return false;
+ }
+ private IntelProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java
new file mode 100644
index 0000000..e006af2
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Intel (r) C++ compiler for 32-bit applications
+ *
+ * The Intel (r) C++ compiler for IA32 Windows mimics the command options for
+ * the Microsoft (r) C++ compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class IntelWin32CCompiler extends DevStudioCompatibleCCompiler {
+ private static final IntelWin32CCompiler instance = new IntelWin32CCompiler(
+ false, null);
+ public static IntelWin32CCompiler getInstance() {
+ return instance;
+ }
+ private IntelWin32CCompiler(boolean newEnvironment, Environment env) {
+ super("icl", null, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelWin32CCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ return IntelWin32Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java
new file mode 100644
index 0000000..39353d4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLibrarian;
+/**
+ * Adapter for the xilib from the Intel(r) C++ Compiler for IA-32 or IA-64
+ * systems running Microsoft (r) operating systems
+ *
+ * @author Curt Arnold
+ */
+public class IntelWin32Librarian extends DevStudioCompatibleLibrarian {
+ private static final IntelWin32Librarian instance = new IntelWin32Librarian();
+ public static IntelWin32Librarian getInstance() {
+ return instance;
+ }
+ protected IntelWin32Librarian() {
+ super("xilib", "/bogus");
+ }
+ public Linker getLinker(LinkType type) {
+ return IntelWin32Linker.getInstance().getLinker(type);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java
new file mode 100644
index 0000000..fe0642f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLinker;
+/**
+ * Adapter for the Intel (r) linker for 32-bit applications
+ *
+ * @author Curt Arnold
+ */
+public final class IntelWin32Linker extends DevStudioCompatibleLinker {
+ private static final IntelWin32Linker dllLinker = new IntelWin32Linker(
+ ".dll");
+ private static final IntelWin32Linker instance = new IntelWin32Linker(
+ ".exe");
+ public static IntelWin32Linker getInstance() {
+ return instance;
+ }
+ private IntelWin32Linker(String outputSuffix) {
+ super("xilink", "/bogus", outputSuffix);
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return IntelWin32Librarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java
new file mode 100644
index 0000000..5927d0f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.intel;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler;
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Intel C++ compiler for Itanium(TM) Applications
+ *
+ * @author Curt Arnold
+ */
+public final class IntelWin64CCompiler extends DevStudioCompatibleCCompiler {
+ private static final IntelWin64CCompiler instance = new IntelWin64CCompiler(
+ false, null);
+ public static IntelWin64CCompiler getInstance() {
+ return instance;
+ }
+ private IntelWin64CCompiler(boolean newEnvironment, Environment env) {
+ super("ecl", null, newEnvironment, env);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IntelWin64CCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ public Linker getLinker(LinkType type) {
+ //
+ // currently the Intel Win32 and Win64 linkers
+ // are command line equivalent
+ return IntelWin32Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Entries b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Entries
new file mode 100644
index 0000000..b9338cf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Entries
@@ -0,0 +1,3 @@
+/XpidlCompiler.java/1.3/Sat Jun 26 02:45:16 2004//
+/package.html/1.1/Wed May 5 02:50:44 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Repository b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Repository
new file mode 100644
index 0000000..465b097
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/mozilla
diff --git a/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Root b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/mozilla/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/mozilla/XpidlCompiler.java b/src/net/sf/antcontrib/cpptasks/mozilla/XpidlCompiler.java
new file mode 100644
index 0000000..32eb9ec
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/mozilla/XpidlCompiler.java
@@ -0,0 +1,365 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.mozilla;
+
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+import net.sf.antcontrib.cpptasks.gcc.LdLinker;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * Adapter for the Mozilla Xpidl Compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class XpidlCompiler
+ extends CommandLineCompiler {
+ /**
+ * Singleton instance.
+ */
+ private static final XpidlCompiler INSTANCE = new XpidlCompiler(
+ false, null);
+ /**
+ * Gets singleton instance of compiler.
+ * @return XpidlCompiler singleton instance
+ */
+ public static XpidlCompiler getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param newEnvironment boolean establish an new environment.
+ * @param env Environment environment.
+ */
+ private XpidlCompiler(final boolean newEnvironment,
+ final Environment env) {
+ super("xpidl", null, new String[] {".idl", ".xpidl"}
+ , new String[0], ".xpt", false, null, newEnvironment, env);
+ }
+
+ /**
+ * Add arguments for debug, etc.
+ * @param args Vector command argument list
+ * @param debug boolean build for debug if true
+ * @param multithreaded boolean build for multithreading if true
+ * @param exceptions boolean enable exceptions if true
+ * @param linkType LinkType output and runtime type
+ * @param rtti Boolean enable run-time type identification if true
+ * @param optimization OptimizationEnum optimization
+ */
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ }
+
+ /**
+ * Add arguments for specified warning level.
+ * @param args Vector command line arguments
+ * @param level int warning level value
+ */
+ protected void addWarningSwitch(final Vector args,
+ final int level) {
+ }
+
+ /**
+ * Change enviroment (deprecated).
+ * @param newEnvironment boolean use new environment.
+ * @param env Environment environment
+ * @return Processor modified processor
+ */
+ public Processor changeEnvironment(final boolean newEnvironment,
+ final Environment env) {
+ return this;
+ }
+
+ /**
+ * Gets dependency parser.
+ * @param source source file
+ * @return parser
+ */
+ protected Parser createParser(final File source) {
+ return new CParser();
+ }
+
+ /**
+ * Gets number of command line arguments per input file.
+ * @return int number of command line arguments per input file.
+ */
+ protected int getArgumentCountPerInputFile() {
+ return 3;
+ }
+
+ /**
+ * Gets output file names.
+ * @param inputFile String input file name
+ * @param versionInfo version info, not used by this compiler.
+ * @return String[] output file names
+ */
+ public String[] getOutputFileNames(final String inputFile,
+ final VersionInfo versionInfo) {
+ //
+ // if a recognized input file
+ //
+ String baseName = getBaseOutputName(inputFile);
+ return new String[] {
+ baseName + ".xpt",
+ baseName + ".h"};
+ }
+
+ /**
+ * Gets input file arguments.
+ * @param outputDir File output directory
+ * @param filename String input file name.
+ * @param index int argument index,
+ * 0 to getNumberOfArgumentsPerInputFile() -1
+ * @return String input file argument
+ */
+ protected String getInputFileArgument(final File outputDir,
+ final String filename,
+ final int index) {
+ return "";
+ }
+
+ /**
+ * Gets maximum length of command line.
+ * @return int maximum length of command line
+ */
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+
+ /**
+ * Gets maximum number of input files processed per command.
+ * @return int maximum number of input files processed per command.
+ */
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+
+ /**
+ * Adds command line arguments for include paths.
+ *
+ * @param baseDirPath String base directory
+ * @param includeDirs File[] include directories
+ * @param args Vector command line arguments
+ * @param relativeArgs Vector arguments for configuration identification
+ * @param includePathId StringBuffer buffer for configuration identification
+ */
+ protected void addIncludes(final String baseDirPath,
+ final File[] includeDirs,
+ final Vector args,
+ final Vector relativeArgs,
+ final StringBuffer includePathId) {
+ //
+ // requires space between switch and path
+ //
+ for (int i = 0; i < includeDirs.length; i++) {
+ args.addElement("-I");
+ args.addElement(includeDirs[i].getAbsolutePath());
+ if (relativeArgs != null) {
+ String relative = CUtil.getRelativePath(baseDirPath,
+ includeDirs[i]);
+ relativeArgs.addElement("-I");
+ relativeArgs.addElement(relative);
+ if (includePathId != null) {
+ if (includePathId.length() == 0) {
+ includePathId.append("-I ");
+ } else {
+ includePathId.append(" -I ");
+ }
+ includePathId.append(relative);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets include directory switch.
+ * @param includeDir String include directory
+ * @return String command switch to add specified directory to search path
+ */
+ protected String getIncludeDirSwitch(final String includeDir) {
+ return "-I" + includeDir;
+ }
+
+ /**
+ * Gets switch to define preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ * @param value String macro value, may be null.
+ */
+ protected void getDefineSwitch(final StringBuffer buffer,
+ final String define,
+ final String value) {
+ }
+
+ /**
+ * Gets switch to undefine preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ */
+ protected void getUndefineSwitch(final StringBuffer buffer,
+ final String define) {
+ }
+
+ /**
+ * Gets standard include paths.
+ * @return File[] standard include paths
+ */
+ protected File[] getEnvironmentIncludePath() {
+ return new File[0];
+ }
+
+ /**
+ * Gets linker associated with this type.
+ * @param type LinkType linker, returns ld.
+ * @return Linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return LdLinker.getInstance();
+ }
+
+ /**
+ * Compiles an .idl file into the corresponding .h and .xpt files.
+ * @param task current cc task
+ * @param outputDir output directory
+ * @param sourceFiles source files
+ * @param args command line arguments that appear before input files
+ * @param endArgs command line arguments that appear after input files
+ * @param relentless if true, do not stop at first compilation error
+ * @param config compiler configuration
+ * @param monitor progress monitor
+ */
+ public void compile(final CCTask task,
+ final File outputDir,
+ final String[] sourceFiles,
+ final String[] args,
+ final String[] endArgs,
+ final boolean relentless,
+ final CommandLineCompilerConfiguration config,
+ final ProgressMonitor monitor) {
+
+ BuildException exc = null;
+ String[] thisSource = new String[1];
+ String[] tlbCommand = new String[args.length + endArgs.length + 6];
+ tlbCommand[0] = "xpidl";
+ tlbCommand[1] = "-m";
+ tlbCommand[2] = "typelib";
+ String[] headerCommand = new String[args.length + endArgs.length + 6];
+ headerCommand[0] = "xpidl";
+ headerCommand[1] = "-m";
+ headerCommand[2] = "header";
+ for (int i = 0; i < args.length; i++) {
+ tlbCommand[i + 3] = args[i];
+ headerCommand[i + 3] = args[i];
+ }
+ tlbCommand[args.length + 3] = "-e";
+ headerCommand[args.length + 3] = "-e";
+
+ int tlbIndex = args.length + 6;
+ int headerIndex = args.length + 6;
+ for (int i = 0; i < endArgs.length; i++) {
+ tlbCommand[tlbIndex++] = endArgs[i];
+ headerCommand[headerIndex++] = endArgs[i];
+ }
+ for (int j = 0; j < sourceFiles.length; j++) {
+ tlbIndex = args.length + 4;
+ headerIndex = args.length + 4;
+ String[] outputFileNames = getOutputFileNames(sourceFiles[j], null);
+
+ tlbCommand[tlbIndex++] = outputFileNames[0];
+ tlbCommand[tlbIndex++] = sourceFiles[j];
+
+ headerCommand[headerIndex++] = outputFileNames[1];
+ headerCommand[headerIndex++] = sourceFiles[j];
+
+ int retval = runCommand(task, outputDir, tlbCommand);
+ if (retval == 0) {
+ retval = runCommand(task, outputDir, headerCommand);
+ }
+ if (monitor != null) {
+ thisSource[0] = sourceFiles[j];
+ monitor.progress(thisSource);
+ }
+ //
+ // if the process returned a failure code and
+ // we aren't holding an exception from an earlier
+ // interation
+ if (retval != 0 && exc == null) {
+ //
+ // construct the exception
+ //
+ exc = new BuildException(this.getCommand()
+ + " failed with return code " + retval, task
+ .getLocation());
+ //
+ // and throw it now unless we are relentless
+ //
+ if (!relentless) {
+ throw exc;
+ }
+ }
+ }
+ //
+ // if the compiler returned a failure value earlier
+ // then throw an exception
+ if (exc != null) {
+ throw exc;
+ }
+ }
+
+ /**
+ * Get total command line length due to the input file.
+ * @param outputDir File output directory
+ * @param inputFile String input file
+ * @return int characters added to command line for the input file.
+ */
+ protected int getTotalArgumentLengthForInputFile(
+ final File outputDir,
+ final String inputFile) {
+ return 0;
+ }
+
+ /**
+ * Gets compiler identifier.
+ * @return String compiler identification string
+ */
+ public String getIdentifier() {
+ return "Mozilla xpidl";
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/mozilla/package.html b/src/net/sf/antcontrib/cpptasks/mozilla/package.html
new file mode 100644
index 0000000..6be6dff
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/mozilla/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Compiler adapter for Mozilla's XPCOM compiler.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Entries b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Entries
new file mode 100644
index 0000000..4777cd4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Entries
@@ -0,0 +1,10 @@
+/OpenWatcomCCompiler.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomCLinker.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomCompiler.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomFortranCompiler.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomFortranLinker.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomLibrarian.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomLinker.java/1.1/Thu Jul 8 21:30:54 2004//
+/OpenWatcomProcessor.java/1.1/Thu Jul 8 21:30:54 2004//
+/package.html/1.1/Tue Jul 13 03:31:04 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Repository b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Repository
new file mode 100644
index 0000000..ef2bef3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/openwatcom
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Root b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCCompiler.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCCompiler.java
new file mode 100644
index 0000000..4c36438
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCCompiler.java
@@ -0,0 +1,84 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * Adapter for the OpenWatcom C Compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class OpenWatcomCCompiler
+ extends OpenWatcomCompiler {
+ /**
+ * Singleton.
+ */
+ private static final OpenWatcomCCompiler INSTANCE = new OpenWatcomCCompiler(
+ "wcl386",
+ false, null);
+
+ /**
+ * Get compiler.
+ * @return OpenWatcomCCompiler compiler
+ */
+ public static OpenWatcomCCompiler getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param command String command
+ * @param newEnvironment boolean use new environment
+ * @param env Environment environment
+ */
+ private OpenWatcomCCompiler(final String command,
+ final boolean newEnvironment,
+ final Environment env) {
+ super(command, "/?",
+ new String[] {".c", ".cc", ".cpp", ".cxx", ".c++"}
+ ,
+ new String[] {".h", ".hpp", ".inl"}
+ ,
+ newEnvironment, env);
+ }
+
+ /**
+ * Create parser.
+ * @param source File file to be parsed.
+ * @return Parser parser
+ */
+ public Parser createParser(final File source) {
+ return new CParser();
+ }
+
+ /**
+ * Get linker.
+ * @param type link type
+ * @return linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return OpenWatcomCLinker.getInstance().getLinker(type);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCLinker.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCLinker.java
new file mode 100644
index 0000000..93e65b4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCLinker.java
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+
+/**
+ * Adapter for the OpenWatcom linker.
+ *
+ * @author Curt Arnold
+ */
+public final class OpenWatcomCLinker
+ extends OpenWatcomLinker {
+ /**
+ * Dll linker.
+ */
+ private static final OpenWatcomCLinker DLL_LINKER =
+ new OpenWatcomCLinker(".dll");
+ /**
+ * Exe linker.
+ */
+ private static final OpenWatcomCLinker INSTANCE =
+ new OpenWatcomCLinker(".exe");
+ /**
+ * Get linker instance.
+ * @return OpenWatcomCLinker linker
+ */
+ public static OpenWatcomCLinker getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param outputSuffix String output suffix.
+ */
+ private OpenWatcomCLinker(final String outputSuffix) {
+ super("wcl386", outputSuffix);
+ }
+
+ /**
+ * Get linker.
+ * @param type LinkType link type
+ * @return Linker linker
+ */
+ public Linker getLinker(final LinkType type) {
+ if (type.isStaticLibrary()) {
+ return OpenWatcomLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return DLL_LINKER;
+ }
+ return INSTANCE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCompiler.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCompiler.java
new file mode 100644
index 0000000..4cf2d18
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomCompiler.java
@@ -0,0 +1,169 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * An abstract base class for the OpenWatcom C and Fortran compilers.
+ *
+ * @author Curt Arnold
+ */
+public abstract class OpenWatcomCompiler
+ extends CommandLineCompiler {
+ /**
+ * Constructor.
+ * @param command String command
+ * @param identifierArg String identifier
+ * @param sourceExtensions String[] source extension
+ * @param headerExtensions String[] header extension
+ * @param newEnvironment boolean use new enviroment
+ * @param env Environment environment
+ */
+ protected OpenWatcomCompiler(final String command,
+ final String identifierArg,
+ final String[] sourceExtensions,
+ final String[] headerExtensions,
+ final boolean newEnvironment,
+ final Environment env) {
+ super(command, identifierArg, sourceExtensions,
+ headerExtensions, ".obj", false,
+ null, newEnvironment, env);
+ }
+
+ /**
+ * Add implied arguments.
+ * @param args Vector command line arguments
+ * @param debug boolean is debug
+ * @param multithreaded boolean multithreaderd
+ * @param exceptions boolean support exceptions
+ * @param linkType LinkType link type
+ * @param rtti Boolean run time type information
+ * @param optimization OptimizationEnum
+ */
+ protected final void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("/c");
+ if (exceptions) {
+ args.addElement("/xs");
+ }
+ if (multithreaded) {
+ args.addElement("/bm");
+ }
+ if (debug) {
+ args.addElement("/d2");
+ args.addElement("/od");
+ args.addElement("/d_DEBUG");
+ } else {
+ if (optimization != null) {
+ if (optimization.isSize()) {
+ args.addElement("/os");
+ }
+ if (optimization.isSpeed()) {
+ args.addElement("/ot");
+ }
+ }
+ args.addElement("/dNDEBUG");
+ }
+ if (rtti != null && rtti.booleanValue()) {
+ args.addElement("/xr");
+ }
+ }
+
+ /**
+ * Add warning switch.
+ * @param args Vector command line arguments
+ * @param level int warning level
+ */
+ protected final void addWarningSwitch(final Vector args, final int level) {
+ OpenWatcomProcessor.addWarningSwitch(args, level);
+ }
+
+ /**
+ * Change enviroment.
+ * @param newEnvironment boolean use new enviroment
+ * @param env Environment environment
+ * @return Processor modified processor
+ */
+ public final Processor changeEnvironment(final boolean newEnvironment,
+ final Environment env) {
+ return this;
+ }
+
+ /**
+ * Get define switch.
+ * @param buffer StringBuffer buffer
+ * @param define String preprocessor macro
+ * @param value String value, may be null.
+ */
+ protected final void getDefineSwitch(final StringBuffer buffer,
+ final String define,
+ final String value) {
+ OpenWatcomProcessor.getDefineSwitch(buffer, define, value);
+ }
+
+ /**
+ * Get include path from environment.
+ * @return File[]
+ */
+ protected final File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ";");
+ }
+
+ /**
+ * Get include directory switch.
+ * @param includeDir String include directory
+ * @return String command line argument
+ */
+ protected final String getIncludeDirSwitch(final String includeDir) {
+ return OpenWatcomProcessor.getIncludeDirSwitch(includeDir);
+ }
+
+
+ /**
+ * Get maximum command line length.
+ * @return int maximum command line length
+ */
+ public final int getMaximumCommandLength() {
+ return 4096;
+ }
+
+ /**
+ * Get undefine switch.
+ * @param buffer StringBuffer argument destination
+ * @param define String preprocessor macro
+ */
+ protected final void getUndefineSwitch(final StringBuffer buffer,
+ final String define) {
+ OpenWatcomProcessor.getUndefineSwitch(buffer, define);
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranCompiler.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranCompiler.java
new file mode 100644
index 0000000..ca3abcb
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranCompiler.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * Adapter for the OpenWatcom Fortran compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class OpenWatcomFortranCompiler
+ extends OpenWatcomCompiler {
+ /**
+ * Singleton.
+ */
+ private static final OpenWatcomFortranCompiler[] INSTANCE =
+ new OpenWatcomFortranCompiler[] {
+ new OpenWatcomFortranCompiler(
+ "wfl386", false, null)};
+
+ /**
+ * Get instance.
+ * @return OpenWatcomFortranCompiler compiler instance
+ */
+ public static OpenWatcomFortranCompiler getInstance() {
+ return INSTANCE[0];
+ }
+
+ /**
+ * Constructor.
+ * @param command String command
+ * @param newEnvironment boolean use new environment
+ * @param env Environment environment
+ */
+ private OpenWatcomFortranCompiler(final String command,
+ final boolean newEnvironment,
+ final Environment env) {
+ super(command, "/?",
+ new String[] {".f90", ".for", ".f"}
+ ,
+ new String[] {".i", ".i90", ".fpp"}
+ ,
+ newEnvironment, env);
+ }
+
+ /**
+ * Create dependency parser.
+ * @param source File source file
+ * @return Parser parser
+ */
+ public Parser createParser(final File source) {
+ return new FortranParser();
+ }
+
+ /**
+ * Get linker.
+ * @param type link type
+ * @return linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return OpenWatcomFortranLinker.getInstance().getLinker(type);
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranLinker.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranLinker.java
new file mode 100644
index 0000000..82b6999
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomFortranLinker.java
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+
+/**
+ * Adapter for the OpenWatcom Fortran linker.
+ *
+ * @author Curt Arnold
+ */
+public final class OpenWatcomFortranLinker
+ extends OpenWatcomLinker {
+ /**
+ * Singleton for DLL linking.
+ */
+ private static final OpenWatcomFortranLinker DLL_LINKER = new
+ OpenWatcomFortranLinker(".dll");
+ /**
+ * Singleton for executables.
+ */
+ private static final OpenWatcomFortranLinker INSTANCE = new
+ OpenWatcomFortranLinker(".exe");
+ /**
+ * Get instance.
+ * @return OpenWatcomFortranLinker linker
+ */
+ public static OpenWatcomFortranLinker getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param outputSuffix String output suffix
+ */
+ private OpenWatcomFortranLinker(final String outputSuffix) {
+ super("wfl386", outputSuffix);
+ }
+
+ /**
+ * Get linker.
+ * @param type LinkType link type
+ * @return Linker linker
+ */
+ public Linker getLinker(final LinkType type) {
+ if (type.isStaticLibrary()) {
+ return OpenWatcomLibrarian.getInstance();
+ }
+ if (type.isSharedLibrary()) {
+ return DLL_LINKER;
+ }
+ return INSTANCE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLibrarian.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLibrarian.java
new file mode 100644
index 0000000..848c395
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLibrarian.java
@@ -0,0 +1,254 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the OpenWatcom Librarian.
+ *
+ * @author Curt Arnold
+ */
+public final class OpenWatcomLibrarian
+ extends CommandLineLinker {
+ /**
+ * Singleton.
+ */
+ private static final OpenWatcomLibrarian INSTANCE = new OpenWatcomLibrarian();
+ /**
+ * Singleton accessor.
+ * @return OpenWatcomLibrarian librarian instance
+ */
+ public static OpenWatcomLibrarian getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ */
+ private OpenWatcomLibrarian() {
+ super("wlib", null, new String[] {".obj"}
+ , new String[0], ".lib", false,
+ null);
+ }
+
+ /**
+ * Add base address.
+ * @param base long base address
+ * @param args Vector command line arguments
+ */
+ protected void addBase(final long base, final Vector args) {
+ }
+
+ /**
+ * Add alternative entry point.
+ * @param entry String entry point
+ * @param args Vector command line arguments
+ */
+ protected void addEntry(final String entry, final Vector args) {
+ }
+
+ /**
+ * Add fixed parameter.
+ * @param fixed Boolean true if fixed
+ * @param args Vector command line arguments
+ */
+ protected void addFixed(final Boolean fixed, final Vector args) {
+ }
+
+ /**
+ * Add implied arguments.
+ * @param debug boolean true if debugging
+ * @param linkType LinkType link type
+ * @param args Vector command line arguments
+ */
+ protected void addImpliedArgs(final boolean debug,
+ final LinkType linkType,
+ final Vector args) {
+ }
+
+ /**
+ * Add incremental option.
+ * @param incremental boolean true if incremental
+ * @param args Vector command line arguments
+ */
+ protected void addIncremental(final boolean incremental,
+ final Vector args) {
+ }
+
+ /**
+ * Add map option.
+ * @param map boolean true to create map file
+ * @param args Vector command line argument
+ */
+ protected void addMap(final boolean map,
+ final Vector args) {
+ }
+
+ /**
+ * Add stack size option.
+ * @param stack int stack size
+ * @param args Vector command line arguments
+ */
+ protected void addStack(final int stack,
+ final Vector args) {
+ }
+
+ /**
+ * Get command file switch.
+ * @param cmdFile String command file
+ * @return String command file switch
+ */
+ protected String getCommandFileSwitch(final String cmdFile) {
+ return OpenWatcomProcessor.getCommandFileSwitch(cmdFile);
+ }
+
+
+ /**
+ * Get library search path.
+ * @return File[] library search path
+ */
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+
+ /**
+ * Get file selectors for specified library names.
+ * @param libnames String[] library names
+ * @param libType LibraryTypeEnum library type enum
+ * @return String[] file selection patterns
+ */
+ public String[] getLibraryPatterns(final String[] libnames,
+ final LibraryTypeEnum libType) {
+ return OpenWatcomProcessor.getLibraryPatterns(libnames, libType);
+ }
+
+ /**
+ * Get linker.
+ * @param type LinkType link type
+ * @return Linker linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return OpenWatcomCLinker.getInstance().getLinker(type);
+ }
+
+ /**
+ * Gets maximum command line.
+ * @return int maximum command line
+ */
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+
+ /**
+ * Create output file switch.
+ * @param outFile String output file switch
+ * @return String[] output file switch
+ */
+ public String[] getOutputFileSwitch(final String outFile) {
+ return OpenWatcomProcessor.getOutputFileSwitch(outFile);
+ }
+
+ /**
+ * Gets case-sensisitivity of processor.
+ * @return boolean true if case sensitive
+ */
+ public boolean isCaseSensitive() {
+ return OpenWatcomProcessor.isCaseSensitive();
+ }
+
+ /**
+ * Builds a library.
+ * @param task task
+ * @param outputFile generated library
+ * @param sourceFiles object files
+ * @param config linker configuration
+ */
+ public void link(final CCTask task,
+ final File outputFile,
+ final String[] sourceFiles,
+ final CommandLineLinkerConfiguration config) {
+ //
+ // delete any existing library
+ outputFile.delete();
+ //
+ // build a new library
+ super.link(task, outputFile, sourceFiles, config);
+ }
+
+ /**
+ * Prepares argument list for exec command.
+ * @param task task
+ * @param outputDir output directory
+ * @param outputName output file name
+ * @param sourceFiles object files
+ * @param config linker configuration
+ * @return arguments for runTask
+ */
+ protected String[] prepareArguments(
+ final CCTask task,
+ final String outputDir,
+ final String outputName,
+ final String[] sourceFiles,
+ final CommandLineLinkerConfiguration config) {
+ String[] preargs = config.getPreArguments();
+ String[] endargs = config.getEndArguments();
+ StringBuffer buf = new StringBuffer();
+ Vector execArgs = new Vector(preargs.length + endargs.length + 10
+ + sourceFiles.length);
+
+ execArgs.addElement(this.getCommand());
+ String outputFileName = new File(outputDir, outputName).toString();
+ execArgs.addElement(quoteFilename(buf, outputFileName));
+
+ for (int i = 0; i < preargs.length; i++) {
+ execArgs.addElement(preargs[i]);
+ }
+
+ int objBytes = 0;
+
+ for (int i = 0; i < sourceFiles.length; i++) {
+ String last4 = sourceFiles[i]
+ .substring(sourceFiles[i].length() - 4).toLowerCase();
+ if (!last4.equals(".def")
+ && !last4.equals(".res")
+ && !last4.equals(".lib")) {
+ execArgs.addElement("+" + quoteFilename(buf, sourceFiles[i]));
+ objBytes += new File(sourceFiles[i]).length();
+ }
+ }
+
+ for (int i = 0; i < endargs.length; i++) {
+ execArgs.addElement(endargs[i]);
+ }
+
+ String[] execArguments = new String[execArgs.size()];
+ execArgs.copyInto(execArguments);
+
+ return execArguments;
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLinker.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLinker.java
new file mode 100644
index 0000000..f0bbe3d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLinker.java
@@ -0,0 +1,205 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.platforms.WindowsPlatform;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for the OpenWatcom linker.
+ *
+ * @author Curt Arnold
+ */
+public abstract class OpenWatcomLinker
+ extends CommandLineLinker {
+ /**
+ * Constructor.
+ * @param command String command string (wcl386 or wfl386)
+ * @param outputSuffix String output suffix
+ */
+ protected OpenWatcomLinker(final String command,
+ final String outputSuffix) {
+ super(command, "-r", new String[] {".obj", ".lib", ".res"}
+ ,
+ new String[] {".map", ".pdb", ".lnk"}
+ , outputSuffix, false, null);
+ }
+
+ /**
+ * Add specified base address to linker options.
+ * @param base long base address
+ * @param args Vector command options
+ */
+ protected final void addBase(final long base, final Vector args) {
+ }
+
+ /**
+ * Adds non-default entry point.
+ * @param entry entry point name
+ * @param args command line parameters
+ */
+ protected final void addEntry(final String entry, final Vector args) {
+ }
+
+ /**
+ * Adds fixed option.
+ * @param fixed if executable is fixed
+ * @param args command line parameters
+ */
+ protected final void addFixed(final Boolean fixed, final Vector args) {
+ }
+
+ /**
+ * Adds other command line parameters.
+ * @param debug boolean is debug
+ * @param linkType LinkType link type
+ * @param args Vector command line arguments
+ */
+ protected final void addImpliedArgs(final boolean debug,
+ final LinkType linkType,
+ final Vector args) {
+ if (linkType.isExecutable()) {
+ if (linkType.isSubsystemConsole()) {
+ args.addElement("/bc");
+ } else {
+ if (linkType.isSubsystemGUI()) {
+ args.addElement("/bg");
+ }
+ }
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("/bd");
+ }
+ }
+
+ /**
+ * Add command line switch to force incremental linking.
+ * @param incremental boolean do incremental linking
+ * @param args Vector command line arguments
+ */
+ protected final void addIncremental(final boolean incremental,
+ final Vector args) {
+ }
+
+ /**
+ * Add command line switch to force map generation.
+ * @param map boolean build map
+ * @param args Vector command line arguments
+ */
+ protected final void addMap(final boolean map, final Vector args) {
+ if (map) {
+ args.addElement("/fm");
+ }
+ }
+
+ /**
+ * Add command line switch for stack reservation.
+ * @param stack int stack size.
+ * @param args Vector command line arguments.
+ */
+ protected final void addStack(final int stack, final Vector args) {
+ if (stack >= 0) {
+ String stackStr = Integer.toString(stack);
+ args.addElement("/k" + stackStr);
+ }
+ }
+
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param outputFile name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ * @throws IOException if unable to write version resource
+ */
+ public final void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher) throws IOException {
+ WindowsPlatform.addVersionFiles(versionInfo, linkType, outputFile, isDebug,
+ objDir, matcher);
+ }
+
+ /**
+ * Get command file switch.
+ * @param commandFile String command file name
+ * @return String command line option
+ */
+ public final String getCommandFileSwitch(final String commandFile) {
+ return "@" + commandFile;
+ }
+
+ /**
+ * Get search path for libraries.
+ * @return File[] library path
+ */
+ public final File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+
+ /**
+ * Get file selectors for libraries.
+ * @param libnames String[]
+ * @param libType LibraryTypeEnum
+ * @return String[]
+ */
+ public final String[] getLibraryPatterns(final String[] libnames,
+ final LibraryTypeEnum libType) {
+ return OpenWatcomProcessor.getLibraryPatterns(libnames, libType);
+ }
+
+ /**
+ * Get maximum command line length.
+ * @return int command line length
+ */
+ public final int getMaximumCommandLength() {
+ return 1024;
+ }
+
+ /**
+ * Get output file switch.
+ * @param outFile Output file name
+ * @return String[] command line switches
+ */
+ public final String[] getOutputFileSwitch(final String outFile) {
+ return OpenWatcomProcessor.getOutputFileSwitch(outFile);
+ }
+
+ /**
+ * Gets file name sensitivity of processors.
+ * @return boolean true if case sensitive.
+ */
+ public final boolean isCaseSensitive() {
+ return OpenWatcomProcessor.isCaseSensitive();
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomProcessor.java b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomProcessor.java
new file mode 100644
index 0000000..5845776
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomProcessor.java
@@ -0,0 +1,169 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.openwatcom;
+
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * A add-in class for OpenWatcom processors.
+ *
+ *
+ */
+public final class OpenWatcomProcessor {
+ /**
+ * Adds warning command line options.
+ *
+ * @param args Vector list of options
+ * @param level int value of WarningLevelEnum
+ */
+ public static void addWarningSwitch(final Vector args, final int level) {
+ switch (level) {
+ case 0:
+ args.addElement("/w0");
+ break;
+ case 1:
+ args.addElement("/w1");
+ break;
+ case 2:
+ break;
+ case 3:
+ args.addElement("/w2");
+ break;
+ case 4:
+ args.addElement("/w3");
+ break;
+ case 5:
+ args.addElement("/we");
+ break;
+ default:
+ args.addElement("/w1");
+ break;
+ }
+ }
+
+ /**
+ * Gets command line option to read from an option file.
+ *
+ * @param cmdFile String file name for option file
+ * @return String Command line option
+ */
+ public static String getCommandFileSwitch(final String cmdFile) {
+ StringBuffer buf = new StringBuffer("@");
+ if (cmdFile.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(cmdFile.replace('/', '\\'));
+ buf.append('\"');
+ } else {
+ buf.append(cmdFile);
+ }
+ return buf.toString();
+ }
+
+ /**
+ * Creates a command line option to define a preprocessor macro.
+ *
+ * @param buffer StringBuffer destination buffer
+ * @param define String parameter to define
+ * @param value String value, may be null
+ */
+ public static void getDefineSwitch(final StringBuffer buffer,
+ final String define,
+ final String value) {
+ buffer.append("/d");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+
+ /**
+ * Create a command line option to add a directory to the include path.
+ * @param includeDir String directory
+ * @return String command line option
+ */
+ public static String getIncludeDirSwitch(final String includeDir) {
+ return "/i=" + includeDir.replace('/', '\\');
+ }
+
+ /**
+ * Builds command line options to specify the output file names.
+ *
+ * @param outPath String path to output file
+ * @return String[] command line options
+ */
+ public static String[] getOutputFileSwitch(final String outPath) {
+ StringBuffer buf = new StringBuffer("/fo=");
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ String[] retval = new String[] {
+ buf.toString()};
+ return retval;
+ }
+
+ /**
+ * Get file selectors for specified libraries.
+ * @param libnames library names
+ * @param libType library type
+ * @return file selectors
+ */
+ public static String[] getLibraryPatterns(final String[] libnames,
+ final LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length];
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(libnames[i]);
+ buf.append(".lib");
+ patterns[i] = buf.toString();
+ }
+ return patterns;
+ }
+
+ /**
+ * Builds a command line option to undefine a preprocessor macro.
+ * @param buffer StringBuffer destination
+ * @param define String macro to be undefined
+ */
+ public static void getUndefineSwitch(final StringBuffer buffer,
+ final String define) {
+ buffer.append("/u");
+ buffer.append(define);
+ }
+
+ /**
+ * Gets whether processor tratement of file names is case-sensitive.
+ * @return boolean true if case sensitive
+ */
+ public static boolean isCaseSensitive() {
+ return false;
+ }
+
+ /**
+ * Private constructor.
+ */
+ private OpenWatcomProcessor() {
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/openwatcom/package.html b/src/net/sf/antcontrib/cpptasks/openwatcom/package.html
new file mode 100644
index 0000000..3d9adab
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/openwatcom/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Adapters for OpenWatcom compilers and tools.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/os390/CVS/Entries b/src/net/sf/antcontrib/cpptasks/os390/CVS/Entries
new file mode 100644
index 0000000..7482668
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/CVS/Entries
@@ -0,0 +1,4 @@
+/OS390CCompiler.java/1.18/Fri Apr 23 20:15:47 2004//
+/OS390Linker.java/1.19/Tue May 11 03:50:15 2004//
+/OS390Processor.java/1.11/Wed Apr 21 21:46:51 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/os390/CVS/Repository b/src/net/sf/antcontrib/cpptasks/os390/CVS/Repository
new file mode 100644
index 0000000..241f585
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/os390
diff --git a/src/net/sf/antcontrib/cpptasks/os390/CVS/Root b/src/net/sf/antcontrib/cpptasks/os390/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/os390/OS390CCompiler.java b/src/net/sf/antcontrib/cpptasks/os390/OS390CCompiler.java
new file mode 100644
index 0000000..6b1895f
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/OS390CCompiler.java
@@ -0,0 +1,156 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os390;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.CompilerDef;
+import net.sf.antcontrib.cpptasks.compiler.AbstractCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.types.DefineArgument;
+import net.sf.antcontrib.cpptasks.types.UndefineArgument;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the IBM (R) OS/390 (tm) C++ Compiler
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class OS390CCompiler extends CommandLineCCompiler {
+ private static final AbstractCompiler instance = new OS390CCompiler(false,
+ null);
+ public static AbstractCompiler getInstance() {
+ return instance;
+ }
+ private OS390CCompiler(boolean newEnvironment, Environment env) {
+ super("cxx", null, new String[]{".c", ".cc", ".cpp", ".cxx", ".c++",
+ ".s"}, new String[]{".h", ".hpp"}, ".o", false, null,
+ newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ // Specifies that only compilations and assemblies be done.
+ // Link-edit is not done
+ args.addElement("-c");
+ args.addElement("-W");
+ args.addElement("c,NOEXPMAC,NOSHOWINC");
+ /*
+ * if (exceptions) { args.addElement("/GX"); }
+ */
+ if (debug) {
+ args.addElement("-g");
+ args.addElement("-D");
+ args.addElement("_DEBUG");
+ /*
+ * if (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MTd"); } else { args.addElement("/MDd");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/MLd"); }
+ */
+ } else {
+ args.addElement("-D");
+ args.addElement("NEBUG");
+ /*
+ * if (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MT"); } else { args.addElement("/MD");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/ML"); }
+ */
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ OS390Processor.addWarningSwitch(args, level);
+ }
+ /**
+ * The buildDefineArguments implementation CommandLineCCompiler is not good
+ * for us because os390 defines are give by -D definex instead of
+ * /Ddefinex, 2 args not 1! since we implement this ourslefs, we do not
+ * have to implement the getDefineSwitch() and the getUndefineSwitch().
+ */
+ protected void buildDefineArguments(CompilerDef[] defs, Vector args) {
+ //
+ // assume that we aren't inheriting defines from containing <cc>
+ //
+ UndefineArgument[] merged = defs[0].getActiveDefines();
+ for (int i = 1; i < defs.length; i++) {
+ //
+ // if we are inheriting, merge the specific defines with the
+ // containing defines
+ merged = DefineArgument.merge(defs[i].getActiveDefines(), merged);
+ }
+ StringBuffer buf = new StringBuffer(30);
+ for (int i = 0; i < merged.length; i++) {
+ buf.setLength(0);
+ UndefineArgument current = merged[i];
+ if (current.isDefine()) {
+ args.addElement("-D");
+ buf.append(current.getName());
+ if (current.getValue() != null
+ && current.getValue().length() > 0) {
+ buf.append('=');
+ buf.append(current.getValue());
+ }
+ args.addElement(buf.toString());
+ } else {
+ args.addElement("-U");
+ args.addElement(current.getName());
+ }
+ }
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new OS390CCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ /*
+ * @see CommandLineCompiler#getDefineSwitch(StringBuffer, String, String)
+ */
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ":");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return OS390Processor.getIncludeDirSwitch(includeDir);
+ }
+ public Linker getLinker(LinkType type) {
+ return OS390Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ /* Only compile one file at time for now */
+ protected int getMaximumInputFilesPerCommand() {
+ return Integer.MAX_VALUE;
+ }
+ /*
+ * @see CommandLineCompiler#getUndefineSwitch(StringBuffer, String)
+ */
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/os390/OS390Linker.java b/src/net/sf/antcontrib/cpptasks/os390/OS390Linker.java
new file mode 100644
index 0000000..9c4f845
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/OS390Linker.java
@@ -0,0 +1,208 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os390;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the IBM (R) OS/390 (tm) Linker
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public final class OS390Linker extends CommandLineLinker {
+ private static final OS390Linker datasetLinker = new OS390Linker();
+ private static final OS390Linker dllLinker = new OS390Linker("", ".dll");
+ private static final OS390Linker instance = new OS390Linker("", "");
+ public static OS390Linker getDataSetInstance() {
+ return datasetLinker;
+ }
+ public static OS390Linker getInstance() {
+ return instance;
+ }
+ private boolean isADatasetLinker;
+ File outputFile;
+ private String outputPrefix;
+ CCTask task;
+ private OS390Linker() {
+ super("cxx", "/bogus", new String[]{".o", ".a", ".lib", ".xds"},
+ new String[]{".dll", ".x"}, ".xds", false, null);
+ this.outputPrefix = "";
+ this.isADatasetLinker = true;
+ }
+ private OS390Linker(String outputPrefix, String outputSuffix) {
+ super("cxx", "/bogus", new String[]{".o", ".a", ".lib", ".x"},
+ new String[]{".dll"}, outputSuffix, false, null);
+ this.outputPrefix = outputPrefix;
+ this.isADatasetLinker = false;
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-W");
+ args.addElement("l,DLL");
+ }
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ /*
+ * @see CommandLineLinker#addLibrarySets(LibrarySet[], Vector, Vector,
+ * Vector)
+ */
+ protected String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ // If yo want to link against a library sitting in a dataset and
+ // not in the HFS, you can just use the //'dataset' notation
+ // to specify it. e.g:
+ // <libset dir="." libs="//'MQM.V5R2M0.SCSQLOAD'"/>
+ //
+ // We have to have special handling here because the file is not
+ // on the normal filesystem so the task will not noramly include it
+ // as part of the link command.
+ if (libsets != null) {
+ for (int i = 0; i < libsets.length; i++) {
+ String libs[] = libsets[i].getLibs();
+ for (int j = 0; j < libs.length; j++) {
+ if (libs[j].startsWith("//")) {
+ endargs.addElement("-l");
+ endargs.addElement(libs[j]);
+ } else if (libsets[i].getDataset() != null) {
+ String ds = libsets[i].getDataset();
+ endargs.addElement("//'" + ds + "(" + libs[j] + ")'");
+ }
+ }
+ }
+ }
+ return super.addLibrarySets(task, libsets, preargs, midargs, endargs);
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length * 3];
+ int offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ offset = addLibraryPatterns(libnames, buf, "", ".x", patterns, offset);
+ offset = addLibraryPatterns(libnames, buf, "", ".o", patterns, offset);
+ return patterns;
+ }
+
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+
+ public Linker getLinker(LinkType linkType) {
+ if (this == datasetLinker)
+ return datasetLinker;
+ if (linkType.isSharedLibrary())
+ return dllLinker;
+ return instance;
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ String[] baseNames = super.getOutputFileNames(baseName, versionInfo);
+ if (outputPrefix.length() > 0) {
+ for(int i = 0; i < baseNames.length; i++) {
+ baseNames[i] = outputPrefix + baseNames[i];
+ }
+ }
+ return baseNames;
+ }
+ protected String[] getOutputFileSwitch(CCTask task, String outputFile) {
+ if (isADatasetLinker && task.getDataset() != null) {
+ String ds = task.getDataset();
+ outputFile = "//'" + ds + "(" + outputFile + ")'";
+ }
+ return getOutputFileSwitch(outputFile);
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-o", outputFile};
+ }
+ public boolean isCaseSensitive() {
+ return OS390Processor.isCaseSensitive();
+ }
+ /*
+ * @see CommandLineLinker#link(Task, File, String[],
+ * CommandLineLinkerConfiguration)
+ */
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ this.task = task;
+ this.outputFile = outputFile;
+ if (isADatasetLinker) {
+ int p = outputFile.getName().indexOf(".");
+ if (p >= 0) {
+ String newname = outputFile.getName().substring(0, p);
+ outputFile = new File(outputFile.getParent(), newname);
+ }
+ }
+ super.link(task, outputFile, sourceFiles, config);
+ }
+ /*
+ * @see CommandLineLinker#runCommand(Task, File, String[])
+ */
+ protected int runCommand(CCTask task, File workingDir, String[] cmdline)
+ throws BuildException {
+ int rc = super.runCommand(task, workingDir, cmdline);
+ // create the .xds file if everything was ok.
+ if (rc == 0) {
+ try {
+ outputFile.delete();
+ new FileOutputStream(outputFile).close();
+ } catch (IOException e) {
+ throw new BuildException(e.getMessage());
+ }
+ }
+ return rc;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/os390/OS390Processor.java b/src/net/sf/antcontrib/cpptasks/os390/OS390Processor.java
new file mode 100644
index 0000000..d3243fc
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os390/OS390Processor.java
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os390;
+import java.util.Vector;
+/**
+ * A add-in class for IBM (r) OS/390 compilers and linkers
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class OS390Processor {
+ public static void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ /*
+ * case 0: args.addElement("/W0"); break;
+ *
+ * case 1: args.addElement("/W1"); break;
+ *
+ * case 2: break;
+ *
+ * case 3: args.addElement("/W3"); break;
+ *
+ * case 4: args.addElement("/W4"); break;
+ */
+ }
+ }
+ public static String getCommandFileSwitch(String cmdFile) {
+ StringBuffer buf = new StringBuffer("@");
+ if (cmdFile.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(cmdFile);
+ buf.append('\"');
+ } else {
+ buf.append(cmdFile);
+ }
+ return buf.toString();
+ }
+ public static String getIncludeDirSwitch(String includeDir) {
+ return "-I" + includeDir;
+ }
+ public static String[] getOutputFileSwitch(String outPath) {
+ StringBuffer buf = new StringBuffer("-o ");
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ String[] retval = new String[]{buf.toString()};
+ return retval;
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ private OS390Processor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/os400/CVS/Entries b/src/net/sf/antcontrib/cpptasks/os400/CVS/Entries
new file mode 100644
index 0000000..ff17450
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/CVS/Entries
@@ -0,0 +1,4 @@
+/IccCompiler.java/1.8/Fri Apr 23 20:15:46 2004//
+/IccLinker.java/1.9/Tue May 11 03:50:15 2004//
+/IccProcessor.java/1.5/Wed Apr 21 21:47:06 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/os400/CVS/Repository b/src/net/sf/antcontrib/cpptasks/os400/CVS/Repository
new file mode 100644
index 0000000..6bc3715
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/os400
diff --git a/src/net/sf/antcontrib/cpptasks/os400/CVS/Root b/src/net/sf/antcontrib/cpptasks/os400/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/os400/IccCompiler.java b/src/net/sf/antcontrib/cpptasks/os400/IccCompiler.java
new file mode 100644
index 0000000..952d719
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/IccCompiler.java
@@ -0,0 +1,123 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os400;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.AbstractCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the IBM (R) OS/390 (tm) C++ Compiler
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class IccCompiler extends CommandLineCCompiler {
+ private static final AbstractCompiler instance = new IccCompiler(false,
+ null);
+ public static AbstractCompiler getInstance() {
+ return instance;
+ }
+ private IccCompiler(boolean newEnvironment, Environment env) {
+ super("icc", null, new String[]{".c", ".cc", ".cpp", ".cxx", ".c++",
+ ".s"}, new String[]{".h", ".hpp"}, ".o", false, null,
+ newEnvironment, env);
+ }
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ // Specifies that only compilations and assemblies be done.
+ // Link-edit is not done
+ args.addElement("-c");
+ /*
+ * if (exceptions) { args.addElement("/GX"); }
+ */
+ if (debug) {
+ args.addElement("-g");
+ /*
+ * args.addElement("-D"); args.addElement("_DEBUG"); if
+ * (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MTd"); } else { args.addElement("/MDd");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/MLd"); }
+ */
+ } else {
+ /*
+ * args.addElement("-D"); args.addElement("NEBUG"); if
+ * (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MT"); } else { args.addElement("/MD");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/ML"); }
+ */
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ IccProcessor.addWarningSwitch(args, level);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new IccCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ /*
+ * @see CommandLineCompiler#getDefineSwitch(StringBuffer, String, String)
+ */
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("-q");
+ buffer.append(define);
+ if (value != null && value.length() > 0) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ":");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return IccProcessor.getIncludeDirSwitch(includeDir);
+ }
+ public Linker getLinker(LinkType type) {
+ return IccLinker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ /* Only compile one file at time for now */
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ //return Integer.MAX_VALUE;
+ }
+ /*
+ * @see CommandLineCompiler#getUndefineSwitch(StringBuffer, String)
+ */
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ /*
+ * buffer.addElement("-q"); buf.append(define);
+ */
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/os400/IccLinker.java b/src/net/sf/antcontrib/cpptasks/os400/IccLinker.java
new file mode 100644
index 0000000..ea10bcc
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/IccLinker.java
@@ -0,0 +1,209 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os400;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import org.apache.tools.ant.BuildException;
+/**
+ * Adapter for the IBM (R) OS/390 (tm) Linker
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public final class IccLinker extends CommandLineLinker {
+ private static final IccLinker datasetLinker = new IccLinker();
+ private static final IccLinker dllLinker = new IccLinker("", ".dll");
+ private static final IccLinker instance = new IccLinker("", "");
+ public static IccLinker getDataSetInstance() {
+ return datasetLinker;
+ }
+ public static IccLinker getInstance() {
+ return instance;
+ }
+ private boolean isADatasetLinker;
+ File outputFile;
+ private String outputPrefix;
+ CCTask task;
+ private IccLinker() {
+ super("icc", "/bogus", new String[]{".o", ".a", ".lib", ".xds"},
+ new String[]{".dll", ".x"}, ".xds", false, null);
+ this.outputPrefix = "";
+ this.isADatasetLinker = true;
+ }
+ private IccLinker(String outputPrefix, String outputSuffix) {
+ super("icc", "/bogus", new String[]{".o", ".a", ".lib", ".x"},
+ new String[]{".dll"}, outputSuffix, false, null);
+ this.outputPrefix = outputPrefix;
+ this.isADatasetLinker = false;
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-W");
+ args.addElement("l,DLL");
+ }
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ /*
+ * @see CommandLineLinker#addLibrarySets(LibrarySet[], Vector, Vector,
+ * Vector)
+ */
+ protected String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ // If yo want to link against a library sitting in a dataset and
+ // not in the HFS, you can just use the //'dataset' notation
+ // to specify it. e.g:
+ // <libset dir="." libs="//'MQM.V5R2M0.SCSQLOAD'"/>
+ //
+ // We have to have special handling here because the file is not
+ // on the normal filesystem so the task will not noramly include it
+ // as part of the link command.
+ if (libsets != null) {
+ for (int i = 0; i < libsets.length; i++) {
+ String libs[] = libsets[i].getLibs();
+ for (int j = 0; j < libs.length; j++) {
+ if (libs[j].startsWith("//")) {
+ endargs.addElement("-l");
+ endargs.addElement(libs[j]);
+ } else if (libsets[i].getDataset() != null) {
+ String ds = libsets[i].getDataset();
+ endargs.addElement("//'" + ds + "(" + libs[j] + ")'");
+ }
+ }
+ }
+ }
+ return super.addLibrarySets(task, libsets, preargs, midargs, endargs);
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ String[] patterns = new String[libnames.length * 3];
+ int offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ offset = addLibraryPatterns(libnames, buf, "", ".x", patterns, offset);
+ offset = addLibraryPatterns(libnames, buf, "", ".o", patterns, offset);
+ return patterns;
+ }
+
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+
+
+ public Linker getLinker(LinkType linkType) {
+ if (this == datasetLinker)
+ return datasetLinker;
+ if (linkType.isSharedLibrary())
+ return dllLinker;
+ return instance;
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ protected String[] getOutputFileSwitch(CCTask task, String outputFile) {
+ if (isADatasetLinker && task.getDataset() != null) {
+ String ds = task.getDataset();
+ outputFile = "//'" + ds + "(" + outputFile + ")'";
+ }
+ return getOutputFileSwitch(outputFile);
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-o", outputFile};
+ }
+ public boolean isCaseSensitive() {
+ return IccProcessor.isCaseSensitive();
+ }
+ /*
+ * @see CommandLineLinker#link(Task, File, String[],
+ * CommandLineLinkerConfiguration)
+ */
+ public void link(CCTask task, File outputFile, String[] sourceFiles,
+ CommandLineLinkerConfiguration config) throws BuildException {
+ this.task = task;
+ this.outputFile = outputFile;
+ if (isADatasetLinker) {
+ int p = outputFile.getName().indexOf(".");
+ if (p >= 0) {
+ String newname = outputFile.getName().substring(0, p);
+ outputFile = new File(outputFile.getParent(), newname);
+ }
+ }
+ super.link(task, outputFile, sourceFiles, config);
+ }
+ /*
+ * @see CommandLineLinker#runCommand(Task, File, String[])
+ */
+ protected int runCommand(CCTask task, File workingDir, String[] cmdline)
+ throws BuildException {
+ int rc = super.runCommand(task, workingDir, cmdline);
+ // create the .xds file if everything was ok.
+ if (rc == 0) {
+ try {
+ outputFile.delete();
+ new FileOutputStream(outputFile).close();
+ } catch (IOException e) {
+ throw new BuildException(e.getMessage());
+ }
+ }
+ return rc;
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ String[] baseNames = super.getOutputFileNames(baseName, versionInfo);
+ if (outputPrefix.length() > 0) {
+ for(int i = 0; i < baseNames.length; i++) {
+ baseNames[i] = outputPrefix + baseNames[i];
+ }
+ }
+ return baseNames;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/os400/IccProcessor.java b/src/net/sf/antcontrib/cpptasks/os400/IccProcessor.java
new file mode 100644
index 0000000..f15aa8b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/os400/IccProcessor.java
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.os400;
+import java.util.Vector;
+/**
+ * A add-in class for IBM (r) OS/390 compilers and linkers
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class IccProcessor {
+ public static void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ /*
+ * case 0: args.addElement("/W0"); break;
+ *
+ * case 1: args.addElement("/W1"); break;
+ *
+ * case 2: break;
+ *
+ * case 3: args.addElement("/W3"); break;
+ *
+ * case 4: args.addElement("/W4"); break;
+ */
+ }
+ }
+ public static String getCommandFileSwitch(String cmdFile) {
+ StringBuffer buf = new StringBuffer("@");
+ if (cmdFile.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(cmdFile);
+ buf.append('\"');
+ } else {
+ buf.append(cmdFile);
+ }
+ return buf.toString();
+ }
+ public static String getIncludeDirSwitch(String includeDir) {
+ return "-I" + includeDir;
+ }
+ public static String[] getOutputFileSwitch(String outPath) {
+ StringBuffer buf = new StringBuffer("-o ");
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ String[] retval = new String[]{buf.toString()};
+ return retval;
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ private IccProcessor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/package.html b/src/net/sf/antcontrib/cpptasks/package.html
new file mode 100644
index 0000000..fba9d80
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+C++ and other compiled languages build support for Ant.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/parser/AbstractParser.java b/src/net/sf/antcontrib/cpptasks/parser/AbstractParser.java
new file mode 100644
index 0000000..b9bca25
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/AbstractParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+import java.io.IOException;
+import java.io.Reader;
+/**
+ * An abstract base class for simple parsers
+ *
+ * @author Curt Arnold
+ */
+public abstract class AbstractParser {
+ /**
+ *
+ *
+ */
+ protected AbstractParser() {
+ }
+ protected abstract void addFilename(String filename);
+ public abstract AbstractParserState getNewLineState();
+ protected void parse(Reader reader) throws IOException {
+ char[] buf = new char[4096];
+ AbstractParserState newLineState = getNewLineState();
+ AbstractParserState state = newLineState;
+ int charsRead = -1;
+ do {
+ charsRead = reader.read(buf, 0, buf.length);
+ if (state == null) {
+ for (int i = 0; i < charsRead; i++) {
+ if (buf[i] == '\n') {
+ state = newLineState;
+ break;
+ }
+ }
+ }
+ if (state != null) {
+ for (int i = 0; i < charsRead; i++) {
+ state = state.consume(buf[i]);
+ //
+ // didn't match a production, skip to a new line
+ //
+ if (state == null) {
+ for (; i < charsRead; i++) {
+ if (buf[i] == '\n') {
+ state = newLineState;
+ break;
+ }
+ }
+ }
+ }
+ }
+ } while (charsRead >= 0);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/AbstractParserState.java b/src/net/sf/antcontrib/cpptasks/parser/AbstractParserState.java
new file mode 100644
index 0000000..b3e3307
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/AbstractParserState.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+/**
+ * An base class for objects that represent the state of an AbstractParser.
+ *
+ * @author CurtArnold
+ * @see AbstractParser
+ */
+public abstract class AbstractParserState {
+ private AbstractParser parser;
+ protected AbstractParserState(AbstractParser parser) {
+ if (parser == null) {
+ throw new NullPointerException("parser");
+ }
+ this.parser = parser;
+ }
+ /**
+ * Consume a character
+ *
+ * @return new state, may be null to ignore the rest of the line
+ */
+ public abstract AbstractParserState consume(char ch);
+ protected AbstractParser getParser() {
+ return parser;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/BranchState.java b/src/net/sf/antcontrib/cpptasks/parser/BranchState.java
new file mode 100644
index 0000000..4b869e0
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/BranchState.java
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+public class BranchState extends AbstractParserState {
+ private char[] branchChars;
+ private AbstractParserState[] branchStates;
+ private AbstractParserState noMatchState;
+ public BranchState(AbstractParser parser, char[] branchChars,
+ AbstractParserState[] branchStates, AbstractParserState noMatchState) {
+ super(parser);
+ this.branchChars = (char[]) branchChars.clone();
+ this.branchStates = (AbstractParserState[]) branchStates.clone();
+ this.noMatchState = noMatchState;
+ }
+ public AbstractParserState consume(char ch) {
+ AbstractParserState state;
+ for (int i = 0; i < branchChars.length; i++) {
+ if (ch == branchChars[i]) {
+ state = branchStates[i];
+ return state.consume(ch);
+ }
+ }
+ state = getNoMatchState();
+ if (state != null) {
+ return state.consume(ch);
+ }
+ return state;
+ }
+ protected AbstractParserState getNoMatchState() {
+ return noMatchState;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/CParser.java b/src/net/sf/antcontrib/cpptasks/parser/CParser.java
new file mode 100644
index 0000000..d10d889
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/CParser.java
@@ -0,0 +1,78 @@
+/*
+ *
+ * Copyright 2002-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Vector;
+/**
+ * A parser that extracts #include statements from a Reader.
+ *
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public final class CParser extends AbstractParser implements Parser {
+ private final Vector includes = new Vector();
+ private AbstractParserState newLineState;
+ /**
+ *
+ *
+ */
+ public CParser() {
+ AbstractParserState quote = new FilenameState(this, new char[]{'"'});
+ AbstractParserState bracket = new FilenameState(this, new char[]{'>'});
+ AbstractParserState postE = new PostE(this, bracket, quote);
+ //
+ // nclude
+ //
+ AbstractParserState e = new LetterState(this, 'e', postE, null);
+ AbstractParserState d = new LetterState(this, 'd', e, null);
+ AbstractParserState u = new LetterState(this, 'u', d, null);
+ AbstractParserState l = new LetterState(this, 'l', u, null);
+ AbstractParserState c = new LetterState(this, 'c', l, null);
+ AbstractParserState n = new LetterState(this, 'n', c, null);
+ //
+ // mport is equivalent to nclude
+ //
+ AbstractParserState t = new LetterState(this, 't', postE, null);
+ AbstractParserState r = new LetterState(this, 'r', t, null);
+ AbstractParserState o = new LetterState(this, 'o', r, null);
+ AbstractParserState p = new LetterState(this, 'p', o, null);
+ AbstractParserState m = new LetterState(this, 'm', p, null);
+ //
+ // switch between
+ //
+ AbstractParserState n_m = new BranchState(this, new char[]{'n', 'm'},
+ new AbstractParserState[]{n, m}, null);
+ AbstractParserState i = new WhitespaceOrLetterState(this, 'i', n_m);
+ newLineState = new WhitespaceOrLetterState(this, '#', i);
+ }
+ public void addFilename(String include) {
+ includes.addElement(include);
+ }
+ public String[] getIncludes() {
+ String[] retval = new String[includes.size()];
+ includes.copyInto(retval);
+ return retval;
+ }
+ public AbstractParserState getNewLineState() {
+ return newLineState;
+ }
+ public void parse(Reader reader) throws IOException {
+ includes.setSize(0);
+ super.parse(reader);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/CVS/Entries b/src/net/sf/antcontrib/cpptasks/parser/CVS/Entries
new file mode 100644
index 0000000..67699c9
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/CVS/Entries
@@ -0,0 +1,14 @@
+/AbstractParser.java/1.7/Sat Feb 28 19:02:48 2004//
+/AbstractParserState.java/1.6/Sat Feb 28 19:02:48 2004//
+/BranchState.java/1.7/Sat Feb 28 19:02:48 2004//
+/CParser.java/1.9/Mon Aug 15 13:58:27 2005//
+/CaseInsensitiveLetterState.java/1.1/Mon Mar 1 05:11:01 2004//
+/FilenameState.java/1.6/Sat Feb 28 19:02:48 2004//
+/FortranParser.java/1.7/Mon Mar 1 05:11:01 2004//
+/LetterState.java/1.7/Mon Mar 1 05:11:01 2004//
+/Parser.java/1.6/Sat Feb 28 19:02:48 2004//
+/PostE.java/1.6/Sat Feb 28 19:02:48 2004//
+/WhitespaceOrCaseInsensitiveLetterState.java/1.1/Mon Mar 1 05:11:01 2004//
+/WhitespaceOrLetterState.java/1.7/Mon Mar 1 05:11:01 2004//
+/package.html/1.1/Fri Apr 16 04:04:11 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/parser/CVS/Repository b/src/net/sf/antcontrib/cpptasks/parser/CVS/Repository
new file mode 100644
index 0000000..102547a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/parser
diff --git a/src/net/sf/antcontrib/cpptasks/parser/CVS/Root b/src/net/sf/antcontrib/cpptasks/parser/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/parser/CaseInsensitiveLetterState.java b/src/net/sf/antcontrib/cpptasks/parser/CaseInsensitiveLetterState.java
new file mode 100644
index 0000000..edcfe83
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/CaseInsensitiveLetterState.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+/**
+ * This parser state checks consumed characters against a specific character
+ * (case insensitive).
+ *
+ * @author Curt Arnold
+ */
+public final class CaseInsensitiveLetterState
+ extends AbstractParserState {
+ /**
+ * Next state if a match is found.
+ */
+ private final AbstractParserState nextState;
+
+ /**
+ * Next state if not match is found.
+ */
+ private final AbstractParserState noMatchState;
+
+ /**
+ * Lower case version of character to match.
+ */
+ private final char lowerLetter;
+
+ /**
+ * Lower case version of character to match.
+ */
+ private final char upperLetter;
+
+ /**
+ * Constructor.
+ *
+ * @param parser
+ * parser
+ * @param matchLetter
+ * letter to match
+ * @param nextStateArg
+ * next state if a match on the letter
+ * @param noMatchStateArg
+ * state if no match on letter
+ */
+ public CaseInsensitiveLetterState(final AbstractParser parser,
+ final char matchLetter,
+ final AbstractParserState nextStateArg,
+ final AbstractParserState noMatchStateArg) {
+ super(parser);
+ this.lowerLetter = Character.toLowerCase(matchLetter);
+ this.upperLetter = Character.toUpperCase(matchLetter);
+ this.nextState = nextStateArg;
+ this.noMatchState = noMatchStateArg;
+ }
+
+ /**
+ * Consumes a character and returns the next state for the parser.
+ *
+ * @param ch
+ * next character
+ * @return the configured nextState if ch is the expected character or the
+ * configure noMatchState otherwise.
+ */
+ public AbstractParserState consume(final char ch) {
+ if (ch == lowerLetter || ch == upperLetter) {
+ return nextState;
+ }
+ if (ch == '\n') {
+ getParser().getNewLineState();
+ }
+ return noMatchState;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/FilenameState.java b/src/net/sf/antcontrib/cpptasks/parser/FilenameState.java
new file mode 100644
index 0000000..f3a6193
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/FilenameState.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+public class FilenameState extends AbstractParserState {
+ private final StringBuffer buf = new StringBuffer();
+ private final char[] terminators;
+ public FilenameState(AbstractParser parser, char[] terminators) {
+ super(parser);
+ this.terminators = (char[]) terminators.clone();
+ }
+ public AbstractParserState consume(char ch) {
+ for (int i = 0; i < terminators.length; i++) {
+ if (ch == terminators[i]) {
+ getParser().addFilename(buf.toString());
+ buf.setLength(0);
+ return null;
+ }
+ }
+ if (ch == '\n') {
+ buf.setLength(0);
+ return getParser().getNewLineState();
+ } else {
+ buf.append(ch);
+ }
+ return this;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/FortranParser.java b/src/net/sf/antcontrib/cpptasks/parser/FortranParser.java
new file mode 100644
index 0000000..d393e65
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/FortranParser.java
@@ -0,0 +1,106 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Vector;
+
+/**
+ * A parser that extracts INCLUDE statements from a Reader.
+ *
+ * @author Curt Arnold
+ */
+public final class FortranParser
+ extends AbstractParser
+ implements Parser {
+ /**
+ * List of included filenames.
+ */
+ private final Vector includes = new Vector();
+
+ /**
+ * State that starts consuming content at the beginning of a line.
+ */
+ private final AbstractParserState newLineState;
+
+ /**
+ * Default constructor.
+ *
+ */
+ public FortranParser() {
+ AbstractParserState filename = new FilenameState(this, new char[] {'\'',
+ '/'});
+ AbstractParserState apos = new WhitespaceOrLetterState(this, '\'',
+ filename);
+ AbstractParserState blank = new LetterState(this, ' ', apos, null);
+ AbstractParserState e = new CaseInsensitiveLetterState(this, 'E',
+ blank, null);
+ AbstractParserState d = new CaseInsensitiveLetterState(this, 'D', e,
+ null);
+ AbstractParserState u = new CaseInsensitiveLetterState(this, 'U', d,
+ null);
+ AbstractParserState l = new CaseInsensitiveLetterState(this, 'L', u,
+ null);
+ AbstractParserState c = new CaseInsensitiveLetterState(this, 'C', l,
+ null);
+ AbstractParserState n = new CaseInsensitiveLetterState(this, 'N', c,
+ null);
+ newLineState = new WhitespaceOrCaseInsensitiveLetterState(this, 'I', n);
+ }
+
+ /**
+ * Called by FilenameState at completion of file name production.
+ *
+ * @param include
+ * include file name
+ */
+ public void addFilename(final String include) {
+ includes.addElement(include);
+ }
+
+ /**
+ * Gets collection of include file names encountered in parse.
+ * @return include file names
+ */
+ public String[] getIncludes() {
+ String[] retval = new String[includes.size()];
+ includes.copyInto(retval);
+ return retval;
+ }
+
+ /**
+ * Get the state for the beginning of a new line.
+ * @return start of line state
+ */
+ public AbstractParserState getNewLineState() {
+ return newLineState;
+ }
+
+ /**
+ * Collects all included files from the content of the reader.
+ *
+ * @param reader
+ * character reader containing a FORTRAN source module
+ * @throws IOException
+ * throw if I/O error during parse
+ */
+ public void parse(final Reader reader) throws IOException {
+ includes.setSize(0);
+ super.parse(reader);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/LetterState.java b/src/net/sf/antcontrib/cpptasks/parser/LetterState.java
new file mode 100644
index 0000000..fc62f9b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/LetterState.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+/**
+ * This parser state checks consumed characters against a specific character.
+ *
+ * @author Curt Arnold
+ */
+public final class LetterState
+ extends AbstractParserState {
+ /**
+ * Next state if a match is found.
+ */
+ private final AbstractParserState nextState;
+
+ /**
+ * Next state if not match is found.
+ */
+ private final AbstractParserState noMatchState;
+
+ /**
+ * Character to match.
+ */
+ private final char thisLetter;
+
+ /**
+ * Constructor.
+ *
+ * @param parser
+ * parser
+ * @param matchLetter
+ * letter to match
+ * @param nextStateArg
+ * next state if a match on the letter
+ * @param noMatchStateArg
+ * state if no match on letter
+ */
+ public LetterState(final AbstractParser parser,
+ final char matchLetter,
+ final AbstractParserState nextStateArg,
+ final AbstractParserState noMatchStateArg) {
+ super(parser);
+ this.thisLetter = matchLetter;
+ this.nextState = nextStateArg;
+ this.noMatchState = noMatchStateArg;
+ }
+
+ /**
+ * Consumes a character and returns the next state for the parser.
+ *
+ * @param ch
+ * next character
+ * @return the configured nextState if ch is the expected character or the
+ * configure noMatchState otherwise.
+ */
+ public AbstractParserState consume(final char ch) {
+ if (ch == thisLetter) {
+ return nextState;
+ }
+ if (ch == '\n') {
+ getParser().getNewLineState();
+ }
+ return noMatchState;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/Parser.java b/src/net/sf/antcontrib/cpptasks/parser/Parser.java
new file mode 100644
index 0000000..bf63ae7
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/Parser.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+import java.io.IOException;
+import java.io.Reader;
+/**
+ * A parser that extracts #include statements from a Reader.
+ *
+ * @author Curt Arnold
+ */
+public interface Parser {
+ String[] getIncludes();
+ void parse(Reader reader) throws IOException;
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/PostE.java b/src/net/sf/antcontrib/cpptasks/parser/PostE.java
new file mode 100644
index 0000000..d599f19
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/PostE.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+public class PostE extends AbstractParserState {
+ private AbstractParserState bracket;
+ private AbstractParserState quote;
+ public PostE(CParser parser, AbstractParserState bracket,
+ AbstractParserState quote) {
+ super(parser);
+ this.bracket = bracket;
+ this.quote = quote;
+ }
+ public AbstractParserState consume(char ch) {
+ switch (ch) {
+ case ' ' :
+ case '\t' :
+ return this;
+ case '<' :
+ return bracket;
+ case '"' :
+ return quote;
+ case '\n' :
+ return getParser().getNewLineState();
+ }
+ return null;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrCaseInsensitiveLetterState.java b/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrCaseInsensitiveLetterState.java
new file mode 100644
index 0000000..f7cbcea
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrCaseInsensitiveLetterState.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+/**
+ * This parser state checks consumed characters against a specific character
+ * (case insensitive) or whitespace.
+ *
+ * @author Curt Arnold
+ */
+public final class WhitespaceOrCaseInsensitiveLetterState
+ extends
+ AbstractParserState {
+ /**
+ * Next state if the character is found.
+ */
+ private final AbstractParserState nextState;
+
+ /**
+ * Character to match (lower case).
+ */
+ private final char lowerLetter;
+
+ /**
+ * Character to match (upper case).
+ */
+ private final char upperLetter;
+
+ /**
+ * Constructor.
+ *
+ * @param parser
+ * parser
+ * @param matchLetter
+ * letter to match
+ * @param nextStateArg
+ * next state if a match on the letter
+ */
+ public WhitespaceOrCaseInsensitiveLetterState(final AbstractParser parser,
+ final char matchLetter,
+ final AbstractParserState
+ nextStateArg) {
+ super(parser);
+ this.lowerLetter = Character.toLowerCase(matchLetter);
+ this.upperLetter = Character.toUpperCase(matchLetter);
+ this.nextState = nextStateArg;
+ }
+
+ /**
+ * Consumes a character and returns the next state for the parser.
+ *
+ * @param ch
+ * next character
+ * @return the configured nextState if ch is the expected character or the
+ * configure noMatchState otherwise.
+ */
+ public AbstractParserState consume(final char ch) {
+ if (ch == lowerLetter || ch == upperLetter) {
+ return nextState;
+ }
+ if (ch == ' ' || ch == '\t') {
+ return this;
+ }
+ if (ch == '\n') {
+ getParser().getNewLineState();
+ }
+ return null;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrLetterState.java b/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrLetterState.java
new file mode 100644
index 0000000..61c133d
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/WhitespaceOrLetterState.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+/**
+ * This parser state checks consumed characters against a specific character or
+ * whitespace.
+ *
+ * @author Curt Arnold
+ */
+public final class WhitespaceOrLetterState
+ extends AbstractParserState {
+ /**
+ * Next state if the character is found.
+ */
+ private final AbstractParserState nextState;
+
+ /**
+ * Character to match.
+ */
+ private final char thisLetter;
+
+ /**
+ * Constructor.
+ *
+ * @param parser
+ * parser
+ * @param matchLetter
+ * letter to match
+ * @param nextStateArg
+ * next state if a match on the letter
+ */
+ public WhitespaceOrLetterState(final AbstractParser parser,
+ final char matchLetter,
+ final AbstractParserState nextStateArg) {
+ super(parser);
+ this.thisLetter = matchLetter;
+ this.nextState = nextStateArg;
+ }
+
+ /**
+ * Consumes a character and returns the next state for the parser.
+ *
+ * @param ch
+ * next character @returns the configured nextState if ch is the
+ * expected character or the configure noMatchState otherwise.
+ * @return next state
+ */
+ public AbstractParserState consume(final char ch) {
+ if (ch == thisLetter) {
+ return nextState;
+ }
+ if (ch == ' ' || ch == '\t') {
+ return this;
+ }
+ if (ch == '\n') {
+ getParser().getNewLineState();
+ }
+ return null;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/parser/package.html b/src/net/sf/antcontrib/cpptasks/parser/package.html
new file mode 100644
index 0000000..1d7aa49
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/parser/package.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Provides minimal scanners to extract dependencies,
+such as include statements, from source files.
+
+</body>
+</html>
diff --git a/src/net/sf/antcontrib/cpptasks/platforms/CVS/Entries b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Entries
new file mode 100644
index 0000000..d8385c4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Entries
@@ -0,0 +1,3 @@
+/WindowsPlatform.java/1.2/Fri May 21 01:35:58 2004//
+/package.html/1.1/Tue May 11 03:50:13 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/platforms/CVS/Repository b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Repository
new file mode 100644
index 0000000..bacc0be
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/platforms
diff --git a/src/net/sf/antcontrib/cpptasks/platforms/CVS/Root b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/platforms/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java b/src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java
new file mode 100644
index 0000000..f16f94e
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java
@@ -0,0 +1,364 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.platforms;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.TargetMatcher;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+
+
+/**
+ * Platform specific behavior for Microsoft Windows.
+ *
+ * @author Curt Arnold
+ */
+public final class WindowsPlatform {
+
+ /**
+ * Constructor.
+ */
+ private WindowsPlatform() {
+ }
+ /**
+ * Adds source or object files to the bidded fileset to
+ * support version information.
+ *
+ * @param versionInfo version information
+ * @param linkType link type
+ * @param isDebug true if debug build
+ * @param outputFile name of generated executable
+ * @param objDir directory for generated files
+ * @param matcher bidded fileset
+ * @throws IOException if unable to write version resource
+ */
+ public static void addVersionFiles(final VersionInfo versionInfo,
+ final LinkType linkType,
+ final File outputFile,
+ final boolean isDebug,
+ final File objDir,
+ final TargetMatcher matcher)
+ throws IOException {
+ if (versionInfo == null) {
+ throw new NullPointerException("versionInfo");
+ }
+ if (linkType == null) {
+ throw new NullPointerException("linkType");
+ }
+ if (outputFile == null) {
+ throw new NullPointerException("outputFile");
+ }
+ if (objDir == null) {
+ throw new NullPointerException("objDir");
+ }
+
+ /**
+ * Fully resolve version info
+ */
+ VersionInfo mergedInfo = versionInfo.merge();
+
+ File versionResource = new File(objDir, "versioninfo.rc");
+
+ boolean notChanged = false;
+ //
+ // if the resource exists
+ //
+ if (versionResource.exists()) {
+ ByteArrayOutputStream memStream = new ByteArrayOutputStream();
+ Writer writer = new BufferedWriter(new OutputStreamWriter(memStream));
+ writeResource(writer, mergedInfo, outputFile, isDebug, linkType);
+ writer.close();
+ ByteArrayInputStream proposedResource = new ByteArrayInputStream(
+ memStream.toByteArray());
+
+ InputStream existingResource = new FileInputStream(versionResource);
+ //
+ //
+ //
+ notChanged = hasSameContent(proposedResource, existingResource);
+ existingResource.close();
+ }
+
+ //
+ // if the resource file did not exist or will be changed then
+ // write the file
+ //
+ if (!notChanged) {
+ Writer writer = new BufferedWriter(
+ new OutputStreamWriter(
+ new FileOutputStream(versionResource)));
+ writeResource(writer, mergedInfo, outputFile, isDebug, linkType);
+ writer.close();
+ }
+ if (matcher != null) {
+ matcher.visit(new File(versionResource.getParent()),
+ versionResource.getName());
+ }
+
+ }
+
+ /**
+ * Compare two input streams for duplicate content
+ *
+ * Naive implementation, but should not be performance issue.
+ * @param stream1 stream
+ * @param stream2 stream
+ * @return true if streams are identical in content
+ * @throws IOException if error reading streams
+ */
+ private static boolean hasSameContent(final InputStream stream1,
+ final InputStream stream2)
+ throws IOException {
+ int byte1 = -1;
+ int byte2 = -1;
+ do {
+ byte1 = stream1.read();
+ byte2 = stream2.read();
+
+ }
+ while (byte1 == byte2 && byte1 != -1);
+ return (byte1 == byte2);
+ }
+
+
+ /**
+ * Parse version string into array of four short values.
+ * @param version String version
+ * @return short[] four element array
+ */
+ public static short[] parseVersion(final String version) {
+ short[] values = new short[] {
+ 0, 0, 0, 0};
+ if (version != null) {
+ StringBuffer buf = new StringBuffer(version);
+ int start = 0;
+ for (int i = 0; i < 4; i++) {
+ int end = version.indexOf('.', start);
+ if (end <= 0) {
+ end = version.length();
+ for (int j = end; j > start; j--) {
+ String part = buf.substring(start, end);
+ try {
+ values[i] = Short.parseShort(part);
+ break;
+ } catch (NumberFormatException ex) {
+ values[i] = 0;
+ }
+ }
+ break;
+ } else {
+ String part = buf.substring(start, end);
+ try {
+ values[i] = Short.parseShort(part);
+ start = end + 1;
+ } catch (NumberFormatException ex) {
+ break;
+ }
+ }
+ }
+ }
+ return values;
+ }
+
+ /**
+ * Converts parsed version information into a string representation.
+ *
+ * @param buf StringBuffer string buffer to receive version number
+ * @param version short[] four-element array
+ */
+ private static void encodeVersion(final StringBuffer buf,
+ final short[] version) {
+ for (int i = 0; i < 3; i++) {
+ buf.append(Short.toString(version[i]));
+ buf.append(',');
+ }
+ buf.append(Short.toString(version[3]));
+ }
+
+ /**
+ * Writes windows resource.
+ * @param writer writer, may not be nul
+ * @param versionInfo version information
+ * @param outputFile executable file
+ * @param isDebug true if debug
+ * @param linkType link type
+ * @throws IOException if error writing resource file
+ */
+ public static void writeResource(final Writer writer,
+ final VersionInfo versionInfo,
+ final File outputFile,
+ final boolean isDebug,
+ final LinkType linkType) throws IOException {
+
+ //writer.write("#include \"windows.h\"\n");
+
+ writer.write("VS_VERSION_INFO VERSIONINFO\n");
+ StringBuffer buf = new StringBuffer("FILEVERSION ");
+ encodeVersion(buf, parseVersion(versionInfo.getFileversion()));
+ buf.append("\nPRODUCTVERSION ");
+ encodeVersion(buf, parseVersion(versionInfo.getProductversion()));
+ buf.append("\n");
+ writer.write(buf.toString());
+ buf.setLength(0);
+ buf.append("FILEFLAGSMASK 0x1L /* VS_FF_DEBUG */");
+ Boolean patched = versionInfo.getPatched();
+ Boolean prerelease = versionInfo.getPrerelease();
+ if (patched != null) {
+ buf.append(" | 0x4L /* VS_FF_PATCHED */");
+ }
+ if (prerelease != null) {
+ buf.append(" | 0x2L /* VS_FF_PRERELEASE */");
+ }
+ if (versionInfo.getPrivatebuild() != null) {
+ buf.append(" | 0x8L /* VS_FF_PRIVATEBUILD */");
+ }
+ if (versionInfo.getSpecialbuild() != null) {
+ buf.append(" | 0x20L /* VS_FF_SPECIALBUILD */");
+ }
+ buf.append('\n');
+ writer.write(buf.toString());
+ buf.setLength(0);
+ buf.append("FILEFLAGS ");
+
+ if (isDebug) {
+ buf.append("0x1L /* VS_FF_DEBUG */ | ");
+ }
+ if (Boolean.TRUE.equals(patched)) {
+ buf.append("0x4L /* VS_FF_PATCHED */ | ");
+ }
+ if (Boolean.TRUE.equals(prerelease)) {
+ buf.append("0x2L /* VS_FF_PRERELEASE */ | ");
+ }
+ if (Boolean.TRUE.equals(versionInfo.getPrivatebuild())) {
+ buf.append("0x8L /* VS_FF_PRIVATEBUILD */ | ");
+ }
+ if (Boolean.TRUE.equals(versionInfo.getSpecialbuild())) {
+ buf.append("0x20L /* VS_FF_SPECIALBUILD */ | ");
+ }
+ if (buf.length() > 10) {
+ buf.setLength(buf.length() - 3);
+ buf.append('\n');
+ } else {
+ buf.append("0\n");
+ }
+ writer.write(buf.toString());
+ buf.setLength(0);
+
+ writer.write("FILEOS 0x40004 /* VOS_NT_WINDOWS32 */\nFILETYPE ");
+ if (linkType.isExecutable()) {
+ writer.write("0x1L /* VFT_APP */\n");
+ } else {
+ if (linkType.isSharedLibrary()) {
+ writer.write("0x2L /* VFT_DLL */\n");
+ } else if (linkType.isStaticLibrary()) {
+ writer.write("0x7L /* VFT_STATIC_LIB */\n");
+ } else {
+ writer.write("0x0L /* VFT_UNKNOWN */\n");
+ }
+ }
+ writer.write("FILESUBTYPE 0x0L\n");
+ writer.write("BEGIN\n");
+ writer.write("BLOCK \"StringFileInfo\"\n");
+ writer.write(" BEGIN\n#ifdef UNICODE\nBLOCK \"040904B0\"\n");
+ writer.write("#else\nBLOCK \"040904E4\"\n#endif\n");
+ writer.write("BEGIN\n");
+ if (versionInfo.getFilecomments() != null) {
+ writer.write("VALUE \"Comments\", \"");
+ writer.write(versionInfo.getFilecomments());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getCompanyname() != null) {
+ writer.write("VALUE \"CompanyName\", \"");
+ writer.write(versionInfo.getCompanyname());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getFiledescription() != null) {
+ writer.write("VALUE \"FileDescription\", \"");
+ writer.write(versionInfo.getFiledescription());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getFileversion() != null) {
+ writer.write("VALUE \"FileVersion\", \"");
+ writer.write(versionInfo.getFileversion());
+ writer.write("\\0\"\n");
+ }
+ String baseName = CUtil.getBasename(outputFile);
+ String internalName = versionInfo.getInternalname();
+ if (internalName == null) {
+ internalName = baseName;
+ }
+ writer.write("VALUE \"InternalName\", \"");
+ writer.write(internalName);
+ writer.write("\\0\"\n");
+ if (versionInfo.getLegalcopyright() != null) {
+ writer.write("VALUE \"LegalCopyright\", \"");
+ writer.write(versionInfo.getLegalcopyright());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getLegaltrademarks() != null) {
+ writer.write("VALUE \"LegalTrademarks\", \"");
+ writer.write(versionInfo.getLegaltrademarks());
+ writer.write("\\0\"\n");
+ }
+ writer.write("VALUE \"OriginalFilename\", \"");
+ writer.write(baseName);
+ writer.write("\\0\"\n");
+ if (versionInfo.getPrivatebuild() != null) {
+ writer.write("VALUE \"PrivateBuild\", \"");
+ writer.write(versionInfo.getPrivatebuild());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getProductname() != null) {
+ writer.write("VALUE \"ProductName\", \"");
+ writer.write(versionInfo.getProductname());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getProductversion() != null) {
+ writer.write("VALUE \"ProductVersion\", \"");
+ writer.write(versionInfo.getProductversion());
+ writer.write("\\0\"\n");
+ }
+ if (versionInfo.getSpecialbuild() != null) {
+ writer.write("VALUE \"SpecialBuild\", \"");
+ writer.write(versionInfo.getSpecialbuild());
+ writer.write("\\0\"\n");
+ }
+ writer.write("END\n");
+ writer.write("END\n");
+
+ writer.write("BLOCK \"VarFileInfo\"\n");
+ writer.write("BEGIN\n#ifdef UNICODE\n");
+ writer.write("VALUE \"Translation\", 0x409, 1200\n");
+ writer.write("#else\n");
+ writer.write("VALUE \"Translation\", 0x409, 1252\n");
+ writer.write("#endif\n");
+ writer.write("END\n");
+ writer.write("END\n");
+ }
+
+}
diff --git a/src/net/sf/antcontrib/cpptasks/platforms/package.html b/src/net/sf/antcontrib/cpptasks/platforms/package.html
new file mode 100644
index 0000000..e054c41
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/platforms/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Platform specific utilities.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/sun/C89CCompiler.java b/src/net/sf/antcontrib/cpptasks/sun/C89CCompiler.java
new file mode 100644
index 0000000..4ac8ac1
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/C89CCompiler.java
@@ -0,0 +1,108 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.AbstractCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for the Sun C89 C++ Compiler
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class C89CCompiler extends CommandLineCCompiler {
+ private static final AbstractCompiler instance = new C89CCompiler(false,
+ null);
+ public static AbstractCompiler getInstance() {
+ return instance;
+ }
+ private C89CCompiler(boolean newEnvironment, Environment env) {
+ super("c89", null, new String[]{".c", ".cc", ".cpp", ".cxx", ".c++"},
+ new String[]{".h", ".hpp"}, ".o", false, null, newEnvironment,
+ env);
+ }
+ protected void addImpliedArgs(
+ final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ // Specifies that only compilations and assemblies be done.
+ args.addElement("-c");
+ /*
+ * if (exceptions) { args.addElement("/GX"); }
+ */
+ if (debug) {
+ args.addElement("-g");
+ args.addElement("-D_DEBUG");
+ /*
+ * if (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MTd"); } else { args.addElement("/MDd");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/MLd"); }
+ */
+ } else {
+ args.addElement("-DNDEBUG");
+ /*
+ * if (multithreaded) { args.addElement("/D_MT"); if (staticLink) {
+ * args.addElement("/MT"); } else { args.addElement("/MD");
+ * args.addElement("/D_DLL"); } } else { args.addElement("/ML"); }
+ */
+ }
+ }
+ protected void addWarningSwitch(Vector args, int level) {
+ C89Processor.addWarningSwitch(args, level);
+ }
+ public Processor changeEnvironment(boolean newEnvironment, Environment env) {
+ if (newEnvironment || env != null) {
+ return new C89CCompiler(newEnvironment, env);
+ }
+ return this;
+ }
+ protected void getDefineSwitch(StringBuffer buf, String define, String value) {
+ C89Processor.getDefineSwitch(buf, define, value);
+ }
+ protected File[] getEnvironmentIncludePath() {
+ return CUtil.getPathFromEnvironment("INCLUDE", ":");
+ }
+ protected String getIncludeDirSwitch(String includeDir) {
+ return C89Processor.getIncludeDirSwitch(includeDir);
+ }
+ public Linker getLinker(LinkType type) {
+ return C89Linker.getInstance().getLinker(type);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ /* Only compile one file at time for now */
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+ protected void getUndefineSwitch(StringBuffer buf, String define) {
+ C89Processor.getUndefineSwitch(buf, define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/C89Linker.java b/src/net/sf/antcontrib/cpptasks/sun/C89Linker.java
new file mode 100644
index 0000000..6c41c89
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/C89Linker.java
@@ -0,0 +1,132 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+/**
+ * Adapter for the Sun C89 Linker
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public final class C89Linker extends CommandLineLinker {
+ private static final C89Linker dllLinker = new C89Linker("lib", ".so");
+ private static final C89Linker instance = new C89Linker("", "");
+ public static C89Linker getInstance() {
+ return instance;
+ }
+ private String outputPrefix;
+ private C89Linker(String outputPrefix, String outputSuffix) {
+ super("ld", "/bogus", new String[]{".o", ".a", ".lib", ".x"},
+ new String[]{}, outputSuffix, false, null);
+ this.outputPrefix = outputPrefix;
+ }
+ protected void addBase(long base, Vector args) {
+ }
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-G");
+ }
+ }
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ public String[] addLibrarySets(CCTask task, LibrarySet[] libsets,
+ Vector preargs, Vector midargs, Vector endargs) {
+ super.addLibrarySets(task, libsets, preargs, midargs, endargs);
+ StringBuffer buf = new StringBuffer("-l");
+ for (int i = 0; i < libsets.length; i++) {
+ LibrarySet set = libsets[i];
+ File libdir = set.getDir(null);
+ String[] libs = set.getLibs();
+ if (libdir != null) {
+ endargs.addElement("-L");
+ endargs.addElement(libdir.getAbsolutePath());
+ }
+ for (int j = 0; j < libs.length; j++) {
+ //
+ // reset the buffer to just "-l"
+ //
+ buf.setLength(2);
+ //
+ // add the library name
+ buf.append(libs[j]);
+ //
+ // add the argument to the list
+ endargs.addElement(buf.toString());
+ }
+ }
+ return null;
+ }
+ protected void addMap(boolean map, Vector args) {
+ }
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ public String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ public File[] getLibraryPath() {
+ return CUtil.getPathFromEnvironment("LIB", ";");
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return C89Processor.getLibraryPatterns(libnames, libType);
+ }
+ public Linker getLinker(LinkType linkType) {
+ if (linkType.isSharedLibrary()) {
+ return dllLinker;
+ }
+ /*
+ * if(linkType.isStaticLibrary()) { return
+ * OS390Librarian.getInstance(); }
+ */
+ return instance;
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ String[] baseNames = super.getOutputFileNames(baseName, versionInfo);
+ if (outputPrefix.length() > 0) {
+ for(int i = 0; i < baseNames.length; i++) {
+ baseNames[i] = outputPrefix + baseNames[i];
+ }
+ }
+ return baseNames;
+ }
+ public String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-o", outputFile};
+ }
+ public boolean isCaseSensitive() {
+ return C89Processor.isCaseSensitive();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/C89Processor.java b/src/net/sf/antcontrib/cpptasks/sun/C89Processor.java
new file mode 100644
index 0000000..343293a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/C89Processor.java
@@ -0,0 +1,116 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.util.Vector;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * A add-in class for Sun C89 compilers and linkers
+ *
+ * @author Hiram Chirino (cojonudo14@hotmail.com)
+ */
+public class C89Processor {
+ private static int addLibraryPatterns(String[] libnames, StringBuffer buf,
+ String prefix, String extension, String[] patterns, int offset) {
+ for (int i = 0; i < libnames.length; i++) {
+ buf.setLength(0);
+ buf.append(prefix);
+ buf.append(libnames[i]);
+ buf.append(extension);
+ patterns[offset + i] = buf.toString();
+ }
+ return offset + libnames.length;
+ }
+ public static void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ /*
+ * case 0: args.addElement("/W0"); break;
+ *
+ * case 1: args.addElement("/W1"); break;
+ *
+ * case 2: break;
+ *
+ * case 3: args.addElement("/W3"); break;
+ *
+ * case 4: args.addElement("/W4"); break;
+ */
+ }
+ }
+ public static String getCommandFileSwitch(String cmdFile) {
+ StringBuffer buf = new StringBuffer("@");
+ if (cmdFile.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(cmdFile);
+ buf.append('\"');
+ } else {
+ buf.append(cmdFile);
+ }
+ return buf.toString();
+ }
+ public static void getDefineSwitch(StringBuffer buf, String define,
+ String value) {
+ buf.setLength(0);
+ buf.append("-D");
+ buf.append(define);
+ if (value != null && value.length() > 0) {
+ buf.append('=');
+ buf.append(value);
+ }
+ }
+ public static String getIncludeDirSwitch(String includeDir) {
+ return "-I" + includeDir;
+ }
+ public static String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ StringBuffer buf = new StringBuffer();
+ int patternCount = libnames.length*2;
+ if (libType != null) {
+ patternCount = libnames.length;
+ }
+ String[] patterns = new String[patternCount];
+ int offset = 0;
+ if (libType == null || "static".equals(libType.getValue())) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".a", patterns, 0);
+ }
+ if (libType == null || !"static".equals(libType.getValue())) {
+ offset = addLibraryPatterns(libnames, buf, "lib", ".so", patterns,
+ offset);
+ }
+ return patterns;
+ }
+ public static String[] getOutputFileSwitch(String outPath) {
+ StringBuffer buf = new StringBuffer("-o ");
+ if (outPath.indexOf(' ') >= 0) {
+ buf.append('\"');
+ buf.append(outPath);
+ buf.append('\"');
+ } else {
+ buf.append(outPath);
+ }
+ String[] retval = new String[]{buf.toString()};
+ return retval;
+ }
+ public static void getUndefineSwitch(StringBuffer buf, String define) {
+ buf.setLength(0);
+ buf.append("-U");
+ buf.append(define);
+ }
+ public static boolean isCaseSensitive() {
+ return true;
+ }
+ private C89Processor() {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/CVS/Entries b/src/net/sf/antcontrib/cpptasks/sun/CVS/Entries
new file mode 100644
index 0000000..6bef4b3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/CVS/Entries
@@ -0,0 +1,6 @@
+/C89CCompiler.java/1.8/Fri Apr 23 20:15:49 2004//
+/C89Linker.java/1.10/Tue May 11 03:50:14 2004//
+/C89Processor.java/1.6/Wed Apr 21 21:48:41 2004//
+/ForteCCCompiler.java/1.12/Sat Apr 24 19:07:20 2004//
+/ForteCCLinker.java/1.11/Sat Apr 24 18:22:19 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/sun/CVS/Repository b/src/net/sf/antcontrib/cpptasks/sun/CVS/Repository
new file mode 100644
index 0000000..7372803
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/sun
diff --git a/src/net/sf/antcontrib/cpptasks/sun/CVS/Root b/src/net/sf/antcontrib/cpptasks/sun/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java b/src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java
new file mode 100644
index 0000000..2c37eff
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+/**
+ * Adapter for the Sun (r) Forte (tm) C++ compiler
+ *
+ * @author Curt Arnold
+ */
+public final class ForteCCCompiler extends GccCompatibleCCompiler {
+ private static final ForteCCCompiler instance = new ForteCCCompiler("CC");
+ /**
+ * Gets singleton instance of this class
+ */
+ public static ForteCCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ /**
+ * Private constructor. Use ForteCCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private ForteCCCompiler(String command) {
+ super(command, "-V", false, null, false, null);
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (optimization != null) {
+ if (optimization.isSpeed()) {
+ args.addElement("-xO2");
+ }
+ }
+ if (rtti != null) {
+ if (rtti.booleanValue()) {
+ args.addElement("-features=rtti");
+ } else {
+ args.addElement("-features=no%rtti");
+ }
+ }
+ if (multithreaded) {
+ args.addElement("-mt");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-KPIC");
+ }
+
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 1 :
+ case 2 :
+ args.addElement("+w");
+ break;
+ case 3 :
+ case 4 :
+ case 5 :
+ args.addElement("+w2");
+ break;
+ }
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ File ccLoc = CUtil.getExecutableLocation("CC");
+ if (ccLoc != null) {
+ File compilerIncludeDir = new File(
+ new File(ccLoc, "../include").getAbsolutePath());
+ if (compilerIncludeDir.exists()) {
+ includePath = new File[2];
+ includePath[0] = compilerIncludeDir;
+ }
+ }
+ if (includePath == null) {
+ includePath = new File[1];
+ }
+ includePath[includePath.length - 1] = new File("/usr/include");
+ }
+ return includePath;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return ForteCCLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/ForteCCLinker.java b/src/net/sf/antcontrib/cpptasks/sun/ForteCCLinker.java
new file mode 100644
index 0000000..47d2155
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/ForteCCLinker.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;
+/**
+ * Adapter for Sun (r) Forte(tm) C++ Linker
+ *
+ * @author Curt Arnold
+ */
+public final class ForteCCLinker extends AbstractLdLinker {
+ private static final String[] discardFiles = new String[]{".dll", ".so",
+ ".sl"};
+ private static final String[] objFiles = new String[]{".o", ".a", ".lib"};
+ private static final ForteCCLinker arLinker = new ForteCCLinker("CC",
+ objFiles, discardFiles, "lib", ".a");
+ private static final ForteCCLinker dllLinker = new ForteCCLinker("CC",
+ objFiles, discardFiles, "lib", ".so");
+ private static final ForteCCLinker instance = new ForteCCLinker("CC",
+ objFiles, discardFiles, "", "");
+ public static ForteCCLinker getInstance() {
+ return instance;
+ }
+ private File[] libDirs;
+ private ForteCCLinker(String command, String[] extensions,
+ String[] ignoredExtensions, String outputPrefix, String outputSuffix) {
+ super(command, "-V", extensions, ignoredExtensions, outputPrefix,
+ outputSuffix, false, null);
+ }
+ public void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (linkType.isStaticRuntime()) {
+ args.addElement("-static");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-G");
+ }
+ if (linkType.isStaticLibrary()) {
+ args.addElement("-xar");
+ }
+ }
+ public void addIncremental(boolean incremental, Vector args) {
+ /*
+ * if (incremental) { args.addElement("-xidlon"); } else {
+ * args.addElement("-xidloff"); }
+ */
+ }
+ /**
+ * Returns library path.
+ *
+ */
+ public File[] getLibraryPath() {
+ if (libDirs == null) {
+ File CCloc = CUtil.getExecutableLocation("CC");
+ if (CCloc != null) {
+ File compilerLib = new File(new File(CCloc, "../lib")
+ .getAbsolutePath());
+ if (compilerLib.exists()) {
+ libDirs = new File[2];
+ libDirs[0] = compilerLib;
+ }
+ }
+ if (libDirs == null) {
+ libDirs = new File[1];
+ }
+ }
+ libDirs[libDirs.length - 1] = new File("/usr/lib");
+ return libDirs;
+ }
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ return arLinker;
+ }
+ if (type.isSharedLibrary()) {
+ return dllLinker;
+ }
+ return instance;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/ForteCCompiler.java b/src/net/sf/antcontrib/cpptasks/sun/ForteCCompiler.java
new file mode 100644
index 0000000..9fb43da
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/ForteCCompiler.java
@@ -0,0 +1,98 @@
+/* FREEHEP
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+/**
+ * Adapter for the Sun (r) Forte (tm) C compiler
+ *
+ * @author Mark Donszelmann
+ */
+public final class ForteCCompiler extends GccCompatibleCCompiler {
+ private static final ForteCCompiler instance = new ForteCCompiler("cc");
+ /**
+ * Gets singleton instance of this class
+ */
+ public static ForteCCompiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ /**
+ * Private constructor. Use ForteCCompiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private ForteCCompiler(String command) {
+ super(command, "-V", false, null, false, null);
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (optimization != null) {
+ if (optimization.isSpeed()) {
+ args.addElement("-xO2");
+ }
+ }
+ if (multithreaded) {
+ args.addElement("-mt");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-KPIC");
+ }
+
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 1 :
+ case 2 :
+ args.addElement("+w");
+ break;
+ case 3 :
+ case 4 :
+ case 5 :
+ args.addElement("+w2");
+ break;
+ }
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ File ccLoc = CUtil.getExecutableLocation("cc");
+ if (ccLoc != null) {
+ File compilerIncludeDir = new File(
+ new File(ccLoc, "../include").getAbsolutePath());
+ if (compilerIncludeDir.exists()) {
+ includePath = new File[2];
+ includePath[0] = compilerIncludeDir;
+ }
+ }
+ if (includePath == null) {
+ includePath = new File[1];
+ }
+ includePath[includePath.length - 1] = new File("/usr/include");
+ }
+ return includePath;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return ForteCCLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java b/src/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java
new file mode 100644
index 0000000..2230b66
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java
@@ -0,0 +1,98 @@
+/* FREEHEP
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+/**
+ * Adapter for the Sun (r) Forte (tm) F77 compiler
+ *
+ * @author Mark Donszelmann
+ */
+public final class ForteF77Compiler extends GccCompatibleCCompiler {
+ private static final ForteF77Compiler instance = new ForteF77Compiler("f77");
+ /**
+ * Gets singleton instance of this class
+ */
+ public static ForteF77Compiler getInstance() {
+ return instance;
+ }
+ private String identifier;
+ private File[] includePath;
+ /**
+ * Private constructor. Use ForteF77Compiler.getInstance() to get singleton
+ * instance of this class.
+ */
+ private ForteF77Compiler(String command) {
+ super(command, "-V", false, null, false, null);
+ }
+ public void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ args.addElement("-c");
+ if (debug) {
+ args.addElement("-g");
+ }
+ if (optimization != null) {
+ if (optimization.isSpeed()) {
+ args.addElement("-xO2");
+ }
+ }
+ if (multithreaded) {
+ args.addElement("-mt");
+ }
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-KPIC");
+ }
+
+ }
+ public void addWarningSwitch(Vector args, int level) {
+ switch (level) {
+ case 0 :
+ args.addElement("-w");
+ break;
+ case 1 :
+ case 2 :
+ args.addElement("+w");
+ break;
+ case 3 :
+ case 4 :
+ case 5 :
+ args.addElement("+w2");
+ break;
+ }
+ }
+ public File[] getEnvironmentIncludePath() {
+ if (includePath == null) {
+ File f77Loc = CUtil.getExecutableLocation("f77");
+ if (f77Loc != null) {
+ File compilerIncludeDir = new File(
+ new File(f77Loc, "../include").getAbsolutePath());
+ if (compilerIncludeDir.exists()) {
+ includePath = new File[2];
+ includePath[0] = compilerIncludeDir;
+ }
+ }
+ if (includePath == null) {
+ includePath = new File[1];
+ }
+ includePath[includePath.length - 1] = new File("/usr/include");
+ }
+ return includePath;
+ }
+ public Linker getLinker(LinkType linkType) {
+ return ForteCCLinker.getInstance().getLinker(linkType);
+ }
+ public int getMaximumCommandLength() {
+ return Integer.MAX_VALUE;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ti/CVS/Entries b/src/net/sf/antcontrib/cpptasks/ti/CVS/Entries
new file mode 100644
index 0000000..1599815
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/CVS/Entries
@@ -0,0 +1,4 @@
+/ClxxCCompiler.java/1.3/Fri Apr 23 20:15:47 2004//
+/ClxxLibrarian.java/1.4/Thu Apr 22 08:06:54 2004//
+/ClxxLinker.java/1.4/Thu Apr 22 08:06:55 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/ti/CVS/Repository b/src/net/sf/antcontrib/cpptasks/ti/CVS/Repository
new file mode 100644
index 0000000..c05a718
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/ti
diff --git a/src/net/sf/antcontrib/cpptasks/ti/CVS/Root b/src/net/sf/antcontrib/cpptasks/ti/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/ti/ClxxCCompiler.java b/src/net/sf/antcontrib/cpptasks/ti/ClxxCCompiler.java
new file mode 100644
index 0000000..c844ac4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/ClxxCCompiler.java
@@ -0,0 +1,191 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ti;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+
+
+import org.apache.tools.ant.types.Environment;
+/**
+ * Adapter for TI DSP compilers with cl** commands
+ *
+ * @author CurtA
+ */
+public class ClxxCCompiler extends CommandLineCCompiler {
+ /**
+ * Header file extensions
+ */
+ private static final String[] headerExtensions = new String[]{".h", ".hpp",
+ ".inl"};
+ /**
+ * Source file extensions
+ */
+ private static final String[] sourceExtensions = new String[]{".c", ".cc",
+ ".cpp", ".cxx", ".c++"};
+ /**
+ * Singleton for TMS320C55x
+ */
+ private static final ClxxCCompiler cl55 = new ClxxCCompiler("cl55", false,
+ null);
+ /**
+ * Singleton for TMS320C6000
+ */
+ private static final ClxxCCompiler cl6x = new ClxxCCompiler("cl6x", false,
+ null);
+ public static ClxxCCompiler getCl55Instance() {
+ return cl55;
+ }
+ public static ClxxCCompiler getCl6xInstance() {
+ return cl6x;
+ }
+ /**
+ * Private constructor
+ *
+ * @param command
+ * executable name
+ * @param newEnvironment
+ * Change environment
+ * @param env
+ * New environment
+ */
+ private ClxxCCompiler(String command, boolean newEnvironment,
+ Environment env) {
+ super(command, "-h", sourceExtensions, headerExtensions, ".o", false,
+ null, newEnvironment, env);
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#addImpliedArgs(java.util.Vector,
+ * boolean, boolean, boolean,
+ * net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ protected void addImpliedArgs(
+ final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ if (debug) {
+ args.addElement("-gw");
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#addWarningSwitch(java.util.Vector,
+ * int)
+ */
+ protected void addWarningSwitch(Vector args, int warnings) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getDefineSwitch(java.lang.StringBuffer,
+ * java.lang.String, java.lang.String)
+ */
+ protected void getDefineSwitch(StringBuffer buffer, String define,
+ String value) {
+ buffer.append("-d");
+ buffer.append(define);
+ if (value != null) {
+ buffer.append('=');
+ buffer.append(value);
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getEnvironmentIncludePath()
+ */
+ protected File[] getEnvironmentIncludePath() {
+ File[] c_dir = CUtil.getPathFromEnvironment("C_DIR", ";");
+ File[] cx_dir = CUtil.getPathFromEnvironment("C6X_C_DIR", ";");
+ if (c_dir.length == 0) {
+ return cx_dir;
+ }
+ if (cx_dir.length == 0) {
+ return c_dir;
+ }
+ File[] combo = new File[c_dir.length + cx_dir.length];
+ for (int i = 0; i < cx_dir.length; i++) {
+ combo[i] = cx_dir[i];
+ }
+ for (int i = 0; i < c_dir.length; i++) {
+ combo[i + cx_dir.length] = c_dir[i];
+ }
+ return combo;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getIncludeDirSwitch(java.lang.String)
+ */
+ protected String getIncludeDirSwitch(String source) {
+ return "-I" + source;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType type) {
+ if (type.isStaticLibrary()) {
+ if (this == cl6x) {
+ return ClxxLibrarian.getCl6xInstance();
+ }
+ return ClxxLibrarian.getCl55Instance();
+ }
+ if (type.isSharedLibrary()) {
+ if (this == cl6x) {
+ return ClxxLinker.getCl6xDllInstance();
+ }
+ return ClxxLinker.getCl55DllInstance();
+ }
+ if (this == cl6x) {
+ return ClxxLinker.getCl6xInstance();
+ }
+ return ClxxLinker.getCl55Instance();
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getMaximumCommandLength()
+ */
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#getUndefineSwitch(java.lang.StringBuffer,
+ * java.lang.String)
+ */
+ protected void getUndefineSwitch(StringBuffer buffer, String define) {
+ buffer.append("-u");
+ buffer.append(define);
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ti/ClxxLibrarian.java b/src/net/sf/antcontrib/cpptasks/ti/ClxxLibrarian.java
new file mode 100644
index 0000000..c48815a
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/ClxxLibrarian.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ti;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ *
+ * Adapter for TI DSP librarian
+ * *
+ * @author CurtA
+ */
+public class ClxxLibrarian extends CommandLineLinker {
+ private static final ClxxLibrarian cl55Instance = new ClxxLibrarian("ar55");
+ private static final ClxxLibrarian cl6xInstance = new ClxxLibrarian("ar6x");
+ public static final ClxxLibrarian getCl55Instance() {
+ return cl55Instance;
+ }
+ public static final ClxxLibrarian getCl6xInstance() {
+ return cl6xInstance;
+ }
+ private ClxxLibrarian(String command) {
+ super(command, null, new String[]{".o"}, new String[0], ".lib", false,
+ null);
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addBase(long,
+ * java.util.Vector)
+ */
+ protected void addBase(long base, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addFixed(java.lang.Boolean,
+ * java.util.Vector)
+ */
+ protected void addFixed(Boolean fixed, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addImpliedArgs(boolean,
+ * net.sf.antcontrib.cpptasks.compiler.LinkType, java.util.Vector)
+ */
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addIncremental(boolean,
+ * java.util.Vector)
+ */
+ protected void addIncremental(boolean incremental, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addMap(boolean,
+ * java.util.Vector)
+ */
+ protected void addMap(boolean map, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addStack(int,
+ * java.util.Vector)
+ */
+ protected void addStack(int stack, Vector args) {
+ // TODO Auto-generated method stub
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getCommandFileSwitch(java.lang.String)
+ */
+ protected String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPath()
+ */
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPatterns(java.lang.String[])
+ */
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return new String[0];
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType linkType) {
+ return null;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getMaximumCommandLength()
+ */
+ protected int getMaximumCommandLength() {
+ return 1024;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getOutputFileSwitch(java.lang.String)
+ */
+ protected String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-o", outputFile};
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#isCaseSensitive()
+ */
+ public boolean isCaseSensitive() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/ti/ClxxLinker.java b/src/net/sf/antcontrib/cpptasks/ti/ClxxLinker.java
new file mode 100644
index 0000000..bb644a4
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/ti/ClxxLinker.java
@@ -0,0 +1,181 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.ti;
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+
+/**
+ * Adapter for TI DSP linkers
+ * *
+ * @author CurtA
+ *
+ */
+public class ClxxLinker extends CommandLineLinker {
+ private static final ClxxLinker cl55DllInstance = new ClxxLinker("lnk55",
+ ".dll");
+ private static final ClxxLinker cl55Instance = new ClxxLinker("lnk55",
+ ".exe");
+ private static final ClxxLinker cl6xDllInstance = new ClxxLinker("lnk6x",
+ ".dll");
+ private static final ClxxLinker cl6xInstance = new ClxxLinker("lnk6x",
+ ".exe");
+ public static ClxxLinker getCl55DllInstance() {
+ return cl55DllInstance;
+ }
+ public static ClxxLinker getCl55Instance() {
+ return cl55Instance;
+ }
+ public static ClxxLinker getCl6xDllInstance() {
+ return cl6xDllInstance;
+ }
+ public static ClxxLinker getCl6xInstance() {
+ return cl6xInstance;
+ }
+ private ClxxLinker(String command, String outputSuffix) {
+ super(command, "-h", new String[]{".o", ".lib", ".res"}, new String[]{
+ ".map", ".pdb", ".lnk"}, outputSuffix, false, null);
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addBase(long,
+ * java.util.Vector)
+ */
+ protected void addBase(long base, Vector args) {
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addFixed(java.lang.Boolean,
+ * java.util.Vector)
+ */
+ protected void addFixed(Boolean fixed, Vector args) {
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addImpliedArgs(boolean,
+ * net.sf.antcontrib.cpptasks.compiler.LinkType, java.util.Vector)
+ */
+ protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
+ if (linkType.isSharedLibrary()) {
+ args.addElement("-abs");
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addIncremental(boolean,
+ * java.util.Vector)
+ */
+ protected void addIncremental(boolean incremental, Vector args) {
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addMap(boolean,
+ * java.util.Vector)
+ */
+ protected void addMap(boolean map, Vector args) {
+ if (map) {
+ args.addElement("-m");
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addStack(int,
+ * java.util.Vector)
+ */
+ protected void addStack(int stack, Vector args) {
+ }
+ /* (non-Javadoc)
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
+ */
+ protected void addEntry(String entry, Vector args) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getCommandFileSwitch(java.lang.String)
+ */
+ protected String getCommandFileSwitch(String commandFile) {
+ return "@" + commandFile;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPath()
+ */
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPatterns(java.lang.String[])
+ */
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ //
+ // TODO: Looks bogus, should be .a or .so's not .o's
+ //
+ String[] libpats = new String[libnames.length];
+ for (int i = 0; i < libnames.length; i++) {
+ libpats[i] = libnames[i] + ".o";
+ }
+ return libpats;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)
+ */
+ public Linker getLinker(LinkType linkType) {
+ return this;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getMaximumCommandLength()
+ */
+ protected int getMaximumCommandLength() {
+ return 1024;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getOutputFileSwitch(java.lang.String)
+ */
+ protected String[] getOutputFileSwitch(String outputFile) {
+ return new String[]{"-o", outputFile};
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.Linker#isCaseSensitive()
+ */
+ public boolean isCaseSensitive() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries
new file mode 100644
index 0000000..60ffa7c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries
@@ -0,0 +1,6 @@
+/MetaObjectCompiler.java/1.2/Tue May 11 03:50:15 2004//
+/MetaObjectParser.java/1.2/Tue May 11 03:50:14 2004//
+/UserInterfaceCompiler.java/1.2/Tue May 11 03:50:15 2004//
+/UserInterfaceParser.java/1.1/Wed May 5 02:50:45 2004//
+/package.html/1.1/Wed May 5 02:50:45 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository
new file mode 100644
index 0000000..e4f3388
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/trolltech
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Root b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectCompiler.java b/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectCompiler.java
new file mode 100644
index 0000000..25651da
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectCompiler.java
@@ -0,0 +1,280 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.FileReader;
+import java.io.Reader;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.gcc.LdLinker;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * Adapter for the Trolltech Qt MOC Compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class MetaObjectCompiler
+ extends CommandLineCompiler {
+ /**
+ * Singleton instance.
+ */
+ private static final MetaObjectCompiler INSTANCE = new MetaObjectCompiler(
+ false, null);
+
+ /**
+ * Gets singleton instance of compiler.
+ * @return MetaObjectCompiler singleton instance
+ */
+ public static MetaObjectCompiler getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param newEnvironment boolean establish an new environment.
+ * @param env Environment environment.
+ */
+ private MetaObjectCompiler(final boolean newEnvironment,
+ final Environment env) {
+ super("moc", "-version", new String[] {".h", ".cpp"}
+ , new String[0], ".moc", false, null, newEnvironment, env);
+ }
+
+ /**
+ * Add arguments for debug, etc.
+ * @param args Vector command argument list
+ * @param debug boolean build for debug if true
+ * @param multithreaded boolean build for multithreading if true
+ * @param exceptions boolean enable exceptions if true
+ * @param linkType LinkType output and runtime type
+ * @param rtti Boolean enable run-time type identification if true
+ * @param optimization OptimizationEnum optimization
+ */
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ }
+
+ /**
+ * Add arguments for specified warning level.
+ * @param args Vector command line arguments
+ * @param level int warning level value
+ */
+ protected void addWarningSwitch(final Vector args, final int level) {
+ }
+
+ /**
+ * Change enviroment (deprecated).
+ * @param newEnvironment boolean use new environment.
+ * @param env Environment environment
+ * @return Processor modified processor
+ */
+ public Processor changeEnvironment(final boolean newEnvironment,
+ final Environment env) {
+ return this;
+ }
+
+ /**
+ * Gets a parser to scan source file for dependencies.
+ * @param source source file
+ * @return parser
+ */
+ protected Parser createParser(final File source) {
+ return new CParser();
+ }
+
+ /**
+ * Gets number of command line arguments per input file.
+ * @return int number of command line arguments per input file.
+ */
+ protected int getArgumentCountPerInputFile() {
+ return 3;
+ }
+
+ /**
+ * Returns the bid of the processor for the file.
+ *
+ * @param inputFile
+ * filename of input file
+ * @return bid for the file, 0 indicates no interest, 1 indicates that the
+ * processor recognizes the file but doesn't process it (header
+ * files, for example), 100 indicates strong interest
+ */
+ public int bid(final String inputFile) {
+ //
+ // get base bid
+ int baseBid = super.bid(inputFile);
+ //
+ // if the base bid was non-zero (.h or .cpp extension)
+ //
+ if (baseBid > 0) {
+ //
+ // scan the file for Q_OBJECT
+ // skip file if not present
+ //
+ try {
+ Reader reader = new BufferedReader(new FileReader(inputFile));
+ boolean hasQObject = MetaObjectParser.hasQObject(reader);
+ reader.close();
+ if (hasQObject) {
+ return baseBid;
+ }
+ } catch (IOException ex) {
+ return 0;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Gets output file names.
+ * @param inputFile String input file name
+ * @param versionInfo version info, not used by this compiler.
+ * @return String[] output file names
+ */
+ public String[] getOutputFileNames(final String inputFile,
+ final VersionInfo versionInfo) {
+ if (inputFile.endsWith(".cpp")) {
+ return super.getOutputFileNames(inputFile, versionInfo);
+ }
+ //
+ // if a recognized input file
+ //
+ String baseName = getBaseOutputName(inputFile);
+ return new String[] {
+ "moc_" + baseName + ".cpp"};
+ }
+
+ /**
+ * Gets input file arguments.
+ * @param outputDir File output directory
+ * @param filename String input file name.
+ * @param index int argument index,
+ * 0 to getNumberOfArgumentsPerInputFile() -1
+ * @return String input file argument
+ */
+ protected String getInputFileArgument(final File outputDir,
+ final String filename,
+ final int index) {
+ switch (index) {
+ case 0:
+ return "-o";
+ case 1:
+ String outputFileName = getOutputFileNames(filename, null)[0];
+ return new File(outputDir, outputFileName)
+ .toString();
+
+ case 2:
+ return filename;
+
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Gets maximum length of command line.
+ * @return int maximum length of command line
+ */
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+
+ /**
+ * Gets maximum number of input files processed per command.
+ * @return int maximum number of input files processed per command.
+ */
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+
+ /**
+ * Gets include directory switch.
+ * @param includeDir String include directory
+ * @return String command switch to add specified directory to search path
+ */
+ protected String getIncludeDirSwitch(final String includeDir) {
+ return "";
+ }
+
+ /**
+ * Gets switch to define preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ * @param value String macro value, may be null.
+ */
+ protected void getDefineSwitch(final StringBuffer buffer,
+ final String define,
+ final String value) {
+ }
+
+ /**
+ * Gets switch to undefine preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ */
+ protected void getUndefineSwitch(final StringBuffer buffer,
+ final String define) {
+ }
+
+ /**
+ * Gets standard include paths.
+ * @return File[] standard include paths
+ */
+ protected File[] getEnvironmentIncludePath() {
+ return new File[0];
+ }
+
+ /**
+ * Gets linker associated with this type.
+ * @param type LinkType linker, returns ld.
+ * @return Linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return LdLinker.getInstance();
+ }
+
+ /**
+ * Get total command line length due to the input file.
+ * @param outputDir File output directory
+ * @param inputFile String input file
+ * @return int characters added to command line for the input file.
+ */
+ protected int getTotalArgumentLengthForInputFile(final File outputDir,
+ final String inputFile) {
+ String arg1 = getInputFileArgument(outputDir, inputFile, 0);
+ String arg2 = getInputFileArgument(outputDir, inputFile, 1);
+ return arg1.length() + arg2.length() + 3;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectParser.java b/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectParser.java
new file mode 100644
index 0000000..e75a116
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/MetaObjectParser.java
@@ -0,0 +1,148 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import net.sf.antcontrib.cpptasks.parser.AbstractParser;
+import net.sf.antcontrib.cpptasks.parser.AbstractParserState;
+import net.sf.antcontrib.cpptasks.parser.LetterState;
+import net.sf.antcontrib.cpptasks.parser.WhitespaceOrLetterState;
+
+/**
+ * Scans a source file for Q_OBJECT.
+ *
+ * @author Curt Arnold
+ */
+public final class MetaObjectParser
+ extends AbstractParser {
+ /**
+ * Parser state that matches file T character.
+ */
+ private static final class FinalTState
+ extends AbstractParserState {
+ /**
+ * Parser.
+ */
+ private final MetaObjectParser mocParser;
+
+ /**
+ * Constructor.
+ * @param parser MetaObjectParser parser
+ */
+ public FinalTState(final MetaObjectParser parser) {
+ super(parser);
+ this.mocParser = parser;
+ }
+
+ /**
+ * Consumes a character and returns the next state for the parser.
+ *
+ * @param ch
+ * next character
+ * @return the configured nextState if ch is the expected character or the
+ * configure noMatchState otherwise.
+ */
+ public AbstractParserState consume(final char ch) {
+ if (ch == 'T') {
+ mocParser.setQObject(true);
+ return null;
+ }
+ if (ch == '\n') {
+ getParser().getNewLineState();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Determines if source file contains Q_OBJECT.
+ * @param reader Reader source reader
+ * @throws IOException if unable to read source file
+ * @return boolean true if source contains Q_OBJECT
+ */
+ public static boolean hasQObject(final Reader reader) throws IOException {
+ MetaObjectParser parser = new MetaObjectParser();
+ parser.parse(reader);
+ return parser.hasQObject;
+
+ }
+
+ /**
+ * Has Q_OBJECT been encountered.
+ */
+ private boolean hasQObject = false;
+
+ /**
+ * Parser state for start of new line.
+ */
+ private AbstractParserState newLineState;
+
+ /**
+ * Constructor.
+ *
+ */
+ private MetaObjectParser() {
+ //
+ // search for Q_OBJECT
+ //
+ AbstractParserState t = new FinalTState(this);
+ AbstractParserState c = new LetterState(this, 'C', t, null);
+ AbstractParserState e = new LetterState(this, 'E', c, null);
+ AbstractParserState j = new LetterState(this, 'J', e, null);
+ AbstractParserState b = new LetterState(this, 'B', j, null);
+ AbstractParserState o = new LetterState(this, 'O', b, null);
+ AbstractParserState underline = new LetterState(this, '_', o, null);
+ newLineState = new WhitespaceOrLetterState(this, 'Q', underline);
+ }
+
+ /**
+ * Adds a filename to the list of included files.
+ *
+ * @param filename filename to be added
+ */
+ protected void addFilename(final String filename) {
+
+ }
+
+ /**
+ * Gets new line state.
+ * @return AbstractParserState new line state.
+ */
+ public AbstractParserState getNewLineState() {
+ return newLineState;
+ }
+
+ /**
+ * Parse input file.
+ * @param reader Reader source file
+ * @throws IOException if error reading source file
+ */
+ public void parse(final Reader reader) throws IOException {
+ hasQObject = false;
+ super.parse(reader);
+ }
+
+ /**
+ * Called FinalTState to set that Q_OBJECT was found.
+ * @param value boolean new value for hasQObject
+ */
+ public void setQObject(final boolean value) {
+ this.hasQObject = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceCompiler.java b/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceCompiler.java
new file mode 100644
index 0000000..cc4cf3b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceCompiler.java
@@ -0,0 +1,347 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import java.io.File;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.OptimizationEnum;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.compiler.Processor;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+import net.sf.antcontrib.cpptasks.gcc.LdLinker;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Environment;
+
+/**
+ * Adapter for the Trolltech Qt UIC Compiler.
+ *
+ * @author Curt Arnold
+ */
+public final class UserInterfaceCompiler
+ extends CommandLineCompiler {
+ /**
+ * Singleton instance.
+ */
+ private static final UserInterfaceCompiler INSTANCE = new
+ UserInterfaceCompiler(
+ false, null);
+
+ /**
+ * Gets singleton instance of compiler.
+ * @return MetaObjectCompiler singleton instance
+ */
+ public static UserInterfaceCompiler getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Constructor.
+ * @param newEnvironment boolean establish an new environment.
+ * @param env Environment environment.
+ */
+ private UserInterfaceCompiler(final boolean newEnvironment,
+ final Environment env) {
+ super("uic", "-version", new String[] {".ui"}
+ , new String[0], ".h", false, null, newEnvironment, env);
+ }
+
+ /**
+ * Add arguments for debug, etc.
+ * @param args Vector command argument list
+ * @param debug boolean build for debug if true
+ * @param multithreaded boolean build for multithreading if true
+ * @param exceptions boolean enable exceptions if true
+ * @param linkType LinkType output and runtime type
+ * @param rtti Boolean enable run-time type identification if true
+ * @param optimization OptimizationEnum optimization
+ */
+ protected void addImpliedArgs(final Vector args,
+ final boolean debug,
+ final boolean multithreaded,
+ final boolean exceptions,
+ final LinkType linkType,
+ final Boolean rtti,
+ final OptimizationEnum optimization) {
+ }
+
+ /**
+ * Add arguments for specified warning level.
+ * @param args Vector command line arguments
+ * @param level int warning level value
+ */
+ protected void addWarningSwitch(final Vector args, final int level) {
+ }
+
+ /**
+ * Change enviroment (deprecated).
+ * @param newEnvironment boolean use new environment.
+ * @param env Environment environment
+ * @return Processor modified processor
+ */
+ public Processor changeEnvironment(final boolean newEnvironment,
+ final Environment env) {
+ return this;
+ }
+
+ /**
+ * The include parser for C will work just fine, but we didn't want to
+ * inherit from CommandLineCCompiler.
+ * @param source source file to be parsed
+ * @return parser
+ */
+ protected Parser createParser(final File source) {
+ return new UserInterfaceParser();
+ }
+
+ /**
+ * Gets number of command line arguments per input file.
+ * @return int number of command line arguments per input file.
+ */
+ protected int getArgumentCountPerInputFile() {
+ return 3;
+ }
+
+ /**
+ * Gets output file names.
+ * @param inputFile String input file name
+ * @param versionInfo version info, not used by this compiler.
+ * @return String[] output file names
+ */
+ public String[] getOutputFileNames(final String inputFile,
+ final VersionInfo versionInfo) {
+ //
+ // if a recognized input file
+ //
+ String baseName = getBaseOutputName(inputFile);
+ return new String[] {
+ baseName + ".h",
+ baseName + ".cpp",
+ "moc_" + baseName + ".cpp"};
+ }
+
+ /**
+ * Gets input file arguments.
+ * @param outputDir File output directory
+ * @param filename String input file name.
+ * @param index int argument index,
+ * 0 to getNumberOfArgumentsPerInputFile() -1
+ * @return String input file argument
+ */
+ protected String getInputFileArgument(final File outputDir,
+ final String filename,
+ final int index) {
+ switch (index) {
+ case 0:
+ return "-o";
+
+ case 1:
+ String outputFileName = getOutputFileNames(filename, null)[0];
+ return new File(outputDir, outputFileName)
+ .toString();
+
+ case 2:
+ return filename;
+
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Gets maximum length of command line.
+ * @return int maximum length of command line
+ */
+ public int getMaximumCommandLength() {
+ return 1024;
+ }
+
+ /**
+ * Gets maximum number of input files processed per command.
+ * @return int maximum number of input files processed per command.
+ */
+ protected int getMaximumInputFilesPerCommand() {
+ return 1;
+ }
+
+ /**
+ * Gets include directory switch.
+ * @param includeDir String include directory
+ * @return String command switch to add specified directory to search path
+ */
+ protected String getIncludeDirSwitch(final String includeDir) {
+ return "";
+ }
+
+ /**
+ * Gets switch to define preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ * @param value String macro value, may be null.
+ */
+ protected void getDefineSwitch(final StringBuffer buffer,
+ final String define,
+ final String value) {
+ }
+
+ /**
+ * Gets switch to undefine preprocessor macro.
+ * @param buffer StringBuffer command line argument
+ * @param define String macro name
+ */
+ protected void getUndefineSwitch(final StringBuffer buffer,
+ final String define) {
+ }
+
+ /**
+ * Gets standard include paths.
+ * @return File[] standard include paths
+ */
+ protected File[] getEnvironmentIncludePath() {
+ return new File[0];
+ }
+
+ /**
+ * Gets linker associated with this type.
+ * @param type LinkType linker, returns ld.
+ * @return Linker
+ */
+ public Linker getLinker(final LinkType type) {
+ return LdLinker.getInstance();
+ }
+
+ /**
+ * Compiles an .ui file into the corresponding .h, .cpp and moc_*.cpp files.
+ * @param task current cc task
+ * @param outputDir output directory
+ * @param sourceFiles source files
+ * @param args command line arguments that appear before input files
+ * @param endArgs command line arguments that appear after input files
+ * @param relentless if true, do not stop at first compilation error
+ * @param config compiler configuration
+ * @param monitor progress monitor
+ */
+ public void compile(final CCTask task,
+ final File outputDir,
+ final String[] sourceFiles,
+ final String[] args,
+ final String[] endArgs,
+ final boolean relentless,
+ final CommandLineCompilerConfiguration config,
+ final ProgressMonitor monitor) {
+
+ BuildException exc = null;
+ String[] thisSource = new String[1];
+ String[] uicCommand = new String[args.length + endArgs.length + 4];
+ uicCommand[0] = "uic";
+ String[] uicImplCommand = new String[args.length + endArgs.length + 6];
+ uicImplCommand[0] = "uic";
+ String[] mocCommand = new String[args.length + endArgs.length + 4];
+ mocCommand[0] = "moc";
+ for (int i = 0; i < args.length; i++) {
+ uicCommand[i + 1] = args[i];
+ uicImplCommand[i + 1] = args[i];
+ mocCommand[i + i] = args[i];
+ }
+ uicCommand[args.length + 1] = "-o";
+ uicImplCommand[args.length + 1] = "-o";
+ mocCommand[args.length + 1] = "-o";
+
+ int uicIndex = args.length + 4;
+ int uicImplIndex = args.length + 6;
+ int mocIndex = args.length + 4;
+ for (int i = 0; i < endArgs.length; i++) {
+ uicCommand[uicIndex++] = endArgs[i];
+ uicImplCommand[uicImplIndex++] = endArgs[i];
+ mocCommand[mocIndex++] = endArgs[i];
+ }
+ for (int j = 0; j < sourceFiles.length; j++) {
+ uicIndex = args.length + 2;
+ uicImplIndex = args.length + 2;
+ mocIndex = args.length + 2;
+ String[] outputFileNames = getOutputFileNames(sourceFiles[j], null);
+
+ uicCommand[uicIndex++] = outputFileNames[0];
+ uicCommand[uicIndex++] = sourceFiles[j];
+
+ uicImplCommand[uicImplIndex++] = outputFileNames[1];
+ uicImplCommand[uicImplIndex++] = "-impl";
+ uicImplCommand[uicImplIndex++] = outputFileNames[0];
+ uicImplCommand[uicImplIndex++] = sourceFiles[j];
+
+ mocCommand[mocIndex++] = outputFileNames[2];
+ mocCommand[mocIndex++] = outputFileNames[0];
+
+ int retval = runCommand(task, outputDir, uicCommand);
+ if (retval == 0) {
+ retval = runCommand(task, outputDir, uicImplCommand);
+ if (retval == 0) {
+ retval = runCommand(task, outputDir, mocCommand);
+ }
+ }
+ if (monitor != null) {
+ thisSource[0] = sourceFiles[j];
+ monitor.progress(thisSource);
+ }
+ //
+ // if the process returned a failure code and
+ // we aren't holding an exception from an earlier
+ // interation
+ if (retval != 0 && exc == null) {
+ //
+ // construct the exception
+ //
+ exc = new BuildException(this.getCommand()
+ + " failed with return code " + retval, task
+ .getLocation());
+ //
+ // and throw it now unless we are relentless
+ //
+ if (!relentless) {
+ throw exc;
+ }
+ }
+ }
+ //
+ // if the compiler returned a failure value earlier
+ // then throw an exception
+ if (exc != null) {
+ throw exc;
+ }
+ }
+
+ /**
+ * Get total command line length due to the input file.
+ * @param outputDir File output directory
+ * @param inputFile String input file
+ * @return int characters added to command line for the input file.
+ */
+ protected int getTotalArgumentLengthForInputFile(
+ final File outputDir,
+ final String inputFile) {
+ String arg1 = getInputFileArgument(outputDir, inputFile, 1);
+ String arg2 = getInputFileArgument(outputDir, inputFile, 2);
+ return arg1.length() + arg2.length() + 4;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceParser.java b/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceParser.java
new file mode 100644
index 0000000..e3e309c
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/UserInterfaceParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import net.sf.antcontrib.cpptasks.parser.Parser;
+
+/**
+ * Dependency scanner for Trolltech Qt User Interface definition files.
+ *
+ * .ui files are XML documents that may contain an include elements,
+ * however the includes are just copied to the generated files and
+ * and changes to the includes do not need to trigger rerunning uic.
+ *
+ * @author Curt Arnold
+ */
+public final class UserInterfaceParser
+ implements Parser {
+
+ /**
+ * Constructor.
+ *
+ */
+ public UserInterfaceParser() {
+ }
+
+ /**
+ * Adds filename to the list of included files.
+ *
+ * @param include String included file name
+ */
+ public void addFilename(final String include) {
+ }
+
+ /**
+ * Gets included files.
+ * @return String[] included files
+ */
+ public String[] getIncludes() {
+ return new String[0];
+ }
+
+ /**
+ * Parses source file for dependencies.
+ *
+ * @param reader Reader reader
+ * @throws IOException if error reading source file
+ */
+ public void parse(final Reader reader) throws IOException {
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/trolltech/package.html b/src/net/sf/antcontrib/cpptasks/trolltech/package.html
new file mode 100644
index 0000000..c12d506
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/trolltech/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Adapters for Trolltech Qt moc and uic compilers.
+</body>
+</html>
+
diff --git a/src/net/sf/antcontrib/cpptasks/types/CVS/Entries b/src/net/sf/antcontrib/cpptasks/types/CVS/Entries
new file mode 100644
index 0000000..80db835
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/CVS/Entries
@@ -0,0 +1,15 @@
+/CommandLineArgument.java/1.7/Sat Feb 28 19:03:43 2004//
+/CompilerArgument.java/1.4/Sat Feb 28 19:03:43 2004//
+/ConditionalFileSet.java/1.8/Sat Feb 28 19:03:43 2004//
+/ConditionalPath.java/1.8/Sat Feb 28 19:03:43 2004//
+/DefineArgument.java/1.12/Sat Feb 28 19:03:43 2004//
+/DefineSet.java/1.8/Sat Feb 28 19:03:43 2004//
+/FlexLong.java/1.7/Sat Feb 28 19:03:43 2004//
+/IncludePath.java/1.4/Sat Feb 28 19:03:43 2004//
+/LibrarySet.java/1.27/Wed Apr 21 21:47:31 2004//
+/LibraryTypeEnum.java/1.1/Wed Apr 21 21:47:31 2004//
+/LinkerArgument.java/1.4/Sat Feb 28 19:03:43 2004//
+/SystemIncludePath.java/1.4/Sat Feb 28 19:03:43 2004//
+/SystemLibrarySet.java/1.6/Sat Feb 28 19:03:43 2004//
+/UndefineArgument.java/1.4/Sat Feb 28 19:03:43 2004//
+D
diff --git a/src/net/sf/antcontrib/cpptasks/types/CVS/Repository b/src/net/sf/antcontrib/cpptasks/types/CVS/Repository
new file mode 100644
index 0000000..fed2715
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/src/net/sf/antcontrib/cpptasks/types
diff --git a/src/net/sf/antcontrib/cpptasks/types/CVS/Root b/src/net/sf/antcontrib/cpptasks/types/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/src/net/sf/antcontrib/cpptasks/types/CommandLineArgument.java b/src/net/sf/antcontrib/cpptasks/types/CommandLineArgument.java
new file mode 100644
index 0000000..e428469
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/CommandLineArgument.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * An compiler/linker command line flag.
+ */
+public class CommandLineArgument {
+ /**
+ * Enumerated attribute with the values "start", "mid" and "end",
+ */
+ public static class LocationEnum extends EnumeratedAttribute {
+ public String[] getValues() {
+ return new String[]{"start", "mid", "end"};
+ }
+ }
+ private String ifCond;
+ private int location;
+ private String unlessCond;
+ private String value;
+ public CommandLineArgument() {
+ }
+ public int getLocation() {
+ return location;
+ }
+ public String getValue() {
+ return value;
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ */
+ public boolean isActive(org.apache.tools.ant.Project p) {
+ if (value == null) {
+ return false;
+ }
+ if (ifCond != null && p.getProperty(ifCond) == null) {
+ return false;
+ } else if (unlessCond != null && p.getProperty(unlessCond) != null) {
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The argument will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Specifies relative location of argument on command line. "start" will
+ * place argument at start of command line, "mid" will place argument after
+ * all "start" arguments but before filenames, "end" will place argument
+ * after filenames.
+ *
+ */
+ public void setLocation(LocationEnum location) {
+ this.location = location.getIndex();
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the argument will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+ /**
+ * Specifies the string that should appear on the command line. The
+ * argument will be quoted if it contains embedded blanks. Use multiple
+ * arguments to avoid quoting.
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/CompilerArgument.java b/src/net/sf/antcontrib/cpptasks/types/CompilerArgument.java
new file mode 100644
index 0000000..2137186
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/CompilerArgument.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+/**
+ * A compiler command line argument.
+ */
+public class CompilerArgument extends CommandLineArgument {
+ public CompilerArgument() {
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/ConditionalFileSet.java b/src/net/sf/antcontrib/cpptasks/types/ConditionalFileSet.java
new file mode 100644
index 0000000..7bc22ee
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/ConditionalFileSet.java
@@ -0,0 +1,84 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import net.sf.antcontrib.cpptasks.CUtil;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.AbstractFileSet;
+import org.apache.tools.ant.types.FileSet;
+/**
+ * An Ant FileSet object augmented with if and unless conditions.
+ *
+ * @author Curt Arnold
+ */
+public class ConditionalFileSet extends FileSet {
+ private String ifCond;
+ private String unlessCond;
+ public ConditionalFileSet() {
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /**
+ * overrides FileSet's implementation which would throw an exception since
+ * the referenced object isn't this type.
+ */
+ protected AbstractFileSet getRef(Project p) {
+ return (AbstractFileSet) ref.getReferencedObject(p);
+ }
+ /**
+ * Returns true if the Path's if and unless conditions (if any) are
+ * satisfied.
+ */
+ public boolean isActive() throws BuildException {
+ Project p = getProject();
+ if (p == null) {
+ throw new java.lang.IllegalStateException(
+ "setProject() should have been called");
+ }
+ return CUtil.isActive(p, ifCond, unlessCond);
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The fileset will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the fileset will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/ConditionalPath.java b/src/net/sf/antcontrib/cpptasks/types/ConditionalPath.java
new file mode 100644
index 0000000..ae45eaa
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/ConditionalPath.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import net.sf.antcontrib.cpptasks.CUtil;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+/**
+ * An Ant Path object augmented with if and unless conditionals
+ *
+ * @author Curt Arnold
+ */
+public class ConditionalPath extends Path {
+ private String ifCond;
+ private String unlessCond;
+ public ConditionalPath(Project project) {
+ super(project);
+ }
+ public ConditionalPath(Project p, String path) {
+ super(p, path);
+ }
+ /**
+ * Returns true if the Path's if and unless conditions (if any) are
+ * satisfied.
+ */
+ public boolean isActive(org.apache.tools.ant.Project p)
+ throws BuildException {
+ return CUtil.isActive(p, ifCond, unlessCond);
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The path will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the path will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/DefineArgument.java b/src/net/sf/antcontrib/cpptasks/types/DefineArgument.java
new file mode 100644
index 0000000..5118e79
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/DefineArgument.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+/**
+ * Preprocessor macro definition.
+ *
+ * @author Mark A Russell <a
+ * href="mailto:mark_russell@csgsystems.com">mark_russell@csg_systems.com
+ * </a>
+ */
+public class DefineArgument extends UndefineArgument {
+ private String value;
+ public DefineArgument() {
+ super(true);
+ }
+ /** Returns the value of the define */
+ public final String getValue() {
+ return value;
+ }
+ /** Set the value attribute */
+ public final void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/DefineSet.java b/src/net/sf/antcontrib/cpptasks/types/DefineSet.java
new file mode 100644
index 0000000..f3ab44b
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/DefineSet.java
@@ -0,0 +1,199 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+/**
+ * Set of preprocessor macro defines and undefines.
+ *
+ * @author Mark A Russell <a
+ * href="mailto:mark_russell@csgsystems.com">mark_russell@csg_systems.com
+ * </a>
+ * @author Adam Murdoch
+ */
+public class DefineSet extends DataType {
+ private Vector defineList = new Vector();
+ private String ifCond = null;
+ private String unlessCond = null;
+ /**
+ *
+ * Adds a define element.
+ *
+ * @throws BuildException
+ * if reference
+ */
+ public void addDefine(DefineArgument arg) throws BuildException {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ defineList.addElement(arg);
+ }
+ /** Adds defines/undefines. */
+ private void addDefines(String[] defs, boolean isDefine) {
+ for (int i = 0; i < defs.length; i++) {
+ UndefineArgument def;
+ if (isDefine) {
+ def = new DefineArgument();
+ } else {
+ def = new UndefineArgument();
+ }
+ def.setName(defs[i]);
+ defineList.addElement(def);
+ }
+ }
+ /**
+ *
+ * Adds an undefine element.
+ *
+ * @throws BuildException
+ * if reference
+ */
+ public void addUndefine(UndefineArgument arg) throws BuildException {
+ if (isReference()) {
+ throw noChildrenAllowed();
+ }
+ defineList.addElement(arg);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /** Returns the defines and undefines in this set. */
+ public UndefineArgument[] getDefines() throws BuildException {
+ if (isReference()) {
+ DefineSet defset = (DefineSet) getCheckedRef(DefineSet.class,
+ "DefineSet");
+ return defset.getDefines();
+ } else {
+ if (isActive()) {
+ UndefineArgument[] defs = new UndefineArgument[defineList
+ .size()];
+ defineList.copyInto(defs);
+ return defs;
+ } else {
+ return new UndefineArgument[0];
+ }
+ }
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ *
+ * @exception BuildException
+ * throws build exception if name is not set
+ */
+ public final boolean isActive() throws BuildException {
+ return CUtil.isActive(getProject(), ifCond, unlessCond);
+ }
+ /**
+ * A comma-separated list of preprocessor macros to define. Use nested
+ * define elements to define macro values.
+ *
+ * @param defList
+ * comma-separated list of preprocessor macros
+ * @throws BuildException
+ * throw if defineset is a reference
+ */
+ public void setDefine(CUtil.StringArrayBuilder defList)
+ throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ addDefines(defList.getValue(), true);
+ }
+ /**
+ * Sets a description of the current data type.
+ */
+ public void setDescription(String desc) {
+ super.setDescription(desc);
+ }
+ /**
+ * Sets an id that can be used to reference this element.
+ *
+ * @param id
+ * id
+ */
+ public void setId(String id) {
+ //
+ // this is actually accomplished by a different
+ // mechanism, but we can document it
+ //
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The define will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public final void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Specifies that this element should behave as if the content of the
+ * element with the matching id attribute was inserted at this location. If
+ * specified, no other attributes or child content should be specified,
+ * other than "description".
+ *
+ */
+ public void setRefid(Reference r) throws BuildException {
+ if (!defineList.isEmpty()) {
+ throw tooManyAttributes();
+ }
+ super.setRefid(r);
+ }
+ /**
+ * A comma-separated list of preprocessor macros to undefine.
+ *
+ * @param undefList
+ * comma-separated list of preprocessor macros
+ * @throws BuildException
+ * throw if defineset is a reference
+ */
+ public void setUndefine(CUtil.StringArrayBuilder undefList)
+ throws BuildException {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ addDefines(undefList.getValue(), false);
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public final void setUnless(String propName) {
+ unlessCond = propName;
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/FlexLong.java b/src/net/sf/antcontrib/cpptasks/types/FlexLong.java
new file mode 100644
index 0000000..f710aa3
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/FlexLong.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import java.lang.reflect.Method;
+
+/**
+ * Helper class which can be used for Ant task attribute setter methods to
+ * allow the build file to specify a long in either decimal, octal, or
+ * hexadecimal format.
+ * // FlexInteger author
+ * @author Erik Hatcher
+ * @see org.apache.tools.ant.types.FlexInteger
+ */
+public class FlexLong {
+ private Long value;
+ /**
+ * Constructor used by Ant's introspection mechanism for attribute
+ * population
+ */
+ public FlexLong(String value) {
+ // Java 1.1 did not support Long.decode().. so we call it by
+ // reflection.
+ try {
+ Method m = Long.class
+ .getMethod("decode", new Class[]{String.class});
+ Object rc = m.invoke(null, new Object[]{value});
+ this.value = (Long) rc;
+ } catch (Exception e) {
+ // Try it the old fashioned way, we must be on a 1.1 jre
+ this.value = new Long(value);
+ }
+ }
+ /**
+ * Returns the decimal integer value
+ */
+ public long longValue() {
+ return value.longValue();
+ }
+ /**
+ * Overridden method to return the decimal value for display
+ */
+ public String toString() {
+ return value.toString();
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/IncludePath.java b/src/net/sf/antcontrib/cpptasks/types/IncludePath.java
new file mode 100644
index 0000000..e4c8414
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/IncludePath.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import org.apache.tools.ant.Project;
+/**
+ * An include path.
+ *
+ * Works like other paths in Ant with with the addition of "if" and "unless"
+ * conditions.
+ *
+ * @author Curt Arnold
+ */
+public class IncludePath extends ConditionalPath {
+ public IncludePath(Project project) {
+ super(project);
+ }
+ public IncludePath(Project p, String path) {
+ super(p, path);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/LibrarySet.java b/src/net/sf/antcontrib/cpptasks/types/LibrarySet.java
new file mode 100644
index 0000000..b623654
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/LibrarySet.java
@@ -0,0 +1,290 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.FileVisitor;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.PatternSet;
+/**
+ * A set of library names. Libraries can also be added to a link by specifying
+ * them in a fileset.
+ *
+ * For most Unix-like compilers, libset will result in a series of -l and -L
+ * linker arguments. For Windows compilers, the library names will be used to
+ * locate the appropriate library files which will be added to the linkers
+ * input file list as if they had been specified in a fileset.
+ *
+ * @author Mark A Russell <a
+ * href="mailto:mark_russell@csgsystems.com">mark_russell@csg_systems.com
+ * </a>
+ * @author Adam Murdoch
+ * @author Curt Arnold
+ */
+public class LibrarySet extends ProjectComponent {
+ private String dataset;
+ private boolean explicitCaseSensitive;
+ private String ifCond;
+ private String[] libnames;
+ private final FileSet set = new FileSet();
+ private String unlessCond;
+ private LibraryTypeEnum libraryType;
+ public LibrarySet() {
+ libnames = new String[0];
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /**
+ * Gets the dataset. Used on OS390 if the libs are in a dataset.
+ *
+ * @return Returns a String
+ */
+ public String getDataset() {
+ return dataset;
+ }
+ public File getDir(Project project) {
+ return set.getDir(project);
+ }
+ protected FileSet getFileSet() {
+ return set;
+ }
+ public String[] getLibs() {
+ String[] retval = (String[]) libnames.clone();
+ return retval;
+ }
+
+ /**
+ * Gets preferred library type
+ *
+ * @return library type, may be null.
+ */
+ public LibraryTypeEnum getType() {
+ return libraryType;
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ */
+ public boolean isActive(org.apache.tools.ant.Project p) {
+ if (p == null) {
+ throw new NullPointerException("p");
+ }
+ if (ifCond != null) {
+ String ifValue = p.getProperty(ifCond);
+ if (ifValue != null) {
+ if (ifValue.equals("no") || ifValue.equals("false")) {
+ throw new BuildException(
+ "property "
+ + ifCond
+ + " used as if condition has value "
+ + ifValue
+ + " which suggests a misunderstanding of if attributes");
+ }
+ } else {
+ return false;
+ }
+ }
+ if (unlessCond != null) {
+ String unlessValue = p.getProperty(unlessCond);
+ if (unlessValue != null) {
+ if (unlessValue.equals("no") || unlessValue.equals("false")) {
+ throw new BuildException(
+ "property "
+ + unlessCond
+ + " used as unless condition has value "
+ + unlessValue
+ + " which suggests a misunderstanding of unless attributes");
+ }
+ return false;
+ }
+ }
+ if (libnames.length == 0) {
+ p.log("libnames not specified or empty.", Project.MSG_WARN);
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Sets case sensitivity of the file system. If not set, will default to
+ * the linker's case sensitivity.
+ *
+ * @param isCaseSensitive
+ * "true"|"on"|"yes" if file system is case sensitive,
+ * "false"|"off"|"no" when not.
+ */
+ public void setCaseSensitive(boolean isCaseSensitive) {
+ explicitCaseSensitive = true;
+ set.setCaseSensitive(isCaseSensitive);
+ }
+ /**
+ * Sets the dataset. Used on OS390 if the libs are in a dataset.
+ *
+ * @param dataset
+ * The dataset to set
+ */
+ public void setDataset(String dataset) {
+ this.dataset = dataset;
+ }
+ /**
+ * Library directory.
+ *
+ * @param dir
+ * library directory
+ *
+ */
+ public void setDir(File dir) throws BuildException {
+ set.setDir(dir);
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The library set will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public void setIf(String propName) {
+ ifCond = propName;
+ }
+ /**
+ * Comma-separated list of library names without leading prefixes, such as
+ * "lib", or extensions, such as ".so" or ".a".
+ *
+ */
+ public void setLibs(CUtil.StringArrayBuilder libs) throws BuildException {
+ libnames = libs.getValue();
+ // If this is not active.. then it's ok if the lib names are invalid.
+ // so we can do a: <libset if="x.lib" dir="." libs="${x.lib}"/>
+ if (!isActive(getProject()))
+ return;
+ for (int i = 0; i < libnames.length; i++) {
+ int lastDot = libnames[i].lastIndexOf('.');
+ if (lastDot >= 0) {
+ String extension = libnames[i].substring(lastDot);
+ if (extension.equalsIgnoreCase(".lib")
+ || extension.equalsIgnoreCase(".so")
+ || extension.equalsIgnoreCase(".a")) {
+ getProject().log(
+ "Suspicious library name ending with \""
+ + extension + "\": " + libnames[i]);
+ }
+ }
+ if (libnames[i].length() >= 3
+ && libnames[i].substring(0, 3).equalsIgnoreCase("lib")) {
+ getProject().log(
+ "Suspicious library name starting with \"lib\": "
+ + libnames[i]);
+ }
+ }
+ }
+ public void setProject(Project project) {
+ set.setProject(project);
+ super.setProject(project);
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the library set will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public void setUnless(String propName) {
+ unlessCond = propName;
+ }
+
+ /**
+ * Sets the preferred library type. Supported values "shared", "static", and
+ * "framework". "framework" is equivalent to "shared" on non-Darwin platforms.
+ */
+ public void setType(LibraryTypeEnum type) {
+ this.libraryType = type;
+ }
+
+ public void visitLibraries(Project project, Linker linker, File[] libpath,
+ FileVisitor visitor) throws BuildException {
+ FileSet localSet = (FileSet) set.clone();
+ //
+ // unless explicitly set
+ // will default to the linker case sensitivity
+ //
+ if (!explicitCaseSensitive) {
+ boolean linkerCaseSensitive = linker.isCaseSensitive();
+ localSet.setCaseSensitive(linkerCaseSensitive);
+ }
+ //
+ // if there was a libs attribute then
+ // add the corresponding patterns to the FileSet
+ //
+ if (libnames != null && libnames.length > 0) {
+ String[] patterns = linker.getLibraryPatterns(libnames, libraryType);
+ //
+ // if no patterns, then linker does not support libraries
+ //
+ if (patterns.length > 0) {
+ for (int i = 0; i < patterns.length; i++) {
+ PatternSet.NameEntry entry = localSet.createInclude();
+ entry.setName(patterns[i]);
+ }
+ //
+ // if there was no specified directory then
+ // run through the libpath backwards
+ //
+ if (localSet.getDir(project) == null) {
+ //
+ // scan libpath in reverse order
+ // to give earlier entries priority
+ //
+ for (int j = libpath.length - 1; j >= 0; j--) {
+ FileSet clone = (FileSet) localSet.clone();
+ clone.setDir(libpath[j]);
+ DirectoryScanner scanner = clone.getDirectoryScanner(project);
+ File basedir = scanner.getBasedir();
+ String[] files = scanner.getIncludedFiles();
+ for (int k = 0; k < files.length; k++) {
+ visitor.visit(basedir, files[k]);
+ }
+ }
+ } else {
+ DirectoryScanner scanner = localSet.getDirectoryScanner(project);
+ File basedir = scanner.getBasedir();
+ String[] files = scanner.getIncludedFiles();
+ for (int k = 0; k < files.length; k++) {
+ visitor.visit(basedir, files[k]);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/LibraryTypeEnum.java b/src/net/sf/antcontrib/cpptasks/types/LibraryTypeEnum.java
new file mode 100644
index 0000000..c0af5f8
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/LibraryTypeEnum.java
@@ -0,0 +1,48 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+/**
+ * Enumeration of library types for LibrarySet
+ *
+ * @author Curt Arnold
+ *
+ */
+public class LibraryTypeEnum extends EnumeratedAttribute {
+ /**
+ * Constructor
+ *
+ * Set by default to "shared"
+ *
+ * @see java.lang.Object#Object()
+ */
+ public LibraryTypeEnum() {
+ setValue("shared");
+ }
+ /**
+ * Gets list of acceptable values
+ *
+ * @see org.apache.tools.ant.types.EnumeratedAttribute#getValues()
+ */
+ public String[] getValues() {
+ return new String[]{"shared", // prefer shared libraries
+ "static", // prefer static libraries
+ "framework" // framework libraries (Mac OS/X)
+ // equiv to shared on other platforms
+ };
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/LinkerArgument.java b/src/net/sf/antcontrib/cpptasks/types/LinkerArgument.java
new file mode 100644
index 0000000..bee15cf
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/LinkerArgument.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+/**
+ * A linker command line argument.
+ */
+public class LinkerArgument extends CommandLineArgument {
+ public LinkerArgument() {
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/SystemIncludePath.java b/src/net/sf/antcontrib/cpptasks/types/SystemIncludePath.java
new file mode 100644
index 0000000..37a3e28
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/SystemIncludePath.java
@@ -0,0 +1,45 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import org.apache.tools.ant.Project;
+/**
+ * A system include path.
+ *
+ * Files located using a system include path will not participate in dependency
+ * analysis.
+ *
+ * Standard include paths for a compiler should not be specified since these
+ * should be determined from environment variables or configuration files by
+ * the compiler adapter.
+ *
+ * Works like other paths in Ant with with the addition of "if" and "unless"
+ * conditions.
+ *
+ * @author Curt Arnold
+ */
+public class SystemIncludePath extends ConditionalPath {
+ public SystemIncludePath(Project project) {
+ super(project);
+ }
+ public SystemIncludePath(Project p, String path) {
+ super(p, path);
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/SystemLibrarySet.java b/src/net/sf/antcontrib/cpptasks/types/SystemLibrarySet.java
new file mode 100644
index 0000000..97c4fa2
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/SystemLibrarySet.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+/**
+ * A set of system library names. Timestamp or location of system libraries are
+ * not considered in dependency analysis.
+ *
+ * Libraries can also be added to a link by specifying them in a fileset.
+ *
+ * For most Unix-like compilers, syslibset will result in a series of -l and -L
+ * linker arguments. For Windows compilers, the library names will be used to
+ * locate the appropriate library files which will be added to the linkers
+ * input file list as if they had been specified in a fileset.
+ */
+public class SystemLibrarySet extends LibrarySet {
+ public SystemLibrarySet() {
+ super();
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+}
diff --git a/src/net/sf/antcontrib/cpptasks/types/UndefineArgument.java b/src/net/sf/antcontrib/cpptasks/types/UndefineArgument.java
new file mode 100644
index 0000000..aa958ef
--- /dev/null
+++ b/src/net/sf/antcontrib/cpptasks/types/UndefineArgument.java
@@ -0,0 +1,153 @@
+/*
+ *
+ * Copyright 2001-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import java.util.Vector;
+
+import net.sf.antcontrib.cpptasks.CUtil;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Preprocessor macro undefinition.
+ *
+ * @author Mark A Russell <a
+ * href="mailto:mark_russell@csgsystems.com">mark_russell@csg_systems.com
+ * </a>
+ */
+public class UndefineArgument {
+ /**
+ * This method returns an array of UndefineArgument and DefineArgument's by
+ * merging a base list with an override list.
+ *
+ * Any define in the base list with a name that appears in the override
+ * list is suppressed. All entries in the override list are preserved
+ *
+ */
+ public static UndefineArgument[] merge(UndefineArgument[] base,
+ UndefineArgument[] override) {
+ if (base.length == 0) {
+ UndefineArgument[] overrideClone = (UndefineArgument[]) override
+ .clone();
+ return overrideClone;
+ }
+ if (override.length == 0) {
+ UndefineArgument[] baseClone = (UndefineArgument[]) base.clone();
+ return baseClone;
+ }
+ Vector unduplicated = new Vector(base.length);
+ for (int i = 0; i < base.length; i++) {
+ UndefineArgument current = base[i];
+ String currentName = current.getName();
+ boolean match = false;
+ if (currentName == null) {
+ match = true;
+ } else {
+ for (int j = 0; j < override.length; j++) {
+ UndefineArgument over = override[j];
+ String overName = over.getName();
+ if (overName != null && overName.equals(currentName)) {
+ match = true;
+ break;
+ }
+ }
+ }
+ if (!match) {
+ unduplicated.addElement(current);
+ }
+ }
+ UndefineArgument[] combined = new UndefineArgument[unduplicated.size()
+ + override.length];
+ unduplicated.copyInto(combined);
+ int offset = unduplicated.size();
+ for (int i = 0; i < override.length; i++) {
+ combined[offset + i] = override[i];
+ }
+ return combined;
+ }
+ private boolean define = false;
+ private String ifCond;
+ private String name;
+ private String unlessCond;
+ public UndefineArgument() {
+ }
+ protected UndefineArgument(boolean isDefine) {
+ this.define = isDefine;
+ }
+ public void execute() throws org.apache.tools.ant.BuildException {
+ throw new org.apache.tools.ant.BuildException(
+ "Not an actual task, but looks like one for documentation purposes");
+ }
+ /** Returns the name of the define */
+ public final String getName() {
+ return name;
+ }
+ /** Returns the value of the define */
+ public String getValue() {
+ return null;
+ }
+ /**
+ * Returns true if the define's if and unless conditions (if any) are
+ * satisfied.
+ *
+ * @exception BuildException
+ * throws build exception if name is not set
+ */
+ public final boolean isActive(org.apache.tools.ant.Project p)
+ throws BuildException {
+ if (name == null) {
+ throw new BuildException("<define> is missing name attribute");
+ }
+ return CUtil.isActive(p, ifCond, unlessCond);
+ }
+ /** Returns true if this is a define, false if an undefine. */
+ public final boolean isDefine() {
+ return define;
+ }
+ /**
+ * Sets the property name for the 'if' condition.
+ *
+ * The define will be ignored unless the property is defined.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") will throw an exception when
+ * evaluated.
+ *
+ * @param propName
+ * property name
+ */
+ public final void setIf(String propName) {
+ ifCond = propName;
+ }
+ /** Set the name attribute */
+ public final void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * Set the property name for the 'unless' condition.
+ *
+ * If named property is set, the define will be ignored.
+ *
+ * The value of the property is insignificant, but values that would imply
+ * misinterpretation ("false", "no") of the behavior will throw an
+ * exception when evaluated.
+ *
+ * @param propName
+ * name of property
+ */
+ public final void setUnless(String propName) {
+ unlessCond = propName;
+ }
+}
diff --git a/sun_checks.xml b/sun_checks.xml
new file mode 100644
index 0000000..63ccf49
--- /dev/null
+++ b/sun_checks.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+ Checkstyle configuration that checks the sun coding conventions from:
+
+ - the Java Language Specification at
+ http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+ - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+ - the Javadoc guidelines at
+ http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+ - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+ - some best practices
+
+ Checkstyle is very configurable. Be sure to read the documentation at
+ http://checkstyle.sf.net (or in your downloaded distribution).
+
+ Most Checks are configurable, be sure to consult the documentation.
+
+ To completely disable a check, just comment it out or delete it from the file.
+
+ Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+
+ <!-- Checks that a package.html file exists for each package. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+ <module name="PackageHtml"/>
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile"/>
+
+ <!-- Checks that property files contain the same keys. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+ <module name="Translation"/>
+
+
+ <module name="TreeWalker">
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <module name="JavadocMethod"/>
+ <module name="JavadocType"/>
+ <module name="JavadocVariable"/>
+ <module name="JavadocStyle"/>
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="ConstantName"/>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+
+
+ <!-- Checks for Headers -->
+ <!-- See http://checkstyle.sf.net/config_header.html -->
+ <!-- <module name="Header"> -->
+ <!-- The follow property value demonstrates the ability -->
+ <!-- to have access to ANT properties. In this case it uses -->
+ <!-- the ${basedir} property to allow Checkstyle to be run -->
+ <!-- from any directory within a project. See property -->
+ <!-- expansion, -->
+ <!-- http://checkstyle.sf.net/config.html#properties -->
+ <!-- <property -->
+ <!-- name="headerFile" -->
+ <!-- value="${basedir}/java.header"/> -->
+ <!-- </module> -->
+
+ <!-- Following interprets the header file as regular expressions. -->
+ <!-- <module name="RegexpHeader"/> -->
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="FileLength"/>
+ <module name="LineLength"/>
+ <!-- module name="MethodLength"/ -->
+ <!-- module name="ParameterNumber"/ -->
+
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="EmptyForIteratorPad"/>
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap"/>
+ <module name="ParenPad"/>
+ <module name="TypecastParenPad"/>
+ <module name="TabCharacter"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="AvoidNestedBlocks"/>
+ <module name="EmptyBlock"/>
+ <module name="LeftCurly"/>
+ <module name="NeedBraces"/>
+ <module name="RightCurly"/>
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <module name="AvoidInlineConditionals"/>
+ <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
+ <module name="EmptyStatement"/>
+ <module name="EqualsHashCode"/>
+ <module name="HiddenField"/>
+ <module name="IllegalInstantiation"/>
+ <module name="InnerAssignment"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="RedundantThrows"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <module name="DesignForExtension"/>
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <module name="VisibilityModifier"/>
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+ <module name="FinalParameters"/>
+ <module name="GenericIllegalRegexp">
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ <module name="TodoComment"/>
+ <module name="UpperEll"/>
+
+ </module>
+
+</module>
diff --git a/test/CVS/Entries b/test/CVS/Entries
new file mode 100644
index 0000000..2e3eea4
--- /dev/null
+++ b/test/CVS/Entries
@@ -0,0 +1 @@
+D/junit////
diff --git a/test/CVS/Entries.Log b/test/CVS/Entries.Log
new file mode 100644
index 0000000..d7e6626
--- /dev/null
+++ b/test/CVS/Entries.Log
@@ -0,0 +1,4 @@
+A D/c-src////
+A D/f-src////
+R D/f-src////
+R D/c-src////
diff --git a/test/CVS/Repository b/test/CVS/Repository
new file mode 100644
index 0000000..f8775ef
--- /dev/null
+++ b/test/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test
diff --git a/test/CVS/Root b/test/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/CVS/Entries b/test/junit/CVS/Entries
new file mode 100644
index 0000000..704c0ea
--- /dev/null
+++ b/test/junit/CVS/Entries
@@ -0,0 +1,2 @@
+D/files////
+D/net////
diff --git a/test/junit/CVS/Repository b/test/junit/CVS/Repository
new file mode 100644
index 0000000..e7bec73
--- /dev/null
+++ b/test/junit/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit
diff --git a/test/junit/CVS/Root b/test/junit/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/files/CVS/Entries b/test/junit/files/CVS/Entries
new file mode 100644
index 0000000..d812dcd
--- /dev/null
+++ b/test/junit/files/CVS/Entries
@@ -0,0 +1,2 @@
+D/openshore////
+D/xerces-c////
diff --git a/test/junit/files/CVS/Repository b/test/junit/files/CVS/Repository
new file mode 100644
index 0000000..bcd4407
--- /dev/null
+++ b/test/junit/files/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/files
diff --git a/test/junit/files/CVS/Root b/test/junit/files/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/files/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/files/openshore/CVS/Entries b/test/junit/files/openshore/CVS/Entries
new file mode 100644
index 0000000..07fc670
--- /dev/null
+++ b/test/junit/files/openshore/CVS/Entries
@@ -0,0 +1,3 @@
+/dependencies.xml/1.1/Mon Oct 13 03:34:56 2003//
+/history.xml/1.1/Mon Oct 13 03:34:56 2003//
+D
diff --git a/test/junit/files/openshore/CVS/Repository b/test/junit/files/openshore/CVS/Repository
new file mode 100644
index 0000000..37b56ba
--- /dev/null
+++ b/test/junit/files/openshore/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/files/openshore
diff --git a/test/junit/files/openshore/CVS/Root b/test/junit/files/openshore/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/files/openshore/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/files/openshore/dependencies.xml b/test/junit/files/openshore/dependencies.xml
new file mode 100644
index 0000000..1644f84
--- /dev/null
+++ b/test/junit/files/openshore/dependencies.xml
@@ -0,0 +1,911 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dependencies>
+ <includePath signature="/Isrc/include /I${env.XSBHOME}/include">
+ <source file="../../../../src/db/mm/MetamodellDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Metamodell.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ </source>
+ <source file="../../../../src/include/Transaction.h" lastModified="f14b43d130">
+ <include file="../../../../src/db/store/Transaction.h"/>
+ </source>
+ <source file="../../../../src/misc/librefpp/librefpp.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/librefpp/CountedRef.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/RangeIteratorMem.h" lastModified="f706b6aff0">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbMap.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/store/Container.h"/>
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ <include file="../../../../src/include/DbOId.h"/>
+ </source>
+ <source file="../../../../src/db/mm/SearchableDocsFilter.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/misc/os/ProcessLink.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/include/librefpp.h"/>
+ <include file="../../../../src/misc/os/AsyncIOStream.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ObjTypeDb.h" lastModified="f6cdec9dda">
+ <include file="../../../../src/db/mm/ObjType.h"/>
+ <include file="../../../../src/db/mm/ResTypeDb.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/RangeIteratorOS.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Modell.h" lastModified="f6cdec9dda">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/Relation.h"/>
+ </source>
+ <source file="../../../../src/include/DbRoot.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbRoot.h"/>
+ </source>
+ <source file="../../../../src/include/IteratorAdapter.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/IteratorAdapter.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbSetMemOrdered.h" lastModified="f706b6aff1">
+ <include file="../../../../src/db/store/storeMem/DbOId.h"/>
+ <include file="../../../../src/include/DbSet.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeMem/ShoreStoreMem.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/KeyCmp.h" lastModified="f7168d7762">
+ <include file="../../../../src/db/store/storeMem/DbOId.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ObjectDb.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/ResourceDb.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/SearchableDocTypesFilter.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/SearchableDocTypesFilter.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbOIdAny.h" lastModified="f6b509d010">
+ </source>
+ <source file="../../../../src/include/TraceExLog.h" lastModified="f14b43d130">
+ <include file="../../../../src/misc/trace/TraceExLog.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceExStack.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/misc/trace/TraceDynInfo.h"/>
+ </source>
+ <source file="../../../../src/db/mm/AbstractObjsIterator.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/Metamodell.h"/>
+ <include file="../../../../src/db/mm/AbstractObjsIterator.h"/>
+ </source>
+ <source file="../../../../src/db/mm/UndefDocsIterator.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/UndefDocsIterator.h"/>
+ </source>
+ <source file="../../../../src/include/DbMap.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbMap.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Cardinality.h" lastModified="f6cdec9dd9">
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemSetFiltered.h" lastModified="f706b6aff0">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExRuntime.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExceptionImpl.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbOId.h" lastModified="f6e3bf7069">
+ <include file="../../../../src/db/store/DbRef.h"/>
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/ContainerFactoryOS.h" lastModified="f6cedcba99">
+ <include file="../../../../src/include/ContainerFactory.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOId.h"/>
+ <include file="../../../../src/db/store/storeOS/DbSetOS.h"/>
+ <include file="../../../../src/db/store/storeOS/DbSetOSOrdered.h"/>
+ <include file="../../../../src/db/store/storeOS/DbMapOS.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeOS/DbMultiMapOS.h"/>
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/DbType2Name.h"/>
+ </source>
+ <source file="../../../../src/db/store/ShoreStoreIntern.h" lastModified="f6d3c83461">
+ <include file="../../../../src/db/store/ShoreStore.h"/>
+ <include file="../../../../src/include/DbOIdAny.h"/>
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/Container.h"/>
+ <include file="../../../../src/db/store/DbMap.h"/>
+ <include file="../../../../src/db/store/DbMapOId.h"/>
+ <include file="../../../../src/db/store/DbMultiMap.h"/>
+ <include file="../../../../src/db/store/DbMultiMapOId.h"/>
+ <include file="../../../../src/db/store/DbSet.h"/>
+ <include file="../../../../src/db/store/DbSetOId.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbType2Name.h" lastModified="f6cdec9dd8">
+ </source>
+ <source file="../../../../src/db/mm/ObjType.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/ResType.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ResourceDb.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/ResourceDb.h"/>
+ <include file="../../../../src/db/mm/RelationFilter.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbSet.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ <include file="../../../../src/db/store/Container.h"/>
+ </source>
+ <source file="../../../../src/db/mm/AbstractDocsIterator.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbOId.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/DbRef.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOIdAny.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/misc/os/IOManager.h" lastModified="f2339cb692">
+ <include file="../../../../src/misc/os/AsyncIOManager.h"/>
+ <include file="../../../../src/misc/os/AsyncIOStream.h"/>
+ <include file="../../../../src/misc/os/ProcessLink.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbOIdCross.h" lastModified="f6b509d010">
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExIOFile.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExIO.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/include/Iterator.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/Iterator.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbOIdAny.h" lastModified="f6d3c69a38">
+ </source>
+ <source file="../../../../src/db/store/storeOS/KeyOSDict.h" lastModified="f6cedcba99">
+ <include file="../../../../src/db/store/storeOS/KeyOSShared.h"/>
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/store/storeOS/RankerOS.h"/>
+ </source>
+ <source file="../../../../src/db/store/TransactionHandle.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/store/Transaction.h"/>
+ <include file="../../../../src/db/store/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/include/IOManager.h" lastModified="f14b43cd48">
+ <include file="../../../../src/misc/os/IOManager.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/IteratorOSFiltered1.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOS.h"/>
+ </source>
+ <source file="../../../../src/include/DbSet.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbSet.h"/>
+ </source>
+ <source file="../../../../src/include/DbUnordered.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceParInfoUnion.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/misc/trace/TraceParInfo.h"/>
+ </source>
+ <source file="../../../../src/misc/os/AsyncIOManager.h" lastModified="f667da4e79">
+ <include file="../../../../src/misc/os/AsyncIOStream.h"/>
+ <include file="../../../../src/misc/os/AsyncIOHandle.h"/>
+ </source>
+ <source file="../../../../src/db/store/ContainerFactory.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/DbSet.h"/>
+ <include file="../../../../src/db/store/DbMap.h"/>
+ <include file="../../../../src/db/store/DbMultiMap.h"/>
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ErrClass.h" lastModified="f6cdeca1c2">
+ </source>
+ <source file="../../../../src/misc/librefpp/CountedRef.h" lastModified="f6c999d200">
+ <include file="../../../../src/misc/librefpp/CountedBody.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelTypeDb.h" lastModified="f6cdec9dda">
+ <include file="../../../../src/db/mm/RelType.h"/>
+ <include file="../../../../src/db/mm/TypeDb.h"/>
+ <include file="../../../../src/db/mm/Cardinality.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ <include file="../../../../src/db/mm/ResTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelTypeDb.cpp" lastModified="f6d9bc4488">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbMultiMapMem.h" lastModified="f706b6aff3">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/include/DbMultiMap.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMultiMapFiltered.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyIteratorMultiMapMem.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMultiMap.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMapFiltered.h"/>
+ <include file="../../../../src/db/store/storeMem/SoloIteratorMem.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyIteratorMem.h"/>
+ <include file="../../../../src/db/store/storeMem/RangeIteratorMem.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocTypeDb.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/DocType.h"/>
+ <include file="../../../../src/db/mm/ResTypeDb.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/include/ShoreGlobals.h" lastModified="f14b43cd48">
+ <include file="../../../../src/misc/trace/ShoreGlobals.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Resource.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Base.h"/>
+ <include file="../../../../src/db/mm/Relation.h"/>
+ <include file="../../../../src/db/mm/ResType.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ModellDb.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/ModellDb.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/include/DbRoot.h"/>
+ <include file="../../../../src/include/IOManager.h"/>
+ <include file="../../../../src/db/mm/mmDb.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/RelationFilter.h"/>
+ <include file="../../../../src/db/mm/UndefDocsIterator.h"/>
+ <include file="../../../../src/db/mm/UndefObjsIterator.h"/>
+ <include file="../../../../src/db/mm/AbstractDocsIterator.h"/>
+ <include file="../../../../src/db/mm/AbstractObjsIterator.h"/>
+ <include file="../../../../src/db/mm/DocumentFilter.h"/>
+ <include file="../../../../src/db/mm/RelationIterator.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocTypeDb.cpp" lastModified="f6d9bc4489">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocumentDb.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/IOManager.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ <include file="../../../../src/db/mm/ModellDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/SearchableDocTypesFilter.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/IteratorOS.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/Transaction.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ErrCode.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbRoot.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/store/ShoreStoreIntern.h"/>
+ <include file="../../../../src/include/DbOIdCross.h"/>
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/TransactionHandle.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/IteratorOS1.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOS.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/KeyOSShared.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/db/store/storeOS/KeyOS.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOIdCross.h"/>
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/DbType2Name.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/misc/os/AsyncIOHandle.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/misc/os/AsyncIOStream.h"/>
+ </source>
+ <source file="../../../../src/include/DbOIdCross.h" lastModified="f6d3cbc288">
+ <include file="../../../../src/db/store/storeMem/DbOIdCross.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOIdCross.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbSetOId.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/DbSet.h"/>
+ <include file="../../../../src/db/store/ContainerFactory.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceDynInfo.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/misc/trace/TraceExStack.h"/>
+ <include file="../../../../src/misc/trace/TraceStaticInfo.h"/>
+ <include file="../../../../src/misc/trace/TraceParInfoUnion.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/timeb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/UndefObjsIterator.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/SoloIteratorOS.h" lastModified="f6cedcba98">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbMultiMapOS.h" lastModified="f6cedcba9c">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/include/DbMultiMap.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOSDict.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ <include file="../../../../src/db/store/storeOS/ShoreStoreOS.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/RangeIteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOSFiltered.h"/>
+ <include file="../../../../src/db/store/storeOS/SoloIteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyIteratorOS.h"/>
+ </source>
+ <source file="../../../../src/include/Errors.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/Errors.h"/>
+ </source>
+ <source file="../../../../src/include/ShoreStoreIntern.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/db/mm/TypeDb.cpp" lastModified="f14b4a5529">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/TypeDb.h"/>
+ </source>
+ <source file="../../../../src/include/librefpp.h" lastModified="f14b43d130">
+ <include file="../../../../src/misc/librefpp/librefpp.h"/>
+ </source>
+ <source file="../../../../src/db/mm/BaseDb.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Base.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/db/mm/SearchableDocsFilter.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/SearchableDocsFilter.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemMapFiltered.h" lastModified="f7168d7761">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocumentFilter.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/UndefObjsIterator.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/UndefObjsIterator.h"/>
+ </source>
+ <source file="../../../../src/include/DbOId.h" lastModified="f6cee42508">
+ <include file="../../../../src/db/store/storeMem/DbOId.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOId.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/MemDB.h" lastModified="f6b509d012">
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbUnordered.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ </source>
+ <source file="../../../../src/db/mm/MetamodellDb.cpp" lastModified="f6d9bc4489">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/include/DbRoot.h"/>
+ <include file="../../../../src/include/IOManager.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ <include file="../../../../src/db/mm/SearchableDocTypesFilter.h"/>
+ <include file="../../../../src/db/mm/TopoSort.h"/>
+ <include file="../../../../src/db/mm/ModellDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/ShoreStoreOS.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeOS/TransactionOS.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationIterator.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/RelationIterator.h"/>
+ </source>
+ <source file="../../../../src/include/ContainerFactory.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/ContainerFactory.h"/>
+ </source>
+ <source file="../../../../src/db/mm/mmDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/TraceEx.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Object.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Resource.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/ObjType.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbOIdCross.h" lastModified="f6d3c69a39">
+ <include file="../../../../src/db/store/storeOS/DbOIdAny.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExIO.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExRuntime.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Document.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Resource.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/Relation.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ </source>
+ <source file="../../../../src/misc/os/AsyncIOStream.h" lastModified="f6cdeca1c2">
+ <include file="../../../../src/misc/os/AsyncIOHandle.h"/>
+ <include file="../../../../src/include/librefpp.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ErrCode.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ErrClass.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Base.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Type.h"/>
+ <include file="../../../../src/include/Iterator.h"/>
+ </source>
+ <source file="../../../../src/include/DbOIdAny.h" lastModified="f6d3cbc288">
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ <include file="../../../../src/db/store/storeOS/DbOIdAny.h"/>
+ </source>
+ <source file="../../../../src/db/mm/TopoSort.h" lastModified="f6dee5965a">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/db/mm/TypeDb.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Type.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceEx.h" lastModified="f6cdeca1c2">
+ <include file="../../../../src/misc/trace/TraceParInfo.h"/>
+ <include file="../../../../src/misc/trace/TraceParInfoUnion.h"/>
+ <include file="../../../../src/misc/trace/TraceExLog.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbSetMem.h" lastModified="f7168d7762">
+ <include file="../../../../src/db/store/storeMem/DbOId.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemSet.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemSetFiltered.h"/>
+ <include file="../../../../src/include/DbSet.h"/>
+ <include file="../../../../src/db/store/storeMem/ShoreStoreMem.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/IteratorOSFiltered.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/misc/error/AllExceptions.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExIOFile.h"/>
+ <include file="../../../../src/misc/error/ExIODb.h"/>
+ <include file="../../../../src/misc/error/ExInvalidResource.h"/>
+ <include file="../../../../src/misc/error/ExOS.h"/>
+ <include file="../../../../src/misc/error/ExSHORE.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Cardinality.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/Cardinality.h"/>
+ </source>
+ <source file="../../../../src/include/AllExceptions.h" lastModified="f14b43cd48">
+ <include file="../../../../src/misc/error/AllExceptions.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ResTypeDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/ResType.h"/>
+ <include file="../../../../src/db/mm/TypeDb.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExceptionImpl.h" lastModified="f6cdeca1c3">
+ <include file="../../../../src/include/Exception.h"/>
+ <include file="../../../../src/include/TraceExLog.h"/>
+ <include file="../../../../src/misc/error/ErrCode.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceStaticInfo.h" lastModified="f6cdeca1c2">
+ <include file="../../../../src/misc/trace/TraceDynInfo.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbRef.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/store/DbRefAny.h"/>
+ <include file="../../../../src/db/store/Errors.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/KeyIteratorMultiMapMem.h" lastModified="f706b6aff0">
+ <include file="../../../../src/include/Iterator.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ResourceDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Resource.h"/>
+ <include file="../../../../src/db/mm/BaseDb.h"/>
+ <include file="../../../../src/include/DbLess.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/SoloIteratorMem.h" lastModified="f706b6aff1">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/mm/BaseDb.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/BaseDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/ShoreStore.h" lastModified="f667da4e79">
+ <include file="../../../../src/db/store/DbRef.h"/>
+ <include file="../../../../src/db/store/Iterator.h"/>
+ <include file="../../../../src/db/store/Transaction.h"/>
+ <include file="../../../../src/db/store/Errors.h"/>
+ </source>
+ <source file="../../../../src/include/Filter.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/Filter.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Metamodell.h" lastModified="f6cdec9ddb">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Cardinality.h"/>
+ <include file="../../../../src/db/mm/Type.h"/>
+ <include file="../../../../src/db/mm/ObjType.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ <include file="../../../../src/db/mm/RelType.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemMultiMap.h" lastModified="f706b6aff1">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocType.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/ResType.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ </source>
+ <source file="../../../../src/db/store/Iterator.h" lastModified="f6dee59658">
+ <include file="../../../../src/db/store/DbRef.h"/>
+ <include file="../../../../src/db/store/Errors.h"/>
+ </source>
+ <source file="../../../../src/db/store/Errors.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/store/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/include/ShoreStore.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbMapOId.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/DbMap.h"/>
+ <include file="../../../../src/db/store/ContainerFactory.h"/>
+ </source>
+ <source file="../../../../src/include/DbRef.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbRef.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Type.h" lastModified="f6cdec9dd9">
+ </source>
+ <source file="../../../../src/include/DbMultiMap.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbMultiMap.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocumentFilter.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/DocumentFilter.h"/>
+ </source>
+ <source file="../../../../src/include/DbLess.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbLess.h"/>
+ </source>
+ <source file="../../../../src/db/mm/AbstractDocsIterator.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/Metamodell.h"/>
+ <include file="../../../../src/db/mm/AbstractDocsIterator.h"/>
+ </source>
+ <source file="../../../../src/db/mm/AbstractObjsIterator.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ <include file="../../../../src/db/mm/ObjType.h"/>
+ </source>
+ <source file="../../../../src/include/Utf8Ranker.h" lastModified="f14b43d130">
+ <include file="../../../../src/misc/unicode/Utf8Ranker.h"/>
+ </source>
+ <source file="../../../../src/misc/librefpp/CountedBody.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/include/TraceEx.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbMultiMap.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/store/Container.h"/>
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ <include file="../../../../src/include/DbOId.h"/>
+ </source>
+ <source file="../../../../src/db/mm/DocumentDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/ResourceDb.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationDb.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ <include file="../../../../src/db/mm/ModellDb.h"/>
+ </source>
+ <source file="../../../../src/misc/unicode/Utf8Ranker.h" lastModified="f6cdeca1c0">
+ </source>
+ <source file="../../../../src/misc/error/ExSHORE.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExceptionImpl.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/Exception.h" lastModified="f6cdeca1c1">
+ </source>
+ <source file="../../../../src/db/store/DbRefAny.h" lastModified="f6cdec9dd9">
+ </source>
+ <source file="../../../../src/misc/error/ExIODb.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExIO.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/include/TraceEx.h" lastModified="f14b43d130">
+ <include file="../../../../src/misc/trace/TraceEx.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/TransactionOS.h" lastModified="f6cedcba99">
+ <include file="../../../../src/include/Transaction.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/mm/Relation.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Base.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/RelType.h"/>
+ <include file="../../../../src/db/mm/Resource.h"/>
+ <include file="../../../../src/db/mm/ResType.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/Object.h"/>
+ </source>
+ <source file="../../../../src/db/mm/UndefDocsIterator.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Document.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExOS.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExRuntime.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemMap.h" lastModified="f706b6aff1">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemMultiMapFiltered.h" lastModified="f706b6aff1">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/Container.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/store/Iterator.h"/>
+ <include file="../../../../src/db/store/Filter.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbSetOS.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/db/store/storeOS/DbOId.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOSFiltered.h"/>
+ <include file="../../../../src/include/DbSet.h"/>
+ <include file="../../../../src/db/store/storeOS/ShoreStoreOS.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOSDict.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ </source>
+ <source file="../../../../src/include/Exception.h" lastModified="f14b43cd48">
+ <include file="../../../../src/misc/trace/Exception.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Relation.h"/>
+ <include file="../../../../src/db/mm/BaseDb.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ <include file="../../../../src/db/mm/ResourceDb.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ResType.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Type.h"/>
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Resource.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbMultiMapOId.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/DbOId.h"/>
+ <include file="../../../../src/db/store/DbMultiMap.h"/>
+ <include file="../../../../src/db/store/ContainerFactory.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ObjectDb.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ <include file="../../../../src/db/mm/ObjType.h"/>
+ <include file="../../../../src/db/mm/ModellDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ResTypeDb.cpp" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ <include file="../../../../src/db/mm/ResTypeDb.h"/>
+ </source>
+ <source file="../../../../src/include/ErrCode.h" lastModified="f14b43cd48">
+ <include file="../../../../src/misc/error/ErrCode.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/TransactionMem.h" lastModified="f6b509d010">
+ <include file="../../../../src/include/Transaction.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/DbMapMem.h" lastModified="f7168d7764">
+ <include file="../../../../src/db/store/DbMap.h"/>
+ <include file="../../../../src/db/store/Iterator.h"/>
+ <include file="../../../../src/db/store/Filter.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/include/DbLess.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMap.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMapFiltered.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMap.h"/>
+ <include file="../../../../src/db/store/storeMem/IteratorMemMapFiltered.h"/>
+ <include file="../../../../src/db/store/storeMem/SoloIteratorMem.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyIteratorMem.h"/>
+ </source>
+ <source file="../../../../src/db/store/IteratorAdapter.h" lastModified="f6dee59658">
+ <include file="../../../../src/db/store/Iterator.h"/>
+ <include file="../../../../src/include/DbOId.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbSetOSOrdered.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/db/store/storeOS/DbOId.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOS1.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOSFiltered1.h"/>
+ <include file="../../../../src/include/DbSet.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeOS/ShoreStoreOS.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ </source>
+ <source file="../../../../src/include/DbType2Name.h" lastModified="f14b43cd48">
+ <include file="../../../../src/db/store/DbType2Name.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/ShoreStoreMem.h" lastModified="f6b509d011">
+ <include file="../../../../src/db/store/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeMem/TransactionMem.h"/>
+ <include file="../../../../src/db/store/storeMem/MemDB.h"/>
+ </source>
+ <source file="../../../../src/db/store/Filter.h" lastModified="f6cdec9dd8">
+ </source>
+ <source file="../../../../src/db/store/storeOS/RankerOS.h" lastModified="f6cedcba9a">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/DbType2Name.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/ContainerFactoryMem.h" lastModified="f706b6ac09">
+ <include file="../../../../src/db/store/ContainerFactory.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/store/storeMem/DbOId.h"/>
+ <include file="../../../../src/db/store/storeMem/DbSetMem.h"/>
+ <include file="../../../../src/db/store/storeMem/DbMapMem.h"/>
+ <include file="../../../../src/db/store/storeMem/DbMultiMapMem.h"/>
+ <include file="../../../../src/db/store/storeMem/DbSetMemOrdered.h"/>
+ <include file="../../../../src/db/store/DbUnordered.h"/>
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/DbType2Name.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationFilter.cpp" lastModified="f14b4a5528">
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/RelationFilter.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/KeyOS.h" lastModified="f6cedcba98">
+ <include file="../../../../src/db/store/storeOS/DbOId.h"/>
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/DbType2Name.h"/>
+ <include file="../../../../src/db/store/storeOS/RankerOS.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/IteratorMemSet.h" lastModified="f70515310a">
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/store/storeMem/DbOIdAny.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ModellDb.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/db/mm/Modell.h"/>
+ <include file="../../../../src/include/ShoreStoreIntern.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationIterator.h" lastModified="f6d9bc4489">
+ <include file="../../../../src/db/mm/Relation.h"/>
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/mm/Resource.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceExLog.h" lastModified="f6cdeca1c1">
+ <include file="../../../../src/misc/trace/TraceDynInfo.h"/>
+ <include file="../../../../src/misc/trace/Exception.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/timeb.h"/>
+ </source>
+ <source file="../../../../src/db/mm/mm-container.cpp" lastModified="f6dee5965a">
+ <include file="../../../../src/include/DbType2Name.h"/>
+ <include file="../../../../src/include/DbLess.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/db/store/storeMem/ContainerFactoryMem.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOS.h"/>
+ <include file="../../../../src/db/store/storeOS/ContainerFactoryOS.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/TypeDb.h"/>
+ <include file="../../../../src/db/mm/DocTypeDb.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/RelTypeDb.h"/>
+ <include file="../../../../src/db/mm/DocumentDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ </source>
+ <source file="../../../../src/db/store/DbLess.h" lastModified="f6cdec9dd8">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/TraceParInfo.h" lastModified="f6cdeca1c1">
+ </source>
+ <source file="../../../../src/db/mm/RelType.h" lastModified="f6cdec9dd9">
+ <include file="../../../../src/db/mm/Type.h"/>
+ <include file="../../../../src/include/ShoreStore.h"/>
+ <include file="../../../../src/db/mm/Relation.h"/>
+ <include file="../../../../src/db/mm/DocType.h"/>
+ <include file="../../../../src/db/mm/ResType.h"/>
+ </source>
+ <source file="../../../../src/misc/trace/ShoreGlobals.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/trace/TraceEx.h"/>
+ <include file="../../../../src/include/AllExceptions.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/KeyIteratorOS.h" lastModified="f6cedcba9c">
+ <include file="../../../../src/include/Iterator.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeOS/DbMapOS.h" lastModified="f6cedcba9d">
+ <include file="../../../../src/include/DbMap.h"/>
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/include/Filter.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOSDict.h"/>
+ <include file="../../../../src/include/DbUnordered.h"/>
+ <include file="../../../../src/include/Errors.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/IteratorOSFiltered.h"/>
+ <include file="../../../../src/db/store/storeOS/SoloIteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyIteratorOS.h"/>
+ <include file="../../../../src/db/store/storeOS/ShoreStoreOS.h"/>
+ <include file="../../../../src/db/store/storeOS/KeyOS.h"/>
+ </source>
+ <source file="../../../../src/misc/error/ExInvalidResource.h" lastModified="f6cdeca1c0">
+ <include file="../../../../src/misc/error/ExRuntime.h"/>
+ <sysinclude file="../../../../../../../../usr/include/gcc/darwin/3.1/stdarg.h"/>
+ </source>
+ <source file="../../../../src/db/store/storeMem/KeyIteratorMem.h" lastModified="f706b6aff0">
+ <include file="../../../../src/include/Iterator.h"/>
+ <include file="../../../../src/db/store/storeMem/KeyCmp.h"/>
+ </source>
+ <source file="../../../../src/db/mm/RelationFilter.h" lastModified="f6d9bc4488">
+ <include file="../../../../src/db/mm/RelationDb.h"/>
+ <include file="../../../../src/include/Filter.h"/>
+ </source>
+ <source file="../../../../src/db/mm/ObjTypeDb.cpp" lastModified="f705153108">
+ <include file="../../../../src/include/ShoreGlobals.h"/>
+ <include file="../../../../src/include/Utf8Ranker.h"/>
+ <include file="../../../../src/include/IteratorAdapter.h"/>
+ <include file="../../../../src/db/mm/MetamodellDb.h"/>
+ <include file="../../../../src/db/mm/ObjTypeDb.h"/>
+ <include file="../../../../src/db/mm/ObjectDb.h"/>
+ </source>
+ </includePath>
+</dependencies>
diff --git a/test/junit/files/openshore/history.xml b/test/junit/files/openshore/history.xml
new file mode 100644
index 0000000..19fe515
--- /dev/null
+++ b/test/junit/files/openshore/history.xml
@@ -0,0 +1,74 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<history>
+ <processor signature="gcc 3.1 ppc-darwin-pipe -c -g -DDEBUG -D_DEBUG -DSHORE_STORE_MEM -Isrc/include -I${env.XSBHOME}/include">
+ <target file="MetamodellDb.o" lastModified="f74b969978">
+ <source file="../../../../src/db/mm/MetamodellDb.cpp" lastModified="f6d9bc4488"/>
+ </target>
+ <target file="AbstractObjsIterator.o" lastModified="f74b963bb8">
+ <source file="../../../../src/db/mm/AbstractObjsIterator.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="ObjectDb.o" lastModified="f74b958038">
+ <source file="../../../../src/db/mm/ObjectDb.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="AbstractDocsIterator.o" lastModified="f74b9610c0">
+ <source file="../../../../src/db/mm/AbstractDocsIterator.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="ResourceDb.o" lastModified="f74b9560f8">
+ <source file="../../../../src/db/mm/ResourceDb.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="RelationDb.o" lastModified="f74b95b6e8">
+ <source file="../../../../src/db/mm/RelationDb.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="UndefObjsIterator.o" lastModified="f74b958fd8">
+ <source file="../../../../src/db/mm/UndefObjsIterator.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="ModellDb.o" lastModified="f74b972230">
+ <source file="../../../../src/db/mm/ModellDb.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="SearchableDocTypesFilter.o" lastModified="f74b9499c0">
+ <source file="../../../../src/db/mm/SearchableDocTypesFilter.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="RelationIterator.o" lastModified="f74b9735b8">
+ <source file="../../../../src/db/mm/RelationIterator.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="DocumentFilter.o" lastModified="f74b9545a0">
+ <source file="../../../../src/db/mm/DocumentFilter.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="DocumentDb.o" lastModified="f74b94ebc8">
+ <source file="../../../../src/db/mm/DocumentDb.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="Cardinality.o" lastModified="f74b961c78">
+ <source file="../../../../src/db/mm/Cardinality.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="RelationFilter.o" lastModified="f74b953600">
+ <source file="../../../../src/db/mm/RelationFilter.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="RelTypeDb.o" lastModified="f74b95e9b0">
+ <source file="../../../../src/db/mm/RelTypeDb.cpp" lastModified="f6d9bc4488"/>
+ </target>
+ <target file="mm-container.o" lastModified="f74b9ccf50">
+ <source file="../../../../src/db/mm/mm-container.cpp" lastModified="f6dee59658"/>
+ </target>
+ <target file="BaseDb.o" lastModified="f74b974940">
+ <source file="../../../../src/db/mm/BaseDb.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="DocTypeDb.o" lastModified="f74b96cc40">
+ <source file="../../../../src/db/mm/DocTypeDb.cpp" lastModified="f6d9bc4488"/>
+ </target>
+ <target file="TypeDb.o" lastModified="f74b962c18">
+ <source file="../../../../src/db/mm/TypeDb.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="ObjTypeDb.o" lastModified="f74b952660">
+ <source file="../../../../src/db/mm/ObjTypeDb.cpp" lastModified="f705153108"/>
+ </target>
+ <target file="UndefDocsIterator.o" lastModified="f74b96dfc8">
+ <source file="../../../../src/db/mm/UndefDocsIterator.cpp" lastModified="f14b4a5528"/>
+ </target>
+ <target file="ResTypeDb.o" lastModified="f74b960120">
+ <source file="../../../../src/db/mm/ResTypeDb.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ <target file="SearchableDocsFilter.o" lastModified="f74b948e08">
+ <source file="../../../../src/db/mm/SearchableDocsFilter.cpp" lastModified="f6cdec9dd8"/>
+ </target>
+ </processor>
+</history>
diff --git a/test/junit/files/xerces-c/CVS/Entries b/test/junit/files/xerces-c/CVS/Entries
new file mode 100644
index 0000000..07fc670
--- /dev/null
+++ b/test/junit/files/xerces-c/CVS/Entries
@@ -0,0 +1,3 @@
+/dependencies.xml/1.1/Mon Oct 13 03:34:56 2003//
+/history.xml/1.1/Mon Oct 13 03:34:56 2003//
+D
diff --git a/test/junit/files/xerces-c/CVS/Repository b/test/junit/files/xerces-c/CVS/Repository
new file mode 100644
index 0000000..1851a2f
--- /dev/null
+++ b/test/junit/files/xerces-c/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/files/xerces-c
diff --git a/test/junit/files/xerces-c/CVS/Root b/test/junit/files/xerces-c/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/files/xerces-c/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/files/xerces-c/dependencies.xml b/test/junit/files/xerces-c/dependencies.xml
new file mode 100644
index 0000000..f8d7324
--- /dev/null
+++ b/test/junit/files/xerces-c/dependencies.xml
@@ -0,0 +1,3330 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dependencies>
+ <includePath signature="/I..">
+ <source file="../../src/xercesc/util/RefStackOf.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/EmptyStackException.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.c"/>
+ </source>
+ <source file="../../src/xercesc/util/Mutexes.cpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Mutexes.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaInfo.cpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/validators/schema/SchemaInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XUtil.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaInfo.hpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNotation.hpp" lastModified="f3ca10bee0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegularExpression.hpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/regx/Op.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/BMPattern.hpp"/>
+ <include file="../../src/xercesc/util/regx/ModifierToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ConditionToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/OpFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegularExpression.cpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/regx/RegularExpression.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxUtil.hpp"/>
+ <include file="../../src/xercesc/util/regx/Match.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/XMLUniCharacter.hpp"/>
+ <include file="../../src/xercesc/util/regx/ParserForXMLSchema.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/ParseException.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLGrammarDescription.hpp" lastModified="f5e681e138">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp" lastModified="f536f6e268">
+ <include file="../../src/xercesc/util/Transcoders/Iconv/IconvTransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/wchar.h"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ </source>
+ <source file="../../src/xercesc/util/Transcoders/Iconv/IconvTransService.hpp" lastModified="f52d258c58">
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/BMPattern.hpp" lastModified="f52d21bfb0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/BMPattern.cpp" lastModified="f52d21bfb0">
+ <include file="../../src/xercesc/util/regx/BMPattern.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/SimpleContentModel.hpp" lastModified="f58edebac8">
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/SimpleContentModel.cpp" lastModified="f14f8c11d0">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/validators/common/SimpleContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesElementWildcard.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMDeepNodeListPool.c" lastModified="f58918bf80">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDeepNodeListPool.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefStackOf.c" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ASCIIRangeFactory.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ASCIIRangeFactory.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ASCIIRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLErrorCodes.hpp" lastModified="f527dde100">
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMError.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLString.hpp" lastModified="f73ad56a38">
+ <include file="../../src/xercesc/util/BaseRefVectorOf.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLString.cpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/ctype.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ <sysinclude file="../../../../../../../../usr/include/errno.h"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/BorlandCDefs.hpp" lastModified="f3eca0ff38">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/AutoSense.hpp" lastModified="f54c8ccf20">
+ </source>
+ <source file="../../src/xercesc/util/DefaultPanicHandler.cpp" lastModified="f3d3bf3340">
+ <include file="../../src/xercesc/util/DefaultPanicHandler.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ </source>
+ <source file="../../src/xercesc/util/DefaultPanicHandler.hpp" lastModified="f3d8ada2d8">
+ <include file="../../src/xercesc/util/PanicHandler.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/KeyRefPair.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/KeyRefPair.c"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesAttGroupInfo.hpp" lastModified="f53b93c700">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesAttGroupInfo.cpp" lastModified="f52d2f11d8">
+ <include file="../../src/xercesc/validators/schema/XercesAttGroupInfo.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaGrammar.hpp" lastModified="f6b9585a10">
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ <include file="../../src/xercesc/util/RefHash3KeysIdPool.hpp"/>
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaGrammar.cpp" lastModified="f6b9585a10">
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/NamespaceScope.hpp"/>
+ <include file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesAttGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/StringDatatypeValidator.cpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/TraverseSchema.cpp" lastModified="f6fd66f978">
+ <include file="../../src/xercesc/validators/schema/TraverseSchema.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidityCodes.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Key.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_KeyRef.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Unique.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp"/>
+ <include file="../../src/xercesc/util/XMLStringTokenizer.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XUtil.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/NamespaceScope.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDefList.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathException.hpp"/>
+ <include file="../../src/xercesc/validators/schema/GeneralAttributeCheck.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesAttGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDDOMParser.hpp"/>
+ <include file="../../src/xercesc/util/HashPtr.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/dom/impl/XSDElementNSImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/TraverseSchema.hpp" lastModified="f64dcb7fe8">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/DOMAttr.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorCodes.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/GeneralAttributeCheck.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDErrorReporter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLFloat.hpp" lastModified="f52f8f6068">
+ <include file="../../src/xercesc/util/XMLAbstractDoubleFloat.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp" lastModified="f5515e0640">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentType.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMChildNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BaseRefVectorOf.c" lastModified="f532e77c78">
+ <include file="../../src/xercesc/util/BaseRefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLFloat.cpp" lastModified="f52f8f6069">
+ <include file="../../src/xercesc/util/XMLFloat.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/errno.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLScanner.hpp" lastModified="f64dc0ece0">
+ <include file="../../src/xercesc/framework/XMLBufferMgr.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorCodes.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRefInfo.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/SecurityManager.hpp"/>
+ <include file="../../src/xercesc/internal/ReaderMgr.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLScanner.cpp" lastModified="f6fe622a28">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/SunCCDefs.hpp" lastModified="f573a406c8">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLEnumerator.hpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLEBCDICTranscoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XMLEBCDICTranscoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLEBCDICTranscoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XML256TableTranscoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNodeIterator.hpp" lastModified="f3ca10baf8">
+ <include file="../../src/xercesc/dom/DOMNodeFilter.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLBigDecimal.cpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/XMLBigDecimal.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/XMLChar.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLBigDecimal.hpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/XMLNumber.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/XMLReaderFactory.hpp" lastModified="f5e6935dc8">
+ <include file="../../src/xercesc/parsers/SAX2XMLReaderImpl.hpp"/>
+ <include file="../../src/xercesc/sax/SAXException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/NamespaceScope.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/util/EmptyStackException.hpp"/>
+ <include file="../../src/xercesc/validators/schema/NamespaceScope.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/NamespaceScope.hpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUniDefs.hpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHash2KeysTableOf.c" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMDocumentFragment.hpp" lastModified="f3ca10a770">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathException.hpp" lastModified="f74016cc30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLIBM1140Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XML256TableTranscoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLIBM1140Transcoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XMLIBM1140Transcoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/EndOfEntityException.hpp" lastModified="f14f8f1f10">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathException.cpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/dom/DOMXPathException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/SunKaiDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/memory.h"/>
+ <sysinclude file="../../../../../../../../usr/include/strings.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/GrammarResolver.cpp" lastModified="f75d3cf898">
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp"/>
+ <include file="../../src/xercesc/internal/XMLGrammarPoolImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/GrammarResolver.hpp" lastModified="f75d3cf898">
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp" lastModified="f6b95a7138">
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.cpp" lastModified="f6b95a7138">
+ <include file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ConcatToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ConcatToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ConcatToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLNotationDecl.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLNotationDecl.hpp" lastModified="f54da203f8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLRefInfo.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLPScanToken.hpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNodeList.hpp" lastModified="f3ca10bee0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateTimeDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLContentModel.cpp" lastModified="f14f90ff88">
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLContentModel.hpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateTimeDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNodeFilter.hpp" lastModified="f3ca10b710">
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/SAXParser.hpp" lastModified="f5e6929690">
+ <include file="../../src/xercesc/sax/Parser.hpp"/>
+ <include file="../../src/xercesc/internal/VecAttrListImpl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/util/SecurityManager.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/SAXParser.cpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/parsers/SAXParser.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScannerResolver.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/sax/DocumentHandler.hpp"/>
+ <include file="../../src/xercesc/sax/DTDHandler.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/RefArrayOf.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/XMLEnumerator.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayOf.c"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLNumber.hpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLNumber.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XMLNumber.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/EmptyStackException.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLElementDecl.cpp" lastModified="f53b93b760">
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLElementDecl.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttDefList.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMNode.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/EntityResolver.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathExpression.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ConditionToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ConditionToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ConditionToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/URLInputSource.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/URLInputSource.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/YearMonthDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/YearMonthDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/YearMonthDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/MixedContentModel.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/MixedContentModel.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/MixedContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/TransService.hpp" lastModified="f58edebac8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRecognizer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/XercesDOMParser.cpp" lastModified="f71a8f40f0">
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/parsers/XercesDOMParser.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/XercesDOMParser.hpp" lastModified="f5e6929a78">
+ <include file="../../src/xercesc/parsers/AbstractDOMParser.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/TransService.cpp" lastModified="f52d387fe8">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XML88591Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLASCIITranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLChTranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLEBCDICTranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLIBM1140Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLUCS4Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLUTF8Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLUTF16Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLWin1252Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/TransENameMap.hpp"/>
+ <include file="../../src/xercesc/util/EncodingValidator.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/IOException.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLNumber.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/FlagJanitor.hpp" lastModified="f3c9ae9210">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/FlagJanitor.c"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMDocumentImpl.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/RefArrayOf.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/KeyRefPair.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/dom/DOMUserDataHandler.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDeepNodeListPool.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/ReaderMgr.hpp" lastModified="f6fe622a28">
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ <include file="../../src/xercesc/sax/Locator.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/ReaderMgr.cpp" lastModified="f6fe622a28">
+ <include file="../../src/xercesc/util/BinMemInputStream.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/internal/ReaderMgr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DecimalDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DecimalDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/XMLBigDecimal.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/DECCXXDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/KVStringPair.hpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeTokenMap.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeTokenMap.hpp" lastModified="f52d21bfb0">
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeToken.cpp" lastModified="f532e78060">
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeToken.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMDocument.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentRange.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentTraversal.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathEvaluator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUni.cpp" lastModified="f724d6a5a8">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUri.hpp" lastModified="f698f48320">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUri.cpp" lastModified="f698f48320">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLUri.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUni.hpp" lastModified="f7211e8778">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/KVStringPair.cpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/KVStringPair.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/HPCCDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDDOMParser.cpp" lastModified="f5e6992640">
+ <include file="../../src/xercesc/validators/schema/XSDDOMParser.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDDOMParser.hpp" lastModified="f5e6992640">
+ <include file="../../src/xercesc/parsers/XercesDOMParser.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/DTDHandler.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUTF16Transcoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/XMLUTF16Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUTF16Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/LexicalHandler.hpp" lastModified="f3c9ad49f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefArrayVectorOf.hpp" lastModified="f56a88c600">
+ <include file="../../src/xercesc/util/BaseRefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayVectorOf.c"/>
+ </source>
+ <source file="../../src/xercesc/framework/Wrapper4DOMInputSource.cpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/framework/Wrapper4DOMInputSource.hpp"/>
+ <include file="../../src/xercesc/dom/DOMInputSource.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/Wrapper4DOMInputSource.hpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMLeaf.hpp" lastModified="f579d6c1e8">
+ <include file="../../src/xercesc/validators/common/CMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMDeepNodeListPool.hpp" lastModified="f54da203f8">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/XMLEnumerator.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/HashPtr.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDeepNodeListPool.c"/>
+ </source>
+ <source file="../../src/xercesc/util/RefArrayVectorOf.c" lastModified="f579d6c1e8">
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaAttDef.hpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttDef.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/PSVIDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaAttDef.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/TokenFactory.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenInc.hpp"/>
+ <include file="../../src/xercesc/util/regx/XMLRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/ASCIIRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/UnicodeRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/BlockRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/TokenFactory.hpp" lastModified="f532e78060">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/BeOS/BeOSDefs.hpp" lastModified="f3892d3fe8">
+ </source>
+ <source file="../../src/xercesc/dom/DOMTypeInfo.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMException.hpp" lastModified="f14f9948a0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMException.cpp" lastModified="f14f9948a0">
+ <include file="../../src/xercesc/dom/DOMException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/VecAttrListImpl.cpp" lastModified="f52d12b808">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/internal/VecAttrListImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/VecAttrListImpl.hpp" lastModified="f52d12b808">
+ <include file="../../src/xercesc/sax/AttributeList.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMImplementationSource.hpp" lastModified="f3ca10b328">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/GCCDefs.hpp" lastModified="f573a406c8">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/QCCDefs.hpp" lastModified="f3e9703978">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ <sysinclude file="../../../../../../../../usr/include/inttypes.h"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/GCCDefs.cpp" lastModified="f198df5338">
+ <include file="../../src/xercesc/util/Compilers/GCCDefs.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/strings.h"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/util/Base64.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinInputStream.cpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinInputStream.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDAttDefList.cpp" lastModified="f14f882200">
+ <include file="../../src/xercesc/validators/DTD/DTDAttDefList.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDAttDefList.hpp" lastModified="f1f4075e90">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashXMLCh.cpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashXMLCh.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLSchemaDescription.hpp" lastModified="f6b9503fd8">
+ <include file="../../src/xercesc/framework/XMLGrammarDescription.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/Dummy.cpp" lastModified="f14f8d65a8">
+ <include file="../../src/xercesc/sax/AttributeList.hpp"/>
+ <include file="../../src/xercesc/sax/DocumentHandler.hpp"/>
+ <include file="../../src/xercesc/sax/DTDHandler.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/HandlerBase.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/sax/Locator.hpp"/>
+ <include file="../../src/xercesc/sax/Parser.hpp"/>
+ <include file="../../src/xercesc/sax/SAXException.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" lastModified="f14f8ab240">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMCharacterDataImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesGroupInfo.hpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesGroupInfo.cpp" lastModified="f53b93c700">
+ <include file="../../src/xercesc/validators/schema/XercesGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMUserDataHandler.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/MVSCPPDefs.hpp" lastModified="f3107eac30">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/StdOutFormatTarget.hpp" lastModified="f2f1d91770">
+ <include file="../../src/xercesc/framework/XMLFormatter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/StdOutFormatTarget.cpp" lastModified="f573a406ca">
+ <include file="../../src/xercesc/framework/StdOutFormatTarget.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/IllegalArgumentException.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLRecognizer.cpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/framework/XMLRecognizer.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLRecognizer.hpp" lastModified="f3c9ab2710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/InvalidCastException.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashPtr.cpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/HashPtr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashPtr.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/StdInInputSource.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/StdInInputSource.cpp" lastModified="f52ef362d0">
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/StdInInputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueVectorOf.hpp" lastModified="f574195220">
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/XMLEnumerator.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.c"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMLocatorImpl.hpp" lastModified="f3c9aa5808">
+ <include file="../../src/xercesc/dom/DOMLocator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ParseException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.cpp" lastModified="f53b93cae8">
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcher.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/PlatformUtils.cpp" lastModified="f744486020">
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLNetAccessor.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/util/DefaultPanicHandler.hpp"/>
+ <include file="../../src/xercesc/internal/MemoryManagerImpl.hpp"/>
+ <include file="../../src/xercesc/internal/MemoryManagerArrayImpl.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/PlatformUtils.hpp" lastModified="f744486020">
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ <include file="../../src/xercesc/util/PanicHandler.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHashTableOf.c" lastModified="f71f3218f8">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDScanner.cpp" lastModified="f64dc37d20">
+ <include file="../../src/xercesc/util/BinMemInputStream.hpp"/>
+ <include file="../../src/xercesc/util/FlagJanitor.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/MixedContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDScanner.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDScanner.hpp" lastModified="f64dc37d20">
+ <include file="../../src/xercesc/validators/DTD/DTDGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashCMStateSet.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMRangeException.hpp" lastModified="f14f9948a0">
+ <include file="../../src/xercesc/dom/DOMException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMProcessingInstruction.hpp" lastModified="f3ca10bee0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMRangeException.cpp" lastModified="f14f9948a0">
+ <include file="../../src/xercesc/dom/DOMRangeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp" lastModified="f52ef75e58">
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLMsgLoader.hpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.cpp" lastModified="f6b95a7138">
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLMsgLoader.cpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/DocumentHandler.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLStringTokenizer.hpp" lastModified="f52ef34390">
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLStringTokenizer.cpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/XMLStringTokenizer.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLAttDefList.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMCharacterData.hpp" lastModified="f3ca10a388">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMUnaryOp.cpp" lastModified="f52d26d478">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMUnaryOp.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMUnaryOp.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/validators/common/CMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLBuffer.cpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLAttDef.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLAttDef.hpp"/>
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLAttDef.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLBuffer.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDGrammar.hpp" lastModified="f6fe65e730">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDTDDescription.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDGrammar.cpp" lastModified="f6fe65e730">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/OpFactory.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/OpFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/Op.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/OpFactory.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLScannerResolver.hpp" lastModified="f64dc0ece0">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLScannerResolver.cpp" lastModified="f64dc0ece0">
+ <include file="../../src/xercesc/internal/XMLScannerResolver.hpp"/>
+ <include file="../../src/xercesc/internal/WFXMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/DGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/SGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/IGXMLScanner.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMImplementation.hpp" lastModified="f52d122b68">
+ <include file="../../src/xercesc/dom/DOMImplementationLS.hpp"/>
+ <include file="../../src/xercesc/dom/DOMException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMRangeException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/ComplexTypeInfo.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDefList.hpp"/>
+ <include file="../../src/xercesc/validators/common/AllContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/DFAContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/MixedContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/SimpleContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/MonthDayDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMTreeWalker.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNodeFilter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/MonthDayDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/MonthDayDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLNetAccessor.hpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMImplementationLS.hpp" lastModified="f5e68ac2a8">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NCNameDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NCNameDatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/NCNameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/TransENameMap.c" lastModified="f52d387fe8">
+ <include file="../../src/xercesc/util/TransENameMap.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ModifierToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ModifierToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ModifierToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/CodeWarriorDefs.hpp" lastModified="f510eeb190">
+ <sysinclude file="../../../../../../../../usr/include/wchar.h"/>
+ <sysinclude file="../../../../../../../../usr/include/wctype.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaElementDecl.cpp" lastModified="f53b93c700">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDefList.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp" lastModified="f74d849a50">
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/ComplexTypeInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/PSVIDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUCSTranscoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/XMLUCS4Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLBufferMgr.cpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/framework/XMLBufferMgr.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLBufferMgr.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/StringToken.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/StringToken.cpp" lastModified="f52e46f630">
+ <include file="../../src/xercesc/util/regx/StringToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Tandem/TandemDefs.hpp" lastModified="ebc3ca8cd0">
+ </source>
+ <source file="../../src/xercesc/util/XMLChar.cpp" lastModified="f24cc1f810">
+ <include file="../../src/xercesc/util/XMLChar.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/internal/CharTypeTables.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLChar.hpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/CSetDefs.hpp" lastModified="f573a406c8">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp" lastModified="f3c9b22808">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ <include file="../../src/xercesc/util/XMLNetAccessor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NetAccessors/Socket/SocketNetAccessor.cpp" lastModified="f534aecb10">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp"/>
+ <include file="../../src/xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/AIX/AIXDefs.hpp" lastModified="ebc3ca8118">
+ </source>
+ <source file="../../src/xercesc/util/Platforms/PTX/PTXDefs.hpp" lastModified="ebc3ca88e8">
+ </source>
+ <source file="../../src/xercesc/util/Platforms/OS2/OS2Defs.hpp" lastModified="ebc3ca88e8">
+ </source>
+ <source file="../../src/xercesc/util/Platforms/QNX/QNXDefs.hpp" lastModified="f3e96fdfa1">
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLValidator.hpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidityCodes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLValidator.cpp" lastModified="f52d126218">
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/OS400/OS400Defs.hpp" lastModified="ebc3ca88e8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLGrammarPool.hpp" lastModified="f6b94faf50">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Linux/LinuxDefs.hpp" lastModified="f19d86e248">
+ <sysinclude file="../../../../../../../../usr/include/endian.h"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHash3KeysIdPool.c" lastModified="f58918bf80">
+ <include file="../../src/xercesc/util/RefHash3KeysIdPool.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHash3KeysIdPool.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/RefHash3KeysIdPool.c"/>
+ </source>
+ <source file="../../src/xercesc/util/Janitor.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.c"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueStackOf.hpp" lastModified="f574195220">
+ <include file="../../src/xercesc/util/EmptyStackException.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/ValueStackOf.c"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMConfiguration.hpp" lastModified="f444bde5a0">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueStackOf.c" lastModified="f574195220">
+ <include file="../../src/xercesc/util/ValueStackOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp" lastModified="ed96f74688">
+ </source>
+ <source file="../../src/xercesc/util/EncodingValidator.cpp" lastModified="f3badfa580">
+ <include file="../../src/xercesc/util/EncodingValidator.hpp"/>
+ <include file="../../src/xercesc/internal/IANAEncodings.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/EncodingValidator.hpp" lastModified="f3badfa580">
+ <include file="../../src/xercesc/util/ValueHashTableOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/MemoryManagerImpl.hpp" lastModified="f4b106eba8">
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/MemoryManagerImpl.cpp" lastModified="f4b106eba8">
+ <include file="../../src/xercesc/internal/MemoryManagerImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/MsgLoaders/InMemory/XercesMessages_en_US.hpp" lastModified="f527dde4e8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeFactory.hpp" lastModified="f52d21bfb0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RangeFactory.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLDTDDescription.hpp" lastModified="f5e681e138">
+ <include file="../../src/xercesc/framework/XMLGrammarDescription.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinMemInputStream.hpp" lastModified="f52ef34390">
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinMemInputStream.cpp" lastModified="f52ef34390">
+ <include file="../../src/xercesc/util/BinMemInputStream.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Op.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Op.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/Op.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp" lastModified="ebc3ca8118">
+ </source>
+ <source file="../../src/xercesc/util/QName.cpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/QName.hpp" lastModified="f532e77c78">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/AttributeList.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/SAXParseException.hpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/sax/SAXException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/SAXParseException.cpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/sax/Locator.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.cpp" lastModified="f70c111828">
+ <include file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp" lastModified="f70c111828">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NumberFormatException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/IGXMLScanner.hpp" lastModified="f6fe622a28">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/util/KVStringPair.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/SGXMLScanner.hpp" lastModified="f64dc0e8f8">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/util/KVStringPair.hpp"/>
+ <include file="../../src/xercesc/util/ValueHashTableOf.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/DGXMLScanner.hpp" lastModified="f6939ac6c8">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/WFXMLScanner.hpp" lastModified="f64dc0ece0">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/util/ValueHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMNodeIDMap.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/WFXMLScanner.cpp" lastModified="f6939ac6c8">
+ <include file="../../src/xercesc/internal/WFXMLScanner.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidityCodes.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/SGXMLScanner.cpp" lastModified="f7438ecc50">
+ <include file="../../src/xercesc/internal/SGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/TraverseSchema.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDDOMParser.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/FieldActivator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/DGXMLScanner.cpp" lastModified="f6b951d618">
+ <include file="../../src/xercesc/internal/DGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDTDDescription.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDScanner.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/IGXMLScanner.cpp" lastModified="f7438ecc50">
+ <include file="../../src/xercesc/internal/IGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDTDDescription.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDScanner.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/FieldActivator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMText.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMCharacterData.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AnyURIDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ <include file="../../src/xercesc/util/XMLUri.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AnyURIDatatypeValidator.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/validators/datatype/AnyURIDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.hpp"/>
+ <include file="../../src/xercesc/util/XMLDateTime.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMWriter.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ <include file="../../src/xercesc/dom/DOMWriterFilter.hpp"/>
+ <include file="../../src/xercesc/dom/DOMErrorHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLFormatter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHash2KeysTableOf.hpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.c"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMImplementationRegistry.hpp" lastModified="f14f9948a0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateTimeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/CharToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/CharToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/CharToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLFormatter.cpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/framework/XMLFormatter.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLChar.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLFormatter.hpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ParenToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ParenToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ParenToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp" lastModified="f450803a28">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMUserDataHandler.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DateDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/YearDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/YearDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/YearDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/ListDatatypeValidator.cpp" lastModified="f52f8f7008">
+ <include file="../../src/xercesc/validators/datatype/ListDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/ListDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/TimeDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/TimeDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/TimeDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NameDatatypeValidator.cpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/NameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NameDatatypeValidator.hpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLChTranscoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLChTranscoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/XMLChTranscoder.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMChildNode.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMParentNode.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeListImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/DOMBuilderImpl.hpp" lastModified="f5e6929690">
+ <include file="../../src/xercesc/parsers/AbstractDOMParser.hpp"/>
+ <include file="../../src/xercesc/dom/DOMBuilder.hpp"/>
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/DOMBuilderImpl.cpp" lastModified="f7211e8778">
+ <include file="../../src/xercesc/parsers/DOMBuilderImpl.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntityResolver.hpp"/>
+ <include file="../../src/xercesc/dom/DOMErrorHandler.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMErrorImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMLocatorImpl.hpp"/>
+ <include file="../../src/xercesc/dom/DOMException.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/framework/Wrapper4DOMInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/SAX2XMLReaderImpl.cpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/util/XMLChTranscoder.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/sax2/ContentHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/LexicalHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/DeclHandler.hpp"/>
+ <include file="../../src/xercesc/sax/DTDHandler.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ <include file="../../src/xercesc/sax/SAXException.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScannerResolver.hpp"/>
+ <include file="../../src/xercesc/parsers/SAX2XMLReaderImpl.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/parsers/SAX2XMLReaderImpl.hpp" lastModified="f5e6929690">
+ <include file="../../src/xercesc/parsers/SAXParser.hpp"/>
+ <include file="../../src/xercesc/sax/Parser.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/internal/VecAttributesImpl.hpp"/>
+ <include file="../../src/xercesc/sax2/SAX2XMLReader.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ <include file="../../src/xercesc/util/SecurityManager.hpp"/>
+ <include file="../../src/xercesc/util/ValueStackOf.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBufferMgr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp" lastModified="f52d1d1460">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/PanicHandler.hpp"/>
+ <include file="../../src/xercesc/util/LogicalPath.c"/>
+ <sysinclude file="../../../../../../../../usr/include/pthread.h"/>
+ <sysinclude file="../../../../../../../../usr/include/unistd.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ <sysinclude file="../../../../../../../../usr/include/errno.h"/>
+ <sysinclude file="../../../../../../../../usr/include/libgen.h"/>
+ <sysinclude file="../../../../../../../../usr/include/linux/limits.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/timeb.h"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMAny.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/validators/common/CMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMAny.cpp" lastModified="f52d26d478">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMAny.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/FlagJanitor.c" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/FlagJanitor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefHashTableOf.hpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.c"/>
+ </source>
+ <source file="../../src/xercesc/internal/IGXMLScanner2.cpp" lastModified="f6fe622a28">
+ <include file="../../src/xercesc/internal/IGXMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/EndOfEntityException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/URLInputSource.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRefInfo.hpp"/>
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDTDDescription.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/TraverseSchema.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDDOMParser.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/TandemCCDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLASCIITranscoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XMLASCIITranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLASCIITranscoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLRegisterCleanup.hpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMElementNSImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/dom/impl/DOMElementImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/XSDElementNSImpl.hpp" lastModified="f14f979ed8">
+ <include file="../../src/xercesc/dom/impl/DOMElementNSImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMBinaryOp.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/validators/common/CMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMBinaryOp.cpp" lastModified="f52d26d478">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMBinaryOp.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMStateSet.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLErrorReporter.hpp" lastModified="f3c9ab2710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMAttr.hpp" lastModified="f3ca1097d0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/AbstractDOMParser.cpp" lastModified="f728d1b490">
+ <include file="../../src/xercesc/parsers/AbstractDOMParser.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScannerResolver.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementation.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementationRegistry.hpp"/>
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMAttrImpl.hpp"/>
+ <include file="../../src/xercesc/dom/DOMCDATASection.hpp"/>
+ <include file="../../src/xercesc/dom/DOMComment.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMTextImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDocumentImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentType.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMElementImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMEntityImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNotationImpl.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/dom/DOMProcessingInstruction.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeIDMap.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/GrammarResolver.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/parsers/AbstractDOMParser.hpp" lastModified="f7211e8390">
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityHandler.hpp"/>
+ <include file="../../src/xercesc/util/SecurityManager.hpp"/>
+ <include file="../../src/xercesc/util/ValueStackOf.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentType.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBufferMgr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/SchemaDateTimeException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/SecurityManager.hpp" lastModified="f4b56fb850">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.cpp" lastModified="f52d26d478">
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp" lastModified="f2036c8fe0">
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp" lastModified="f534aecb10">
+ <include file="../../src/xercesc/util/XMLNetAccessor.hpp"/>
+ <include file="../../src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/unistd.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/sys/socket.h"/>
+ <sysinclude file="../../../../../../../../usr/include/netdb.h"/>
+ <sysinclude file="../../../../../../../../usr/include/errno.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDAttDef.cpp" lastModified="f532ed48d8">
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDAttDef.hpp" lastModified="f532ed48d8">
+ <include file="../../src/xercesc/framework/XMLAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NoSuchElementException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NameIdPool.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/NameIdPool.c"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Unique.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/validators/schema/identity/IC_Unique.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Unique.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp" lastModified="f3c9b21480">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.cpp" lastModified="f52d15c548">
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/MsgLoaders/InMemory/XercesMessages_en_US.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Win32/Win32Defs.hpp" lastModified="ebc3ca94a0">
+ </source>
+ <source file="../../src/xercesc/util/regx/RegxParser.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/RegxParser.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/ParseException.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegularExpression.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxUtil.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenInc.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorCodes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegxParser.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractStringValidator.cpp" lastModified="f52f8f7008">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/IBMVAOS2Defs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/IBMVAW32Defs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathEvaluator.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/HandlerBase.hpp" lastModified="f579d6be00">
+ <include file="../../src/xercesc/sax/DocumentHandler.hpp"/>
+ <include file="../../src/xercesc/sax/DTDHandler.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueVectorOf.c" lastModified="f574195220">
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/LocalFileInputSource.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/LocalFileInputSource.hpp"/>
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/LocalFileInputSource.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ParserForXMLSchema.cpp" lastModified="f52d21bfb0">
+ <include file="../../src/xercesc/util/regx/ParserForXMLSchema.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenInc.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/ParseException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ParserForXMLSchema.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/regx/RegxParser.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/PSVIDefs.hpp" lastModified="f30b7afb30">
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp" lastModified="f455546718">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMProcessingInstruction.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMCharacterDataImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMChildNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/CharTypeTables.hpp" lastModified="f24cc226f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/SAXException.cpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/sax/SAXException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/SAXException.hpp" lastModified="f6fbf9c160">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLEntityHandler.hpp" lastModified="f3c9ab2710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp" lastModified="f532ed48d8">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDAttDef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NullPointerException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDElementDecl.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/validators/common/DFAContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/MixedContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/SimpleContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDAttDefList.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/HPUX/HPUXDefs.hpp" lastModified="ebc3ca8500">
+ </source>
+ <source file="../../src/xercesc/util/Platforms/IRIX/IRIXDefs.hpp" lastModified="ebc3ca8500">
+ </source>
+ <source file="../../src/xercesc/dom/DOMError.hpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/TransENameMap.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/TransENameMap.c"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/PTXCCDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Match.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Match.cpp" lastModified="f52e46f630">
+ <include file="../../src/xercesc/util/regx/Match.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMAttrImpl.hpp" lastModified="f30b76cce0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMDocumentImpl.hpp"/>
+ <include file="../../src/xercesc/dom/DOMAttr.hpp"/>
+ <include file="../../src/xercesc/dom/DOMTypeInfo.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeIDMap.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/Parser.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOM.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/dom/DOMAttr.hpp"/>
+ <include file="../../src/xercesc/dom/DOMCDATASection.hpp"/>
+ <include file="../../src/xercesc/dom/DOMCharacterData.hpp"/>
+ <include file="../../src/xercesc/dom/DOMComment.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentFragment.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentType.hpp"/>
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntity.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntityReference.hpp"/>
+ <include file="../../src/xercesc/dom/DOMException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementation.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNodeList.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNotation.hpp"/>
+ <include file="../../src/xercesc/dom/DOMProcessingInstruction.hpp"/>
+ <include file="../../src/xercesc/dom/DOMText.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentRange.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocumentTraversal.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNodeFilter.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNodeIterator.hpp"/>
+ <include file="../../src/xercesc/dom/DOMRange.hpp"/>
+ <include file="../../src/xercesc/dom/DOMRangeException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMTreeWalker.hpp"/>
+ <include file="../../src/xercesc/dom/DOMBuilder.hpp"/>
+ <include file="../../src/xercesc/dom/DOMConfiguration.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntityResolver.hpp"/>
+ <include file="../../src/xercesc/dom/DOMError.hpp"/>
+ <include file="../../src/xercesc/dom/DOMErrorHandler.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementationLS.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementationRegistry.hpp"/>
+ <include file="../../src/xercesc/dom/DOMImplementationSource.hpp"/>
+ <include file="../../src/xercesc/dom/DOMInputSource.hpp"/>
+ <include file="../../src/xercesc/dom/DOMLocator.hpp"/>
+ <include file="../../src/xercesc/dom/DOMTypeInfo.hpp"/>
+ <include file="../../src/xercesc/dom/DOMUserDataHandler.hpp"/>
+ <include file="../../src/xercesc/dom/DOMWriter.hpp"/>
+ <include file="../../src/xercesc/dom/DOMWriterFilter.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathEvaluator.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathNSResolver.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathExpression.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathResult.hpp"/>
+ <include file="../../src/xercesc/dom/DOMXPathNamespace.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/InputSource.cpp" lastModified="f532e77c78">
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/InputSource.hpp" lastModified="f579d6c1e8">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLDocumentHandler.hpp" lastModified="f3c9ab2710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefArrayOf.c" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/RefArrayOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMEntityImpl.hpp" lastModified="f455546718">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntity.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/KVStringPair.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegularExpression.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLReader.hpp" lastModified="f532e77890">
+ <include file="../../src/xercesc/util/XMLChar.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRecognizer.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLReader.cpp" lastModified="f62396d7b8">
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLEBCDICTranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RuntimeException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLAbstractDoubleFloat.cpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/XMLAbstractDoubleFloat.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLAbstractDoubleFloat.hpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/XMLNumber.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XercesVersion.hpp" lastModified="f3ee5fc250">
+ </source>
+ <source file="../../src/xercesc/util/PanicHandler.hpp" lastModified="f55114f720">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/PanicHandler.cpp" lastModified="f3d3bf3340">
+ <include file="../../src/xercesc/util/PanicHandler.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Field.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcher.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Field.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/MemoryManager.hpp" lastModified="f4d020a6c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.cpp" lastModified="f5e6839e88">
+ <include file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp" lastModified="f5e6839e88">
+ <include file="../../src/xercesc/framework/XMLDTDDescription.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Tru64/Tru64Defs.hpp" lastModified="ebc3ca8cd0">
+ </source>
+ <source file="../../src/xercesc/util/XMLUCS4Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUTF8Transcoder.cpp" lastModified="f40d0c5bf0">
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUTF8Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/UTFDataFormatException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLUTF8Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ <include file="../../src/xercesc/util/HexBin.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMElement.hpp" lastModified="f3ca10ab58">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMComment.hpp" lastModified="f3ca10a388">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMCharacterData.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathSymbols.hpp" lastModified="f14f8566c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathSymbols.cpp" lastModified="f14f8566c8">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueHashTableOf.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/HashBase.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/HashXMLCh.hpp"/>
+ <include file="../../src/xercesc/util/ValueHashTableOf.c"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcher.cpp" lastModified="f53b93cae8">
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcher.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaAttDef.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcher.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/util/ValueStackOf.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/NameIdPool.c" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ValueHashTableOf.c" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/ValueHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/RefVectorOf.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/BaseRefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.c"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XPathException.hpp" lastModified="f14f8566c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMErrorHandler.hpp" lastModified="f3ca10b328">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XUtil.hpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XUtil.cpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/validators/schema/XUtil.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/DOMDocument.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/LogicalPath.c" lastModified="f52d3599b8">
+ </source>
+ <source file="../../src/xercesc/dom/DOMBuilder.hpp" lastModified="f3ca1097d0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinFileInputStream.cpp" lastModified="f52ef34390">
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BinFileInputStream.hpp" lastModified="f58edebac8">
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/Wrapper4InputSource.hpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/dom/DOMInputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HexBin.cpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/HexBin.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HexBin.hpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/Wrapper4InputSource.cpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/framework/Wrapper4InputSource.hpp"/>
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/StringPool.cpp" lastModified="f53b93bb48">
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/StringPool.hpp" lastModified="f52f8f5c80">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLAttr.hpp" lastModified="f54da203f8">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttDef.hpp"/>
+ </source>
+ <source file="../../samples/CreateDOMDocument/CreateDOMDocument.cpp" lastModified="f6de4942d2">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/dom/DOM.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLAttr.cpp" lastModified="f53b93b760">
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMEntityReference.hpp" lastModified="f3ca10af40">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDValidator.cpp" lastModified="f532ed48d8">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/internal/ReaderMgr.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDValidator.hpp" lastModified="f160834d00">
+ <include file="../../src/xercesc/util/NameIdPool.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDGrammar.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp" lastModified="f532ed48d8">
+ <include file="../../src/xercesc/framework/XMLEntityDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/LocalFileFormatTarget.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/LocalFileFormatTarget.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/LocalFileFormatTarget.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLFormatter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLWin1252Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XML256TableTranscoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLWin1252Transcoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XMLWin1252Transcoder.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMEntity.hpp" lastModified="f3ca10ab58">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/DTD/DocTypeHandler.hpp" lastModified="f3c9b36c40">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDAttDef.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDElementDecl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDEntityDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMErrorImpl.hpp" lastModified="f52c895040">
+ <include file="../../src/xercesc/dom/DOMError.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/DeclHandler.hpp" lastModified="f3c9ad49f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMDocumentType.hpp" lastModified="f3ca10a770">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_KeyRef.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/validators/schema/identity/IC_KeyRef.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_KeyRef.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HashBase.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/ValueStore.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/validators/schema/identity/FieldValueMap.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp" lastModified="f17e7a3300">
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/ValueStore.cpp" lastModified="f53b93cae8">
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_KeyRef.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/BlockRangeFactory.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/BlockRangeFactory.cpp" lastModified="f377d1b508">
+ <include file="../../src/xercesc/util/regx/BlockRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaSymbols.cpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaSymbols.hpp" lastModified="f2b92feb38">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/BooleanDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp" lastModified="f52f8f7008">
+ <include file="../../src/xercesc/validators/datatype/BooleanDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/sax2Dummy.cpp" lastModified="f14f8cc968">
+ <include file="../../src/xercesc/sax2/SAX2XMLReader.hpp"/>
+ <include file="../../src/xercesc/sax2/XMLReaderFactory.hpp"/>
+ <include file="../../src/xercesc/sax2/ContentHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/DefaultHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/Attributes.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDLocator.cpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDLocator.hpp" lastModified="f52ef75e58">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/sax/Locator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMNotationImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNotation.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMNodeListImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNodeList.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/MIPSproDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/TokenInc.hpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/CharToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ClosureToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ConcatToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ConditionToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ModifierToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ParenToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/StringToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/UnionToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/FieldActivator.cpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/validators/schema/identity/FieldActivator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/FieldActivator.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMRange.hpp" lastModified="f3ca10bee0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/DFAContentModel.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/DFAContentModel.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMAny.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMBinaryOp.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMLeaf.hpp"/>
+ <include file="../../src/xercesc/validators/common/CMUnaryOp.hpp"/>
+ <include file="../../src/xercesc/validators/common/DFAContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesElementWildcard.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/HashCMStateSet.hpp"/>
+ <include file="../../src/xercesc/util/XMLInteger.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/FieldValueMap.cpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/validators/schema/identity/FieldValueMap.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/FieldValueMap.hpp" lastModified="f56680bec8">
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RefArrayVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDErrorReporter.cpp" lastModified="f3d3be0e48">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorCodes.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidityCodes.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDErrorReporter.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XSDErrorReporter.hpp" lastModified="f52d2f11d8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XercesXPath.cpp" lastModified="f53b93cae8">
+ <include file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XPathException.hpp"/>
+ <include file="../../src/xercesc/validators/schema/NamespaceScope.hpp"/>
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Selector.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/XercesXPath.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/FieldActivator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp" lastModified="f58edebac8">
+ <include file="../../src/xercesc/validators/schema/identity/XPathMatcher.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMDocumentRange.hpp" lastModified="f3ca10a770">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/MonthDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/MonthDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/MonthDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DayDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DayDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DayDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/OS390/OS390Defs.hpp" lastModified="ebc3ca88e8">
+ </source>
+ <source file="../../src/xercesc/sax2/SAX2XMLReader.hpp" lastModified="f3c9ad49f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/framework/XMLPScanToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathNamespace.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/dom/DOMNode.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/IDDatatypeValidator.cpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRefInfo.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/ValueStoreCache.cpp" lastModified="f56680bec8">
+ <include file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/ValueStore.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ <include file="../../src/xercesc/util/HashPtr.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/ValueStoreCache.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.hpp"/>
+ <include file="../../src/xercesc/util/RefStackOf.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/CMStateSet.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLExceptMsgs.hpp" lastModified="f527dde4e8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMError.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/XMLRangeFactory.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/XMLRangeFactory.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/XMLRangeFactory.hpp"/>
+ <include file="../../src/xercesc/internal/CharTypeTables.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/MemBufInputSource.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/BinMemInputStream.hpp"/>
+ <include file="../../src/xercesc/framework/MemBufInputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/MemBufInputSource.hpp" lastModified="f6b3ae9570">
+ <include file="../../src/xercesc/sax/InputSource.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Base64.cpp" lastModified="f5479f2e90">
+ <include file="../../src/xercesc/util/Base64.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Base64.hpp" lastModified="f5477c6450">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMEntityResolver.hpp" lastModified="f3ca10af40">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNode.hpp" lastModified="f4fa3320f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/GeneralAttributeCheck.hpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ <include file="../../src/xercesc/util/ValueHashTableOf.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/GeneralAttributeCheck.cpp" lastModified="f52d2f11d8">
+ <include file="../../src/xercesc/validators/schema/GeneralAttributeCheck.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/dom/DOMNamedNodeMap.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorCodes.hpp"/>
+ <include file="../../src/xercesc/validators/schema/TraverseSchema.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdio.h"/>
+ </source>
+ <source file="../../src/xercesc/util/BitSet.cpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/BitSet.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BitSet.hpp" lastModified="f52d3599b8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMInputSource.hpp" lastModified="f579d6ba18">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/VecAttributesImpl.hpp" lastModified="f3c9abe290">
+ <include file="../../src/xercesc/sax2/Attributes.hpp"/>
+ <include file="../../src/xercesc/framework/XMLAttr.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/VecAttributesImpl.cpp" lastModified="f532e774a8">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/internal/VecAttributesImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/BooleanDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DecimalDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/NOTATIONDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/QNameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/NameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/NCNameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/ListDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DoubleDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/FloatDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/AnyURIDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DateTimeDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DateDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/TimeDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DayDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/MonthDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/MonthDayDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/YearDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/YearMonthDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DurationDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.hpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMElementImpl.hpp" lastModified="f30b76cce0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/dom/DOMElement.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMChildNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMAttrMapImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMNamedNodeMap.hpp" lastModified="f3ca10b710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegxDefs.hpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/BitOps.hpp" lastModified="f3c9ae9210">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XML256TableTranscoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XML256TableTranscoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/XML256TableTranscoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegxUtil.hpp" lastModified="f52e46f630">
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/RegxUtil.cpp" lastModified="f52e46f630">
+ <include file="../../src/xercesc/util/regx/RegxUtil.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMWriterFilter.hpp" lastModified="f3ca10c2c8">
+ <include file="../../src/xercesc/dom/DOMNodeFilter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp" lastModified="ec49d070d8">
+ </source>
+ <source file="../../src/xercesc/validators/datatype/FloatDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLFloat.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/FloatDatatypeValidator.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/validators/datatype/FloatDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLInteger.hpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathNSResolver.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ClosureToken.cpp" lastModified="f14fa03de0">
+ <include file="../../src/xercesc/util/regx/ClosureToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/ClosureToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Key.hpp" lastModified="f532ed5490">
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IC_Key.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/validators/schema/identity/IC_Key.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/UnicodeRangeFactory.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/RangeFactory.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMXPathResult.hpp" lastModified="f71f1f8710">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLBigInteger.cpp" lastModified="f54da207e0">
+ <include file="../../src/xercesc/util/XMLBigInteger.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLBigInteger.hpp" lastModified="f52f8f6068">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/UnicodeRangeFactory.cpp" lastModified="f14fa041c8">
+ <include file="../../src/xercesc/util/regx/UnicodeRangeFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RangeTokenMap.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxDefs.hpp"/>
+ <include file="../../src/xercesc/util/regx/XMLUniCharacter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DurationDatatypeValidator.hpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DateTimeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/UnionToken.hpp" lastModified="f3c9b07670">
+ <include file="../../src/xercesc/util/regx/Token.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/UnionToken.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/regx/UnionToken.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxUtil.hpp"/>
+ <include file="../../src/xercesc/util/regx/TokenFactory.hpp"/>
+ <include file="../../src/xercesc/util/regx/StringToken.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DurationDatatypeValidator.cpp" lastModified="f6fe655e78">
+ <include file="../../src/xercesc/validators/datatype/DurationDatatypeValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/DefaultHandler.hpp" lastModified="f14f8cc968">
+ <include file="../../src/xercesc/sax2/ContentHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/LexicalHandler.hpp"/>
+ <include file="../../src/xercesc/sax2/DeclHandler.hpp"/>
+ <include file="../../src/xercesc/sax/DTDHandler.hpp"/>
+ <include file="../../src/xercesc/sax/EntityResolver.hpp"/>
+ <include file="../../src/xercesc/sax/ErrorHandler.hpp"/>
+ <include file="../../src/xercesc/sax/SAXParseException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMTextImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMText.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMChildNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMCharacterDataImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp" lastModified="f53b93cae8">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XML88591Transcoder.cpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/TranscodingException.hpp"/>
+ <include file="../../src/xercesc/util/XML88591Transcoder.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XML88591Transcoder.hpp" lastModified="f3c9ae95f8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/identity/IdentityConstraint.cpp" lastModified="f52d3101f0">
+ <include file="../../src/xercesc/validators/schema/identity/IdentityConstraint.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Selector.hpp"/>
+ <include file="../../src/xercesc/validators/schema/identity/IC_Field.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/TranscodingException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/UTFDataFormatException.hpp" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/ContentSpecNode.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/ContentSpecNode.hpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/AllContentModel.cpp" lastModified="f53b93bf30">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/common/AllContentModel.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesElementWildcard.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/AllContentModel.hpp" lastModified="f532ed4cc0">
+ <include file="../../src/xercesc/framework/XMLContentModel.hpp"/>
+ <include file="../../src/xercesc/util/ValueVectorOf.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMAttrMapImpl.hpp" lastModified="f14f979af0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp" lastModified="f14f8ab240">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaAttDefList.hpp" lastModified="f1f4073f50">
+ <include file="../../src/xercesc/util/RefHash2KeysTableOf.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaElementDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaAttDefList.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/validators/schema/SchemaAttDefList.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/KeyRefPair.c" lastModified="f14fa4e160">
+ <include file="../../src/xercesc/util/KeyRefPair.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XercesDefs.hpp" lastModified="f573a406c8">
+ <include file="../../src/xercesc/util/XercesVersion.hpp"/>
+ <include file="../../src/xercesc/util/AutoSense.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/Win32/Win32Defs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/AIX/AIXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/Solaris/SolarisDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/HPUX/HPUXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/IRIX/IRIXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/Tandem/TandemDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/BeOS/BeOSDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/Linux/LinuxDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/OS390/OS390Defs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/PTX/PTXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/OS2/OS2Defs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/OS400/OS400Defs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/Tru64/Tru64Defs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/QNX/QNXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/VCPPDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/CSetDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/BorlandCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/SunCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/SCOCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/SunKaiDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/HPCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/MIPSproDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/TandemCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/GCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/MVSCPPDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/IBMVAW32Defs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/IBMVAOS2Defs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/CodeWarriorDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/PTXCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/OS400SetDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/DECCXXDefs.hpp"/>
+ <include file="../../src/xercesc/util/Compilers/QCCDefs.hpp"/>
+ <include file="../../src/xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLURL.cpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/TransService.hpp"/>
+ <include file="../../src/xercesc/util/XMLURL.hpp"/>
+ <include file="../../src/xercesc/util/XMLNetAccessor.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/XMLUri.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLURL.hpp" lastModified="f740135960">
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/VCPPDefs.hpp" lastModified="f5743100a0">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/XMLUniCharacter.hpp" lastModified="f14fa041c8">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/XMLUniCharacter.cpp" lastModified="f251b2a1f8">
+ <include file="../../src/xercesc/util/regx/XMLUniCharacter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/StringDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/framework/XMLRefInfo.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.cpp" lastModified="f532ed50a8">
+ <include file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/QNameDatatypeValidator.cpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/QNameDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/QNameDatatypeValidator.hpp" lastModified="f52d2b6858">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/ContentHandler.hpp" lastModified="f3c9ad49f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp" lastModified="f1e7634cf8">
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesElementWildcard.cpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/validators/schema/XercesElementWildcard.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/XercesElementWildcard.hpp" lastModified="f14f873f70">
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMCDATASection.hpp" lastModified="f3ca1097d0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMText.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/IANAEncodings.hpp" lastModified="f30a738db0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax2/Attributes.hpp" lastModified="f3c9ad49f0">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Token.hpp" lastModified="f52d21c398">
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/regx/Token.cpp" lastModified="f1a719a8b8">
+ <include file="../../src/xercesc/util/regx/RangeToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/ModifierToken.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegularExpression.hpp"/>
+ <include file="../../src/xercesc/util/regx/RegxUtil.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp" lastModified="f4df446630">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/dom/DOMEntityReference.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMParentNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMChildNode.hpp"/>
+ <include file="../../src/xercesc/dom/impl/DOMNodeImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/Locator.hpp" lastModified="f3c9acec30">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/sax/ErrorHandler.hpp" lastModified="f579d6be00">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLException.hpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/XMLExceptMsgs.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLException.cpp" lastModified="f52d3883d0">
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ <include file="../../src/xercesc/util/Mutexes.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLMsgLoader.hpp"/>
+ <include file="../../src/xercesc/util/XMLRegisterCleanup.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/MemoryManagerArrayImpl.hpp" lastModified="f74040aaf0">
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/MemoryManagerArrayImpl.cpp" lastModified="f74040aaf0">
+ <include file="../../src/xercesc/internal/MemoryManagerArrayImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/common/Grammar.hpp" lastModified="f6b9542008">
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLEntityDecl.hpp"/>
+ <include file="../../src/xercesc/framework/XMLNotationDecl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp" lastModified="f53b93c318">
+ <include file="../../src/xercesc/validators/datatype/DoubleDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/DoubleDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractNumericValidator.hpp"/>
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ <include file="../../src/xercesc/util/XMLDouble.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Janitor.c" lastModified="f548c89360">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/MemBufFormatTarget.cpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/MemBufFormatTarget.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/MemBufFormatTarget.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/framework/XMLFormatter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp" lastModified="f521b12cd8">
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NOTATIONDatatypeValidator.hpp" lastModified="f52d2b6470">
+ <include file="../../src/xercesc/validators/datatype/AbstractStringValidator.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMLocator.hpp" lastModified="f3ca10b328">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLDouble.hpp" lastModified="f52f8f6068">
+ <include file="../../src/xercesc/util/XMLAbstractDoubleFloat.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLDouble.cpp" lastModified="f52f8f6069">
+ <include file="../../src/xercesc/util/XMLDouble.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/NumberFormatException.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ <sysinclude file="../../../../../../../../usr/include/errno.h"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLValidityCodes.hpp" lastModified="f4d69f2470">
+ <include file="../../src/xercesc/framework/XMLErrorReporter.hpp"/>
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/datatype/NOTATIONDatatypeValidator.cpp" lastModified="f52f8f7008">
+ <include file="../../src/xercesc/validators/datatype/NOTATIONDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/util/XMLUri.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeFacetException.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/InvalidDatatypeValueException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/dom/DOMDocumentTraversal.hpp" lastModified="f3ca10a770">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/HeaderDummy.cpp" lastModified="f14fa4dd78">
+ <include file="../../src/xercesc/util/BinInputStream.hpp"/>
+ <include file="../../src/xercesc/util/BinMemInputStream.hpp"/>
+ <include file="../../src/xercesc/util/BinFileInputStream.hpp"/>
+ <include file="../../src/xercesc/util/BitOps.hpp"/>
+ <include file="../../src/xercesc/util/EmptyStackException.hpp"/>
+ <include file="../../src/xercesc/util/IllegalArgumentException.hpp"/>
+ <include file="../../src/xercesc/util/InvalidCastException.hpp"/>
+ <include file="../../src/xercesc/util/IOException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/util/NullPointerException.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/RuntimeException.hpp"/>
+ <include file="../../src/xercesc/util/UnexpectedEOFException.hpp"/>
+ <include file="../../src/xercesc/util/UnsupportedEncodingException.hpp"/>
+ <include file="../../src/xercesc/util/UTFDataFormatException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/UnsupportedEncodingException.hpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLDateTime.hpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/XMLNumber.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ <include file="../../src/xercesc/util/SchemaDateTimeException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/XMLDateTime.cpp" lastModified="f6fe62ddd8">
+ <include file="../../src/xercesc/util/XMLDateTime.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ <include file="../../src/xercesc/util/XMLUni.hpp"/>
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ </source>
+ <source file="../../src/xercesc/util/BaseRefVectorOf.hpp" lastModified="f56a88c600">
+ <include file="../../src/xercesc/util/ArrayIndexOutOfBoundsException.hpp"/>
+ <include file="../../src/xercesc/util/XMLEnumerator.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <include file="../../src/xercesc/util/BaseRefVectorOf.c"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLEntityDecl.cpp" lastModified="f54da203f8">
+ <include file="../../src/xercesc/framework/XMLEntityDecl.hpp"/>
+ <include file="../../src/xercesc/util/XMLUniDefs.hpp"/>
+ </source>
+ <source file="../../src/xercesc/framework/XMLEntityDecl.hpp" lastModified="f532e76cd8">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/util/XMLString.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/ElemStack.hpp" lastModified="f532e774a8">
+ <include file="../../src/xercesc/util/StringPool.hpp"/>
+ <include file="../../src/xercesc/util/QName.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/ElemStack.cpp" lastModified="f53b93b760">
+ <include file="../../src/xercesc/util/EmptyStackException.hpp"/>
+ <include file="../../src/xercesc/util/NoSuchElementException.hpp"/>
+ <include file="../../src/xercesc/framework/XMLElementDecl.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/validators/common/Grammar.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/string.h"/>
+ </source>
+ <source file="../../src/xercesc/util/RefVectorOf.c" lastModified="f579d6c1e8">
+ <include file="../../src/xercesc/util/RefVectorOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/SCOCCDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/UnexpectedEOFException.hpp" lastModified="f14fa4e548">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <include file="../../src/xercesc/util/XMLException.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Compilers/OS400SetDefs.hpp" lastModified="f14f834000">
+ <sysinclude file="../../../../../../../../usr/include/sys/types.h"/>
+ <sysinclude file="../../../../../../../../usr/include/limits.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMemory.cpp" lastModified="f739e11758">
+ <include file="../../src/xercesc/util/XMemory.hpp"/>
+ <include file="../../src/xercesc/util/PlatformUtils.hpp"/>
+ <include file="../../src/xercesc/framework/MemoryManager.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/assert.h"/>
+ </source>
+ <source file="../../src/xercesc/util/XMemory.hpp" lastModified="f739e11758">
+ <include file="../../src/xercesc/util/XercesDefs.hpp"/>
+ <sysinclude file="../../../../../../../../usr/include/stdlib.h"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLGrammarPoolImpl.hpp" lastModified="f6b951d618">
+ <include file="../../src/xercesc/framework/XMLGrammarPool.hpp"/>
+ <include file="../../src/xercesc/util/RefHashTableOf.hpp"/>
+ </source>
+ <source file="../../src/xercesc/internal/XMLGrammarPoolImpl.cpp" lastModified="f6b951d618">
+ <include file="../../src/xercesc/internal/XMLGrammarPoolImpl.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/DTDGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp"/>
+ </source>
+ <source file="../../src/xercesc/util/Platforms/Solaris/SolarisDefs.hpp" lastModified="ebc3ca88e8">
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaValidator.hpp" lastModified="f6fe662d80">
+ <include file="../../src/xercesc/framework/XMLValidator.hpp"/>
+ <include file="../../src/xercesc/framework/XMLBuffer.hpp"/>
+ <include file="../../src/xercesc/util/ValueStackOf.hpp"/>
+ <include file="../../src/xercesc/validators/common/ContentSpecNode.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaGrammar.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDErrorReporter.hpp"/>
+ </source>
+ <source file="../../src/xercesc/validators/schema/SchemaValidator.cpp" lastModified="f6fe662d80">
+ <include file="../../src/xercesc/util/Janitor.hpp"/>
+ <include file="../../src/xercesc/util/KVStringPair.hpp"/>
+ <include file="../../src/xercesc/framework/XMLDocumentHandler.hpp"/>
+ <include file="../../src/xercesc/framework/XMLSchemaDescription.hpp"/>
+ <include file="../../src/xercesc/internal/XMLReader.hpp"/>
+ <include file="../../src/xercesc/internal/XMLScanner.hpp"/>
+ <include file="../../src/xercesc/internal/ElemStack.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/ListDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaSymbols.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SchemaValidator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XercesGroupInfo.hpp"/>
+ <include file="../../src/xercesc/validators/schema/XSDLocator.hpp"/>
+ <include file="../../src/xercesc/internal/XMLGrammarPoolImpl.hpp"/>
+ </source>
+ </includePath>
+</dependencies>
diff --git a/test/junit/files/xerces-c/history.xml b/test/junit/files/xerces-c/history.xml
new file mode 100644
index 0000000..2e8a3c0
--- /dev/null
+++ b/test/junit/files/xerces-c/history.xml
@@ -0,0 +1,636 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<history>
+ <processor signature="gcc 2.95.3 i486-suse-linux-c -g -fPIC -DPROJ_SAX2 -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_DOM -DPROJ_VALIDATORS -DXML_SINGLEDLL -DLINUX -D_REENTRANT -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -D_GNU_SOURCE -D__USE_GNU -I..">
+ <target file="LinuxPlatformUtils.o" lastModified="f75e50ed20">
+ <source file="../../src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp" lastModified="f52d1d1460"/>
+ </target>
+ </processor>
+ <processor signature="gcc 2.95.3 i486-suse-linux-c -g -fPIC -DPROJ_SAX2 -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_DOM -DPROJ_VALIDATORS -DXML_SINGLEDLL -DLINUX -D_REENTRANT -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -I..">
+ <target file="DayDatatypeValidator.o" lastModified="f75e4feb50">
+ <source file="../../src/xercesc/validators/datatype/DayDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="DOMBuilderImpl.o" lastModified="f75e4cce70">
+ <source file="../../src/xercesc/parsers/DOMBuilderImpl.cpp" lastModified="f7211e8778"/>
+ </target>
+ <target file="StringPool.o" lastModified="f75e50ba58">
+ <source file="../../src/xercesc/util/StringPool.cpp" lastModified="f53b93bb48"/>
+ </target>
+ <target file="IGXMLScanner2.o" lastModified="f75e4fe380">
+ <source file="../../src/xercesc/internal/IGXMLScanner2.cpp" lastModified="f6fe622a28"/>
+ </target>
+ <target file="QNameDatatypeValidator.o" lastModified="f75e4d18a8">
+ <source file="../../src/xercesc/validators/datatype/QNameDatatypeValidator.cpp" lastModified="f52d2b6858"/>
+ </target>
+ <target file="IC_Selector.o" lastModified="f75e4d3018">
+ <source file="../../src/xercesc/validators/schema/identity/IC_Selector.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="DateTimeValidator.o" lastModified="f75e4ef538">
+ <source file="../../src/xercesc/validators/datatype/DateTimeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="DatatypeValidator.o" lastModified="f75e50b670">
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="InputSource.o" lastModified="f75e4fe768">
+ <source file="../../src/xercesc/sax/InputSource.cpp" lastModified="f532e77c78"/>
+ </target>
+ <target file="ListDatatypeValidator.o" lastModified="f75e4e0308">
+ <source file="../../src/xercesc/validators/datatype/ListDatatypeValidator.cpp" lastModified="f52f8f7008"/>
+ </target>
+ <target file="DateDatatypeValidator.o" lastModified="f75e4cbed0">
+ <source file="../../src/xercesc/validators/datatype/DateDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="RangeTokenMap.o" lastModified="f75e4e6c80">
+ <source file="../../src/xercesc/util/regx/RangeTokenMap.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="HashXMLCh.o" lastModified="f75e4c8ff0">
+ <source file="../../src/xercesc/util/HashXMLCh.cpp" lastModified="f52d3599b8"/>
+ </target>
+ <target file="XercesElementWildcard.o" lastModified="f75e4cbae8">
+ <source file="../../src/xercesc/validators/schema/XercesElementWildcard.cpp" lastModified="f14f873f70"/>
+ </target>
+ <target file="DFAContentModel.o" lastModified="f75e4fa8e8">
+ <source file="../../src/xercesc/validators/common/DFAContentModel.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="DateTimeDatatypeValidator.o" lastModified="f75e509730">
+ <source file="../../src/xercesc/validators/datatype/DateTimeDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="VecAttrListImpl.o" lastModified="f75e4cda28">
+ <source file="../../src/xercesc/internal/VecAttrListImpl.cpp" lastModified="f52d12b808"/>
+ </target>
+ <target file="IDREFDatatypeValidator.o" lastModified="f75e5054c8">
+ <source file="../../src/xercesc/validators/datatype/IDREFDatatypeValidator.cpp" lastModified="f532ed50a8"/>
+ </target>
+ <target file="VecAttributesImpl.o" lastModified="f75e501e18">
+ <source file="../../src/xercesc/internal/VecAttributesImpl.cpp" lastModified="f532e774a8"/>
+ </target>
+ <target file="XMLAttDef.o" lastModified="f75e4d43a0">
+ <source file="../../src/xercesc/framework/XMLAttDef.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="XMLMsgLoader.o" lastModified="f75e4f4358">
+ <source file="../../src/xercesc/util/XMLMsgLoader.cpp" lastModified="f52d3883d0"/>
+ </target>
+ <target file="IC_KeyRef.o" lastModified="f75e4dff20">
+ <source file="../../src/xercesc/validators/schema/identity/IC_KeyRef.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="ConditionToken.o" lastModified="f75e4fb4a0">
+ <source file="../../src/xercesc/util/regx/ConditionToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="UnionToken.o" lastModified="f75e4da160">
+ <source file="../../src/xercesc/util/regx/UnionToken.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="InMemMsgLoader.o" lastModified="f75e506080">
+ <source file="../../src/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.cpp" lastModified="f52d15c548"/>
+ </target>
+ <target file="ENTITYDatatypeValidator.o" lastModified="f75e5025e8">
+ <source file="../../src/xercesc/validators/datatype/ENTITYDatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="XMLEntityDecl.o" lastModified="f75e4fbc70">
+ <source file="../../src/xercesc/framework/XMLEntityDecl.cpp" lastModified="f54da203f8"/>
+ </target>
+ <target file="EncodingValidator.o" lastModified="f75e4cbae8">
+ <source file="../../src/xercesc/util/EncodingValidator.cpp" lastModified="f3badfa580"/>
+ </target>
+ <target file="ContentSpecNode.o" lastModified="f75e4f9948">
+ <source file="../../src/xercesc/validators/common/ContentSpecNode.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="ReaderMgr.o" lastModified="f75e4deb98">
+ <source file="../../src/xercesc/internal/ReaderMgr.cpp" lastModified="f6fe622a28"/>
+ </target>
+ <target file="XMLElementDecl.o" lastModified="f75e4fef38">
+ <source file="../../src/xercesc/framework/XMLElementDecl.cpp" lastModified="f53b93b760"/>
+ </target>
+ <target file="SAX2XMLReaderImpl.o" lastModified="f75e4dc488">
+ <source file="../../src/xercesc/parsers/SAX2XMLReaderImpl.cpp" lastModified="f6fbf9c160"/>
+ </target>
+ <target file="IGXMLScanner.o" lastModified="f75e50b288">
+ <source file="../../src/xercesc/internal/IGXMLScanner.cpp" lastModified="f7438ecc50"/>
+ </target>
+ <target file="IC_Key.o" lastModified="f75e4dad18">
+ <source file="../../src/xercesc/validators/schema/identity/IC_Key.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="RangeFactory.o" lastModified="f75e4caf30">
+ <source file="../../src/xercesc/util/regx/RangeFactory.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="XMLUTF8Transcoder.o" lastModified="f75e502db8">
+ <source file="../../src/xercesc/util/XMLUTF8Transcoder.cpp" lastModified="f40d0c5bf0"/>
+ </target>
+ <target file="SchemaSymbols.o" lastModified="f75e4d0cf0">
+ <source file="../../src/xercesc/validators/schema/SchemaSymbols.cpp" lastModified="f14f873f70"/>
+ </target>
+ <target file="UnicodeRangeFactory.o" lastModified="f75e4d7a50">
+ <source file="../../src/xercesc/util/regx/UnicodeRangeFactory.cpp" lastModified="f14fa041c8"/>
+ </target>
+ <target file="XPathMatcherStack.o" lastModified="f75e4cc6a0">
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcherStack.cpp" lastModified="f53b93cae8"/>
+ </target>
+ <target file="RangeToken.o" lastModified="f75e4d4b70">
+ <source file="../../src/xercesc/util/regx/RangeToken.cpp" lastModified="f532e78060"/>
+ </target>
+ <target file="ParenToken.o" lastModified="f75e4cc6a0">
+ <source file="../../src/xercesc/util/regx/ParenToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="XercesDOMParser.o" lastModified="f75e503d58">
+ <source file="../../src/xercesc/parsers/XercesDOMParser.cpp" lastModified="f71a8f40f0"/>
+ </target>
+ <target file="XMLUTF16Transcoder.o" lastModified="f75e4ce9c8">
+ <source file="../../src/xercesc/util/XMLUTF16Transcoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="URLInputSource.o" lastModified="f75e4ce9c8">
+ <source file="../../src/xercesc/framework/URLInputSource.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="PanicHandler.o" lastModified="f75e4c97c0">
+ <source file="../../src/xercesc/util/PanicHandler.cpp" lastModified="f3d3bf3340"/>
+ </target>
+ <target file="XMLBuffer.o" lastModified="f75e4dc870">
+ <source file="../../src/xercesc/framework/XMLBuffer.cpp" lastModified="f52d126218"/>
+ </target>
+ <target file="LocalFileFormatTarget.o" lastModified="f75e50c9f8">
+ <source file="../../src/xercesc/framework/LocalFileFormatTarget.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="BinMemInputStream.o" lastModified="f75e50ba58">
+ <source file="../../src/xercesc/util/BinMemInputStream.cpp" lastModified="f52ef34390"/>
+ </target>
+ <target file="ParserForXMLSchema.o" lastModified="f75e501260">
+ <source file="../../src/xercesc/util/regx/ParserForXMLSchema.cpp" lastModified="f52d21bfb0"/>
+ </target>
+ <target file="XMLScanner.o" lastModified="f75e50d998">
+ <source file="../../src/xercesc/internal/XMLScanner.cpp" lastModified="f6fe622a28"/>
+ </target>
+ <target file="DefaultPanicHandler.o" lastModified="f75e4fc828">
+ <source file="../../src/xercesc/util/DefaultPanicHandler.cpp" lastModified="f3d3bf3340"/>
+ </target>
+ <target file="MixedContentModel.o" lastModified="f75e4e0ec0">
+ <source file="../../src/xercesc/validators/common/MixedContentModel.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="XPathSymbols.o" lastModified="f75e4d9990">
+ <source file="../../src/xercesc/validators/schema/identity/XPathSymbols.cpp" lastModified="f14f8566c8"/>
+ </target>
+ <target file="AbstractStringValidator.o" lastModified="f75e4ed9e0">
+ <source file="../../src/xercesc/validators/datatype/AbstractStringValidator.cpp" lastModified="f52f8f7008"/>
+ </target>
+ <target file="DecimalDatatypeValidator.o" lastModified="f75e508f60">
+ <source file="../../src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="CMBinaryOp.o" lastModified="f75e508790">
+ <source file="../../src/xercesc/validators/common/CMBinaryOp.cpp" lastModified="f52d26d478"/>
+ </target>
+ <target file="HexBinaryDatatypeValidator.o" lastModified="f75e4e64b0">
+ <source file="../../src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="NOTATIONDatatypeValidator.o" lastModified="f75e4c9ba8">
+ <source file="../../src/xercesc/validators/datatype/NOTATIONDatatypeValidator.cpp" lastModified="f52f8f7008"/>
+ </target>
+ <target file="DatatypeValidatorFactory.o" lastModified="f75e503970">
+ <source file="../../src/xercesc/validators/datatype/DatatypeValidatorFactory.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="XMLSchemaDescriptionImpl.o" lastModified="f75e4c9f90">
+ <source file="../../src/xercesc/validators/schema/XMLSchemaDescriptionImpl.cpp" lastModified="f6b95a7138"/>
+ </target>
+ <target file="AbstractDOMParser.o" lastModified="f75e4d66c8">
+ <source file="../../src/xercesc/parsers/AbstractDOMParser.cpp" lastModified="f728d1b490"/>
+ </target>
+ <target file="FieldActivator.o" lastModified="f75e4d5b10">
+ <source file="../../src/xercesc/validators/schema/identity/FieldActivator.cpp" lastModified="f54da207e0"/>
+ </target>
+ <target file="XercesGroupInfo.o" lastModified="f75e4d0908">
+ <source file="../../src/xercesc/validators/schema/XercesGroupInfo.cpp" lastModified="f53b93c700"/>
+ </target>
+ <target file="TimeDatatypeValidator.o" lastModified="f75e4f1090">
+ <source file="../../src/xercesc/validators/datatype/TimeDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="HexBin.o" lastModified="f75e4f7df0">
+ <source file="../../src/xercesc/util/HexBin.cpp" lastModified="f14fa4dd78"/>
+ </target>
+ <target file="SAXException.o" lastModified="f75e4deb98">
+ <source file="../../src/xercesc/sax/SAXException.cpp" lastModified="f6fbf9c160"/>
+ </target>
+ <target file="Match.o" lastModified="f75e4ff320">
+ <source file="../../src/xercesc/util/regx/Match.cpp" lastModified="f52e46f630"/>
+ </target>
+ <target file="XMLReader.o" lastModified="f75e4ffaf0">
+ <source file="../../src/xercesc/internal/XMLReader.cpp" lastModified="f62396d7b8"/>
+ </target>
+ <target file="DoubleDatatypeValidator.o" lastModified="f75e50e550">
+ <source file="../../src/xercesc/validators/datatype/DoubleDatatypeValidator.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="XSDDOMParser.o" lastModified="f75e4f8d90">
+ <source file="../../src/xercesc/validators/schema/XSDDOMParser.cpp" lastModified="f5e6992640"/>
+ </target>
+ <target file="XMemory.o" lastModified="f75e4d9d78">
+ <source file="../../src/xercesc/util/XMemory.cpp" lastModified="f739e11758"/>
+ </target>
+ <target file="XMLGrammarPoolImpl.o" lastModified="f75e4cab48">
+ <source file="../../src/xercesc/internal/XMLGrammarPoolImpl.cpp" lastModified="f6b951d618"/>
+ </target>
+ <target file="DTDGrammar.o" lastModified="f75e5083a8">
+ <source file="../../src/xercesc/validators/DTD/DTDGrammar.cpp" lastModified="f6fe65e730"/>
+ </target>
+ <target file="BMPattern.o" lastModified="f75e4d14c0">
+ <source file="../../src/xercesc/util/regx/BMPattern.cpp" lastModified="f52d21bfb0"/>
+ </target>
+ <target file="GeneralAttributeCheck.o" lastModified="f75e4d89f0">
+ <source file="../../src/xercesc/validators/schema/GeneralAttributeCheck.cpp" lastModified="f52d2f11d8"/>
+ </target>
+ <target file="HeaderDummy.o" lastModified="f75e50b670">
+ <source file="../../src/xercesc/util/HeaderDummy.cpp" lastModified="f14fa4dd78"/>
+ </target>
+ <target file="TokenFactory.o" lastModified="f75e50dd80">
+ <source file="../../src/xercesc/util/regx/TokenFactory.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="XSDLocator.o" lastModified="f75e4cbae8">
+ <source file="../../src/xercesc/validators/schema/XSDLocator.cpp" lastModified="f14f873f70"/>
+ </target>
+ <target file="XML88591Transcoder.o" lastModified="f75e4d2848">
+ <source file="../../src/xercesc/util/XML88591Transcoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="XML256TableTranscoder.o" lastModified="f75e4d3400">
+ <source file="../../src/xercesc/util/XML256TableTranscoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="ASCIIRangeFactory.o" lastModified="f75e4fc828">
+ <source file="../../src/xercesc/util/regx/ASCIIRangeFactory.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="XercesXPath.o" lastModified="f75e4cb700">
+ <source file="../../src/xercesc/validators/schema/identity/XercesXPath.cpp" lastModified="f53b93cae8"/>
+ </target>
+ <target file="DOMXPathException.o" lastModified="f75e4d5b10">
+ <source file="../../src/xercesc/dom/DOMXPathException.cpp" lastModified="f71f1f8710"/>
+ </target>
+ <target file="DTDElementDecl.o" lastModified="f75e505c98">
+ <source file="../../src/xercesc/validators/DTD/DTDElementDecl.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="ValueStoreCache.o" lastModified="f75e4d3fb8">
+ <source file="../../src/xercesc/validators/schema/identity/ValueStoreCache.cpp" lastModified="f56680bec8"/>
+ </target>
+ <target file="MemBufFormatTarget.o" lastModified="f75e500a90">
+ <source file="../../src/xercesc/framework/MemBufFormatTarget.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="AnySimpleTypeDatatypeValidator.o" lastModified="f75e4dd428">
+ <source file="../../src/xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="UnixHTTPURLInputStream.o" lastModified="f75e4f08c0">
+ <source file="../../src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp" lastModified="f534aecb10"/>
+ </target>
+ <target file="SchemaGrammar.o" lastModified="f75e4d0138">
+ <source file="../../src/xercesc/validators/schema/SchemaGrammar.cpp" lastModified="f6b9585a10"/>
+ </target>
+ <target file="XMLUniCharacter.o" lastModified="f75e4da930">
+ <source file="../../src/xercesc/util/regx/XMLUniCharacter.cpp" lastModified="f251b2a1f8"/>
+ </target>
+ <target file="FloatDatatypeValidator.o" lastModified="f75e50c228">
+ <source file="../../src/xercesc/validators/datatype/FloatDatatypeValidator.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="SchemaElementDecl.o" lastModified="f75e4d7668">
+ <source file="../../src/xercesc/validators/schema/SchemaElementDecl.cpp" lastModified="f53b93c700"/>
+ </target>
+ <target file="AllContentModel.o" lastModified="f75e4e5ce0">
+ <source file="../../src/xercesc/validators/common/AllContentModel.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="XMLAbstractDoubleFloat.o" lastModified="f75e4fc058">
+ <source file="../../src/xercesc/util/XMLAbstractDoubleFloat.cpp" lastModified="f52f8f5c80"/>
+ </target>
+ <target file="CMAny.o" lastModified="f75e4d4788">
+ <source file="../../src/xercesc/validators/common/CMAny.cpp" lastModified="f52d26d478"/>
+ </target>
+ <target file="IdentityConstraint.o" lastModified="f75e509348">
+ <source file="../../src/xercesc/validators/schema/identity/IdentityConstraint.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="KVStringPair.o" lastModified="f75e4cda28">
+ <source file="../../src/xercesc/util/KVStringPair.cpp" lastModified="f52f8f5c80"/>
+ </target>
+ <target file="ClosureToken.o" lastModified="f75e4fc058">
+ <source file="../../src/xercesc/util/regx/ClosureToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="TransService.o" lastModified="f75e506850">
+ <source file="../../src/xercesc/util/TransService.cpp" lastModified="f52d387fe8"/>
+ </target>
+ <target file="BitSet.o" lastModified="f75e4ce5e0">
+ <source file="../../src/xercesc/util/BitSet.cpp" lastModified="f52d3599b8"/>
+ </target>
+ <target file="XSDErrorReporter.o" lastModified="f75e4e5510">
+ <source file="../../src/xercesc/validators/schema/XSDErrorReporter.cpp" lastModified="f3d3be0e48"/>
+ </target>
+ <target file="IDDatatypeValidator.o" lastModified="f75e4fc828">
+ <source file="../../src/xercesc/validators/datatype/IDDatatypeValidator.cpp" lastModified="f532ed50a8"/>
+ </target>
+ <target file="Wrapper4DOMInputSource.o" lastModified="f75e4caf30">
+ <source file="../../src/xercesc/framework/Wrapper4DOMInputSource.cpp" lastModified="f579d6ba18"/>
+ </target>
+ <target file="NCNameDatatypeValidator.o" lastModified="f75e506c38">
+ <source file="../../src/xercesc/validators/datatype/NCNameDatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="BinFileInputStream.o" lastModified="f75e5077f0">
+ <source file="../../src/xercesc/util/BinFileInputStream.cpp" lastModified="f52ef34390"/>
+ </target>
+ <target file="XMLRangeFactory.o" lastModified="f75e4ff320">
+ <source file="../../src/xercesc/util/regx/XMLRangeFactory.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="XMLWin1252Transcoder.o" lastModified="f75e4d18a8">
+ <source file="../../src/xercesc/util/XMLWin1252Transcoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="DTDScanner.o" lastModified="f75e500a90">
+ <source file="../../src/xercesc/validators/DTD/DTDScanner.cpp" lastModified="f64dc37d20"/>
+ </target>
+ <target file="XMLContentModel.o" lastModified="f75e4fb0b8">
+ <source file="../../src/xercesc/framework/XMLContentModel.cpp" lastModified="f14f90ff88"/>
+ </target>
+ <target file="BooleanDatatypeValidator.o" lastModified="f75e4dad18">
+ <source file="../../src/xercesc/validators/datatype/BooleanDatatypeValidator.cpp" lastModified="f52f8f7008"/>
+ </target>
+ <target file="Token.o" lastModified="f75e4d43a0">
+ <source file="../../src/xercesc/util/regx/Token.cpp" lastModified="f1a719a8b8"/>
+ </target>
+ <target file="XMLUni.o" lastModified="f75e4f9948">
+ <source file="../../src/xercesc/util/XMLUni.cpp" lastModified="f724d6a5a8"/>
+ </target>
+ <target file="RegxParser.o" lastModified="f75e4ee980">
+ <source file="../../src/xercesc/util/regx/RegxParser.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="SAXParser.o" lastModified="f75e4ebe88">
+ <source file="../../src/xercesc/parsers/SAXParser.cpp" lastModified="f6fbf9c160"/>
+ </target>
+ <target file="Wrapper4InputSource.o" lastModified="f75e4cc6a0">
+ <source file="../../src/xercesc/framework/Wrapper4InputSource.cpp" lastModified="f579d6ba18"/>
+ </target>
+ <target file="XMLString.o" lastModified="f75e4ddbf8">
+ <source file="../../src/xercesc/util/XMLString.cpp" lastModified="f53b93bb48"/>
+ </target>
+ <target file="Base64BinaryDatatypeValidator.o" lastModified="f75e4e06f0">
+ <source file="../../src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="XMLEBCDICTranscoder.o" lastModified="f75e4d0cf0">
+ <source file="../../src/xercesc/util/XMLEBCDICTranscoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="LocalFileInputSource.o" lastModified="f75e4d9990">
+ <source file="../../src/xercesc/framework/LocalFileInputSource.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="YearMonthDatatypeValidator.o" lastModified="f75e4dbcb8">
+ <source file="../../src/xercesc/validators/datatype/YearMonthDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="XMLFormatter.o" lastModified="f75e4f81d8">
+ <source file="../../src/xercesc/framework/XMLFormatter.cpp" lastModified="f579d6ba18"/>
+ </target>
+ <target file="XMLNumber.o" lastModified="f75e5058b0">
+ <source file="../../src/xercesc/util/XMLNumber.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="MemBufInputSource.o" lastModified="f75e4cab48">
+ <source file="../../src/xercesc/framework/MemBufInputSource.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="XMLValidator.o" lastModified="f75e4d14c0">
+ <source file="../../src/xercesc/framework/XMLValidator.cpp" lastModified="f52d126218"/>
+ </target>
+ <target file="StdOutFormatTarget.o" lastModified="f75e4d0908">
+ <source file="../../src/xercesc/framework/StdOutFormatTarget.cpp" lastModified="f573a406c8"/>
+ </target>
+ <target file="DurationDatatypeValidator.o" lastModified="f75e4cf580">
+ <source file="../../src/xercesc/validators/datatype/DurationDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="SocketNetAccessor.o" lastModified="f75e4d8dd8">
+ <source file="../../src/xercesc/util/NetAccessors/Socket/SocketNetAccessor.cpp" lastModified="f534aecb10"/>
+ </target>
+ <target file="XUtil.o" lastModified="f75e4cc2b8">
+ <source file="../../src/xercesc/validators/schema/XUtil.cpp" lastModified="f14f873f70"/>
+ </target>
+ <target file="XMLBufferMgr.o" lastModified="f75e4d5728">
+ <source file="../../src/xercesc/framework/XMLBufferMgr.cpp" lastModified="f52d126218"/>
+ </target>
+ <target file="SAXParseException.o" lastModified="f75e4e12a8">
+ <source file="../../src/xercesc/sax/SAXParseException.cpp" lastModified="f6fbf9c160"/>
+ </target>
+ <target file="XMLFloat.o" lastModified="f75e50d998">
+ <source file="../../src/xercesc/util/XMLFloat.cpp" lastModified="f52f8f6068"/>
+ </target>
+ <target file="FieldValueMap.o" lastModified="f75e4d2848">
+ <source file="../../src/xercesc/validators/schema/identity/FieldValueMap.cpp" lastModified="f54da207e0"/>
+ </target>
+ <target file="XMLUCSTranscoder.o" lastModified="f75e501648">
+ <source file="../../src/xercesc/util/XMLUCSTranscoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="ElemStack.o" lastModified="f75e4f33b8">
+ <source file="../../src/xercesc/internal/ElemStack.cpp" lastModified="f53b93b760"/>
+ </target>
+ <target file="MonthDatatypeValidator.o" lastModified="f75e4e4958">
+ <source file="../../src/xercesc/validators/datatype/MonthDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="QName.o" lastModified="f75e4ec270">
+ <source file="../../src/xercesc/util/QName.cpp" lastModified="f52f8f5c80"/>
+ </target>
+ <target file="RegxUtil.o" lastModified="f75e501260">
+ <source file="../../src/xercesc/util/regx/RegxUtil.cpp" lastModified="f52e46f630"/>
+ </target>
+ <target file="SubstitutionGroupComparator.o" lastModified="f75e4dd040">
+ <source file="../../src/xercesc/validators/schema/SubstitutionGroupComparator.cpp" lastModified="f6b95a7138"/>
+ </target>
+ <target file="SchemaAttDefList.o" lastModified="f75e4db4e8">
+ <source file="../../src/xercesc/validators/schema/SchemaAttDefList.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="XMLScannerResolver.o" lastModified="f75e4d2460">
+ <source file="../../src/xercesc/internal/XMLScannerResolver.cpp" lastModified="f64dc0ece0"/>
+ </target>
+ <target file="SchemaAttDef.o" lastModified="f75e4f00f0">
+ <source file="../../src/xercesc/validators/schema/SchemaAttDef.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="IC_Field.o" lastModified="f75e4ff708">
+ <source file="../../src/xercesc/validators/schema/identity/IC_Field.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="WFXMLScanner.o" lastModified="f75e4d9990">
+ <source file="../../src/xercesc/internal/WFXMLScanner.cpp" lastModified="f6939ac6c8"/>
+ </target>
+ <target file="CharToken.o" lastModified="f75e4c9ba8">
+ <source file="../../src/xercesc/util/regx/CharToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="XMLBigDecimal.o" lastModified="f75e50e168">
+ <source file="../../src/xercesc/util/XMLBigDecimal.cpp" lastModified="f6fe62ddd8"/>
+ </target>
+ <target file="BlockRangeFactory.o" lastModified="f75e507bd8">
+ <source file="../../src/xercesc/util/regx/BlockRangeFactory.cpp" lastModified="f377d1b508"/>
+ </target>
+ <target file="BinInputStream.o" lastModified="f75e5025e8">
+ <source file="../../src/xercesc/util/BinInputStream.cpp" lastModified="f14fa4dd78"/>
+ </target>
+ <target file="DTDAttDefList.o" lastModified="f75e4eca40">
+ <source file="../../src/xercesc/validators/DTD/DTDAttDefList.cpp" lastModified="f14f882200"/>
+ </target>
+ <target file="DGXMLScanner.o" lastModified="f75e4f7238">
+ <source file="../../src/xercesc/internal/DGXMLScanner.cpp" lastModified="f6b951d618"/>
+ </target>
+ <target file="XMLNotationDecl.o" lastModified="f75e50c228">
+ <source file="../../src/xercesc/framework/XMLNotationDecl.cpp" lastModified="f532e76cd8"/>
+ </target>
+ <target file="IC_Unique.o" lastModified="f75e4f2be8">
+ <source file="../../src/xercesc/validators/schema/identity/IC_Unique.cpp" lastModified="f52d3101f0"/>
+ </target>
+ <target file="Dummy.o" lastModified="f75e4cd258">
+ <source file="../../src/xercesc/sax/Dummy.cpp" lastModified="f14f8d65a8"/>
+ </target>
+ <target file="PlatformUtils.o" lastModified="f75e4e0ad8">
+ <source file="../../src/xercesc/util/PlatformUtils.cpp" lastModified="f744486020"/>
+ </target>
+ <target file="XMLDateTime.o" lastModified="f75e4d2c30">
+ <source file="../../src/xercesc/util/XMLDateTime.cpp" lastModified="f6fe62ddd8"/>
+ </target>
+ <target file="GCCDefs.o" lastModified="f75e4d18a8">
+ <source file="../../src/xercesc/util/Compilers/GCCDefs.cpp" lastModified="f198df5338"/>
+ </target>
+ <target file="NamespaceScope.o" lastModified="f75e4def80">
+ <source file="../../src/xercesc/validators/schema/NamespaceScope.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="Mutexes.o" lastModified="f75e4dfb38">
+ <source file="../../src/xercesc/util/Mutexes.cpp" lastModified="f14fa4e160"/>
+ </target>
+ <target file="RegularExpression.o" lastModified="f75e4d5728">
+ <source file="../../src/xercesc/util/regx/RegularExpression.cpp" lastModified="f6fe62ddd8"/>
+ </target>
+ <target file="SimpleContentModel.o" lastModified="f75e501648">
+ <source file="../../src/xercesc/validators/common/SimpleContentModel.cpp" lastModified="f14f8c11d0"/>
+ </target>
+ <target file="StringDatatypeValidator.o" lastModified="f75e4e7450">
+ <source file="../../src/xercesc/validators/datatype/StringDatatypeValidator.cpp" lastModified="f52d2b6858"/>
+ </target>
+ <target file="XMLIBM1140Transcoder.o" lastModified="f75e4ddfe0">
+ <source file="../../src/xercesc/util/XMLIBM1140Transcoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="XMLUri.o" lastModified="f75e4c93d8">
+ <source file="../../src/xercesc/util/XMLUri.cpp" lastModified="f698f48320"/>
+ </target>
+ <target file="SchemaInfo.o" lastModified="f75e50c610">
+ <source file="../../src/xercesc/validators/schema/SchemaInfo.cpp" lastModified="f532ed50a8"/>
+ </target>
+ <target file="XMLDTDDescriptionImpl.o" lastModified="f75e4dfb38">
+ <source file="../../src/xercesc/validators/DTD/XMLDTDDescriptionImpl.cpp" lastModified="f5e6839e88"/>
+ </target>
+ <target file="CMUnaryOp.o" lastModified="f75e4cc2b8">
+ <source file="../../src/xercesc/validators/common/CMUnaryOp.cpp" lastModified="f52d26d478"/>
+ </target>
+ <target file="DOMRangeException.o" lastModified="f75e5025e8">
+ <source file="../../src/xercesc/dom/DOMRangeException.cpp" lastModified="f14f9948a0"/>
+ </target>
+ <target file="DTDValidator.o" lastModified="f75e4cf198">
+ <source file="../../src/xercesc/validators/DTD/DTDValidator.cpp" lastModified="f532ed48d8"/>
+ </target>
+ <target file="ContentLeafNameTypeVector.o" lastModified="f75e4d9d78">
+ <source file="../../src/xercesc/validators/common/ContentLeafNameTypeVector.cpp" lastModified="f52d26d478"/>
+ </target>
+ <target file="MemoryManagerImpl.o" lastModified="f75e4fb4a0">
+ <source file="../../src/xercesc/internal/MemoryManagerImpl.cpp" lastModified="f4b106eba8"/>
+ </target>
+ <target file="AbstractNumericFacetValidator.o" lastModified="f75e4df750">
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericFacetValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="MemoryManagerArrayImpl.o" lastModified="f75e4e4958">
+ <source file="../../src/xercesc/internal/MemoryManagerArrayImpl.cpp" lastModified="f74040aaf0"/>
+ </target>
+ <target file="XMLASCIITranscoder.o" lastModified="f75e4c8050">
+ <source file="../../src/xercesc/util/XMLASCIITranscoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="XMLURL.o" lastModified="f75e4f7a08">
+ <source file="../../src/xercesc/util/XMLURL.cpp" lastModified="f6fe62ddd8"/>
+ </target>
+ <target file="UnionDatatypeValidator.o" lastModified="f75e502db8">
+ <source file="../../src/xercesc/validators/datatype/UnionDatatypeValidator.cpp" lastModified="f70c111828"/>
+ </target>
+ <target file="XPathMatcher.o" lastModified="f75e4ce5e0">
+ <source file="../../src/xercesc/validators/schema/identity/XPathMatcher.cpp" lastModified="f53b93cae8"/>
+ </target>
+ <target file="ComplexTypeInfo.o" lastModified="f75e4c8ff0">
+ <source file="../../src/xercesc/validators/schema/ComplexTypeInfo.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="SchemaValidator.o" lastModified="f75e5050e0">
+ <source file="../../src/xercesc/validators/schema/SchemaValidator.cpp" lastModified="f6fe662d80"/>
+ </target>
+ <target file="MonthDayDatatypeValidator.o" lastModified="f75e4fb0b8">
+ <source file="../../src/xercesc/validators/datatype/MonthDayDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ <target file="XMLException.o" lastModified="f75e4d4b70">
+ <source file="../../src/xercesc/util/XMLException.cpp" lastModified="f52d3883d0"/>
+ </target>
+ <target file="HashPtr.o" lastModified="f75e501a30">
+ <source file="../../src/xercesc/util/HashPtr.cpp" lastModified="f52d3599b8"/>
+ </target>
+ <target file="ValueStore.o" lastModified="f75e4f56e0">
+ <source file="../../src/xercesc/validators/schema/identity/ValueStore.cpp" lastModified="f53b93cae8"/>
+ </target>
+ <target file="AbstractNumericValidator.o" lastModified="f75e4d6ab0">
+ <source file="../../src/xercesc/validators/datatype/AbstractNumericValidator.cpp" lastModified="f52d2b6470"/>
+ </target>
+ <target file="XMLChar.o" lastModified="f75e5077f0">
+ <source file="../../src/xercesc/util/XMLChar.cpp" lastModified="f24cc1f810"/>
+ </target>
+ <target file="DTDAttDef.o" lastModified="f75e4c8438">
+ <source file="../../src/xercesc/validators/DTD/DTDAttDef.cpp" lastModified="f532ed48d8"/>
+ </target>
+ <target file="XercesAttGroupInfo.o" lastModified="f75e4cda28">
+ <source file="../../src/xercesc/validators/schema/XercesAttGroupInfo.cpp" lastModified="f52d2f11d8"/>
+ </target>
+ <target file="sax2Dummy.o" lastModified="f75e4f3f70">
+ <source file="../../src/xercesc/sax2/sax2Dummy.cpp" lastModified="f14f8cc968"/>
+ </target>
+ <target file="GrammarResolver.o" lastModified="f75e4f2800">
+ <source file="../../src/xercesc/validators/common/GrammarResolver.cpp" lastModified="f75d3cf898"/>
+ </target>
+ <target file="IconvTransService.o" lastModified="f75e4cd258">
+ <source file="../../src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp" lastModified="f536f6e268"/>
+ </target>
+ <target file="Op.o" lastModified="f75e4d4788">
+ <source file="../../src/xercesc/util/regx/Op.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="DOMException.o" lastModified="f75e4d0908">
+ <source file="../../src/xercesc/dom/DOMException.cpp" lastModified="f14f9948a0"/>
+ </target>
+ <target file="XMLDouble.o" lastModified="f75e4d3400">
+ <source file="../../src/xercesc/util/XMLDouble.cpp" lastModified="f52f8f6068"/>
+ </target>
+ <target file="ModifierToken.o" lastModified="f75e4e5510">
+ <source file="../../src/xercesc/util/regx/ModifierToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="XMLChTranscoder.o" lastModified="f75e4da548">
+ <source file="../../src/xercesc/util/XMLChTranscoder.cpp" lastModified="f14fa4e548"/>
+ </target>
+ <target file="NameDatatypeValidator.o" lastModified="f75e4fe768">
+ <source file="../../src/xercesc/validators/datatype/NameDatatypeValidator.cpp" lastModified="f52d2b6858"/>
+ </target>
+ <target file="StdInInputSource.o" lastModified="f75e4f9d30">
+ <source file="../../src/xercesc/framework/StdInInputSource.cpp" lastModified="f52ef362d0"/>
+ </target>
+ <target file="XMLBigInteger.o" lastModified="f75e4dd810">
+ <source file="../../src/xercesc/util/XMLBigInteger.cpp" lastModified="f54da207e0"/>
+ </target>
+ <target file="XMLRecognizer.o" lastModified="f75e4c97c0">
+ <source file="../../src/xercesc/framework/XMLRecognizer.cpp" lastModified="f52d126218"/>
+ </target>
+ <target file="SGXMLScanner.o" lastModified="f75e4eaee8">
+ <source file="../../src/xercesc/internal/SGXMLScanner.cpp" lastModified="f7438ecc50"/>
+ </target>
+ <target file="AnyURIDatatypeValidator.o" lastModified="f75e4fb888">
+ <source file="../../src/xercesc/validators/datatype/AnyURIDatatypeValidator.cpp" lastModified="f53b93c318"/>
+ </target>
+ <target file="ConcatToken.o" lastModified="f75e4d89f0">
+ <source file="../../src/xercesc/util/regx/ConcatToken.cpp" lastModified="f14fa03de0"/>
+ </target>
+ <target file="OpFactory.o" lastModified="f75e4e4d40">
+ <source file="../../src/xercesc/util/regx/OpFactory.cpp" lastModified="f53b93bf30"/>
+ </target>
+ <target file="XMLAttr.o" lastModified="f75e4ddbf8">
+ <source file="../../src/xercesc/framework/XMLAttr.cpp" lastModified="f53b93b760"/>
+ </target>
+ <target file="Base64.o" lastModified="f75e50c610">
+ <source file="../../src/xercesc/util/Base64.cpp" lastModified="f5479f2e90"/>
+ </target>
+ <target file="StringToken.o" lastModified="f75e4caf30">
+ <source file="../../src/xercesc/util/regx/StringToken.cpp" lastModified="f52e46f630"/>
+ </target>
+ <target file="TraverseSchema.o" lastModified="f75e4e4188">
+ <source file="../../src/xercesc/validators/schema/TraverseSchema.cpp" lastModified="f6fd66f978"/>
+ </target>
+ <target file="XMLStringTokenizer.o" lastModified="f75e508790">
+ <source file="../../src/xercesc/util/XMLStringTokenizer.cpp" lastModified="f53b93bb48"/>
+ </target>
+ <target file="YearDatatypeValidator.o" lastModified="f75e4de3c8">
+ <source file="../../src/xercesc/validators/datatype/YearDatatypeValidator.cpp" lastModified="f6fe655e78"/>
+ </target>
+ </processor>
+ <processor signature="gcc 2.95.3 i486-suse-linux-fpic -w -O -c -g -DCONSOLE -DLINUX -D_REENTRANT -I..">
+ <target file="CreateDOMDocument.o" lastModified="f75e513758">
+ <source file="../../samples/CreateDOMDocument/CreateDOMDocument.cpp" lastModified="f6de4942d0"/>
+ </target>
+ </processor>
+</history>
diff --git a/test/junit/net/CVS/Entries b/test/junit/net/CVS/Entries
new file mode 100644
index 0000000..04c4303
--- /dev/null
+++ b/test/junit/net/CVS/Entries
@@ -0,0 +1 @@
+D/sf////
diff --git a/test/junit/net/CVS/Repository b/test/junit/net/CVS/Repository
new file mode 100644
index 0000000..7c6da67
--- /dev/null
+++ b/test/junit/net/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net
diff --git a/test/junit/net/CVS/Root b/test/junit/net/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/CVS/Entries b/test/junit/net/sf/CVS/Entries
new file mode 100644
index 0000000..f19339c
--- /dev/null
+++ b/test/junit/net/sf/CVS/Entries
@@ -0,0 +1 @@
+D/antcontrib////
diff --git a/test/junit/net/sf/CVS/Repository b/test/junit/net/sf/CVS/Repository
new file mode 100644
index 0000000..854d26b
--- /dev/null
+++ b/test/junit/net/sf/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf
diff --git a/test/junit/net/sf/CVS/Root b/test/junit/net/sf/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/CVS/Entries b/test/junit/net/sf/antcontrib/CVS/Entries
new file mode 100644
index 0000000..18d9c65
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/CVS/Entries
@@ -0,0 +1 @@
+D/cpptasks////
diff --git a/test/junit/net/sf/antcontrib/CVS/Repository b/test/junit/net/sf/antcontrib/CVS/Repository
new file mode 100644
index 0000000..cf57a7e
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib
diff --git a/test/junit/net/sf/antcontrib/CVS/Root b/test/junit/net/sf/antcontrib/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/CVS/Entries
new file mode 100644
index 0000000..34f5f14
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/CVS/Entries
@@ -0,0 +1,23 @@
+/MockBuildListener.java/1.2/Sat Feb 28 19:04:46 2004//
+/MockFileCollector.java/1.2/Thu Apr 22 08:06:53 2004//
+/TestAllClasses.java/1.26/Thu Apr 22 08:06:53 2004//
+/TestCCTask.java/1.15/Sat May 1 01:40:39 2004//
+/TestCUtil.java/1.11/Sat Feb 28 19:04:46 2004//
+/TestCompilerDef.java/1.14/Tue May 11 03:50:11 2004//
+/TestCompilerEnum.java/1.5/Mon Aug 15 13:57:31 2005/-ko/
+/TestDependencyTable.java/1.2/Sat Feb 28 19:04:46 2004//
+/TestLinkerDef.java/1.11/Thu Apr 22 08:06:53 2004//
+/TestLinkerEnum.java/1.3/Sat Feb 28 19:04:46 2004//
+/TestOutputTypeEnum.java/1.3/Sat Feb 28 19:04:46 2004//
+/TestProcessorDef.java/1.12/Tue May 11 03:50:11 2004//
+/TestTargetHistoryTable.java/1.10/Tue May 11 03:50:11 2004//
+/TestTargetInfo.java/1.13/Tue May 11 03:50:11 2004//
+/TestXMLConsumer.java/1.2/Sat Feb 28 19:04:46 2004//
+/package.html/1.1/Fri Apr 16 04:04:11 2004//
+D/borland////
+D/compiler////
+D/devstudio////
+D/gcc////
+D/parser////
+D/trolltech////
+D/types////
diff --git a/test/junit/net/sf/antcontrib/cpptasks/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/CVS/Repository
new file mode 100644
index 0000000..04ae15a
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks
diff --git a/test/junit/net/sf/antcontrib/cpptasks/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/MockBuildListener.java b/test/junit/net/sf/antcontrib/cpptasks/MockBuildListener.java
new file mode 100644
index 0000000..ffa6083
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/MockBuildListener.java
@@ -0,0 +1,172 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildListener;
+/**
+ * Captures build events
+ *
+ */
+public class MockBuildListener implements BuildListener {
+ private Vector buildFinishedEvents = new Vector();
+ private Vector buildStartedEvents = new Vector();
+ private Vector messageLoggedEvents = new Vector();
+ private Vector targetFinishedEvents = new Vector();
+ private Vector targetStartedEvents = new Vector();
+ private Vector taskFinishedEvents = new Vector();
+ private Vector taskStartedEvents = new Vector();
+ /**
+ * Signals that the last target has finished. This event will still be
+ * fired if an error occurred during the build.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getException()
+ */
+ public void buildFinished(BuildEvent event) {
+ buildFinishedEvents.addElement(event);
+ }
+ /**
+ * Signals that a build has started. This event is fired before any targets
+ * have started.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ */
+ public void buildStarted(BuildEvent event) {
+ buildStartedEvents.addElement(event);
+ }
+ public Vector getBuildFinishedEvents() {
+ return new Vector(buildFinishedEvents);
+ }
+ /**
+ * Gets a list of buildStarted events
+ *
+ * @return list of build started events
+ */
+ public Vector getBuildStartedEvents() {
+ return new Vector(buildStartedEvents);
+ }
+ /**
+ * Gets message logged events
+ *
+ * @return
+ */
+ public Vector getMessageLoggedEvents() {
+ return new Vector(messageLoggedEvents);
+ }
+ /**
+ * Gets target finished events
+ *
+ * @return
+ */
+ public Vector getTargetFinishedEvents() {
+ return new Vector(targetFinishedEvents);
+ }
+ /**
+ * Gets target started events
+ *
+ * @return
+ */
+ public Vector getTargetStartedEvents() {
+ return new Vector(targetStartedEvents);
+ }
+ /**
+ * Gets task finished events
+ *
+ * @return
+ */
+ public Vector getTaskFinishedEvents() {
+ return new Vector(taskFinishedEvents);
+ }
+ /**
+ * Gets task started events
+ *
+ * @return
+ */
+ public Vector getTaskStartedEvents() {
+ return new Vector(taskStartedEvents);
+ }
+ /**
+ * Signals a message logging event.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getMessage()
+ * @see BuildEvent#getPriority()
+ */
+ public void messageLogged(BuildEvent event) {
+ messageLoggedEvents.addElement(event);
+ }
+ /**
+ * Signals that a target has finished. This event will still be fired if an
+ * error occurred during the build.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getException()
+ */
+ public void targetFinished(BuildEvent event) {
+ targetFinishedEvents.addElement(event);
+ }
+ /**
+ * Signals that a target is starting.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getTarget()
+ */
+ public void targetStarted(BuildEvent event) {
+ targetStartedEvents.addElement(event);
+ }
+ /**
+ * Signals that a task has finished. This event will still be fired if an
+ * error occurred during the build.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getException()
+ */
+ public void taskFinished(BuildEvent event) {
+ taskFinishedEvents.addElement(event);
+ }
+ /**
+ * Signals that a task is starting.
+ *
+ * @param event
+ * An event with any relevant extra information. Must not be
+ * <code>null</code>.
+ *
+ * @see BuildEvent#getTask()
+ */
+ public void taskStarted(BuildEvent event) {
+ taskStartedEvents.addElement(event);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/MockFileCollector.java b/test/junit/net/sf/antcontrib/cpptasks/MockFileCollector.java
new file mode 100644
index 0000000..d1768fd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/MockFileCollector.java
@@ -0,0 +1,90 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Implementation of FileVisitor that collects visited files for later
+ * retrieval.
+ *
+ * @author Curt Arnold
+ *
+ */
+public final class MockFileCollector
+ implements FileVisitor {
+
+ /**
+ * list of fileName parameter values.
+ */
+ private final List fileNames = new ArrayList();
+
+ /**
+ * list of baseDir parameter values.
+ */
+ private final List baseDirs = new ArrayList();
+
+ /**
+ * Constructor.
+ *
+ */
+ public MockFileCollector() {
+ }
+
+ /**
+ * Implementation of FileVisitor.visit.
+ * @param baseDir base directory
+ * @param fileName file name
+ */
+ public void visit(final File baseDir, final String fileName) {
+ fileNames.add(fileName);
+ baseDirs.add(baseDir);
+ }
+
+ /**
+ * Get value of fileName parameter for a specified index.
+ *
+ * @param index
+ * index
+ * @return value of failName parameter
+ */
+ public String getFileName(final int index) {
+ return (String) fileNames.get(index);
+ }
+
+ /**
+ * Get value of baseDir parameter for the specified index.
+ *
+ * @param index
+ * index
+ * @return value of baseDir parameter
+ */
+ public File getBaseDir(final int index) {
+ return (File) baseDirs.get(index);
+ }
+
+ /**
+ * Get count of calls to FileVisitor.visit.
+ *
+ * @return count of calls.
+ */
+ public int size() {
+ return fileNames.size();
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestAllClasses.java b/test/junit/net/sf/antcontrib/cpptasks/TestAllClasses.java
new file mode 100644
index 0000000..e8d7c33
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestAllClasses.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import junit.framework.TestSuite;
+/**
+ * Test for abstract compiler class
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestAllClasses extends TestSuite {
+ public static TestSuite suite() {
+ return new TestAllClasses("TestAllClasses");
+ }
+ public TestAllClasses(String name) {
+ super(name);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestCUtil.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.borland.TestBorlandCCompiler.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.compiler.TestAbstractCompiler.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.compiler.TestAbstractLinker.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.compiler.TestAbstractProcessor.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestCCTask.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestCompilerEnum.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.compiler.TestCommandLineCompilerConfiguration.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestDependencyTable.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.types.TestDefineArgument.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.devstudio.TestDevStudioLinker.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestLinkerDef.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestTargetInfo.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.types.TestLibrarySet.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestCompilerDef.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.parser.TestCParser.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestGccCCompiler.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestAbstractLdLinker.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestAbstractArLibrarian.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestTargetHistoryTable.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestOutputTypeEnum.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.compiler.TestLinkType.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.TestLinkerEnum.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestAbstractLdLinker.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestAbstractArLibrarian.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestGccLinker.class);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestCCTask.java b/test/junit/net/sf/antcontrib/cpptasks/TestCCTask.java
new file mode 100644
index 0000000..82faae2
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestCCTask.java
@@ -0,0 +1,128 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Hashtable;
+import java.util.Vector;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+
+/**
+ * Tests for CCTask.
+ *
+ */
+public final class TestCCTask
+ extends TestCase {
+ /**
+ * Constructor.
+ * @param name test name
+ *
+ */
+ public TestCCTask(final String name) {
+ super(name);
+ }
+
+ /**
+ * Test that a target with no existing object file is
+ * returned by getTargetsToBuildByConfiguration.
+ */
+ public void testGetTargetsToBuildByConfiguration1() {
+ CompilerConfiguration config1 = new CommandLineCompilerConfiguration(
+ (GccCCompiler) GccCCompiler.getInstance(), "dummy",
+ new File[0], new File[0], new File[0], "", new String[0],
+ new ProcessorParam[0], true, new String[0]);
+ TargetInfo target1 = new TargetInfo(config1, new File[] {new File(
+ "src/foo.bar")}
+ , null, new File("foo.obj"), true);
+ Hashtable targets = new Hashtable();
+ targets.put(target1.getOutput(), target1);
+ Hashtable targetsByConfig = CCTask
+ .getTargetsToBuildByConfiguration(targets);
+ Vector targetsForConfig1 = (Vector) targetsByConfig.get(config1);
+ assertNotNull(targetsForConfig1);
+ assertEquals(1, targetsForConfig1.size());
+ TargetInfo targetx = (TargetInfo) targetsForConfig1.elementAt(0);
+ assertSame(target1, targetx);
+ }
+
+ /**
+ * Test that a target that is up to date is not returned by
+ * getTargetsToBuildByConfiguration.
+ *
+ */
+ public void testGetTargetsToBuildByConfiguration2() {
+ CompilerConfiguration config1 = new CommandLineCompilerConfiguration(
+ (GccCCompiler) GccCCompiler.getInstance(), "dummy",
+ new File[0], new File[0], new File[0], "", new String[0],
+ new ProcessorParam[0], false, new String[0]);
+ //
+ // target doesn't need to be rebuilt
+ //
+ TargetInfo target1 = new TargetInfo(config1, new File[] {new File(
+ "src/foo.bar")}
+ , null, new File("foo.obj"), false);
+ Hashtable targets = new Hashtable();
+ targets.put(target1.getOutput(), target1);
+ //
+ // no targets need to be built, return a zero-length hashtable
+ //
+ Hashtable targetsByConfig = CCTask
+ .getTargetsToBuildByConfiguration(targets);
+ assertEquals(0, targetsByConfig.size());
+ }
+
+ /**
+ * Tests that the default value of failonerror is true.
+ */
+ public void testGetFailOnError() {
+ CCTask task = new CCTask();
+ boolean failOnError = task.getFailonerror();
+ assertEquals(true, failOnError);
+ }
+
+ /**
+ * Tests that setting failonerror is effective.
+ */
+ public void testSetFailOnError() {
+ CCTask task = new CCTask();
+ task.setFailonerror(false);
+ boolean failOnError = task.getFailonerror();
+ assertEquals(false, failOnError);
+ task.setFailonerror(true);
+ failOnError = task.getFailonerror();
+ assertEquals(true, failOnError);
+ }
+
+ /**
+ * Test checks for the presence of antlib.xml.
+ * @throws IOException if stream can't be closed.
+ *
+ */
+ public void testAntlibXmlPresent() throws IOException {
+ InputStream stream = TestCCTask.class.getClassLoader()
+ .getResourceAsStream("net/sf/antcontrib/cpptasks/antlib.xml");
+ if (stream != null) {
+ stream.close();
+ }
+ assertNotNull("antlib.xml missing", stream);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestCUtil.java b/test/junit/net/sf/antcontrib/cpptasks/TestCUtil.java
new file mode 100644
index 0000000..c15bf31
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestCUtil.java
@@ -0,0 +1,121 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+/**
+ * Tests for CUtil class
+ */
+public class TestCUtil extends TestCase {
+ public TestCUtil(String name) {
+ super(name);
+ }
+ public void testGetPathFromEnvironment() {
+ File[] files = CUtil.getPathFromEnvironment("LIB", ";");
+ assertNotNull(files);
+ }
+ public void testGetRelativePath1() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil.getRelativePath(canonicalBase, new File(
+ "/foo/bar/baz"));
+ assertEquals("baz", rel);
+ }
+ public void testGetRelativePath2() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil
+ .getRelativePath(canonicalBase, new File("/foo/bar/"));
+ assertEquals(".", rel);
+ }
+ public void testGetRelativePath3() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil.getRelativePath(canonicalBase,
+ new File("/foo/bar/a"));
+ assertEquals("a", rel);
+ }
+ public void testGetRelativePath4() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil.getRelativePath(canonicalBase, new File("/foo/"));
+ assertEquals("..", rel);
+ }
+ public void testGetRelativePath5() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil.getRelativePath(canonicalBase, new File("/a"));
+ String expected = ".." + File.separator + ".." + File.separator + "a";
+ assertEquals(expected, rel);
+ }
+ public void testGetRelativePath6() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ String rel = CUtil.getRelativePath(canonicalBase, new File(
+ "/foo/baz/bar"));
+ String expected = ".." + File.separator + "baz" + File.separator
+ + "bar";
+ assertEquals(expected, rel);
+ }
+ public void testGetRelativePath7() throws IOException {
+ String canonicalBase = new File("/foo/bar/").getCanonicalPath();
+ //
+ // skip the UNC test unless running on Windows
+ //
+ String osName = System.getProperty("os.name");
+ if (osName.indexOf("Windows") >= 0) {
+ File uncFile = new File("\\\\fred\\foo.bar");
+ String uncPath;
+ try {
+ uncPath = uncFile.getCanonicalPath();
+ } catch (IOException ex) {
+ uncPath = uncFile.toString();
+ }
+ String rel = CUtil.getRelativePath(canonicalBase, uncFile);
+ assertEquals(uncPath, rel);
+ }
+ }
+ public void testParsePath1() {
+ File[] files = CUtil.parsePath("", ";");
+ assertEquals(0, files.length);
+ }
+ public void testParsePath2() {
+ String workingDir = System.getProperty("user.dir");
+ File[] files = CUtil.parsePath(workingDir, ";");
+ assertEquals(1, files.length);
+ File workingDirFile = new File(workingDir);
+ assertEquals(workingDirFile, files[0]);
+ }
+ public void testParsePath3() {
+ String workingDir = System.getProperty("user.dir");
+ File[] files = CUtil.parsePath(workingDir + ";", ";");
+ assertEquals(1, files.length);
+ assertEquals(new File(workingDir), files[0]);
+ }
+ public void testParsePath4() {
+ String workingDir = System.getProperty("user.dir");
+ String javaHome = System.getProperty("java.home");
+ File[] files = CUtil.parsePath(workingDir + ";" + javaHome, ";");
+ assertEquals(2, files.length);
+ assertEquals(new File(workingDir), files[0]);
+ assertEquals(new File(javaHome), files[1]);
+ }
+ public void testParsePath5() {
+ String workingDir = System.getProperty("user.dir");
+ String javaHome = System.getProperty("java.home");
+ File[] files = CUtil.parsePath(workingDir + ";" + javaHome + ";", ";");
+ assertEquals(2, files.length);
+ assertEquals(new File(workingDir), files[0]);
+ assertEquals(new File(javaHome), files[1]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestCompilerDef.java b/test/junit/net/sf/antcontrib/cpptasks/TestCompilerDef.java
new file mode 100644
index 0000000..c553756
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestCompilerDef.java
@@ -0,0 +1,357 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.io.IOException;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.Compiler;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioCCompiler;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+import net.sf.antcontrib.cpptasks.types.CompilerArgument;
+import net.sf.antcontrib.cpptasks.types.ConditionalPath;
+import net.sf.antcontrib.cpptasks.types.DefineArgument;
+import net.sf.antcontrib.cpptasks.types.DefineSet;
+import net.sf.antcontrib.cpptasks.types.IncludePath;
+import net.sf.antcontrib.cpptasks.types.SystemIncludePath;
+import net.sf.antcontrib.cpptasks.types.UndefineArgument;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+
+/**
+ * Tests for CompilerDef.
+ */
+public final class TestCompilerDef
+ extends TestProcessorDef {
+ /**
+ * Constructor.
+ *
+ * @param name
+ * test name
+ */
+ public TestCompilerDef(final String name) {
+ super(name);
+ }
+
+ /**
+ * Creates a new processor.
+ *
+ * @return new processor
+ */
+ protected ProcessorDef create() {
+ return new CompilerDef();
+ }
+
+ /**
+ * This method tests CompilerDef.getActiveDefines.
+ *
+ * A CompilerDef is created similar to what would be created for
+ *
+ * <cc><defineset><define name="DEBUG" if="debug"/> <define name="NDEBUG"
+ * unless="debug"/> </defineset> </cc>
+ *
+ * Then getActiveDefines is called for a project without and with the
+ * "debug" property defined. Return value from getActiveDefines should
+ * contain one member
+ */
+ public void testGetActiveDefines() {
+ Project project = new org.apache.tools.ant.Project();
+ CompilerDef def = new CompilerDef();
+ def.setProject(project);
+ DefineSet defset = new DefineSet();
+ DefineArgument arg1 = new DefineArgument();
+ arg1.setName("DEBUG");
+ arg1.setIf("debug");
+ defset.addDefine(arg1);
+ DefineArgument arg2 = new DefineArgument();
+ arg2.setName("NDEBUG");
+ arg2.setUnless("debug");
+ defset.addDefine(arg2);
+ def.addConfiguredDefineset(defset);
+ //
+ // Evaluate without "debug" set
+ //
+ UndefineArgument[] activeArgs = def.getActiveDefines();
+ assertEquals(1, activeArgs.length);
+ assertEquals("NDEBUG", activeArgs[0].getName());
+ //
+ // Set the "debug" property
+ //
+ project.setProperty("debug", "");
+ activeArgs = def.getActiveDefines();
+ assertEquals(1, activeArgs.length);
+ assertEquals("DEBUG", activeArgs[0].getName());
+ }
+
+ /**
+ * This method tests CompilerDef.getActiveIncludePath.
+ *
+ * A CompilerDef is created similar to what would be created for
+ *
+ * <cc><includepath location=".." if="debug"/> </cc>
+ *
+ * and is evaluate for a project without and without "debug" set
+ */
+ public void testGetActiveIncludePaths() {
+ Project project = new org.apache.tools.ant.Project();
+ CompilerDef def = new CompilerDef();
+ def.setProject(project);
+ ConditionalPath path = def.createIncludePath();
+ path.setLocation(new File(".."));
+ path.setIf("debug");
+ //
+ // Evaluate without "debug" set
+ //
+ String[] includePaths = def.getActiveIncludePaths();
+ assertEquals(0, includePaths.length);
+ //
+ // Set the "debug" property
+ //
+ project.setProperty("debug", "");
+ includePaths = def.getActiveIncludePaths();
+ assertEquals(1, includePaths.length);
+ }
+
+ /**
+ * Tests that setting classname to the Gcc compiler is effective.
+ */
+ public void testGetGcc() {
+ CompilerDef compilerDef = (CompilerDef) create();
+ compilerDef.setClassname("net.sf.antcontrib.cpptasks.gcc.GccCCompiler");
+ Compiler comp = (Compiler) compilerDef.getProcessor();
+ assertNotNull(comp);
+ assertSame(GccCCompiler.getInstance(), comp);
+ }
+
+ /**
+ * Tests that setting classname to the MSVC compiler is effective.
+ */
+ public void testGetMSVC() {
+ CompilerDef compilerDef = (CompilerDef) create();
+ compilerDef
+ .setClassname(
+ "net.sf.antcontrib.cpptasks.devstudio.DevStudioCCompiler");
+ Compiler comp = (Compiler) compilerDef.getProcessor();
+ assertNotNull(comp);
+ assertSame(DevStudioCCompiler.getInstance(), comp);
+ }
+
+ /**
+ * Tests that setting classname to an bogus class name results in a
+ * BuildException.
+ */
+ public void testUnknownClass() {
+ CompilerDef compilerDef = (CompilerDef) create();
+ try {
+ compilerDef
+ .setClassname("net.sf.antcontrib.cpptasks.bogus.BogusCompiler");
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Exception not thrown");
+ }
+
+ /**
+ * Test that setting classname to a class that doesn't support Compiler
+ * throws a BuildException.
+ *
+ */
+ public void testWrongType() {
+ CompilerDef compilerDef = (CompilerDef) create();
+ try {
+ compilerDef
+ .setClassname("net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker");
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Exception not thrown");
+ }
+
+ /**
+ * Gets the command line arguments that precede filenames.
+ *
+ * @param processor
+ * processor under test
+ * @return command line arguments
+ */
+ protected String[] getPreArguments(final ProcessorDef processor) {
+ return ((CommandLineCompilerConfiguration) getConfiguration(processor))
+ .getPreArguments();
+ }
+
+ /**
+ * Tests if a fileset enclosed in the base compiler definition is effective.
+ *
+ * @throws IOException
+ * if unable to create or delete a temporary file
+ */
+ public void testExtendsFileSet() throws IOException {
+ super.testExtendsFileSet(File.createTempFile("cpptaskstest", ".cpp"));
+ }
+
+ /**
+ * Tests if the rebuild attribute of the base compiler definition is
+ * effective.
+ *
+ */
+ public void testExtendsRebuild() {
+ testExtendsRebuild(new CompilerDef());
+ }
+
+ /**
+ * Tests that compilerarg's contained in the base compiler definition are
+ * effective.
+ */
+ public void testExtendsCompilerArgs() {
+ CompilerDef baseLinker = new CompilerDef();
+ CompilerArgument linkerArg = new CompilerArgument();
+ linkerArg.setValue("/base");
+ baseLinker.addConfiguredCompilerArg(linkerArg);
+ CompilerDef extendedLinker = (CompilerDef) createExtendedProcessorDef(
+ baseLinker);
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals(2, preArgs.length);
+ assertEquals("/base", preArgs[0]);
+ }
+
+ /**
+ * Tests that defineset's contained in the base compiler definition are
+ * effective.
+ */
+ public void testExtendsDefineSet() {
+ CompilerDef baseCompiler = new CompilerDef();
+ DefineSet defSet = new DefineSet();
+ DefineArgument define = new DefineArgument();
+ define.setName("foo");
+ define.setValue("bar");
+ defSet.addDefine(define);
+ baseCompiler.addConfiguredDefineset(defSet);
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals(2, preArgs.length);
+ assertEquals("-Dfoo=bar", preArgs[1]);
+ }
+
+ /**
+ * Tests that includepath's contained in the base compiler definition are
+ * effective.
+ */
+ public void testExtendsIncludePath() {
+ CompilerDef baseCompiler = new CompilerDef();
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ IncludePath path = baseCompiler.createIncludePath();
+ path.setPath("/tmp");
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals(2, preArgs.length);
+ assertEquals("-I", preArgs[1].substring(0, 2));
+ }
+
+ /**
+ * Tests that sysincludepath's contained in the base compiler definition are
+ * effective.
+ */
+ public void testExtendsSysIncludePath() {
+ CompilerDef baseCompiler = new CompilerDef();
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ SystemIncludePath path = baseCompiler.createSysIncludePath();
+ path.setPath("/tmp");
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals(2, preArgs.length);
+ assertEquals("-I", preArgs[1].substring(0, 2));
+ }
+
+ /**
+ * Sets the name attribute.
+ *
+ * @param compiler
+ * compiler under test
+ * @param name
+ * compiler name
+ */
+ private static void setCompilerName(final CompilerDef compiler,
+ final String name) {
+ CompilerEnum compilerName = new CompilerEnum();
+ compilerName.setValue(name);
+ compiler.setName(compilerName);
+ }
+
+ /**
+ * Tests that the extend attribute of the base compiler definition is
+ * effective.
+ */
+ public void testExtendsExceptions() {
+ CompilerDef baseCompiler = new CompilerDef();
+ baseCompiler.setExceptions(true);
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ setCompilerName(extendedCompiler, "msvc");
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals("/GX", preArgs[2]);
+ }
+
+ /**
+ * Tests that the multithread attribute of the base compiler definition is
+ * effective.
+ */
+ public void testExtendsMultithreaded() {
+ CompilerDef baseCompiler = new CompilerDef();
+ baseCompiler.setMultithreaded(false);
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ setCompilerName(extendedCompiler, "msvc");
+ CCTask cctask = new CCTask();
+ LinkType linkType = new LinkType();
+ linkType.setStaticRuntime(true);
+ CommandLineCompilerConfiguration config = (CommandLineCompilerConfiguration)
+ extendedCompiler
+ .createConfiguration(cctask, linkType, null, null, null);
+ String[] preArgs = config.getPreArguments();
+ assertEquals("/ML", preArgs[3]);
+ }
+
+ /**
+ * Tests that the name attribute in the base compiler is effective.
+ */
+ public void testExtendsName() {
+ CompilerDef baseCompiler = new CompilerDef();
+ setCompilerName(baseCompiler, "msvc");
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ extendedCompiler.setExceptions(true);
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals("/GX", preArgs[2]);
+ }
+
+ /**
+ * Tests that the classname attribute in the base compiler is effective.
+ */
+ public void testExtendsClassname() {
+ CompilerDef baseCompiler = new CompilerDef();
+ baseCompiler
+ .setClassname(
+ "net.sf.antcontrib.cpptasks.devstudio.DevStudioCCompiler");
+ CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
+ baseCompiler);
+ extendedCompiler.setExceptions(true);
+ String[] preArgs = getPreArguments(extendedCompiler);
+ assertEquals("/GX", preArgs[2]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestCompilerEnum.java b/test/junit/net/sf/antcontrib/cpptasks/TestCompilerEnum.java
new file mode 100644
index 0000000..6fc72ba
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestCompilerEnum.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright 2002-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import junit.framework.TestCase;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Tests for CompilerEnum.
+ */
+public class TestCompilerEnum extends TestCase {
+ /**
+ * Create instance of TestCompilerEnum.
+ * @param name test name.
+ */
+ public TestCompilerEnum(final String name) {
+ super(name);
+ }
+ /**
+ * Test that "gcc" is recognized as a compiler enum.
+ */
+ public void testCompilerEnum1() {
+ CompilerEnum compilerEnum = new CompilerEnum();
+ compilerEnum.setValue("gcc");
+ assertTrue(compilerEnum.getIndex() >= 0);
+ }
+ /**
+ * Test that "bogus" is not recognized as a compiler enum.
+ */
+ public void testCompilerEnum2() {
+ CompilerEnum compilerEnum = new CompilerEnum();
+ try {
+ compilerEnum.setValue("bogus");
+ fail();
+ } catch (BuildException ex) {
+ }
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestDependencyTable.java b/test/junit/net/sf/antcontrib/cpptasks/TestDependencyTable.java
new file mode 100644
index 0000000..2a02a0b
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestDependencyTable.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+/**
+ * DependencyTable tests
+ *
+ * @author curta
+ */
+public class TestDependencyTable extends TestXMLConsumer {
+ /**
+ * Default constructor
+ */
+ public TestDependencyTable() {
+ super();
+ }
+ /**
+ * Constructor
+ *
+ * @param testName
+ * test name
+ */
+ public TestDependencyTable(String testName) {
+ super(testName);
+ }
+ /**
+ * Loads a dependency file from OpenSHORE (http://www.openshore.org)
+ *
+ * @throws IOException
+ */
+ public void testLoadOpenshore() throws IOException,
+ ParserConfigurationException, SAXException {
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ try {
+ copyResourceToTmpDir("files/openshore/dependencies.xml",
+ "dependencies.xml");
+ DependencyTable dependencies = new DependencyTable(new File(tmpDir));
+ dependencies.load();
+ } finally {
+ deleteTmpFile("dependencies.xml");
+ }
+ }
+ /**
+ * Loads a dependency file from Xerces-C (http://xml.apache.org)
+ *
+ * @throws IOException
+ */
+ public void testLoadXerces() throws IOException,
+ ParserConfigurationException, SAXException {
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ try {
+ copyResourceToTmpDir("files/xerces-c/dependencies.xml",
+ "dependencies.xml");
+ DependencyTable dependencies = new DependencyTable(new File(tmpDir));
+ dependencies.load();
+ } finally {
+ deleteTmpFile("dependencies.xml");
+ }
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestLinkerDef.java b/test/junit/net/sf/antcontrib/cpptasks/TestLinkerDef.java
new file mode 100644
index 0000000..decd10a
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestLinkerDef.java
@@ -0,0 +1,323 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.io.IOException;
+import net.sf.antcontrib.cpptasks.compiler.CommandLineLinkerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker;
+import net.sf.antcontrib.cpptasks.gcc.GccLinker;
+import net.sf.antcontrib.cpptasks.types.FlexLong;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LinkerArgument;
+import net.sf.antcontrib.cpptasks.types.SystemLibrarySet;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.FlexInteger;
+
+/**
+ * Tests for LinkerDef class.
+ */
+public final class TestLinkerDef
+ extends TestProcessorDef {
+ /**
+ * Constructor.
+ *
+ * @param name
+ * test name
+ */
+ public TestLinkerDef(final String name) {
+ super(name);
+ }
+
+ /**
+ * Creates a processor.
+ *
+ * @return new linker
+ */
+ protected ProcessorDef create() {
+ return new LinkerDef();
+ }
+
+ /**
+ * Test if setting the classname attribute to the name of the GCC linker
+ * results in the singleton GCC linker.
+ */
+ public void testGetGcc() {
+ LinkerDef linkerDef = (LinkerDef) create();
+ linkerDef.setClassname("net.sf.antcontrib.cpptasks.gcc.GccLinker");
+ Linker comp = (Linker) linkerDef.getProcessor();
+ assertNotNull(comp);
+ assertSame(GccLinker.getInstance(), comp);
+ }
+
+ /**
+ * Test if setting the classname attribute to the name of the MSVC linker
+ * results in the singleton MSVC linker.
+ */
+ public void testGetMSVC() {
+ LinkerDef linkerDef = (LinkerDef) create();
+ linkerDef
+ .setClassname("net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker");
+ Linker comp = (Linker) linkerDef.getProcessor();
+ assertNotNull(comp);
+ assertSame(DevStudioLinker.getInstance(), comp);
+ }
+
+ /**
+ * Tests if setting the classname attribute to an bogus classname results in
+ * a BuildException.
+ *
+ */
+ public void testUnknownClass() {
+ LinkerDef linkerDef = (LinkerDef) create();
+ try {
+ linkerDef
+ .setClassname("net.sf.antcontrib.cpptasks.bogus.BogusLinker");
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("should have thrown exception");
+ }
+
+ /**
+ * Tests if setting the classname to the name of a class that doesn't
+ * support Linker throws a BuildException.
+ *
+ */
+ public void testWrongType() {
+ LinkerDef linkerDef = (LinkerDef) create();
+ try {
+ linkerDef.setClassname("net.sf.antcontrib.cpptasks.CCTask");
+ } catch (ClassCastException ex) {
+ return;
+ }
+ fail("should have thrown exception");
+ }
+
+ /**
+ * Gets the command line arguments that appear before the filenames.
+ *
+ * @param processor processor under test
+ * @return command line arguments
+ */
+ protected String[] getPreArguments(final ProcessorDef processor) {
+ return ((CommandLineLinkerConfiguration) getConfiguration(processor))
+ .getPreArguments();
+ }
+
+ /**
+ * Sets the name attribute.
+ *
+ * @param linker
+ * linker defintion
+ * @param name
+ * linker name
+ */
+ private static void setLinkerName(final LinkerDef linker,
+ final String name) {
+ LinkerEnum linkerName = new LinkerEnum();
+ linkerName.setValue(name);
+ linker.setName(linkerName);
+ }
+
+ /**
+ * Tests that linkerarg's that appear in the base linker are effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsLinkerArgs() {
+ LinkerDef baseLinker = new LinkerDef();
+ LinkerArgument linkerArg = new LinkerArgument();
+ linkerArg.setValue("/base");
+ baseLinker.addConfiguredLinkerArg(linkerArg);
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals(1, preArgs.length);
+ assertEquals("/base", preArgs[0]);
+ }
+
+ /**
+ * Tests that fileset's that appear in the base linker are effective when
+ * creating the command line for a linker that extends it.
+ * @throws IOException if unable to create or delete temporary file
+ */
+ public void testExtendsFileSet() throws IOException {
+ super.testExtendsFileSet(File.createTempFile("cpptaskstest", ".o"));
+ }
+
+ /**
+ * Tests that libset's that appear in the base linker are effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsLibSet() {
+ LinkerDef baseLinker = new LinkerDef();
+ LibrarySet libset = new LibrarySet();
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ libset.setProject(baseLinker.getProject());
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("advapi32");
+ libset.setLibs(libs);
+ baseLinker.addLibset(libset);
+ CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration)
+ getConfiguration(extendedLinker);
+ String[] libnames = config.getLibraryNames();
+ assertEquals(1, libnames.length);
+ assertEquals("advapi32", libnames[0]);
+ }
+
+ /**
+ * Tests that syslibset's that appear in the base linker are effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsSysLibSet() {
+ LinkerDef baseLinker = new LinkerDef();
+ SystemLibrarySet libset = new SystemLibrarySet();
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ libset.setProject(baseLinker.getProject());
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("advapi32");
+ libset.setLibs(libs);
+ baseLinker.addSyslibset(libset);
+ CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration)
+ getConfiguration(extendedLinker);
+ String[] libnames = config.getLibraryNames();
+ assertEquals(1, libnames.length);
+ assertEquals("advapi32", libnames[0]);
+ }
+
+ /**
+ * Tests that the base attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsBase() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setBase(new FlexLong("10000"));
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ setLinkerName(extendedLinker, "msvc");
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/BASE:0x2710", preArgs[2]);
+ }
+
+ /**
+ * Tests that the stack attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsStack() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setStack(new FlexInteger("10000"));
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ setLinkerName(extendedLinker, "msvc");
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/STACK:0x2710", preArgs[2]);
+ }
+
+ /**
+ * Tests that the entry attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsEntry() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setEntry("foo");
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("-e", preArgs[0]);
+ assertEquals("foo", preArgs[1]);
+ }
+
+ /**
+ * Tests that the fixed attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsFixed() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setFixed(true);
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ setLinkerName(extendedLinker, "msvc");
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/FIXED", preArgs[2]);
+ }
+
+ /**
+ * Tests that the incremental attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsIncremental() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setIncremental(true);
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ setLinkerName(extendedLinker, "msvc");
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/INCREMENTAL:YES", preArgs[1]);
+ }
+
+ /**
+ * Tests that the map attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsMap() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker.setMap(true);
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ setLinkerName(extendedLinker, "msvc");
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/MAP", preArgs[2]);
+ }
+
+ /**
+ * Tests that the rebuild attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsRebuild() {
+ testExtendsRebuild(new LinkerDef());
+ }
+
+ /**
+ * Tests that the name attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsName() {
+ LinkerDef baseLinker = new LinkerDef();
+ setLinkerName(baseLinker, "msvc");
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ extendedLinker.setBase(new FlexLong("10000"));
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/BASE:0x2710", preArgs[2]);
+ }
+
+ /**
+ * Tests that the classname attribute in the base linker is effective when
+ * creating the command line for a linker that extends it.
+ */
+ public void testExtendsClassname() {
+ LinkerDef baseLinker = new LinkerDef();
+ baseLinker
+ .setClassname("net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker");
+ LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(
+ baseLinker);
+ extendedLinker.setBase(new FlexLong("10000"));
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("/BASE:0x2710", preArgs[2]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestLinkerEnum.java b/test/junit/net/sf/antcontrib/cpptasks/TestLinkerEnum.java
new file mode 100644
index 0000000..77158d7
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestLinkerEnum.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import junit.framework.TestCase;
+/**
+ *
+ * Tests for LinkerEnum
+ *
+ * @author CurtA
+ */
+public class TestLinkerEnum extends TestCase {
+ /**
+ * @param test
+ * case name
+ */
+ public TestLinkerEnum(String name) {
+ super(name);
+ }
+ /**
+ * Test checks that enumeration contains value g++
+ *
+ * See patch [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testContainsValueGpp() {
+ assertTrue(new LinkerEnum().containsValue("g++"));
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestOutputTypeEnum.java b/test/junit/net/sf/antcontrib/cpptasks/TestOutputTypeEnum.java
new file mode 100644
index 0000000..61bb2b7
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestOutputTypeEnum.java
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import junit.framework.TestCase;
+/**
+ * @author CurtA
+ */
+public class TestOutputTypeEnum extends TestCase {
+ /**
+ * Default constructor
+ *
+ * @see junit.framework.TestCase#TestCase(String)
+ */
+ public TestOutputTypeEnum(String name) {
+ super(name);
+ }
+ /**
+ * Test checks that output type enum contains "plugin"
+ *
+ * See patch [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testContainsValuePlugin() {
+ assertTrue(new OutputTypeEnum().containsValue("plugin"));
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestProcessorDef.java b/test/junit/net/sf/antcontrib/cpptasks/TestProcessorDef.java
new file mode 100644
index 0000000..c4e2905
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestProcessorDef.java
@@ -0,0 +1,278 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+
+import java.io.File;
+import java.io.IOException;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ * Tests for ProcessorDef.
+ */
+public abstract class TestProcessorDef
+ extends TestCase {
+
+ /**
+ * Constructor.
+ *
+ * @param name
+ * test name
+ */
+ public TestProcessorDef(final String name) {
+ super(name);
+ }
+
+ /**
+ * Creates a new processor definition.
+ *
+ * @return created processor definition
+ */
+ protected abstract ProcessorDef create();
+
+ /**
+ * Tests that isActive returns true when "if" references a set property.
+ */
+ public final void testIsActive2() {
+ ProcessorDef arg = create();
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setProject(project);
+ arg.setIf("cond");
+ assertTrue(arg.isActive());
+ }
+
+ /**
+ * Tests that isActive returns false when "if" references an unset property.
+ */
+ public final void testIsActive3() {
+ ProcessorDef arg = create();
+ arg.setProject(new Project());
+ arg.setIf("cond");
+ assertTrue(!arg.isActive());
+ }
+
+ /**
+ * Tests that evaluating isActive when "if" refernces a property with the
+ * value "false" throws an exception to warn of a suspicious value.
+ *
+ */
+ public final void testIsActive4() {
+ ProcessorDef arg = create();
+ Project project = new Project();
+ project.setProperty("cond", "false");
+ arg.setProject(project);
+ arg.setIf("cond");
+ try {
+ boolean isActive = arg.isActive();
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Should throw exception for suspicious value");
+ }
+
+ /**
+ * Tests that isActive returns false when "unless" references a set
+ * property.
+ */
+ public final void testIsActive5() {
+ ProcessorDef arg = create();
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setProject(project);
+ arg.setUnless("cond");
+ assertTrue(!arg.isActive());
+ }
+
+ /**
+ * Tests that isActive returns true when "unless" references an unset
+ * property.
+ */
+ public final void testIsActive6() {
+ ProcessorDef arg = create();
+ arg.setProject(new Project());
+ arg.setUnless("cond");
+ assertTrue(arg.isActive());
+ }
+
+ /**
+ * Tests that evaluating isActive when "unless" references a property with
+ * the value "false" throws an exception to warn of a suspicious value.
+ *
+ */
+ public final void testIsActive7() {
+ ProcessorDef arg = create();
+ Project project = new Project();
+ project.setProperty("cond", "false");
+ arg.setProject(project);
+ arg.setUnless("cond");
+ try {
+ boolean isActive = arg.isActive();
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Should throw exception for suspicious value");
+ }
+
+ /**
+ * Tests if a processor is active when both "if" and "unless" are specified
+ * and the associated properties are set.
+ *
+ */
+ public final void testIsActive8() {
+ ProcessorDef arg = create();
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setProject(project);
+ arg.setIf("cond");
+ arg.setUnless("cond");
+ assertTrue(!arg.isActive());
+ }
+
+ /**
+ * Creates a processor initialized to be an extension of the base processor.
+ *
+ * @param baseProcessor
+ * base processor
+ * @return extending processor
+ */
+ protected final ProcessorDef createExtendedProcessorDef(
+ final ProcessorDef baseProcessor) {
+ Project project = new Project();
+ baseProcessor.setProject(project);
+ baseProcessor.setId("base");
+ project.addReference("base", baseProcessor);
+ ProcessorDef extendedLinker = create();
+ extendedLinker.setProject(project);
+ extendedLinker.setExtends(new Reference("base"));
+ return extendedLinker;
+ }
+
+ /**
+ * Gets the processor configuration.
+ *
+ * @param extendedProcessor
+ * processor under test
+ * @return configuration
+ */
+ protected final ProcessorConfiguration getConfiguration(
+ final ProcessorDef extendedProcessor) {
+ CCTask cctask = new CCTask();
+ LinkType linkType = new LinkType();
+ return extendedProcessor.createConfiguration(cctask,
+ linkType,
+ null,
+ null,
+ null);
+ }
+
+ /**
+ * Gets command line arguments that precede filenames.
+ *
+ * @param processor
+ * processor under test
+ * @return array of command line parameters
+ */
+ protected abstract String[] getPreArguments(final ProcessorDef processor);
+
+ /**
+ * Tests that a fileset in the base processor is effective when evaluating
+ * the files included in an extending processor.
+ *
+ * @param tempFile
+ * temporary file
+ * @throws IOException
+ * if unable to delete file
+ */
+ protected final void testExtendsFileSet(final File tempFile) throws
+ IOException {
+ ProcessorDef baseLinker = create();
+ ConditionalFileSet fileSet = new ConditionalFileSet();
+ ProcessorDef extendedLinker = createExtendedProcessorDef(baseLinker);
+ fileSet.setProject(baseLinker.getProject());
+ fileSet.setDir(new File(tempFile.getParent()));
+ fileSet.setIncludes(tempFile.getName());
+ baseLinker.addFileset(fileSet);
+ MockFileCollector collector = new MockFileCollector();
+ extendedLinker.visitFiles(collector);
+ tempFile.delete();
+ assertEquals(1, collector.size());
+ }
+
+ /**
+ * Tests that the if attribute in the base processor is effective when
+ * evaluating if an extending processor is active.
+ */
+ public final void testExtendsIf() {
+ ProcessorDef baseLinker = create();
+ baseLinker.setIf("bogus");
+ ProcessorDef extendedLinker = createExtendedProcessorDef(baseLinker);
+ boolean isActive = extendedLinker.isActive();
+ assertEquals(false, isActive);
+ baseLinker.getProject().setProperty("bogus", "");
+ isActive = extendedLinker.isActive();
+ assertEquals(true, isActive);
+ }
+
+ /**
+ * Tests that the unless attribute in the base processor is effective when
+ * evaluating if an extending processor is active.
+ */
+ public final void testExtendsUnless() {
+ ProcessorDef baseLinker = create();
+ baseLinker.setUnless("bogus");
+ ProcessorDef extendedLinker = createExtendedProcessorDef(baseLinker);
+ boolean isActive = extendedLinker.isActive();
+ assertEquals(true, isActive);
+ baseLinker.getProject().setProperty("bogus", "");
+ isActive = extendedLinker.isActive();
+ assertEquals(false, isActive);
+ }
+
+ /**
+ * Tests that the debug attribute in the base processor is effective when
+ * creating the command line for a processor that extends it.
+ */
+ public final void testExtendsDebug() {
+ ProcessorDef baseLinker = create();
+ baseLinker.setDebug(true);
+ ProcessorDef extendedLinker = createExtendedProcessorDef(baseLinker);
+ String[] preArgs = getPreArguments(extendedLinker);
+ assertEquals("-g", preArgs[preArgs.length - 1]);
+ }
+
+ /**
+ * Tests that the rebuild attribute in the base processor is effective when
+ * creating the command line for a processor that extends it.
+ *
+ * @param baseProcessor
+ * processor under test
+ */
+ protected final void testExtendsRebuild(
+ final ProcessorDef baseProcessor) {
+ baseProcessor.setRebuild(true);
+ ProcessorDef extendedLinker = createExtendedProcessorDef(baseProcessor);
+ ProcessorConfiguration config = getConfiguration(extendedLinker);
+ boolean rebuild = config.getRebuild();
+ assertEquals(true, rebuild);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestTargetHistoryTable.java b/test/junit/net/sf/antcontrib/cpptasks/TestTargetHistoryTable.java
new file mode 100644
index 0000000..1b3a656
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestTargetHistoryTable.java
@@ -0,0 +1,141 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+/**
+ * Tests for TargetHistoryTable
+ *
+ * @author CurtA
+ */
+public class TestTargetHistoryTable extends TestXMLConsumer {
+ private static class MockProcessorConfiguration
+ implements
+ ProcessorConfiguration {
+ public MockProcessorConfiguration() {
+ }
+ public int bid(String fileName) {
+ return 100;
+ }
+ public String getIdentifier() {
+ return "Mock Configuration";
+ }
+ public String[] getOutputFileNames(String baseName, VersionInfo versionInfo) {
+ return new String[] { baseName };
+ }
+ public ProcessorParam[] getParams() {
+ return new ProcessorParam[0];
+ }
+ public boolean getRebuild() {
+ return false;
+ }
+ }
+ /**
+ * Constructor
+ *
+ * @param name
+ * test case name
+ * @see junit.framework.TestCase#TestCase(String)
+ */
+ public TestTargetHistoryTable(String name) {
+ super(name);
+ }
+ /**
+ * Tests loading a stock history file
+ *
+ * @throws IOException
+ */
+ public void testLoadOpenshore() throws IOException {
+ try {
+ copyResourceToTmpDir("files/openshore/history.xml", "history.xml");
+ CCTask task = new CCTask();
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ TargetHistoryTable history = new TargetHistoryTable(task, new File(
+ tmpDir));
+ } finally {
+ deleteTmpFile("history.xml");
+ }
+ }
+ /**
+ * Tests loading a stock history file
+ *
+ * @throws IOException
+ */
+ public void testLoadXerces() throws IOException {
+ try {
+ copyResourceToTmpDir("files/xerces-c/history.xml", "history.xml");
+ CCTask task = new CCTask();
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ TargetHistoryTable history = new TargetHistoryTable(task, new File(
+ tmpDir));
+ } finally {
+ deleteTmpFile("history.xml");
+ }
+ }
+ /**
+ * Tests for bug fixed by patch [ 650397 ] Fix: Needless rebuilds on Unix
+ *
+ * @throws IOException
+ */
+ public void testUpdateTimeResolution() throws IOException {
+ File compiledFile = null;
+ try {
+ //
+ // delete any history file that might exist
+ // in the test output directory
+ String tempDir = System.getProperty("java.io.tmpdir");
+ File historyFile = new File(tempDir, "history.xml");
+ if (historyFile.exists()) {
+ historyFile.delete();
+ }
+ TargetHistoryTable table = new TargetHistoryTable(null, new File(
+ tempDir));
+ //
+ // create a dummy compiled unit
+ //
+ compiledFile = new File(tempDir, "dummy.o");
+ FileOutputStream compiledStream = new FileOutputStream(compiledFile);
+ compiledStream.close();
+ //
+ // lastModified times can be slightly less than
+ // task start time due to file system resolution.
+ // Mimic this by slightly incrementing the last modification time.
+ //
+ long startTime = compiledFile.lastModified() + 1;
+ //
+ // update the table
+ //
+ table.update(new MockProcessorConfiguration(),
+ new String[]{"dummy.o"}, null);
+ //
+ // commit. If "compiled" file was judged to be
+ // valid we should have a history file.
+ //
+ table.commit();
+ assertTrue("History file was not created", historyFile.exists());
+ assertTrue("History file was empty", historyFile.length() > 10);
+ } finally {
+ if (compiledFile != null && compiledFile.exists()) {
+ compiledFile.delete();
+ }
+ }
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestTargetInfo.java b/test/junit/net/sf/antcontrib/cpptasks/TestTargetInfo.java
new file mode 100644
index 0000000..5851805
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestTargetInfo.java
@@ -0,0 +1,134 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration;
+import net.sf.antcontrib.cpptasks.compiler.ProgressMonitor;
+import org.apache.tools.ant.BuildException;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+
+/**
+ * A description of a file built or to be built
+ */
+public class TestTargetInfo extends TestCase {
+ private class DummyConfiguration implements CompilerConfiguration {
+ public int bid(String filename) {
+ return 1;
+ }
+ public void close() {
+ }
+ public void compile(CCTask task, File workingDir, String[] source,
+ boolean relentless, ProgressMonitor monitor)
+ throws BuildException {
+ throw new BuildException("Not implemented");
+ }
+ public CompilerConfiguration[] createPrecompileConfigurations(
+ File file, String[] exceptFiles) {
+ return null;
+ }
+ public String getIdentifier() {
+ return "dummy";
+ }
+ public String[] getIncludeDirectories() {
+ return new String[0];
+ }
+ public String getIncludePathIdentifier() {
+ return "dummyIncludePath";
+ }
+ public String[] getOutputFileNames(String inputFile, VersionInfo versionInfo) {
+ return new String[0];
+ }
+ public CompilerParam getParam(String name) {
+ return null;
+ }
+ public ProcessorParam[] getParams() {
+ return new ProcessorParam[0];
+ }
+ public boolean getRebuild() {
+ return false;
+ }
+ public boolean isPrecompileGeneration() {
+ return true;
+ }
+ public DependencyInfo parseIncludes(CCTask task, File baseDir, File file) {
+ return null;
+ }
+ }
+ public TestTargetInfo(String name) {
+ super(name);
+ }
+ public void testConstructorNullConfig() {
+ try {
+ new TargetInfo(null, new File[]{new File("")}, null, new File(""),
+ false);
+ fail("Didn't throw exception");
+ } catch (NullPointerException ex) {
+ }
+ }
+ public void testConstructorNullOutput() {
+ CompilerConfiguration config = new DummyConfiguration();
+ try {
+ new TargetInfo(config, new File[]{new File("")}, null, null, false);
+ fail("Didn't throw exception");
+ } catch (NullPointerException ex) {
+ }
+ }
+ public void testConstructorNullSource() {
+ CompilerConfiguration config = new DummyConfiguration();
+ try {
+ new TargetInfo(config, null, null, new File(""), false);
+ fail("Didn't throw exception");
+ } catch (NullPointerException ex) {
+ }
+ }
+ public void testGetRebuild() {
+ CompilerConfiguration config = new DummyConfiguration();
+ TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
+ "FoO.BaR")}, null, new File("foo.o"), false);
+ assertEquals(false, targetInfo.getRebuild());
+ targetInfo = new TargetInfo(config, new File[]{new File("FoO.BaR")},
+ null, new File("foo.o"), true);
+ assertEquals(true, targetInfo.getRebuild());
+ }
+ public void testGetSource() {
+ CompilerConfiguration config = new DummyConfiguration();
+ TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
+ "FoO.BaR")}, null, new File("foo.o"), false);
+ String source = targetInfo.getSources()[0].getName();
+ assertEquals(source, "FoO.BaR");
+ }
+ public void testHasSameSource() {
+ CompilerConfiguration config = new DummyConfiguration();
+ TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
+ "foo.bar")}, null, new File("foo.o"), false);
+ boolean hasSame = targetInfo.getSources()[0]
+ .equals(new File("foo.bar"));
+ assertTrue(hasSame);
+ hasSame = targetInfo.getSources()[0].equals(new File("boo.far"));
+ assertEquals(hasSame, false);
+ }
+ public void testMustRebuild() {
+ CompilerConfiguration config = new DummyConfiguration();
+ TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
+ "FoO.BaR")}, null, new File("foo.o"), false);
+ assertEquals(false, targetInfo.getRebuild());
+ targetInfo.mustRebuild();
+ assertEquals(true, targetInfo.getRebuild());
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/TestXMLConsumer.java b/test/junit/net/sf/antcontrib/cpptasks/TestXMLConsumer.java
new file mode 100644
index 0000000..7c8c86f
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/TestXMLConsumer.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+/**
+ * Base class for tests on classes that consume or public XML documents.
+ *
+ * @author Curt Arnold
+ *
+ */
+public class TestXMLConsumer extends TestCase {
+ /**
+ * Loads a TargetHistoryTable from a resource
+ *
+ * @param resourceName
+ * resouce name, such as "files/openshore/history.xml".
+ * @return TargetHistoryTable
+ */
+ public static final void copyResourceToTmpDir(String resourceName,
+ String tmpFile) throws IOException {
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ //
+ // attempt to get resource from jar
+ // (should succeed unless testing in IDE)
+ InputStream src = null;
+ if (TestTargetHistoryTable.class.getClassLoader().getResource(
+ resourceName) != null) {
+ src = TestTargetHistoryTable.class.getClassLoader()
+ .getResourceAsStream(resourceName);
+ }
+ //
+ // if not found, try to find it relative to the current directory
+ //
+ if (src == null) {
+ src = new FileInputStream(resourceName);
+ }
+ assertNotNull("Could not locate resource " + resourceName, src);
+ try {
+ File destFile = new File(tmpDir, tmpFile);
+ FileOutputStream dest = new FileOutputStream(destFile);
+ try {
+ int bytesRead = 0;
+ byte[] buffer = new byte[4096];
+ do {
+ bytesRead = src.read(buffer);
+ if (bytesRead > 0) {
+ dest.write(buffer, 0, bytesRead);
+ }
+ } while (bytesRead == buffer.length);
+ } finally {
+ dest.close();
+ }
+ } finally {
+ src.close();
+ }
+ }
+ /**
+ * Deletes a file, if it exists, from the user's temporary directory.
+ *
+ * @param tmpName
+ * file name, may not be null
+ */
+ public static void deleteTmpFile(String tmpName) throws IOException {
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ File tmpFile = new File(tmpDir, tmpName);
+ if (tmpFile.exists()) {
+ tmpFile.delete();
+ }
+ }
+ /**
+ * @param arg0
+ */
+ protected TestXMLConsumer(String testName) {
+ super(testName);
+ }
+
+ protected TestXMLConsumer() {
+ super("TestXMLConsumer");
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Entries
new file mode 100644
index 0000000..67679a7
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Entries
@@ -0,0 +1,2 @@
+/TestBorlandCCompiler.java/1.4/Sat Feb 28 19:04:47 2004/-ko/
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Repository
new file mode 100644
index 0000000..f147a09
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/borland
diff --git a/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/borland/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/borland/TestBorlandCCompiler.java b/test/junit/net/sf/antcontrib/cpptasks/borland/TestBorlandCCompiler.java
new file mode 100644
index 0000000..ddafc5e
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/borland/TestBorlandCCompiler.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.borland;
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+import net.sf.antcontrib.cpptasks.compiler.TestAbstractCompiler;
+/**
+ * Borland C++ Compiler adapter tests
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestBorlandCCompiler extends TestAbstractCompiler {
+ public TestBorlandCCompiler(String name) {
+ super(name);
+ }
+ protected AbstractProcessor create() {
+ return BorlandCCompiler.getInstance();
+ }
+ protected String getObjectExtension() {
+ return ".obj";
+ }
+ public void testGetIdentfier() {
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Entries
new file mode 100644
index 0000000..07eeda9
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Entries
@@ -0,0 +1,7 @@
+/TestAbstractCompiler.java/1.21/Tue May 11 03:50:12 2004//
+/TestAbstractLinker.java/1.20/Tue May 11 03:50:13 2004//
+/TestAbstractProcessor.java/1.17/Tue May 11 03:50:12 2004//
+/TestCommandLineCompilerConfiguration.java/1.10/Sat Feb 28 19:04:47 2004//
+/TestCompilerConfiguration.java/1.9/Tue May 11 03:50:13 2004//
+/TestLinkType.java/1.2/Sat Feb 28 19:04:47 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Repository
new file mode 100644
index 0000000..43e8cff
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/compiler
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractCompiler.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractCompiler.java
new file mode 100644
index 0000000..5a1e66b
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractCompiler.java
@@ -0,0 +1,85 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CompilerDef;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+import org.apache.tools.ant.BuildException;
+/**
+ * Test for abstract compiler class
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestAbstractCompiler extends TestAbstractProcessor {
+ private class DummyAbstractCompiler extends AbstractCompiler {
+ public DummyAbstractCompiler() {
+ super(new String[]{".cpp", ".c"},
+ new String[]{".hpp", ".h", ".inl"}, ".o");
+ }
+ public void compile(CCTask task, File[] srcfile, File[] outputfile,
+ CompilerConfiguration config) throws BuildException {
+ throw new BuildException("Not implemented");
+ }
+ public CompilerConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] def1, CompilerDef def2,
+ net.sf.antcontrib.cpptasks.TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+ return null;
+ }
+ public Parser createParser(File file) {
+ return new CParser();
+ }
+ public String getIdentifier() {
+ return "dummy";
+ }
+ public Linker getLinker(LinkType type) {
+ return null;
+ }
+ }
+ public TestAbstractCompiler(String name) {
+ super(name);
+ }
+ protected AbstractProcessor create() {
+ return new DummyAbstractCompiler();
+ }
+ protected String getObjectExtension() {
+ return ".o";
+ }
+ public void testCanParseTlb() {
+ AbstractCompiler compiler = (AbstractCompiler) create();
+ assertEquals(false, compiler.canParse(new File("sample.tlb")));
+ }
+ public void testGetOutputFileName1() {
+ AbstractProcessor compiler = create();
+ String[] output = compiler.getOutputFileNames("c:/foo\\bar\\hello.c", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.c", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("hello.c", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar\\hello.h", null);
+ assertEquals(0, output.length);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.h", null);
+ assertEquals(0, output.length);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractLinker.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractLinker.java
new file mode 100644
index 0000000..b444a0a
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractLinker.java
@@ -0,0 +1,89 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.LinkerDef;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+import net.sf.antcontrib.cpptasks.TargetDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+
+/**
+ * Test for abstract compiler class
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestAbstractLinker extends TestAbstractProcessor {
+ private class DummyAbstractLinker extends AbstractLinker {
+ public DummyAbstractLinker() {
+ super(new String[]{".obj", ".lib"}, new String[]{".map", ".exp"});
+ }
+ public LinkerConfiguration createConfiguration(final CCTask task,
+ final LinkType linkType,
+ final ProcessorDef[] def1,
+ final LinkerDef def2,
+ final TargetDef targetPlatform,
+ final VersionInfo versionInfo) {
+ return null;
+ }
+ public String getIdentifier() {
+ return "dummy";
+ }
+ public File[] getLibraryPath() {
+ return new File[0];
+ }
+ public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
+ return libnames;
+ }
+ public Linker getLinker(LinkType type) {
+ return null;
+ }
+ public String[] getOutputFileNames(String sourceFile, VersionInfo versionInfo) {
+ return new String[0];
+ }
+ public String[][] getRuntimeLibraries(boolean debug,
+ boolean multithreaded, boolean staticLink) {
+ return new String[2][0];
+ }
+ public boolean isCaseSensitive() {
+ return true;
+ }
+ }
+ public TestAbstractLinker(String name) {
+ super(name);
+ }
+ protected AbstractProcessor create() {
+ return new DummyAbstractLinker();
+ }
+ public void testBid() {
+ AbstractProcessor compiler = create();
+ int bid = compiler.bid("c:/foo\\bar\\hello.obj");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.lib");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar\\hello.map");
+ assertEquals(0, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.map");
+ assertEquals(0, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.c");
+ assertEquals(1, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.cpp");
+ assertEquals(1, bid);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractProcessor.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractProcessor.java
new file mode 100644
index 0000000..f2c04a3
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestAbstractProcessor.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.ProcessorDef;
+import net.sf.antcontrib.cpptasks.VersionInfo;
+/**
+ * Test for abstract compiler class
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestAbstractProcessor extends TestCase {
+ private class DummyAbstractProcessor extends AbstractProcessor {
+ public DummyAbstractProcessor() {
+ super(new String[]{".cpp", ".c"},
+ new String[]{".hpp", ".h", ".inl"});
+ }
+ public ProcessorConfiguration createConfiguration(CCTask task,
+ LinkType linkType, ProcessorDef[] defaultProvider,
+ ProcessorDef specificProvider,
+ net.sf.antcontrib.cpptasks.TargetDef targetPlatform,
+ VersionInfo versionInfo) {
+ return null;
+ }
+ public String getIdentifier() {
+ return "dummy";
+ }
+ public Linker getLinker(LinkType type) {
+ return null;
+ }
+ public String[] getOutputFileNames(String sourceFile, VersionInfo versionInfo) {
+ return new String[0];
+ }
+ public String[][] getRuntimeLibraries(boolean debug,
+ boolean multithreaded, boolean staticLink) {
+ return new String[2][0];
+ }
+ }
+ public TestAbstractProcessor(String name) {
+ super(name);
+ }
+ protected AbstractProcessor create() {
+ return new DummyAbstractProcessor();
+ }
+ public void testBid() {
+ AbstractProcessor compiler = create();
+ int bid = compiler.bid("c:/foo\\bar\\hello.c");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.c");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar\\hello.h");
+ assertEquals(1, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.h");
+ assertEquals(1, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.pas");
+ assertEquals(0, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.java");
+ assertEquals(0, bid);
+ }
+ public void testGetIdentfier() {
+ AbstractProcessor compiler = create();
+ String id = compiler.getIdentifier();
+ assertEquals("dummy", id);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCommandLineCompilerConfiguration.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCommandLineCompilerConfiguration.java
new file mode 100644
index 0000000..a22fa0d
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCommandLineCompilerConfiguration.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.ProcessorParam;
+import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
+/**
+ */
+public class TestCommandLineCompilerConfiguration
+ extends
+ TestCompilerConfiguration {
+ private final CommandLineCompiler compiler;
+ private final String compilerId;
+ public TestCommandLineCompilerConfiguration(String name) {
+ super(name);
+ compiler = (GccCCompiler) GccCCompiler.getInstance();
+ compilerId = compiler.getIdentifier();
+ }
+ protected CompilerConfiguration create() {
+ return new CommandLineCompilerConfiguration(compiler, "dummy",
+ new File[0], new File[0], new File[0], "",
+ new String[]{"/Id:/gcc"}, new ProcessorParam[0], false,
+ new String[0]);
+ }
+ public void testConstructorNullCompiler() {
+ try {
+ new CommandLineCompilerConfiguration(null, "dummy", new File[0],
+ new File[0], new File[0], "", new String[0],
+ new ProcessorParam[0], false, new String[0]);
+ fail("Should throw exception for null compiler");
+ } catch (NullPointerException ex) {
+ }
+ }
+ public void testGetIdentifier() {
+ CompilerConfiguration config = create();
+ String id = config.getIdentifier();
+ assertEquals("dummy", id);
+ }
+ public void testToString() {
+ CompilerConfiguration config = create();
+ String toString = config.toString();
+ assertEquals("dummy", toString);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCompilerConfiguration.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCompilerConfiguration.java
new file mode 100644
index 0000000..a928ae4
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestCompilerConfiguration.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import junit.framework.TestCase;
+/**
+ */
+public abstract class TestCompilerConfiguration extends TestCase {
+ public TestCompilerConfiguration(String name) {
+ super(name);
+ }
+ protected abstract CompilerConfiguration create();
+ public String getObjectFileExtension() {
+ return ".o";
+ }
+ public void testBid() {
+ CompilerConfiguration compiler = create();
+ int bid = compiler.bid("c:/foo\\bar\\hello.c");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.c");
+ assertEquals(100, bid);
+ bid = compiler.bid("c:/foo\\bar\\hello.h");
+ assertEquals(1, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.h");
+ assertEquals(1, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.pas");
+ assertEquals(0, bid);
+ bid = compiler.bid("c:/foo\\bar/hello.java");
+ assertEquals(0, bid);
+ }
+ public void testGetOutputFileName1() {
+ CompilerConfiguration compiler = create();
+ String input = "c:/foo\\bar\\hello.c";
+ //
+ // may cause IllegalStateException since
+ // setPlatformInfo has not been called
+ try {
+ String[] output = compiler.getOutputFileNames(input, null);
+ } catch (java.lang.IllegalStateException ex) {
+ }
+ }
+ public void testGetOutputFileName2() {
+ CompilerConfiguration compiler = create();
+ String[] output = compiler.getOutputFileNames("c:/foo\\bar\\hello.c", null);
+ assertEquals("hello" + getObjectFileExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.c", null);
+ assertEquals("hello" + getObjectFileExtension(), output[0]);
+ output = compiler.getOutputFileNames("hello.c", null);
+ assertEquals("hello" + getObjectFileExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar\\hello.h", null);
+ assertEquals(0, output.length);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.h", null);
+ assertEquals(0, output.length);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/compiler/TestLinkType.java b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestLinkType.java
new file mode 100644
index 0000000..a7e3a45
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/compiler/TestLinkType.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.compiler;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.OutputTypeEnum;
+/**
+ * Tests for LinkType
+ *
+ * @author CurtA
+ */
+public class TestLinkType extends TestCase {
+ /**
+ * Constructor
+ *
+ * @param name
+ * test case name
+ */
+ public TestLinkType(String name) {
+ super(name);
+ }
+ /**
+ * Tests if isPluginModule returns true when set to plugin output type
+ *
+ * See patch [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testIsPluginFalse() {
+ LinkType type = new LinkType();
+ OutputTypeEnum pluginType = new OutputTypeEnum();
+ pluginType.setValue("executable");
+ type.setOutputType(pluginType);
+ assertTrue(!type.isPluginModule());
+ }
+ /**
+ * Tests if isPluginModule returns true when set to plugin output type
+ *
+ * See patch [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testIsPluginTrue() {
+ LinkType type = new LinkType();
+ OutputTypeEnum pluginType = new OutputTypeEnum();
+ pluginType.setValue("plugin");
+ type.setOutputType(pluginType);
+ assertTrue(type.isPluginModule());
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries
new file mode 100644
index 0000000..a84cfa7
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Entries
@@ -0,0 +1,4 @@
+/TestDevStudioLinker.java/1.10/Mon Apr 5 09:34:15 2004//
+/TestInstalledDevStudio.java/1.6/Sat Feb 28 19:04:47 2004//
+/TestInstalledDevStudioLinker.java/1.7/Sat Feb 28 19:04:47 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository
new file mode 100644
index 0000000..54d7855
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/devstudio
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestDevStudioLinker.java b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestDevStudioLinker.java
new file mode 100644
index 0000000..7fdaabe
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestDevStudioLinker.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+import net.sf.antcontrib.cpptasks.compiler.TestAbstractLinker;
+import org.apache.tools.ant.taskdefs.condition.Os;
+/**
+ * Test for Microsoft Developer Studio linker
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestDevStudioLinker extends TestAbstractLinker {
+ public TestDevStudioLinker(String name) {
+ super(name);
+ }
+ protected AbstractProcessor create() {
+ return DevStudioLinker.getInstance();
+ }
+ public void testGetIdentfier() {
+ if (!Os.isFamily("windows")) {
+ return;
+ }
+ AbstractProcessor compiler = create();
+ String id = compiler.getIdentifier();
+ boolean hasMSLinker = ((id.indexOf("Microsoft") >= 0) && (id
+ .indexOf("Linker") >= 0))
+ || id.indexOf("link") >= 0;
+ assertTrue(hasMSLinker);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudio.java b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudio.java
new file mode 100644
index 0000000..3e29c91
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudio.java
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+import junit.framework.TestSuite;
+/**
+ * Tests that depend on DevStudio being installed
+ *
+ */
+public class TestInstalledDevStudio extends TestSuite {
+ public static TestSuite suite() {
+ return new TestInstalledDevStudio("TestInstalledDevStudio");
+ }
+ public TestInstalledDevStudio(String name) {
+ super(name);
+ addTestSuite(net.sf.antcontrib.cpptasks.devstudio.TestInstalledDevStudioLinker.class);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudioLinker.java b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudioLinker.java
new file mode 100644
index 0000000..07f1339
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/devstudio/TestInstalledDevStudioLinker.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.devstudio;
+
+import java.io.File;
+
+
+/**
+ * Test for Microsoft Developer Studio linker
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestInstalledDevStudioLinker extends TestDevStudioLinker
+{
+ public TestInstalledDevStudioLinker(String name) {
+ super(name);
+ }
+
+ public void testGetLibraryPath() {
+ File[] libpath = DevStudioLinker.getInstance().getLibraryPath();
+ //
+ // unless you tweak the library path
+ // it should have more thean three entries
+ assertTrue(libpath.length >= 2);
+ //
+ // check if these files can be found
+ //
+ String[] libnames = new String[] { "kernel32.lib",
+ "advapi32.lib", "msvcrt.lib", "mfc42.lib", "mfc70.lib" };
+ boolean[] libfound = new boolean[libnames.length];
+ for (int i = 0; i < libpath.length; i++) {
+ for (int j = 0; j < libnames.length; j++) {
+ File libfile = new File(libpath[i], libnames[j]);
+ if (libfile.exists()) {
+ libfound[j] = true;
+ }
+ }
+ }
+ assertTrue("kernel32 not found", libfound[0]);
+ assertTrue("advapi32 not found", libfound[1]);
+ assertTrue("msvcrt not found", libfound[2]);
+ if(!(libfound[3] || libfound[4])) {
+ fail("mfc42.lib or mfc70.lib not found");
+ }
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Entries
new file mode 100644
index 0000000..f6cc3a6
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Entries
@@ -0,0 +1,6 @@
+/TestAbstractArLibrarian.java/1.6/Tue May 11 03:50:12 2004//
+/TestAbstractLdLinker.java/1.7/Wed Apr 21 21:46:50 2004//
+/TestGccCCompiler.java/1.7/Sat Feb 28 19:04:47 2004//
+/TestGccCompatibleCCompiler.java/1.3/Sat Feb 28 19:04:47 2004//
+/TestGccLinker.java/1.5/Tue May 11 03:50:12 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Repository
new file mode 100644
index 0000000..288ae90
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/gcc
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractArLibrarian.java b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractArLibrarian.java
new file mode 100644
index 0000000..0fc8449
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractArLibrarian.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+import net.sf.antcontrib.cpptasks.compiler.TestAbstractLinker;
+/**
+ * Tests for classes that derive from AbstractArLibrarian
+ *
+ * @author CurtA
+ */
+public class TestAbstractArLibrarian extends TestAbstractLinker {
+ /**
+ * Constructor
+ *
+ * @param name
+ * test name
+ * @see junit.framework.TestCase#TestCase(String)
+ */
+ public TestAbstractArLibrarian(String name) {
+ super(name);
+ }
+ /**
+ * Creates item under test @returns item under test
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.TestAbstractProcessor#create()
+ */
+ protected AbstractProcessor create() {
+ return GccLibrarian.getInstance();
+ }
+ /**
+ * Override of
+ *
+ * @see net.sf.antcontrib.cpptasks.compiler.TestAbstractProcessor#testBid()
+ */
+ public void testBid() {
+ AbstractProcessor compiler = create();
+ int bid = compiler.bid("c:/foo\\bar\\hello.o");
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, bid);
+ }
+ public void testGetIdentfier() {
+ AbstractProcessor processor = create();
+ String id = processor.getIdentifier();
+ assertTrue(id.indexOf("ar") >= 0);
+ }
+ /**
+ * Tests for library patterns
+ *
+ * See patch [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testGetLibraryPatterns() {
+ String[] libnames = new String[]{"foo"};
+ String[] patterns = ((AbstractArLibrarian) create())
+ .getLibraryPatterns(libnames, null);
+ assertEquals(0, patterns.length);
+ }
+ /**
+ * Tests output file for ar library
+ *
+ * See bug [ 687732 ] Filenames for gcc static library does start with lib
+ */
+ public void testOutputFileName() {
+ String[] outputFiles = GccLibrarian.getInstance().getOutputFileNames("x", null);
+ assertEquals("libx.a", outputFiles[0]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
new file mode 100644
index 0000000..63996c5
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
@@ -0,0 +1,247 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.CCTask;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.OutputTypeEnum;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.types.LibrarySet;
+import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
+/**
+ * Test ld linker adapter abstract base class
+ *
+ * Override create to test concrete compiler implementions
+ */
+public class TestAbstractLdLinker extends TestCase {
+ private final String realOSName;
+ public TestAbstractLdLinker(String name) {
+ super(name);
+ realOSName = System.getProperty("os.name");
+ }
+ protected AbstractLdLinker getLinker() {
+ return GccLinker.getInstance();
+ }
+ protected void tearDown() throws java.lang.Exception {
+ System.setProperty("os.name", realOSName);
+ }
+ /**
+ * Checks for proper arguments for plugin generation on Darwin
+ *
+ * See [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testAddImpliedArgsDarwinPlugin() {
+ System.setProperty("os.name", "Mac OS X");
+ AbstractLdLinker linker = getLinker();
+ Vector args = new Vector();
+ LinkType pluginType = new LinkType();
+ OutputTypeEnum pluginOutType = new OutputTypeEnum();
+ pluginOutType.setValue("plugin");
+ pluginType.setOutputType(pluginOutType);
+ linker.addImpliedArgs(false, pluginType, args);
+ assertEquals(1, args.size());
+ assertEquals("-bundle", args.elementAt(0));
+ }
+ /**
+ * Checks for proper arguments for shared generation on Darwin
+ *
+ * See [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testAddImpliedArgsDarwinShared() {
+ System.setProperty("os.name", "Mac OS X");
+ AbstractLdLinker linker = getLinker();
+ Vector args = new Vector();
+ LinkType pluginType = new LinkType();
+ OutputTypeEnum pluginOutType = new OutputTypeEnum();
+ pluginOutType.setValue("shared");
+ pluginType.setOutputType(pluginOutType);
+ linker.addImpliedArgs(false, pluginType, args);
+ assertEquals(2, args.size());
+ assertEquals("-prebind", args.elementAt(0));
+ assertEquals("-dynamiclib", args.elementAt(1));
+ }
+ /**
+ * Checks for proper arguments for plugin generation on Darwin
+ *
+ * See [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testAddImpliedArgsNonDarwinPlugin() {
+ System.setProperty("os.name", "VAX/VMS");
+ AbstractLdLinker linker = getLinker();
+ Vector args = new Vector();
+ LinkType pluginType = new LinkType();
+ OutputTypeEnum pluginOutType = new OutputTypeEnum();
+ pluginOutType.setValue("plugin");
+ pluginType.setOutputType(pluginOutType);
+ linker.addImpliedArgs(false, pluginType, args);
+ assertEquals(1, args.size());
+ assertEquals("-shared", args.elementAt(0));
+ }
+ /**
+ * Checks for proper arguments for shared generation on Darwin
+ *
+ * See [ 676276 ] Enhanced support for Mac OS X
+ */
+ public void testAddImpliedArgsNonDarwinShared() {
+ System.setProperty("os.name", "VAX/VMS");
+ AbstractLdLinker linker = getLinker();
+ Vector args = new Vector();
+ LinkType pluginType = new LinkType();
+ OutputTypeEnum pluginOutType = new OutputTypeEnum();
+ pluginOutType.setValue("shared");
+ pluginType.setOutputType(pluginOutType);
+ linker.addImpliedArgs(false, pluginType, args);
+ assertEquals(1, args.size());
+ assertEquals("-shared", args.elementAt(0));
+ }
+ public void testAddLibrarySetDirSwitch() {
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setDir(new File("/foo"));
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ String libdirSwitch = (String) endargs.elementAt(0);
+ assertEquals(libdirSwitch.substring(0, 2), "-L");
+ //
+ // can't have space after -L or will break Mac OS X
+ //
+ assertTrue(!libdirSwitch.substring(2, 3).equals(" "));
+ assertEquals(libdirSwitch.substring(libdirSwitch.length() - 3), "foo");
+ }
+ public void testAddLibrarySetLibSwitch() {
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setDir(new File("/foo"));
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ assertEquals("-lbart", (String) endargs.elementAt(1));
+ assertEquals("-lcart", (String) endargs.elementAt(2));
+ assertEquals("-ldart", (String) endargs.elementAt(3));
+ assertEquals(endargs.size(), 4);
+ }
+ public void testAddLibrarySetLibFrameworkNonDarwin() {
+ System.setProperty("os.name", "VAX/VMS");
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setDir(new File("/foo"));
+ LibraryTypeEnum libType = new LibraryTypeEnum();
+ libType.setValue("framework");
+ sets[0].setType(libType);
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ assertEquals("-L", ((String) endargs.elementAt(0)).substring(0, 2));
+ assertEquals("-Bdynamic", (String) endargs.elementAt(1));
+ assertEquals("-lbart", (String) endargs.elementAt(2));
+ assertEquals("-lcart", (String) endargs.elementAt(3));
+ assertEquals("-ldart", (String) endargs.elementAt(4));
+ assertEquals(endargs.size(), 5);
+ }
+ public void testAddLibrarySetLibFrameworkDarwin() {
+ System.setProperty("os.name", "Mac OS X");
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setDir(new File("/foo"));
+ LibraryTypeEnum libType = new LibraryTypeEnum();
+ libType.setValue("framework");
+ sets[0].setType(libType);
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ assertEquals("-F", ((String) endargs.elementAt(0)).substring(0, 2));
+ assertEquals("-framework bart", (String) endargs.elementAt(1));
+ assertEquals("-framework cart", (String) endargs.elementAt(2));
+ assertEquals("-framework dart", (String) endargs.elementAt(3));
+ assertEquals(endargs.size(), 4);
+ }
+ public void testAddLibraryStatic() {
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{
+ new LibrarySet(),
+ new LibrarySet(),
+ new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart"));
+ sets[1].setProject(new org.apache.tools.ant.Project());
+ sets[1].setLibs(new CUtil.StringArrayBuilder("cart"));
+ LibraryTypeEnum libType = new LibraryTypeEnum();
+ libType.setValue("static");
+ sets[1].setType(libType);
+ sets[2].setProject(new org.apache.tools.ant.Project());
+ sets[2].setLibs(new CUtil.StringArrayBuilder("dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ assertEquals("-lbart", (String) endargs.elementAt(0));
+ assertEquals("-Bstatic", (String) endargs.elementAt(1));
+ assertEquals("-lcart", (String) endargs.elementAt(2));
+ assertEquals("-Bdynamic", (String) endargs.elementAt(3));
+ assertEquals("-ldart", (String) endargs.elementAt(4));
+ assertEquals(endargs.size(), 5);
+ }
+ public void testLibReturnValue() {
+ AbstractLdLinker linker = getLinker();
+ CCTask task = new CCTask();
+ LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
+ /* throws an Exception in setLibs otherwise */
+ sets[0].setProject(new org.apache.tools.ant.Project());
+ sets[0].setDir(new File("/foo"));
+ sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
+ Vector preargs = new Vector();
+ Vector midargs = new Vector();
+ Vector endargs = new Vector();
+ String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
+ endargs);
+ assertEquals(3, rc.length);
+ assertEquals("bart", rc[0]);
+ assertEquals("cart", rc[1]);
+ assertEquals("dart", rc[2]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCCompiler.java b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCCompiler.java
new file mode 100644
index 0000000..3abe409
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCCompiler.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.io.File;
+
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+import net.sf.antcontrib.cpptasks.parser.CParser;
+import net.sf.antcontrib.cpptasks.parser.FortranParser;
+import net.sf.antcontrib.cpptasks.parser.Parser;
+/**
+ * Test gcc compiler adapter
+ *
+ */
+public class TestGccCCompiler extends TestGccCompatibleCCompiler {
+ public TestGccCCompiler(String name) {
+ super(name);
+ }
+ protected GccCompatibleCCompiler create() {
+ return GccCCompiler.getInstance();
+ }
+ public void testBidObjectiveAssembly() {
+ GccCCompiler compiler = GccCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.s"));
+ }
+ public void testBidObjectiveC() {
+ GccCCompiler compiler = GccCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.m"));
+ }
+ public void testBidObjectiveCpp() {
+ GccCCompiler compiler = GccCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.mm"));
+ }
+ public void testBidPreprocessedCpp() {
+ GccCCompiler compiler = GccCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.ii"));
+ }
+ public void testCreateCParser1() {
+ Parser parser = GccCCompiler.getInstance().createParser(
+ new File("foo.c"));
+ assertTrue(parser instanceof CParser);
+ }
+ public void testCreateCParser2() {
+ Parser parser = GccCCompiler.getInstance().createParser(
+ new File("foo."));
+ assertTrue(parser instanceof CParser);
+ }
+ public void testCreateCParser3() {
+ Parser parser = GccCCompiler.getInstance()
+ .createParser(new File("foo"));
+ assertTrue(parser instanceof CParser);
+ }
+ public void testCreateFortranParser1() {
+ Parser parser = GccCCompiler.getInstance().createParser(
+ new File("foo.f"));
+ assertTrue(parser instanceof FortranParser);
+ }
+ public void testCreateFortranParser2() {
+ Parser parser = GccCCompiler.getInstance().createParser(
+ new File("foo.FoR"));
+ assertTrue(parser instanceof FortranParser);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCompatibleCCompiler.java b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCompatibleCCompiler.java
new file mode 100644
index 0000000..68fab2e
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccCompatibleCCompiler.java
@@ -0,0 +1,105 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+/**
+ * Tests for gcc compatible compilers
+ *
+ * @author CurtA
+ */
+public abstract class TestGccCompatibleCCompiler extends TestCase {
+ /**
+ * Constructor
+ *
+ * @param name
+ * test case name
+ */
+ public TestGccCompatibleCCompiler(String name) {
+ super(name);
+ }
+ /**
+ * Compiler creation method
+ *
+ * Must be overriden by extending classes
+ *
+ * @return GccCompatibleCCompiler
+ */
+ protected abstract GccCompatibleCCompiler create();
+ /**
+ * Tests command lines switches for warning = 0
+ */
+ public void testWarningLevel0() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 0);
+ assertEquals(1, args.size());
+ assertEquals("-w", args.elementAt(0));
+ }
+ /**
+ * Tests command lines switches for warning = 1
+ */
+ public void testWarningLevel1() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 1);
+ assertEquals(0, args.size());
+ }
+ /**
+ * Tests command lines switches for warning = 2
+ */
+ public void testWarningLevel2() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 2);
+ assertEquals(0, args.size());
+ }
+ /**
+ * Tests command lines switches for warning = 3
+ */
+ public void testWarningLevel3() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 3);
+ assertEquals(1, args.size());
+ assertEquals("-Wall", args.elementAt(0));
+ }
+ /**
+ * Tests command lines switches for warning = 4
+ */
+ public void testWarningLevel4() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 4);
+ assertEquals(2, args.size());
+ assertEquals("-W", args.elementAt(0));
+ assertEquals("-Wall", args.elementAt(1));
+ }
+ /**
+ * Tests command lines switches for warning = 5
+ */
+ public void testWarningLevel5() {
+ GccCompatibleCCompiler compiler = create();
+ Vector args = new Vector();
+ compiler.addWarningSwitch(args, 5);
+ assertEquals(3, args.size());
+ assertEquals("-Werror", args.elementAt(0));
+ assertEquals("-W", args.elementAt(1));
+ assertEquals("-Wall", args.elementAt(2));
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccLinker.java b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccLinker.java
new file mode 100644
index 0000000..ee3ad8b
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/gcc/TestGccLinker.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright 2003-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.gcc;
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.OutputTypeEnum;
+import net.sf.antcontrib.cpptasks.compiler.LinkType;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+/**
+ * @author CurtA
+ */
+public class TestGccLinker extends TestCase {
+ private final String realOSName;
+ /**
+ * Constructor
+ *
+ * @param test
+ * name
+ */
+ public TestGccLinker(String name) {
+ super(name);
+ realOSName = System.getProperty("os.name");
+ }
+ protected void tearDown() throws java.lang.Exception {
+ System.setProperty("os.name", realOSName);
+ }
+ public void testGetLinkerDarwinPlugin() {
+ System.setProperty("os.name", "Mac OS X");
+ GccLinker linker = GccLinker.getInstance();
+ OutputTypeEnum outputType = new OutputTypeEnum();
+ outputType.setValue("plugin");
+ LinkType linkType = new LinkType();
+ linkType.setOutputType(outputType);
+ Linker pluginLinker = linker.getLinker(linkType);
+ assertEquals("libfoo.bundle", pluginLinker.getOutputFileNames("foo", null)[0]);
+ }
+ public void testGetLinkerDarwinShared() {
+ System.setProperty("os.name", "Mac OS X");
+ GccLinker linker = GccLinker.getInstance();
+ OutputTypeEnum outputType = new OutputTypeEnum();
+ outputType.setValue("shared");
+ LinkType linkType = new LinkType();
+ linkType.setOutputType(outputType);
+ Linker sharedLinker = linker.getLinker(linkType);
+ assertEquals("libfoo.dylib", sharedLinker.getOutputFileNames("foo", null)[0]);
+ }
+ public void testGetLinkerNonDarwinPlugin() {
+ System.setProperty("os.name", "Microsoft Windows");
+ GccLinker linker = GccLinker.getInstance();
+ OutputTypeEnum outputType = new OutputTypeEnum();
+ outputType.setValue("plugin");
+ LinkType linkType = new LinkType();
+ linkType.setOutputType(outputType);
+ Linker pluginLinker = linker.getLinker(linkType);
+ assertEquals("libfoo.so", pluginLinker.getOutputFileNames("foo", null)[0]);
+ }
+ public void testGetLinkerNonDarwinShared() {
+ System.setProperty("os.name", "Microsoft Windows");
+ GccLinker linker = GccLinker.getInstance();
+ OutputTypeEnum outputType = new OutputTypeEnum();
+ outputType.setValue("shared");
+ LinkType linkType = new LinkType();
+ linkType.setOutputType(outputType);
+ Linker sharedLinker = linker.getLinker(linkType);
+ assertEquals("libfoo.so", sharedLinker.getOutputFileNames("foo", null)[0]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/package.html b/test/junit/net/sf/antcontrib/cpptasks/package.html
new file mode 100644
index 0000000..eba4e2c
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/package.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+JUnit tests for the net.sf.antcontrib.cpptasks package.
+
+</body>
+</html>
+
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Entries
new file mode 100644
index 0000000..8bec227
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Entries
@@ -0,0 +1,5 @@
+/TestAbstractParser.java/1.6/Sat Feb 28 19:04:46 2004//
+/TestCParser.java/1.9/Mon Aug 15 13:58:27 2005//
+/TestFortranParser.java/1.2/Sat Jun 26 02:45:18 2004//
+/package.html/1.1/Fri Apr 16 04:04:15 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Repository
new file mode 100644
index 0000000..b216e97
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/parser
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/TestAbstractParser.java b/test/junit/net/sf/antcontrib/cpptasks/parser/TestAbstractParser.java
new file mode 100644
index 0000000..5f7eb2a
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/TestAbstractParser.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+import junit.framework.TestCase;
+/**
+ * Tests for the CParser class
+ */
+public class TestAbstractParser extends TestCase {
+ public TestAbstractParser(String name) {
+ super(name);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/TestCParser.java b/test/junit/net/sf/antcontrib/cpptasks/parser/TestCParser.java
new file mode 100644
index 0000000..cbecdfb
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/TestCParser.java
@@ -0,0 +1,197 @@
+/*
+ *
+ * Copyright 2002-2005 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+import java.io.CharArrayReader;
+import java.io.IOException;
+
+/**
+ * Tests for the CParser class.
+ */
+public final class TestCParser
+ extends TestAbstractParser {
+ /**
+ * Constructor.
+ * @param name String test name
+ */
+ public TestCParser(final String name) {
+ super(name);
+ }
+
+ /**
+ * Checks parsing of #include <foo.h>.
+ * @throws IOException test fails on IOException
+ */
+ public void testImmediateImportBracket() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ "#import <foo.h> nowhatever ".toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+ /**
+ * Checks parsing of #import "foo.h".
+ * @throws IOException test fails on IOException
+ */
+ public void testImmediateImportQuote() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#import \"foo.h\" "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+ /**
+ * Checks parsing of #include <foo.h>.
+ * @throws IOException test fails on IOException
+ */
+ public void testImmediateIncludeBracket() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#include <foo.h> "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+ /**
+ * Checks parsing of #include "foo.h".
+ * @throws IOException test fails on IOException.
+ */
+ public void testImmediateIncludeQuote() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ "#include \"foo.h\" ".toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+ /**
+ * Checks parsing of #import <foo.h.
+ * @throws IOException test fails on IOException
+ */
+ public void testIncompleteImmediateImportBracket() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#import <foo.h "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing of #import "foo.h.
+ * @throws IOException test fails on IOException
+ */
+ public void testIncompleteImmediateImportQuote() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#import \"foo.h "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing of #include <foo.h.
+ * @throws IOException test fails on IOException
+ */
+ public void testIncompleteImmediateIncludeBracket() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#include <foo.h "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing of #include "foo.h.
+ * @throws IOException test fails on IOException
+ */
+ public void testIncompleteImmediateIncludeQuote() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#include \"foo.h "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing of #include foo.h.
+ * @throws IOException test fails on IOException
+ */
+ public void testNoQuoteOrBracket() throws IOException {
+ CharArrayReader reader = new CharArrayReader("#include foo.h "
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing of //#include "foo.h".
+ * @throws IOException test fails on IOException
+ */
+ public void testNotFirstWhitespace() throws IOException {
+ CharArrayReader reader = new CharArrayReader("//#include \"foo.h\""
+ .toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 0);
+ }
+
+ /**
+ * Checks parsing when line contains leading whitespace.
+ * @throws IOException test fails on IOException.
+ */
+ public void testLeadingSpace() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ " #include \"foo.h\" ".toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+ /**
+ * Checks parsing when line contains a leading tab.
+ * @throws IOException test fails on IOException.
+ */
+ public void testLeadingTab() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ "\t#include \"foo.h\" ".toCharArray());
+ CParser parser = new CParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.h", includes[0]);
+ }
+
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/TestFortranParser.java b/test/junit/net/sf/antcontrib/cpptasks/parser/TestFortranParser.java
new file mode 100644
index 0000000..8078331
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/TestFortranParser.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.parser;
+
+import java.io.CharArrayReader;
+import java.io.IOException;
+
+/**
+ * Tests for the CParser class.
+ */
+public final class TestFortranParser
+ extends TestAbstractParser {
+ /**
+ * Constructor.
+ * @param name String test name
+ */
+ public TestFortranParser(final String name) {
+ super(name);
+ }
+
+ /**
+ * Checks parsing of INCLUDE 'foo.inc'.
+ * @throws IOException test fails on IOException
+ */
+ public void testINCLUDE() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ "INCLUDE 'foo.inc' nowhatever ".toCharArray());
+ FortranParser parser = new FortranParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.inc", includes[0]);
+ }
+
+ /**
+ * Checks parsing of InClUdE 'foo.inc'.
+ * @throws IOException test fails on IOException
+ */
+ public void testInClUdE() throws IOException {
+ CharArrayReader reader = new CharArrayReader("InClUdE 'foo.inc' "
+ .toCharArray());
+ FortranParser parser = new FortranParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 1);
+ assertEquals("foo.inc", includes[0]);
+ }
+
+ /**
+ * Checks parsing of InClUdE 'foo.inc'.
+ * @throws IOException test fails on IOException
+ */
+ public void testMultipleInClUdE() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ "InClUdE 'foo.inc'\ninclude 'bar.inc' "
+ .toCharArray());
+ FortranParser parser = new FortranParser();
+ parser.parse(reader);
+ String[] includes = parser.getIncludes();
+ assertEquals(includes.length, 2);
+ assertEquals("foo.inc", includes[0]);
+ assertEquals("bar.inc", includes[1]);
+ }
+
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/parser/package.html b/test/junit/net/sf/antcontrib/cpptasks/parser/package.html
new file mode 100644
index 0000000..bfb9d6e
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/parser/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+JUnit tests for the net.sf.antcontrib.cpptasks.parser package.
+
+</body>
+</html>
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries
new file mode 100644
index 0000000..4f19176
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Entries
@@ -0,0 +1,4 @@
+/TestMetaObjectCompiler.java/1.2/Tue May 11 03:50:16 2004//
+/TestMetaObjectParser.java/1.1/Wed May 5 02:50:44 2004//
+/package.html/1.1/Wed May 5 02:50:44 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository
new file mode 100644
index 0000000..6a899c0
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/trolltech
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectCompiler.java b/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectCompiler.java
new file mode 100644
index 0000000..6d97c12
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectCompiler.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+import net.sf.antcontrib.cpptasks.compiler.TestAbstractCompiler;
+
+/**
+ * Tests for Trolltech Meta Object Compiler.
+ *
+ */
+public class TestMetaObjectCompiler
+ extends TestAbstractCompiler {
+ /**
+ * Constructor.
+ * @param name test name
+ */
+ public TestMetaObjectCompiler(final String name) {
+ super(name);
+ }
+
+ /**
+ * Creates compiler for inherited tests.
+ * @return AbstractProcessor compiler
+ */
+ protected AbstractProcessor create() {
+ return MetaObjectCompiler.getInstance();
+ }
+
+ /**
+ * Gets default output file extension.
+ * @return String output file extension
+ */
+ protected String getObjectExtension() {
+ return ".moc";
+ }
+
+ /**
+ * Skip testGetIdentifier.
+ */
+ public void testGetIdentfier() {
+ }
+
+ /**
+ * Override inherited test.
+ */
+ public void testGetOutputFileName1() {
+ AbstractProcessor compiler = MetaObjectCompiler.getInstance();
+ String[] output = compiler.getOutputFileNames("c:/foo\\bar\\hello.cpp", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.cpp", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("hello.cpp", null);
+ assertEquals("hello" + getObjectExtension(), output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar\\hello.h", null);
+ assertEquals("moc_hello.cpp", output[0]);
+ output = compiler.getOutputFileNames("c:/foo\\bar/hello.h", null);
+ assertNull("moc_hello.cpp", output[0]);
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectParser.java b/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectParser.java
new file mode 100644
index 0000000..371bdf1
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/TestMetaObjectParser.java
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright 2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.trolltech;
+
+import java.io.CharArrayReader;
+import java.io.IOException;
+import junit.framework.TestCase;
+
+/**
+ * Tests for the MetaObjectParser class.
+ */
+public final class TestMetaObjectParser
+ extends TestCase {
+ /**
+ * Constructor.
+ * @param name String test name
+ */
+ public TestMetaObjectParser(final String name) {
+ super(name);
+ }
+
+ /**
+ * Test that the presence of Q_OBJECT causes hasQObject to return true.
+ * @throws IOException test fails on IOException
+ */
+ public void testHasQObject1() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ " Q_OBJECT ".toCharArray());
+ boolean hasQObject = MetaObjectParser.hasQObject(reader);
+ assertTrue(hasQObject);
+ }
+
+ /**
+ * Test that the lack of Q_OBJECT causes hasQObject to return false.
+ * @throws IOException test fails on IOException
+ */
+ public void testHasQObject2() throws IOException {
+ CharArrayReader reader = new CharArrayReader(
+ " Q_OBJ ECT ".toCharArray());
+ boolean hasQObject = MetaObjectParser.hasQObject(reader);
+ assertFalse(hasQObject);
+ }
+
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/trolltech/package.html b/test/junit/net/sf/antcontrib/cpptasks/trolltech/package.html
new file mode 100644
index 0000000..bbdaa89
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/trolltech/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+Tests for Trolltech Qt uic and moc compilers.
+</body>
+</html>
+
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Entries b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Entries
new file mode 100644
index 0000000..319dc2e
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Entries
@@ -0,0 +1,4 @@
+/TestDefineArgument.java/1.8/Sat Feb 28 19:04:47 2004//
+/TestLibrarySet.java/1.14/Thu Apr 22 08:06:55 2004//
+/package.html/1.1/Fri Apr 16 04:04:11 2004//
+D
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Repository b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Repository
new file mode 100644
index 0000000..5b7ecc7
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Repository
@@ -0,0 +1 @@
+cpptasks/test/junit/net/sf/antcontrib/cpptasks/types
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Root b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Root
new file mode 100644
index 0000000..1ac95cd
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/TestDefineArgument.java b/test/junit/net/sf/antcontrib/cpptasks/types/TestDefineArgument.java
new file mode 100644
index 0000000..e5b53ee
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/TestDefineArgument.java
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+import junit.framework.TestCase;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+/**
+ * Tests for the DefineArgument class
+ */
+public class TestDefineArgument extends TestCase {
+ public TestDefineArgument(String name) {
+ super(name);
+ }
+ public void testIsActive1() {
+ DefineArgument arg = new DefineArgument();
+ Project project = new Project();
+ try {
+ boolean isActive = arg.isActive(project);
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("isActive should throw exception if name is not set");
+ }
+ public void testIsActive2() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setIf("cond");
+ assertTrue(arg.isActive(project));
+ }
+ public void testIsActive3() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ arg.setIf("cond");
+ assertTrue(!arg.isActive(project));
+ }
+ public void testIsActive4() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ project.setProperty("cond", "false");
+ arg.setIf("cond");
+ try {
+ boolean isActive = arg.isActive(project);
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Should throw exception for suspicious value");
+ }
+ public void testIsActive5() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setUnless("cond");
+ assertTrue(!arg.isActive(project));
+ }
+ public void testIsActive6() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ arg.setUnless("cond");
+ assertTrue(arg.isActive(project));
+ }
+ public void testIsActive7() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ project.setProperty("cond", "false");
+ arg.setUnless("cond");
+ try {
+ boolean isActive = arg.isActive(project);
+ } catch (BuildException ex) {
+ return;
+ }
+ fail("Should throw exception for suspicious value");
+ }
+ public void testIsActive8() {
+ DefineArgument arg = new DefineArgument();
+ arg.setName("TEST");
+ Project project = new Project();
+ project.setProperty("cond", "");
+ arg.setIf("cond");
+ arg.setUnless("cond");
+ assertTrue(!arg.isActive(project));
+ }
+ public void testMerge() {
+ UndefineArgument[] base = new UndefineArgument[2];
+ UndefineArgument[] specific = new UndefineArgument[2];
+ base[0] = new DefineArgument();
+ base[0].setName("foo");
+ base[1] = new UndefineArgument();
+ base[1].setName("hello");
+ specific[0] = new DefineArgument();
+ specific[0].setName("hello");
+ specific[1] = new UndefineArgument();
+ specific[1].setName("world");
+ UndefineArgument[] merged = UndefineArgument.merge(base, specific);
+ assertEquals(3, merged.length);
+ assertEquals("foo", merged[0].getName());
+ assertEquals(true, merged[0].isDefine());
+ assertEquals("hello", merged[1].getName());
+ assertEquals(true, merged[1].isDefine());
+ assertEquals("world", merged[2].getName());
+ assertEquals(false, merged[2].isDefine());
+ }
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/TestLibrarySet.java b/test/junit/net/sf/antcontrib/cpptasks/types/TestLibrarySet.java
new file mode 100644
index 0000000..ce0d712
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/TestLibrarySet.java
@@ -0,0 +1,301 @@
+/*
+ *
+ * Copyright 2002-2004 The Ant-Contrib project
+ *
+ * Licensed 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.
+ */
+package net.sf.antcontrib.cpptasks.types;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+import net.sf.antcontrib.cpptasks.CUtil;
+import net.sf.antcontrib.cpptasks.MockBuildListener;
+import net.sf.antcontrib.cpptasks.MockFileCollector;
+import net.sf.antcontrib.cpptasks.compiler.Linker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker;
+import net.sf.antcontrib.cpptasks.devstudio.DevStudioLibrarian;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+
+/**
+ * Tests for the LibrarySet class.
+ */
+public class TestLibrarySet
+ extends TestCase {
+
+ /**
+ * Constructor.
+ *
+ * @param name
+ * test name
+ */
+ public TestLibrarySet(final String name) {
+ super(name);
+ }
+
+ /**
+ * Evaluate isActive when "if" specifies a property that is set.
+ */
+ public final void testIsActive1() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ project.setProperty("windows", "");
+ libset.setProject(project);
+ libset.setIf("windows");
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("kernel32");
+ libset.setLibs(libs);
+ boolean isActive = libset.isActive(project);
+ assertTrue(isActive);
+ }
+
+ /**
+ * Evaluate isActive when "if" specifies a property whose value suggests the
+ * user thinks the value is significant.
+ *
+ */
+ public final void testIsActive2() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ //
+ // setting the value to false should throw
+ // exception to warn user that they are misusing if
+ //
+ project.setProperty("windows", "false");
+ libset.setIf("windows");
+ try {
+ boolean isActive = libset.isActive(project);
+ } catch (BuildException ex) {
+ return;
+ }
+ fail();
+ }
+
+ /**
+ * Evaluate isActive when "if" specifies a property that is not set.
+ */
+ public final void testIsActive3() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ libset.setIf("windows");
+ boolean isActive = libset.isActive(project);
+ assertTrue(!isActive);
+ }
+
+ /**
+ * Evaluate isActive when "unless" specifies a property that is set.
+ *
+ */
+ public final void testIsActive4() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ project.setProperty("windows", "");
+ libset.setUnless("windows");
+ boolean isActive = libset.isActive(project);
+ assertTrue(!isActive);
+ }
+
+ /**
+ * Evaluate isActive when "unless" specifies a property whose value suggests
+ * the user thinks the value is significant.
+ *
+ */
+ public final void testIsActive5() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ //
+ // setting the value to false should throw
+ // exception to warn user that they are misusing if
+ //
+ project.setProperty("windows", "false");
+ libset.setUnless("windows");
+ try {
+ boolean isActive = libset.isActive(project);
+ } catch (BuildException ex) {
+ return;
+ }
+ fail();
+ }
+
+ /**
+ * Evaluate isActive when "unless" specifies a property that is not set.
+ */
+ public final void testIsActive6() {
+ LibrarySet libset = new LibrarySet();
+ Project project = new Project();
+ libset.setProject(project);
+ libset.setUnless("windows");
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("kernel32");
+ libset.setLibs(libs);
+ boolean isActive = libset.isActive(project);
+ assertTrue(isActive);
+ }
+
+ /**
+ * The libs parameter should not end with .lib, .so, .a etc New behavior is
+ * to warn if it ends in a suspicious extension.
+ */
+ public final void testLibContainsDot() {
+ LibrarySet libset = new LibrarySet();
+ Project p = new Project();
+ MockBuildListener listener = new MockBuildListener();
+ p.addBuildListener(listener);
+ libset.setProject(p);
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("mylib1.1");
+ libset.setLibs(libs);
+ assertEquals(0, listener.getMessageLoggedEvents().size());
+ }
+
+ /**
+ * The libs parameter should not end with .lib, .so, .a etc however the
+ * previous test would cause a build exception for any library containing
+ * periods. Now logs warning message.
+ */
+ public final void testLibContainsDotLib() {
+ LibrarySet libset = new LibrarySet();
+ Project p = new Project();
+ MockBuildListener listener = new MockBuildListener();
+ p.addBuildListener(listener);
+ libset.setProject(p);
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(
+ "mylib1.lib");
+ libset.setLibs(libs);
+ assertEquals(1, listener.getMessageLoggedEvents().size());
+ }
+
+ /**
+ * Use of a libset or syslibset without a libs attribute should log a
+ * warning message.
+ */
+ public final void testLibNotSpecified() {
+ LibrarySet libset = new LibrarySet();
+ Project p = new Project();
+ MockBuildListener listener = new MockBuildListener();
+ p.addBuildListener(listener);
+ libset.setProject(p);
+ boolean isActive = libset.isActive(p);
+ assertEquals(false, isActive);
+ assertEquals(1, listener.getMessageLoggedEvents().size());
+ }
+
+ /**
+ * this threw an exception prior to 2002-09-05 and started to throw one
+ * again 2002-11-19 up to 2002-12-11.
+ */
+ public final void testShortLibName() {
+ LibrarySet libset = new LibrarySet();
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder("li");
+ libset.setProject(new Project());
+ libset.setLibs(libs);
+ }
+
+ /**
+ * The libs parameter should not end with .lib, .so, .a etc however the
+ * previous test would cause a build exception for any library containing
+ * periods. Now logs warning message.
+ */
+ public final void testStartsWithLib() {
+ LibrarySet libset = new LibrarySet();
+ Project p = new Project();
+ MockBuildListener listener = new MockBuildListener();
+ p.addBuildListener(listener);
+ libset.setProject(p);
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(
+ "libmylib1");
+ libset.setLibs(libs);
+ assertEquals(1, listener.getMessageLoggedEvents().size());
+ }
+
+ /**
+ * This test creates two "fake" libraries in the temporary directory and
+ * check how many are visited.
+ *
+ * @param linker linker
+ * @param expected expected number of visited files
+ * @throws IOException
+ * if unable to write to temporary directory or delete temporary
+ * files
+ */
+ public final void testVisitFiles(final Linker linker,
+ final int expected)
+ throws IOException {
+ LibrarySet libset = new LibrarySet();
+ Project p = new Project();
+ MockBuildListener listener = new MockBuildListener();
+ p.addBuildListener(listener);
+ libset.setProject(p);
+ //
+ // create temporary files named cpptasksXXXXX.lib
+ //
+ File lib1 = File.createTempFile("cpptasks", ".lib");
+ String lib1Name = lib1.getName();
+ lib1Name = lib1Name.substring(0, lib1Name.indexOf(".lib"));
+ File lib2 = File.createTempFile("cpptasks", ".lib");
+ File baseDir = lib1.getParentFile();
+
+ // set the dir attribute to the temporary directory
+ libset.setDir(baseDir);
+ // set libs to the file name without the suffix
+ CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(lib1Name);
+ libset.setLibs(libs);
+
+ //
+ // collect all files visited
+ MockFileCollector collector = new MockFileCollector();
+ libset.visitLibraries(p, linker, new File[0], collector);
+
+ //
+ // get the canonical paths for the initial and visited libraries
+ String expectedCanonicalPath = lib1.getCanonicalPath();
+ String actualCanonicalPath = null;
+ if (collector.size() == 1) {
+ actualCanonicalPath = new File(collector.getBaseDir(0), collector
+ .getFileName(0)).getCanonicalPath();
+ }
+ //
+ // delete the temporary files
+ lib1.delete();
+ lib2.delete();
+ // was there only one match
+ assertEquals(expected, collector.size());
+ if (expected == 1) {
+ // is its canonical path as expected
+ assertEquals(expectedCanonicalPath, actualCanonicalPath);
+ }
+ }
+
+ /**
+ * Run testVisitFiles with the MSVC Linker
+ * expect one matching file.
+ *
+ * @throws IOException if unable to create or delete temporary file
+ */
+ public final void testLinkerVisitFiles() throws IOException {
+ Linker linker = DevStudioLinker.getInstance();
+ testVisitFiles(linker, 1);
+ }
+
+ /**
+ * Run testVisitFiles with the MSVC Linker
+ * expect one matching file.
+ *
+ * @throws IOException if unable to create or delete temporary file
+ */
+ public final void testLibrarianVisitFiles() throws IOException {
+ Linker linker = DevStudioLibrarian.getInstance();
+ testVisitFiles(linker, 0);
+ }
+
+}
diff --git a/test/junit/net/sf/antcontrib/cpptasks/types/package.html b/test/junit/net/sf/antcontrib/cpptasks/types/package.html
new file mode 100644
index 0000000..e5efbc4
--- /dev/null
+++ b/test/junit/net/sf/antcontrib/cpptasks/types/package.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+Copyright 2004 The Ant-Contrib project
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+
+JUnit tests for the net.sf.antcontrib.cpptasks.types package.
+
+</body>
+</html>
+