make/uwproj.xsd

changeset 867
7247b0a586bd
parent 809
8e6d8f0327cf
child 890
e77ccf1c4bb3
--- a/make/uwproj.xsd	Fri May 02 18:35:58 2025 +0200
+++ b/make/uwproj.xsd	Fri May 09 18:52:35 2025 +0200
@@ -3,7 +3,7 @@
            xmlns="http://unixwork.de/uwproj"
            targetNamespace="http://unixwork.de/uwproj"
            elementFormDefault="qualified"
-           version="0.2"
+           version="0.3"
 >
     <xs:element name="project" type="ProjectType"/>
 
@@ -17,22 +17,33 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
-            <xs:element name="config" type="ConfigType" minOccurs="0"/>
+            <xs:element name="config" type="ConfigType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
+        <xs:attribute name="version" type="xs:string" use="required" />
     </xs:complexType>
 
     <xs:complexType name="ConfigType">
         <xs:annotation>
             <xs:documentation>
-                The configuration section.
-                Consists of an arbitrary number of <code>var</code> elements.
+                <p>
+                    The configuration section.
+                    Consists of an arbitrary number of <code>var</code> elements.
+                </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.
+                </p>
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
             <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="ConfigVarType">
@@ -185,6 +196,9 @@
                 <code>dependencies</code> are satisfied.
                 If a feature is enabled, all <code>define</code> and <code>make</code> definitions are
                 supposed to be applied to the config file.
+                If a feature is disabled, an optional <code>disabled</code> element may specify which
+                <code>define</code> and <code>make</code> definitions are supposed to be applied.
+                There might also be <code>dependencies</code> when the feature is disabled (e.g. specifying a fallback).
                 In case the optional <code>default</code> attribute is set to true, the feature is enabled by default
                 and is supposed to be automatically disabled (without error) when the dependencies are not satisfied.
                 The name that is supposed to be used for the --enable and --disable arguments can be optionally
@@ -195,11 +209,18 @@
         </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:group ref="TargetDataGroup"/>
+            <xs:element name="desc" type="xs:string"/>
+            <xs:element name="disabled">
+                <xs:complexType>
+                    <xs:choice minOccurs="0" maxOccurs="unbounded">
+                        <xs:group ref="TargetDataGroup"/>
+                    </xs:choice>
+                </xs:complexType>
+            </xs:element>
         </xs:choice>
         <xs:attribute name="name" type="xs:string" use="required"/>
         <xs:attribute name="arg" type="xs:string"/>
         <xs:attribute name="default" type="xs:boolean" default="false"/>
-        <xs:element name="desc" type="xs:string"/>
     </xs:complexType>
 
     <xs:complexType name="OptionType">

mercurial