Some subprojects of the project are headers (copy books) to be included in your HLL programs, and needn't to be compiled; for example, System-builtin Headers and Examples for ILE HLLs
. While some other subprojects are utilities in forms of programs, CL commands, panel group objects, and so on; these subprojects need to be compile before be used. At each release of the project, compiled components of these subprojects in format of *SAVF are provided in the bin
directory of the release package.
To build the project from source code, you need to:
To get the source code of the project by either downing the latest release package or exporting from the project's svn repository.
- The source files of the project can be found in the src in a release package.
- To export source code of the project, you may:
By release 0.2.16, all subprojects of the project can be build via the PASE make utility (see the build script called makefile under each subporject's directory, e.g. cm/makefile
After getting the source of the project, you can build the project by the following steps
- Package the source code at your PC. Make sure the format of your source package can be recognized by archive tools available on your IBM i server. For example, if you want to use the jar utility to extract source files from your uploaded source package, you may package your source packege into .zip or .jar format. The following sample commands package the source package in .zip and .jar format respectively.
$ zip -r src.zip src
$ jar cfM src.jar src
- Upload the source package to a directory in the IFS of your IBM i server via FTP. Make sure your source package is uploaded in BINARY mode.
- Extract source files from the uploaded source package. Start a PASE shell session by calling QP2TERM, change the current directory to where the uploaded source packed resides, and then extract source files from the source package. For example,
$ jar xf src.zip
$ # or
$ jar xf src.jar
- Build a subproject via the PASE make utility. Two MACROs are necessary when invoking the make command, BIN_LIB which incidates the library in which all compiled objects to be put, and MAKERULES which should be set to the path of the rules.mk file under the root of the source directory. For example, to build the Space Object Tools, you might:
make -e BIN_LIB=i5toolkit -e MAKERULES=../rules.mk
The CCSID of a source file created in the PASE environment is determined by the system values for national language QLANGID and QCNTRYID. For languages that use DBCS character sets (e.g. Simplified and Traditional Chinese and Japanese), the default CCSID of a stream file created in the PASE environment is 1208 (CCSID of UTF-8).
We've noticed that at release V5R2 of i5/OS, some compilers and utilities do NOT work very well with stream source files of CCSID 1208. For example, the ILE C compiler (e.g. CRTBNDC) cannot open stream source unit of CCSID 1208; the CPYFRMSTMF command will also fail to copy a stream file of CCSID 1208 to a source PF member. To avoid this problem on a V5R2 machine, you can change the CCSID of your stream files to 819 by the setccsid command. For example, the following command changes CCSID of the source files in directory src to 819 recursively.