From 2d5e2a11d9cb0c034bb573c28f23b247a12675c0 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Thu, 14 Mar 2024 14:29:23 +0100 Subject: [PATCH] Reference manual: Describe Spec Sections Give an overview of the general structure of the spec and how it is processed. --- docs/manual/spec.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/manual/spec.md b/docs/manual/spec.md index c53331a1d8..497311b03c 100644 --- a/docs/manual/spec.md +++ b/docs/manual/spec.md @@ -71,6 +71,22 @@ other conditionals. %if-conditionals are not macros, and are unlikely to yield expected results if used in them. +### Sections ### + +The spec file is divided in several sections. Except of the preamble +of the main package right at the start spec file (and spec parts) +sections begin with a percent sign and the name of the section. They +need to be at the start of a new line. Most section types allow +passing options in this first line. These section markers looks like +macros (with parameters) but are not. + +Each section type has its own rules and syntax. Conditionals are +evaluated first and then macros expanded. Only then are the sections +parsed by the rules of the section types. The content of build and +runtime scripts is then passed on the the interpreter - possible being +stored in a header tag inbetween. The syntax of the other sections is +described below. + ## Preamble ### Preamble tags