Skip to content
Gilles QUERRET edited this page Apr 3, 2015 · 31 revisions

PCTCompile task -- <pct:compile />

Description

Compiles Progress procedures and classes.

Parameters

Attribute Description Type Requirement Default value
destDir Directory where to put compiled code File Required No default value
minSize Compile using option MIN-SIZE=<value> Boolean Optional False
MD5 Compile using option GENERATE-MD5=<value> Boolean Optional False
streamIO Compile using option STREAM-IO=<value> Boolean Optional False
v6Frame Compile using option V6FRAME=<value> Boolean Optional False
runList Generates a .run file for each compiled file, which summarizes RUN statements Boolean Optional False
Listing Generates a listing file for each compiled file (LISTING attribute of COMPILE statement). Generated file name is identical to source file name. Boolean Optional False
listingSource Generates listing file from preprocessed source code (value 'preprocessor' or from standard source code (empty value or not defined). String Optional No default value
preprocess Generates a preprocessed file for each compiled file (PREPROCESS attribute of COMPILE statement). Generated file name appends .preprocess to source file name. Boolean Optional False
preprocessDir Target directory where preprocessed files are written File Optional <destDir>/.pct
debugListing Generates a debug-listing file for each compiled file (DEBUG-LIST attribute of COMPILE statement). Generated file name appends .dbg to file name Boolean Optional False
debugListingDir Target directory where debug listing files are written File Optional <destDir>/.pct
stringXref Generates a string-xref for each compiled file (STRING-XREF attribute of COMPILE statement). Generated file name appends .strxref to source file name Boolean Optional False
appendStringXref Appends string-xref to a single file Boolean Optional False
keepXref Keeps the generated XREF file for each file. Generated file name replaces extension of source file name with .xref Boolean Optional False
noXRef Don't use XREF when compiling or when reading files to compile Boolean Optional False
noParse Always recompile, and skip XREF generation as well as .crc and .inc files Boolean Optional False
xrefDir Where PCT files (CRC, includes, preprocess, listing and debug-listing) should be created File Optional <destDir>/.pct
xmlXref Generates XREF in XML format Boolean Optional False
forceCompile Always compile everything Boolean Optional False
xcode Compiles using XCODE option Boolean Optional False
xcodeKey Sets specific key for encrypted procedures String Optional No default value
noCompile Just prints files to recompile with the reason why, without executing COMPILE statement Boolean Optional False
languages Identifies which language segments to include in the compiled r-code. LANGUAGES option of the COMPILE statement String Optional No default value
textGrowth TEXT-SEG-GROWTH option of the COMPILE statement Integer Optional No default value
multiCompile Change COMPILER:MULTI-COMPILE attribute Boolean Optional False
relativePaths Use relative paths instead of absolute paths for propath and filesets. Every fileset dir has to be in propath. Boolean Optional False
progPerc Show progression percentage Integer Optional 0
stopOnError If set to true, stop compilation as soon as an error occurs Boolean Optional True

PCTCompile inherits attributes from PCT and PCTRun.

Parameters as nested elements

fileset

Adds a file set to the file list to compile

Examples

<PCTCompile destDir="build" dlcHome="${env.DLC}">
  <fileset dir="src">
    <include name="**/*.p"/>
    <exclude name="test/**"/>
  </fileset>
  <propath>
    <pathelement path="src/include"/>
  </propath>
</PCTCompile>

Compiles every .p in src directory (and subdirs) except those from src/test, with PROPATH set to src/include, and put .r in build directory.

<PCTCompile destDir="build" dlcHome="${DLC}" relativePaths="true">
  <fileset dir="custom" />
  <fileset dir="main">
    <present present="srconly" targetdir="custom" />
  </fileset>
  <propath>
    <pathelement location="custom" />
    <pathelement location="main" />
  </propath>
</PCTCompile>

Compiles every file in custom and main directory, but skipping files in main where a file with same name is present in custom. Documentation on <present> selector can be found here.

Relative paths example

Consider the following file in src/foo/bar/test.p :

MESSAGE '{&FILE-NAME}' { foo/test.i }.

With the following include inc/foo/test.i :

'{&FILE-NAME}'

And this build file :

<path id="compilation.propath">
  <pathelement path="src;inc" />
</path>
<PCTCompile destDir="build1" dlcHome="${DLC}" relativePaths="false">
  <fileset dir="src" includes="**/*.p" />
  <propath refid="compilation.propath" />
</PCTCompile>
<PCTCompile destDir="build1" dlcHome="${DLC}" relativePaths="true">
  <fileset dir="src" includes="**/*.p" />
  <propath refid="compilation.propath" />
</PCTCompile>

If you execute build1/foo/bar/test.r and then build2/foo/bar/test.r, you'll see :

/some/absolute/path/to/src/foo/bar/test.p /some/absolute/path/to/inc/foo/test.i
src/foo/bar/test.p inc/foo/test.i

With relativePaths=false, if you compile the same code in two different directories, you end up with different rcode (CRC and MD5 won't match). This can also be a problem when using TranMan : it's database contains either absolute or relative paths to file names, and if you have a different name, TranMan won't find the translation.

Clone this wiki locally