--- a/make/uwproj.xsd Sun Nov 16 23:02:11 2025 +0100 +++ b/make/uwproj.xsd Sun Nov 30 16:52:33 2025 +0100 @@ -29,23 +29,61 @@ <xs:documentation> <p> The configuration section. - Consists of an arbitrary number of <code>var</code> elements. + Consists of an arbitrary number of <code>var</code> elements and pre-defined elements for + standard installation directories. If you want to use standard installation directories, you + must list the wanted variables here. </p> <p> The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers. The configure script shall skip this config declaration if the detected platform is not matching the filter specification of these attributes. + When multiple config sections have a matching filter, and declare the same variables, the settings + of the first matching config section will be used for the affected variables. </p> </xs:documentation> </xs:annotation> <xs:sequence> + <xs:element name="prefix" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="exec-prefix" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="bindir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="sbindir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="libdir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="libexecdir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="datarootdir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="datadir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="sysconfdir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="sharedstatedir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="localstatedir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="runstatedir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="includedir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="infodir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="localedir" type="StandardConfigVarType" minOccurs="0"/> + <xs:element name="mandir" type="StandardConfigVarType" minOccurs="0"/> <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="platform" type="xs:string"/> <xs:attribute name="not" type="xs:string"/> </xs:complexType> + <xs:complexType name="StandardConfigVarType"> + <xs:annotation> + <xs:documentation> + The definition of a standard configuration variable. + <p> + You may customize the value and the help text, + but the variable name and the option name are pre-defined. + </p> + </xs:documentation> + </xs:annotation> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="option-help" type="xs:string"/> + <xs:attribute name="exec" type="xs:boolean" default="false"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="ConfigVarType"> <xs:annotation> <xs:documentation> @@ -55,14 +93,23 @@ written to the resulting config file (in contrast to make variables, which are only written to the config file). The <code>name</code> attribute is mandatory, the value is defined by the text body of the element. - The optional Boolean <code>exec</code> attribute (false by default) controls, whether the entire - definition is automatically executed under command substitution. + The optional Boolean <code>exec</code> attribute (false by default) controls, whether value denotes + a command which shall be executed at configuration time to produce the value. + With <code>option</code> and <code>option-help</code> you can control how the variable can be + overridden on the command line. When you don't specify either of those attributes, no command + line option will be generated. When you provide a <code>option-help</code>, but do not specify the + <code>option</code> name, a name is generated. + You can use the string <code>%default</code> in your help text when you want to show the default + value in the text. When <code>exec</code> is used, the default will not be resolved in the help + text and instead the command is shown (to avoid breaking the formatting). </p> </xs:documentation> </xs:annotation> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="option" type="xs:string"/> + <xs:attribute name="option-help" type="xs:string"/> <xs:attribute name="exec" type="xs:boolean" default="false"/> </xs:extension> </xs:simpleContent> @@ -228,7 +275,9 @@ <xs:documentation> Declares a configuration option. The option argument name is specified with the <code>arg</code> attribute. - Then, the children of this element specify possible <code>values</code> by defining the conditions + Optionally, a description for the help text of the resulting configure script can be specified by + a <code>desc</code> element. + Then, the next children of this element specify possible <code>values</code> by defining the conditions (in terms of dependencies) and effects (in terms of defines and make variables) of each value. Finally, a set of <code>default</code>s is specified which supposed to automagically select the most appropriate value for a specific platform under the available dependencies (in case the option is not @@ -236,6 +285,7 @@ </xs:documentation> </xs:annotation> <xs:sequence> + <xs:element name="desc" type="xs:string" minOccurs="0"/> <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence>