Sun, 30 Nov 2025 22:55:34 +0100
update uwproj
| 0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| 3 | xmlns="http://unixwork.de/uwproj" | |
| 4 | targetNamespace="http://unixwork.de/uwproj" | |
| 5 | elementFormDefault="qualified" | |
|
69
f70ba8f14b41
update uwproj (fixes configure on solaris)
Mike Becker <universe@uap-core.de>
parents:
0
diff
changeset
|
6 | version="0.4" |
| 0 | 7 | > |
| 8 | <xs:element name="project" type="ProjectType"/> | |
| 9 | ||
| 10 | <xs:complexType name="ProjectType"> | |
| 11 | <xs:annotation> | |
| 12 | <xs:documentation> | |
| 13 | The root element of an uwproj project. | |
| 14 | Consists of an optional <code>config</code> element | |
| 15 | and an arbitrary number of <code>dependency</code> | |
| 16 | and <code>target</code> elements. | |
| 17 | </xs:documentation> | |
| 18 | </xs:annotation> | |
| 19 | <xs:sequence> | |
| 20 | <xs:element name="config" type="ConfigType" minOccurs="0" maxOccurs="unbounded"/> | |
| 21 | <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/> | |
| 22 | <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/> | |
| 23 | </xs:sequence> | |
| 24 | <xs:attribute name="version" type="xs:string" use="required" /> | |
| 25 | </xs:complexType> | |
| 26 | ||
| 27 | <xs:complexType name="ConfigType"> | |
| 28 | <xs:annotation> | |
| 29 | <xs:documentation> | |
| 30 | <p> | |
| 31 | The configuration section. | |
| 70 | 32 | Consists of an arbitrary number of <code>var</code> elements and pre-defined elements for |
| 33 | standard installation directories. If you want to use standard installation directories, you | |
| 34 | must list the wanted variables here. | |
| 0 | 35 | </p> |
| 36 | <p> | |
| 37 | The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and | |
| 38 | the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers. | |
| 39 | The configure script shall skip this config declaration if the detected platform is not matching | |
| 40 | the filter specification of these attributes. | |
| 70 | 41 | When multiple config sections have a matching filter, and declare the same variables, the settings |
| 42 | of the first matching config section will be used for the affected variables. | |
| 0 | 43 | </p> |
| 44 | </xs:documentation> | |
| 45 | </xs:annotation> | |
| 46 | <xs:sequence> | |
| 70 | 47 | <xs:element name="prefix" type="StandardConfigVarType" minOccurs="0"/> |
| 48 | <xs:element name="exec-prefix" type="StandardConfigVarType" minOccurs="0"/> | |
| 49 | <xs:element name="bindir" type="StandardConfigVarType" minOccurs="0"/> | |
| 50 | <xs:element name="sbindir" type="StandardConfigVarType" minOccurs="0"/> | |
| 51 | <xs:element name="libdir" type="StandardConfigVarType" minOccurs="0"/> | |
| 52 | <xs:element name="libexecdir" type="StandardConfigVarType" minOccurs="0"/> | |
| 53 | <xs:element name="datarootdir" type="StandardConfigVarType" minOccurs="0"/> | |
| 54 | <xs:element name="datadir" type="StandardConfigVarType" minOccurs="0"/> | |
| 55 | <xs:element name="sysconfdir" type="StandardConfigVarType" minOccurs="0"/> | |
| 56 | <xs:element name="sharedstatedir" type="StandardConfigVarType" minOccurs="0"/> | |
| 57 | <xs:element name="localstatedir" type="StandardConfigVarType" minOccurs="0"/> | |
| 58 | <xs:element name="runstatedir" type="StandardConfigVarType" minOccurs="0"/> | |
| 59 | <xs:element name="includedir" type="StandardConfigVarType" minOccurs="0"/> | |
| 60 | <xs:element name="infodir" type="StandardConfigVarType" minOccurs="0"/> | |
| 61 | <xs:element name="localedir" type="StandardConfigVarType" minOccurs="0"/> | |
| 62 | <xs:element name="mandir" type="StandardConfigVarType" minOccurs="0"/> | |
| 0 | 63 | <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/> |
| 64 | </xs:sequence> | |
| 65 | <xs:attribute name="platform" type="xs:string"/> | |
| 66 | <xs:attribute name="not" type="xs:string"/> | |
| 67 | </xs:complexType> | |
| 68 | ||
| 70 | 69 | <xs:complexType name="StandardConfigVarType"> |
| 70 | <xs:annotation> | |
| 71 | <xs:documentation> | |
| 72 | The definition of a standard configuration variable. | |
| 73 | <p> | |
| 74 | You may customize the value and the help text, | |
| 75 | but the variable name and the option name are pre-defined. | |
| 76 | </p> | |
| 77 | </xs:documentation> | |
| 78 | </xs:annotation> | |
| 79 | <xs:simpleContent> | |
| 80 | <xs:extension base="xs:string"> | |
| 81 | <xs:attribute name="option-help" type="xs:string"/> | |
| 82 | <xs:attribute name="exec" type="xs:boolean" default="false"/> | |
| 83 | </xs:extension> | |
| 84 | </xs:simpleContent> | |
| 85 | </xs:complexType> | |
| 86 | ||
| 0 | 87 | <xs:complexType name="ConfigVarType"> |
| 88 | <xs:annotation> | |
| 89 | <xs:documentation> | |
| 90 | The definition of a configuration variable. | |
| 91 | <p> | |
| 92 | Configuration variables are supposed to be used in the configure script and are also | |
| 93 | written to the resulting config file (in contrast to make variables, which are only | |
| 94 | written to the config file). | |
| 95 | The <code>name</code> attribute is mandatory, the value is defined by the text body of the element. | |
| 70 | 96 | The optional Boolean <code>exec</code> attribute (false by default) controls, whether value denotes |
| 97 | a command which shall be executed at configuration time to produce the value. | |
| 98 | With <code>option</code> and <code>option-help</code> you can control how the variable can be | |
| 99 | overridden on the command line. When you don't specify either of those attributes, no command | |
| 100 | line option will be generated. When you provide a <code>option-help</code>, but do not specify the | |
| 101 | <code>option</code> name, a name is generated. | |
| 102 | You can use the string <code>%default</code> in your help text when you want to show the default | |
| 103 | value in the text. When <code>exec</code> is used, the default will not be resolved in the help | |
| 104 | text and instead the command is shown (to avoid breaking the formatting). | |
| 0 | 105 | </p> |
| 106 | </xs:documentation> | |
| 107 | </xs:annotation> | |
| 108 | <xs:simpleContent> | |
| 109 | <xs:extension base="xs:string"> | |
| 110 | <xs:attribute name="name" type="xs:string" use="required"/> | |
| 70 | 111 | <xs:attribute name="option" type="xs:string"/> |
| 112 | <xs:attribute name="option-help" type="xs:string"/> | |
| 0 | 113 | <xs:attribute name="exec" type="xs:boolean" default="false"/> |
| 114 | </xs:extension> | |
| 115 | </xs:simpleContent> | |
| 116 | </xs:complexType> | |
| 117 | ||
| 118 | <xs:complexType name="PkgConfigType"> | |
| 119 | <xs:annotation> | |
| 120 | <xs:documentation> | |
| 121 | Instructs configure to invoke <code>pkg-config</code>, if present on the system, to determine | |
| 122 | compiler and linker flags. The text body of this element defines the package name to search. | |
| 123 | To constrain the allowed versions, use the attributes <code>atleast, exact, max</code>. | |
| 124 | </xs:documentation> | |
| 125 | </xs:annotation> | |
| 126 | <xs:simpleContent> | |
| 127 | <xs:extension base="xs:string"> | |
| 128 | <xs:attribute name="atleast" type="xs:string"/> | |
| 129 | <xs:attribute name="exact" type="xs:string"/> | |
| 130 | <xs:attribute name="max" type="xs:string"/> | |
| 131 | </xs:extension> | |
| 132 | </xs:simpleContent> | |
| 133 | </xs:complexType> | |
| 134 | ||
| 135 | <xs:simpleType name="LangType"> | |
| 136 | <xs:annotation> | |
| 137 | <xs:documentation> | |
| 138 | Requests a compiler for the specified language. Allowed values are | |
| 139 | c, cpp. | |
| 140 | </xs:documentation> | |
| 141 | </xs:annotation> | |
| 142 | <xs:restriction base="xs:string"> | |
| 143 | <xs:enumeration value="c"/> | |
| 144 | <xs:enumeration value="cpp"/> | |
| 145 | </xs:restriction> | |
| 146 | </xs:simpleType> | |
| 147 | ||
| 148 | <xs:complexType name="DependencyType"> | |
| 149 | <xs:annotation> | |
| 150 | <xs:documentation> | |
| 151 | Declares a dependency. | |
| 152 | <p> | |
| 153 | If the optional <code>name</code> attribute is omitted, the dependency is global | |
| 154 | and must be satisfied, otherwise configuration shall fail. | |
| 155 | A <em>named dependency</em> can be referenced by a target (or is implicitly referenced | |
| 156 | by the default target, if no targets are specified). | |
| 157 | Multiple declarations for the same named dependency may exist, in which case each declaration | |
| 158 | is checked one after another, until one block is satisfied. The result of the first satisfied | |
| 159 | dependency declaration is supposed to be applied to the config file. | |
| 160 | </p> | |
| 161 | <p> | |
| 162 | The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and | |
| 163 | the optional <code>toolchain</code> attribute may specify a <em>single</em> toolchain. | |
| 164 | The optional <code>not</code> attribute may specify a comma-separated list of platform and/or | |
| 165 | toolchain identifiers. | |
| 166 | The configure script shall skip this dependency declaration if the detected platform and toolchain | |
| 167 | is not matching the filter specification of these attributes. | |
| 168 | </p> | |
| 169 | </xs:documentation> | |
| 170 | </xs:annotation> | |
| 171 | <xs:choice minOccurs="0" maxOccurs="unbounded"> | |
| 172 | <xs:element name="lang" type="LangType"/> | |
| 173 | <xs:element name="cflags" type="FlagsType"/> | |
| 174 | <xs:element name="cxxflags" type="FlagsType"/> | |
| 175 | <xs:element name="ldflags" type="FlagsType"/> | |
| 176 | <xs:element name="pkgconfig" type="PkgConfigType"/> | |
| 177 | <xs:element name="test" type="xs:string"> | |
| 178 | <xs:annotation> | |
| 179 | <xs:documentation> | |
| 180 | Specifies a custom command that shall be executed to test whether this dependency is satisfied. | |
| 181 | </xs:documentation> | |
| 182 | </xs:annotation> | |
| 183 | </xs:element> | |
| 184 | <xs:element name="make" type="MakeVarType"/> | |
| 185 | </xs:choice> | |
| 186 | <xs:attribute name="name" type="xs:string"/> | |
| 187 | <xs:attribute name="platform" type="xs:string"/> | |
| 188 | <xs:attribute name="toolchain" type="xs:string"/> | |
| 189 | <xs:attribute name="not" type="xs:string"/> | |
| 190 | </xs:complexType> | |
| 191 | ||
| 192 | <xs:complexType name="FlagsType"> | |
| 193 | <xs:annotation> | |
| 194 | <xs:documentation> | |
| 195 | Instructs configure to append the contents of the element's body to the respective flags variable. | |
| 196 | If the optional <code>exec</code> flag is set to <code>true</code>, the contents are supposed to be | |
| 197 | executed under command substitution <em>at configuration time</em> before they are applied. | |
| 198 | </xs:documentation> | |
| 199 | </xs:annotation> | |
| 200 | <xs:simpleContent> | |
| 201 | <xs:extension base="xs:string"> | |
| 202 | <xs:attribute name="exec" type="xs:boolean" default="false"/> | |
| 203 | </xs:extension> | |
| 204 | </xs:simpleContent> | |
| 205 | </xs:complexType> | |
| 206 | ||
| 207 | <xs:complexType name="TargetType"> | |
| 208 | <xs:annotation> | |
| 209 | <xs:documentation> | |
| 210 | Declares a build target that is supposed to be configured. | |
| 211 | <p> | |
| 212 | If no build target is declared explicitly, an implicit default | |
| 213 | target is generated, which has the <code>alldependencies</code> | |
| 214 | flag set. | |
| 215 | </p> | |
| 216 | <p> | |
| 217 | The optional <code>name</code> attribute is also used to generate a prefix | |
| 218 | for the compiler and linker flags variables. | |
| 219 | Furthermore, a target may consist of an arbitrary number of <code>feature</code>, | |
| 220 | <code>option</code>, and <code>define</code> elements. | |
| 221 | Named dependencies can be listed (separated by comma) in the <code>dependencies</code> | |
| 222 | element. If this target shall use <em>all</em> available named dependencies, the empty | |
| 223 | element <code>alldependencies</code> can be used as a shortcut. | |
| 224 | </p> | |
| 225 | </xs:documentation> | |
| 226 | </xs:annotation> | |
| 227 | <xs:choice minOccurs="0" maxOccurs="unbounded"> | |
| 228 | <xs:element name="feature" type="FeatureType"/> | |
| 229 | <xs:element name="option" type="OptionType"/> | |
| 230 | <xs:element name="define" type="DefineType"/> | |
| 231 | <xs:element name="dependencies" type="DependenciesType"/> | |
| 232 | <xs:element name="alldependencies"> | |
| 233 | <xs:complexType/> | |
| 234 | </xs:element> | |
| 235 | </xs:choice> | |
| 236 | <xs:attribute name="name" type="xs:string"/> | |
| 237 | </xs:complexType> | |
| 238 | ||
| 239 | <xs:complexType name="FeatureType"> | |
| 240 | <xs:annotation> | |
| 241 | <xs:documentation> | |
| 242 | Declares an optional feature, that can be enabled during configuration, if all | |
| 243 | <code>dependencies</code> are satisfied. | |
| 244 | If a feature is enabled, all <code>define</code> and <code>make</code> definitions are | |
| 245 | supposed to be applied to the config file. | |
| 246 | If a feature is disabled, an optional <code>disabled</code> element may specify which | |
| 247 | <code>define</code> and <code>make</code> definitions are supposed to be applied. | |
| 248 | There might also be <code>dependencies</code> when the feature is disabled (e.g. specifying a fallback). | |
| 249 | In case the optional <code>default</code> attribute is set to true, the feature is enabled by default | |
| 250 | and is supposed to be automatically disabled (without error) when the dependencies are not satisfied. | |
| 251 | The name that is supposed to be used for the --enable and --disable arguments can be optionally | |
| 252 | specified with the <code>arg</code> attribute. Otherwise, the <code>name</code> is used by default. | |
| 253 | Optionally, a description for the help text of the resulting configure script can be specified by | |
| 254 | adding a <code>desc</code> element. | |
| 255 | </xs:documentation> | |
| 256 | </xs:annotation> | |
| 257 | <xs:choice minOccurs="0" maxOccurs="unbounded"> | |
| 258 | <xs:group ref="TargetDataGroup"/> | |
| 259 | <xs:element name="desc" type="xs:string"/> | |
| 260 | <xs:element name="disabled"> | |
| 261 | <xs:complexType> | |
| 262 | <xs:choice minOccurs="0" maxOccurs="unbounded"> | |
| 263 | <xs:group ref="TargetDataGroup"/> | |
| 264 | </xs:choice> | |
| 265 | </xs:complexType> | |
| 266 | </xs:element> | |
| 267 | </xs:choice> | |
| 268 | <xs:attribute name="name" type="xs:string" use="required"/> | |
| 269 | <xs:attribute name="arg" type="xs:string"/> | |
| 270 | <xs:attribute name="default" type="xs:boolean" default="false"/> | |
| 271 | </xs:complexType> | |
| 272 | ||
| 273 | <xs:complexType name="OptionType"> | |
| 274 | <xs:annotation> | |
| 275 | <xs:documentation> | |
| 276 | Declares a configuration option. | |
| 277 | The option argument name is specified with the <code>arg</code> attribute. | |
| 70 | 278 | Optionally, a description for the help text of the resulting configure script can be specified by |
| 279 | a <code>desc</code> element. | |
| 280 | Then, the next children of this element specify possible <code>values</code> by defining the conditions | |
| 0 | 281 | (in terms of dependencies) and effects (in terms of defines and make variables) of each value. |
| 282 | Finally, a set of <code>default</code>s is specified which supposed to automagically select the most | |
| 283 | appropriate value for a specific platform under the available dependencies (in case the option is not | |
| 284 | explicitly specified by using the command line argument). | |
| 285 | </xs:documentation> | |
| 286 | </xs:annotation> | |
| 287 | <xs:sequence> | |
| 70 | 288 | <xs:element name="desc" type="xs:string" minOccurs="0"/> |
| 0 | 289 | <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/> |
| 290 | <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/> | |
| 291 | </xs:sequence> | |
| 292 | <xs:attribute name="arg" type="xs:string" use="required"/> | |
| 293 | </xs:complexType> | |
| 294 | ||
| 295 | <xs:complexType name="OptionValueType"> | |
| 296 | <xs:annotation> | |
| 297 | <xs:documentation> | |
| 298 | Declares a possible value for the option (in the <code>str</code> attribute) and | |
| 299 | the conditions (<code>dependencies</code>) and effects, the value has. | |
| 300 | </xs:documentation> | |
| 301 | </xs:annotation> | |
| 302 | <xs:choice minOccurs="0" maxOccurs="unbounded"> | |
| 303 | <xs:group ref="TargetDataGroup"/> | |
| 304 | </xs:choice> | |
| 305 | <xs:attribute name="str" type="xs:string" use="required"/> | |
| 306 | </xs:complexType> | |
| 307 | ||
| 308 | <xs:complexType name="OptionDefaultType"> | |
| 309 | <xs:annotation> | |
| 310 | <xs:documentation> | |
| 311 | Specifies a default value for this option. Multiple default values can be specified, in which case | |
| 312 | they are checked one after another for availability. With the optional <code>platform</code> attribute, | |
| 313 | the default value can be constrained to a <em>single</em> specific platform and is supposed to be | |
| 314 | skipped by configure, when this platform is not detected. | |
| 315 | </xs:documentation> | |
| 316 | </xs:annotation> | |
| 317 | <xs:attribute name="value" type="xs:string" use="required"/> | |
| 318 | <xs:attribute name="platform" type="xs:string"/> | |
| 319 | </xs:complexType> | |
| 320 | ||
| 321 | <xs:group name="TargetDataGroup"> | |
| 322 | <xs:choice> | |
| 323 | <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/> | |
| 324 | <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/> | |
| 325 | <xs:element name="make" type="MakeVarType" minOccurs="0" maxOccurs="unbounded"/> | |
| 326 | </xs:choice> | |
| 327 | </xs:group> | |
| 328 | ||
| 329 | <xs:complexType name="DefineType"> | |
| 330 | <xs:annotation> | |
| 331 | <xs:documentation> | |
| 332 | Specifies C/C++ pre-processor definitions that are supposed to | |
| 333 | be appended to the compiler flags, if supported. | |
| 334 | (Note: for example, Fortran also supports C/C++ style pre-processor definitions under | |
| 335 | certain circumstances) | |
| 336 | </xs:documentation> | |
| 337 | </xs:annotation> | |
| 338 | <xs:attribute name="name" type="xs:string" use="required"/> | |
| 339 | <xs:attribute name="value" type="xs:string"/> | |
| 340 | </xs:complexType> | |
| 341 | ||
| 342 | <xs:simpleType name="DependenciesType"> | |
| 343 | <xs:annotation> | |
| 344 | <xs:documentation>A comma-separated list of named dependencies.</xs:documentation> | |
| 345 | </xs:annotation> | |
| 346 | <xs:restriction base="xs:string"/> | |
| 347 | </xs:simpleType> | |
| 348 | ||
| 349 | <xs:simpleType name="MakeVarType"> | |
| 350 | <xs:annotation> | |
| 351 | <xs:documentation> | |
| 352 | The text contents in the body of this element are supposed to be appended literally | |
| 353 | to the config file without prior processing. | |
| 354 | </xs:documentation> | |
| 355 | </xs:annotation> | |
| 356 | <xs:restriction base="xs:string"/> | |
| 357 | </xs:simpleType> | |
| 358 | </xs:schema> |