make/uwproj.xsd

Fri, 12 Apr 2024 22:43:00 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 12 Apr 2024 22:43:00 +0200
changeset 61
b7954818a6b7
parent 1
e3113d4e2fc0
permissions
-rw-r--r--

merge different bools of AscSceneNode into flags

universe@0 1 <?xml version="1.0" encoding="UTF-8"?>
universe@0 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
universe@0 3 xmlns="http://unixwork.de/uwproj"
universe@0 4 targetNamespace="http://unixwork.de/uwproj"
universe@0 5 elementFormDefault="qualified"
universe@0 6 version="0.1"
universe@0 7 >
universe@0 8 <xs:element name="project" type="ProjectType"/>
universe@0 9
universe@0 10 <xs:complexType name="ProjectType">
universe@1 11 <xs:annotation>
universe@1 12 <xs:documentation>
universe@1 13 The root element of an uwproj project.
universe@1 14 Consists of an optional <code>config</code> element
universe@1 15 and an arbitrary number of <code>dependency</code>
universe@1 16 and <code>target</code> elements.
universe@1 17 </xs:documentation>
universe@1 18 </xs:annotation>
universe@0 19 <xs:sequence>
universe@0 20 <xs:element name="config" type="ConfigType" minOccurs="0"/>
universe@0 21 <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 22 <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 23 </xs:sequence>
universe@0 24 </xs:complexType>
universe@0 25
universe@0 26 <xs:complexType name="ConfigType">
universe@1 27 <xs:annotation>
universe@1 28 <xs:documentation>
universe@1 29 The configuration section.
universe@1 30 Consists of an arbitrary number of <code>var</code> elements.
universe@1 31 </xs:documentation>
universe@1 32 </xs:annotation>
universe@0 33 <xs:sequence>
universe@0 34 <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 35 </xs:sequence>
universe@0 36 </xs:complexType>
universe@0 37
universe@0 38 <xs:complexType name="ConfigVarType">
universe@1 39 <xs:annotation>
universe@1 40 <xs:documentation>
universe@1 41 The definition of a configuration variable.
universe@1 42 <p>
universe@1 43 Configuration variables are supposed to be used in the configure script and are also
universe@1 44 written to the resulting config file (in contrast to make variables, which are only
universe@1 45 written to the config file).
universe@1 46 The <code>name</code> attribute is mandatory, the value is defined by the text body of the element.
universe@1 47 The optional Boolean <code>exec</code> attribute (false by default) controls, whether the entire
universe@1 48 definition is automatically executed under command substitution.
universe@1 49 </p>
universe@1 50 </xs:documentation>
universe@1 51 </xs:annotation>
universe@0 52 <xs:simpleContent>
universe@0 53 <xs:extension base="xs:string">
universe@0 54 <xs:attribute name="name" type="xs:string" use="required"/>
universe@0 55 <xs:attribute name="exec" type="xs:boolean" default="false"/>
universe@0 56 </xs:extension>
universe@0 57 </xs:simpleContent>
universe@0 58 </xs:complexType>
universe@0 59
universe@0 60 <xs:complexType name="PkgConfigType">
universe@1 61 <xs:annotation>
universe@1 62 <xs:documentation>
universe@1 63 Instructs configure to invoke <code>pkg-config</code>, if present on the system, to determine
universe@1 64 compiler and linker flags. The text body of this element defines the package name to search.
universe@1 65 To constrain the allowed versions, use the attributes <code>atleast, exact, max</code>.
universe@1 66 </xs:documentation>
universe@1 67 </xs:annotation>
universe@0 68 <xs:simpleContent>
universe@0 69 <xs:extension base="xs:string">
universe@0 70 <xs:attribute name="atleast" type="xs:string"/>
universe@0 71 <xs:attribute name="exact" type="xs:string"/>
universe@0 72 <xs:attribute name="max" type="xs:string"/>
universe@0 73 </xs:extension>
universe@0 74 </xs:simpleContent>
universe@0 75 </xs:complexType>
universe@0 76
universe@0 77 <xs:simpleType name="LangType">
universe@1 78 <xs:annotation>
universe@1 79 <xs:documentation>
universe@1 80 Requests a compiler for the specified language. Allowed values are
universe@1 81 c, cpp.
universe@1 82 </xs:documentation>
universe@1 83 </xs:annotation>
universe@0 84 <xs:restriction base="xs:string">
universe@0 85 <xs:enumeration value="c"/>
universe@0 86 <xs:enumeration value="cpp"/>
universe@0 87 </xs:restriction>
universe@0 88 </xs:simpleType>
universe@0 89
universe@0 90 <xs:complexType name="DependencyType">
universe@1 91 <xs:annotation>
universe@1 92 <xs:documentation>
universe@1 93 Declares a dependency.
universe@1 94 <p>
universe@1 95 If the optional <code>name</code> attribute is omitted, the dependency is global
universe@1 96 and must be satisfied, otherwise configuration shall fail.
universe@1 97 A <em>named dependency</em> can be referenced by a target (or is implicitly referenced
universe@1 98 by the default target, if no targets are specified).
universe@1 99 Multiple declarations for the same named dependency may exist, in which case each declaration
universe@1 100 is checked one after another, until one block is satisfied. The result of the first satisfied
universe@1 101 dependency declaration is supposed to be applied to the config file.
universe@1 102 </p>
universe@1 103 <p>
universe@1 104 The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and
universe@1 105 the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers.
universe@1 106 The configure script shall skip this dependency declaration if the detected platform is not
universe@1 107 matching the filter specification of these attributes.
universe@1 108 </p>
universe@1 109 </xs:documentation>
universe@1 110 </xs:annotation>
universe@0 111 <xs:choice minOccurs="0" maxOccurs="unbounded">
universe@0 112 <xs:element name="lang" type="LangType"/>
universe@0 113 <xs:element name="cflags" type="FlagsType"/>
universe@0 114 <xs:element name="cxxflags" type="FlagsType"/>
universe@0 115 <xs:element name="ldflags" type="FlagsType"/>
universe@0 116 <xs:element name="pkgconfig" type="PkgConfigType"/>
universe@1 117 <xs:element name="test" type="xs:string">
universe@1 118 <xs:annotation>
universe@1 119 <xs:documentation>
universe@1 120 Specifies a custom command that shall be executed to test whether this dependency is satisfied.
universe@1 121 </xs:documentation>
universe@1 122 </xs:annotation>
universe@1 123 </xs:element>
universe@1 124 <xs:element name="make" type="MakeVarType"/>
universe@0 125 </xs:choice>
universe@0 126 <xs:attribute name="name" type="xs:string"/>
universe@0 127 <xs:attribute name="platform" type="xs:string"/>
universe@0 128 <xs:attribute name="not" type="xs:string"/>
universe@0 129 </xs:complexType>
universe@0 130
universe@0 131 <xs:complexType name="FlagsType">
universe@1 132 <xs:annotation>
universe@1 133 <xs:documentation>
universe@1 134 Instructs configure to append the contents of the element's body to the respective flags variable.
universe@1 135 If the optional <code>exec</code> flag is set to <code>true</code>, the contents are supposed to be
universe@1 136 executed under command substitution <em>at configuration time</em> before they are applied.
universe@1 137 </xs:documentation>
universe@1 138 </xs:annotation>
universe@0 139 <xs:simpleContent>
universe@0 140 <xs:extension base="xs:string">
universe@0 141 <xs:attribute name="exec" type="xs:boolean" default="false"/>
universe@0 142 </xs:extension>
universe@0 143 </xs:simpleContent>
universe@0 144 </xs:complexType>
universe@0 145
universe@0 146 <xs:complexType name="TargetType">
universe@1 147 <xs:annotation>
universe@1 148 <xs:documentation>
universe@1 149 Declares a build target that is supposed to be configured.
universe@1 150 <p>
universe@1 151 If no build target is declared explicitly, an implicit default
universe@1 152 target is generated, which has the <code>alldependencies</code>
universe@1 153 flag set.
universe@1 154 </p>
universe@1 155 <p>
universe@1 156 The optional <code>name</code> attribute is also used to generate a prefix
universe@1 157 for the compiler and linker flags variables.
universe@1 158 Furthermore, a target may consist of an arbitrary number of <code>feature</code>,
universe@1 159 <code>option</code>, and <code>define</code> elements.
universe@1 160 Named dependencies can be listed (separated by comma) in the <code>dependencies</code>
universe@1 161 element. If this target shall use <em>all</em> available named dependencies, the empty
universe@1 162 element <code>alldependencies</code> can be used as a shortcut.
universe@1 163 </p>
universe@1 164 </xs:documentation>
universe@1 165 </xs:annotation>
universe@0 166 <xs:choice minOccurs="0" maxOccurs="unbounded">
universe@0 167 <xs:element name="feature" type="FeatureType"/>
universe@0 168 <xs:element name="option" type="OptionType"/>
universe@0 169 <xs:element name="define" type="DefineType"/>
universe@0 170 <xs:element name="dependencies" type="DependenciesType"/>
universe@0 171 <xs:element name="alldependencies">
universe@0 172 <xs:complexType/>
universe@0 173 </xs:element>
universe@0 174 </xs:choice>
universe@0 175 <xs:attribute name="name" type="xs:string"/>
universe@0 176 </xs:complexType>
universe@0 177
universe@0 178 <xs:complexType name="FeatureType">
universe@1 179 <xs:annotation>
universe@1 180 <xs:documentation>
universe@1 181 Declares an optional feature, that can be enabled during configuration, if all
universe@1 182 <code>dependencies</code> are satisfied.
universe@1 183 If a feature is enabled, all <code>define</code> and <code>make</code> definitions are
universe@1 184 supposed to be applied to the config file.
universe@1 185 In case the optional <code>default</code> attribute is set to true, the feature is enabled by default
universe@1 186 and is supposed to be automatically disabled (without error) when the dependencies are not satisfied.
universe@1 187 The name that is supposed to be used for the --enable and --disable arguments can be optionally
universe@1 188 specified with the <code>arg</code> attribute. Otherwise, the <code>name</code> is used by default.
universe@1 189 </xs:documentation>
universe@1 190 </xs:annotation>
universe@0 191 <xs:choice minOccurs="0" maxOccurs="unbounded">
universe@0 192 <xs:group ref="TargetDataGroup"/>
universe@0 193 </xs:choice>
universe@0 194 <xs:attribute name="name" type="xs:string" use="required"/>
universe@0 195 <xs:attribute name="arg" type="xs:string"/>
universe@0 196 <xs:attribute name="default" type="xs:boolean" default="false"/>
universe@0 197 </xs:complexType>
universe@0 198
universe@0 199 <xs:complexType name="OptionType">
universe@1 200 <xs:annotation>
universe@1 201 <xs:documentation>
universe@1 202 Declares a configuration option.
universe@1 203 The option argument name is specified with the <code>arg</code> attribute.
universe@1 204 Then, the children of this element specify possible <code>values</code> by defining the conditions
universe@1 205 (in terms of dependencies) and effects (in terms of defines and make variables) of each value.
universe@1 206 Finally, a set of <code>default</code>s is specified which supposed to automagically select the most
universe@1 207 appropriate value for a specific platform under the available dependencies (in case the option is not
universe@1 208 explicitly specified by using the command line argument).
universe@1 209 </xs:documentation>
universe@1 210 </xs:annotation>
universe@0 211 <xs:sequence>
universe@0 212 <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 213 <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 214 </xs:sequence>
universe@1 215 <xs:attribute name="arg" type="xs:string" use="required"/>
universe@0 216 </xs:complexType>
universe@0 217
universe@0 218 <xs:complexType name="OptionValueType">
universe@1 219 <xs:annotation>
universe@1 220 <xs:documentation>
universe@1 221 Declares a possible value for the option (in the <code>str</code> attribute) and
universe@1 222 the conditions (<code>dependencies</code>) and effects, the value has.
universe@1 223 </xs:documentation>
universe@1 224 </xs:annotation>
universe@0 225 <xs:choice minOccurs="0" maxOccurs="unbounded">
universe@0 226 <xs:group ref="TargetDataGroup"/>
universe@0 227 </xs:choice>
universe@0 228 <xs:attribute name="str" type="xs:string" use="required"/>
universe@0 229 </xs:complexType>
universe@0 230
universe@0 231 <xs:complexType name="OptionDefaultType">
universe@1 232 <xs:annotation>
universe@1 233 <xs:documentation>
universe@1 234 Specifies a default value for this option. Multiple default values can be specified, in which case
universe@1 235 they are checked one after another for availability. With the optional <code>platform</code> attribute,
universe@1 236 the default value can be constrained to a <em>single</em> specific platform and is supposed to be
universe@1 237 skipped by configure, when this platform is not detected.
universe@1 238 </xs:documentation>
universe@1 239 </xs:annotation>
universe@0 240 <xs:attribute name="value" type="xs:string" use="required"/>
universe@0 241 <xs:attribute name="platform" type="xs:string"/>
universe@0 242 </xs:complexType>
universe@0 243
universe@0 244 <xs:group name="TargetDataGroup">
universe@0 245 <xs:choice>
universe@0 246 <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 247 <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/>
universe@1 248 <xs:element name="make" type="MakeVarType" minOccurs="0" maxOccurs="unbounded"/>
universe@0 249 </xs:choice>
universe@0 250 </xs:group>
universe@0 251
universe@0 252 <xs:complexType name="DefineType">
universe@1 253 <xs:annotation>
universe@1 254 <xs:documentation>
universe@1 255 Specifies C/C++ pre-processor definitions that are supposed to
universe@1 256 be appended to the compiler flags, if supported.
universe@1 257 (Note: for example, Fortran also supports C/C++ style pre-processor definitions under
universe@1 258 certain circumstances)
universe@1 259 </xs:documentation>
universe@1 260 </xs:annotation>
universe@0 261 <xs:attribute name="name" type="xs:string" use="required"/>
universe@0 262 <xs:attribute name="value" type="xs:string"/>
universe@0 263 </xs:complexType>
universe@0 264
universe@0 265 <xs:simpleType name="DependenciesType">
universe@1 266 <xs:annotation>
universe@1 267 <xs:documentation>A comma-separated list of named dependencies.</xs:documentation>
universe@1 268 </xs:annotation>
universe@1 269 <xs:restriction base="xs:string"/>
universe@1 270 </xs:simpleType>
universe@1 271
universe@1 272 <xs:simpleType name="MakeVarType">
universe@1 273 <xs:annotation>
universe@1 274 <xs:documentation>
universe@1 275 The text contents in the body of this element are supposed to be appended literally
universe@1 276 to the config file without prior processing.
universe@1 277 </xs:documentation>
universe@1 278 </xs:annotation>
universe@0 279 <xs:restriction base="xs:string"/>
universe@0 280 </xs:simpleType>
universe@0 281 </xs:schema>

mercurial