Command line options for PBUILD.EXE Foundation
The ProjectBuilder is started from the command line by entering PBUILD. If no project file is specified, the ProjectBuilder searches for the file PROJECT.XPJ and creates the project described in that file. The general syntax for the call is:
@<file>
The character @ indicates a file which lists all sources which are part of a project. <file> is an ASCII file that contains the name of one source file in each line. It can be created very easily by entering DIR /b *.PRG > PROJECT.LST on the command line, for example. From this file, the ProjectBuilder creates a project file with the same file name but a different file extension (XPJ). The name <file> is also used for the executable file to be created.
<XPJ file>
When a project is not described in the file PROJECT.XPJ, the name of the project file must be specified on the command line. The default extension is XPJ.
/? or /h
Display information about options of PBUILD.EXE. The /? switch only provides information and cannot be combined with other switches.
/a
The switch /a causes the ProjectBuilder to perform a complete compile and link cycle for all sources of a project. This rebuilds an entire project regardless of whether or not source files have been changed since the last update of the project.
/c
The switch /c (clean) deletes all intermediate files found in the AUTODEPEND section of the project file (OBJ, EXP, DEF, LIB, and RES files). and the all target files (EXE and DLL files).
/d<id>[=<val>]
The definition <id> in a project file can be set to the value <val>using the /d switch on the command line. For example, entering PBUILD /dDEBUG=NO builds a project without debug information even if DEBUG=YES is specified in the [PROJECT] section. The switch /d, therefore, temporarily changes definitions without changing the project file.
/g[:<name>]
Specifying the switch /g causes the ProjectBuilder to analyze a project for dependencies. It then generates a list of all files the target file depends on. This option must be used to expand the basic structure of a project file or when dependencies are changed. The basic structure of an XPJ file covers only PRG files and targets (EXE or DLL). A complete XPJ file, however, lists files with the extension CH, OBJ, ARC, DEF and LIB (DEF and LIB files are used for creating DLL files).
Optionally, a new project file can be created by specifying <name>. If the file name is omitted, an existing project file is overwritten.
/k
Temporary files are created in the course of a build process which are deleted by default when the ProjectBuilder has finished. Using the /k option (forkeep) prevents the ProjectBuilder from deleting the temporary files.
/l
When DLL files are part of a project, the ProjectBuilder automatically creates corresponding DEF files (Export definition files) and LIB files (import libraries). Normally this is not necessary when a PRG file is changed but only when the number, sequence or identifiers of exported functions change in the DLL.
For example, if a function in a PRG file is changed by inserting a few lines of code, the PRG file must be compiled and the DLL must be linked. However, the export definitions and the import library do not need to be rebuild in this case. Therefore, the /l switch suppresses automatic creation of DEF and LIB files.
/n
With /n, the ProjectBuilder only displays all necessary steps to update a project without performing the corresponding actions (compiler and linker are not invoked).
/q
With /q, the ProjectBuilder suppresses all messages not telling information about the success or failure of the build. The /q switch will be forwarded to any tool that is executed by the ProjectBuilder. As an example, the tool defined by RC_COMPILE will be passed "/q" as an additional parameter.
/t:<targetname>
Normally, all defined targets of the project files are analyzed and eventually rebuilt. The new option /t allows to specify only one target to be processed. The name of the target must match one of the target names defined inside of the project file without the square brackets.
/v
The switch /v activates the verbose mode of the ProjectBuilder.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.