Ide/Make Facility

The Make facility builds the project by generating the resources, constant files, updating the source code sections for the code experts, compiling and linking all the modules. The Make facility checks the file time stamps to see which files need to be compiled or recompiled. A file needs to be recompiled if the .OBJ file is older than either the source file or any of its include files or does not exist.

The Make facility gets the required information, from the project file (  .prj6 ). This includes the set of source files and the Build scripts. Build scripts consist from the following parts:
 * 1) The main Build script - describes how to build the final target.
 * 2) Rules - determine how to compile files with given extensions.
 * 3) Symbols – symbolic names that can be used in the build script and in built rules.

The generates the default Build scripts that can be modified and extended by the programmer.

The settings for the Make facility should be specified in the (Project | Settings), the finally generated Build scripts can be viewed in the Script Preview dialog (Build | Script Preview).

Build Symbols
The Build scripts can refer to Symbols. The syntax used in the scripts to refer to a defined symbol is: $(). These symbols can be either:


 * Symbols defined and automatically handled by the IDE, for example, PROJECT_OBJ, PROJECT_LIB, *, **, etc. (which are handled automatically and cannot be directly modified by the programmer).
 * Symbols initially defined by the IDE (generated by the, but which then can be modified by the programmer, for example, IncDir, ExeDir, ObjDir. The programmer can activate the and then edit/set these symbols from the Directories tab (use command Project | Settings).

The search for the value of a given symbol will be in the reverse of the above order in such a way that if the user specifies a symbol directly (symbols displayed in the Directories tab dialog), the system will just use that. Otherwise, the Make facility checks whether the IDE has such a pre-defined symbol. If this also fails, a warning will be given.

Remark: A symbol identifies as a macro, and is - with respect to syntax and semantics - roughly equivalent to that found in a standard make utility, such as Microsoft’s nmake and Borland's make.

The make script symbols defined by the IDE are:

Make Rules
The Make Rules provide some default rules for how to compile files. The syntax for Make Rules is:  ->  : 

Each line is the command  needed to convert a file with one extension  to a file with the other extension . pro->obj:"$(ProDir)Bin\VipCompiler.exe" /L:R /L:I $(IncDir) "$**.pro" /OBJECTFILE:"$(ObjDir)$*.obj" pack->obj:"$(ProDir)Bin\VipCompiler.exe" /L:R /L:I $(IncDir) "$**.pack" /OBJECTFILE:"$(ObjDir)$*.obj"

As an example, you can see that to compile of a .PRO file to an .OBJ file, the following command must be executed: "$(ProDir)Bin\VipCompiler.exe" /L:R /L:I $(IncDir) "$**.pro" /OBJECTFILE:"$(ObjDir)$*.obj"

Where $* will be replaced by the name of the actual file and $** by the name of the actual file qualified with the path relative to the project root directory. See also the.

A special note to those familiar with other make utilities: The rules specified here are roughly equivalent to what is known as implicit rules. In difference to the IDE in Visual Prolog v. 5, it is not possible to specify explicit rules (local rules) in the current version of the IDE.

It is possible to specify rules that execute batch files.

You can view/edit defined in the project Make Rules in the Build Options.

Build Script
The Build Script is the main command describing how to build the project target file. "$(ProDir)Bin\VIP6Link.exe" -F<< -E_VIPStartUp@0 -d -TPE -SGUI -o"$(ExeDir)$*.exe" -M"$(ObjDir)$*.map" $(PROJECT_OBJ) "$(ObjDir)$*.res" $(PROJECT_LIB)<<

The <<  << syntax means: put the  into a temporary file, and substitute the text with the name of the temporary file.

You can view/edit the defined in the project Build Script in the Build Options tab.

See also the.

Compile
This command attempts to compile the module (compilation unit) containing the selected file. Notice that IDE cannot compile a file that is not a part of the opened project; instead of this file IDE will compile the module selected in the project window.

Build
This command builds a currently chosen platform of a project.

If any resources have been modified since last build, the code experts might update some sections in the source files before the build.

This command will build the project by checking the time stamps of all the source files in the project, so if any source files (or files they include) are more new than the dependent .OBJ files, then the corresponding project modules will be recompiled.

The Build will also build resource files.

The project is then linked to produce the target module (executable program or DLL).

Build All Platforms
This command applies Build command for all platforms which are defined for a project.

Rebuild All
This command operates the same as the Build | Build, except that all files will be regenerated or recompiled and linked irrespectively of file time stamps.

Rebuild All Platforms
This command applies Rebuild All command for all platforms which are defined for a project.

Stop Building
This command is used to stop the compilation/linking.

Execute
If necessary, this command will first do the Build | Build, and then the generated executable will be started.

Run in Window
The Run in Window command is enabled for console applications only. It attempts to execute the target module of the current project in the specially created text mode window. If necessary, this command will first do the Build | Build (to generate an executable), then creates and displays the text mode window. In this window the pause DOS command is executed and the programmer is asked "Press any key to continue ...". After the programmer press any key, the generated executable will be started.

32bit Platform
Sets 32bit platform (if any) of a project as current for building, executing, etc.

64bit Platform
Sets 64bit platform (if any) of a project as current for building, executing, etc.