Build rules

Build rules compile each file in a project. Only one build rule can be active for a specific file type.

Build rules follow this hierarchy:
  • Project - If a relevant build rule is found under Project, it is used. To edit, right-click on the Project view and select Edit Build Rules.
  • Specific - If no relevant build rule is found under Project, then the build rule under Specific is used. To edit, select Tools > Specific setup > Edit Build Rules.
  • Global - if no relevant build rule is found under Project or Specific, then the build rule under Global is used. To edit, select Tools > Global setup > Edit Build Rules.
  • Default - if no relevant build rule is found under Project, Specific, or Global, then the Default build rule is used.

Only one build rule can be active for a specific file type.

Build rules can use predefined node variables.

Example: myfile.4gl

The process used by Project Manager to compile a file called myfile.4gl is:
  1. Project Manager first searches the language to be used as defined in the parent application or library node.
  2. Project Manager determines the MIME type of this file; it is "application/genero-4gl".
  3. Then, Project Manager looks for a corresponding build rule in the Project build rules. After searching the Project build rules, if no rule is found that handles the "application/genero-4gl" MIME type, it searches the Template build rules, and then the Global build rules and then the Default build rules.
  4. Finally, Project Manager executes the commands defined in the build rules after having replaced the variables.
  5. If no build rule is found, the file is skipped and the next one is processed.