update uwproj files

Mon, 30 Oct 2023 17:40:34 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 30 Oct 2023 17:40:34 +0100
changeset 1
e3113d4e2fc0
parent 0
593b60458157
child 2
bb2bfff31f1d

update uwproj files

configure file | annotate | diff | comparison | revisions
make/cc.mk file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
make/uwproj.xsd file | annotate | diff | comparison | revisions
--- a/configure	Fri Oct 06 21:21:10 2023 +0200
+++ b/configure	Mon Oct 30 17:40:34 2023 +0100
@@ -14,19 +14,23 @@
 touch "$TEMP_DIR/features"
 
 # define standard variables
-PREFIX=/usr
-EPREFIX=
-BINDIR=
-SBINDIR=
-LIBDIR=
-LIBEXECDIR=
-DATADIR=
-SYSCONFDIR=
-SHAREDSTATEDIR=
-LOCALSTATEDIR=
-INCLUDEDIR=
-INFODIR=
-MANDIR=
+# also define standard prefix (this is where we will search for config.site)
+prefix=/usr
+exec_prefix=
+bindir=
+sbindir=
+libdir=
+libexecdir=
+datarootdir=
+datadir=
+sysconfdir=
+sharedstatedir=
+localstatedir=
+runstatedir=
+includedir=
+infodir=
+localedir=
+mandir=
 
 # custom variables
 
@@ -56,12 +60,14 @@
   --sysconfdir=DIR        system configuration files [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
 
 __EOF__
 }
@@ -73,19 +79,21 @@
 for ARG in "$@"
 do
     case "$ARG" in
-        "--prefix="*)         PREFIX=${ARG#--prefix=} ;;
-        "--exec-prefix="*)    EPREFIX=${ARG#--exec-prefix=} ;;
-        "--bindir="*)         BINDIR=${ARG#----bindir=} ;;
-        "--sbindir="*)        SBINDIR=${ARG#--sbindir=} ;;
-        "--libdir="*)         LIBDIR=${ARG#--libdir=} ;;
-        "--libexecdir="*)     LIBEXECDIR=${ARG#--libexecdir=} ;;
-        "--datadir="*)        DATADIR=${ARG#--datadir=} ;;
-        "--sysconfdir="*)     SYSCONFDIR=${ARG#--sysconfdir=} ;;
-        "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
-        "--localstatedir="*)  LOCALSTATEDIR=${ARG#--localstatedir=} ;;
-        "--includedir="*)     INCLUDEDIR=${ARG#--includedir=} ;;
-        "--infodir="*)        INFODIR=${ARG#--infodir=} ;;
-        "--mandir"*)          MANDIR=${ARG#--mandir} ;;
+        "--prefix="*)         prefix=${ARG#--prefix=} ;;
+        "--exec-prefix="*)    exec_prefix=${ARG#--exec-prefix=} ;;
+        "--bindir="*)         bindir=${ARG#----bindir=} ;;
+        "--sbindir="*)        sbindir=${ARG#--sbindir=} ;;
+        "--libdir="*)         libdir=${ARG#--libdir=} ;;
+        "--libexecdir="*)     libexecdir=${ARG#--libexecdir=} ;;
+        "--datarootdir="*)    datarootdir=${ARG#--datarootdir=} ;;
+        "--datadir="*)        datadir=${ARG#--datadir=} ;;
+        "--sysconfdir="*)     sysconfdir=${ARG#--sysconfdir=} ;;
+        "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
+        "--localstatedir="*)  localstatedir=${ARG#--localstatedir=} ;;
+        "--includedir="*)     includedir=${ARG#--includedir=} ;;
+        "--infodir="*)        infodir=${ARG#--infodir=} ;;
+        "--mandir"*)          mandir=${ARG#--mandir} ;;
+        "--localedir"*)       localedir=${ARG#--localedir} ;;
         "--help"*) printhelp; abort_configure ;;
         "--debug")           BUILD_TYPE="debug" ;;
         "--release")         BUILD_TYPE="release" ;;
@@ -94,19 +102,41 @@
 done
 
 
-# set dir variables
-: ${EPREFIX:="$PREFIX"}
-: ${BINDIR:="$EPREFIX/bin"}
-: ${SBINDIR:="$EPREFIX/sbin"}
-: ${LIBDIR:="$EPREFIX/lib"}
-: ${LIBEXECDIR:="$EPREFIX/libexec"}
-: ${DATADIR:="$PREFIX/share"}
-: ${SYSCONFDIR:="$PREFIX/etc"}
-: ${SHAREDSTATEDIR:="$PREFIX/com"}
-: ${LOCALSTATEDIR:="$PREFIX/var"}
-: ${INCLUDEDIR:="$PREFIX/include"}
-: ${INFODIR:="$PREFIX/info"}
-: ${MANDIR:="$PREFIX/man"}
+
+# set defaults for dir variables
+: ${exec_prefix:="$prefix"}
+: ${bindir:='${exec_prefix}/bin'}
+: ${sbindir:='${exec_prefix}/sbin'}
+: ${libdir:='${exec_prefix}/lib'}
+: ${libexecdir:='${exec_prefix}/libexec'}
+: ${datarootdir:='${prefix}/share'}
+: ${datadir:='${datarootdir}'}
+: ${sysconfdir:='${prefix}/etc'}
+: ${sharedstatedir:='${prefix}/com'}
+: ${localstatedir:='${prefix}/var'}
+: ${runstatedir:='${localstatedir}/run'}
+: ${includedir:='${prefix}/include'}
+: ${infodir:='${datarootdir}/info'}
+: ${mandir:='${datarootdir}/man'}
+: ${localedir:='${datarootdir}/locale'}
+
+# check if a config.site exists and load it
+if [ -n "$CONFIG_SITE" ]; then
+    # CONFIG_SITE may contain space separated file names
+    for cs in $CONFIG_SITE; do
+        printf "loading defaults from $cs... "
+        . "$cs"
+        echo ok
+    done
+elif [ -f "$prefix/share/config.site" ]; then
+    printf "loading site defaults... "
+    . "$prefix/share/config.site"
+    echo ok
+elif [ -f "$prefix/etc/config.site" ]; then
+    printf "loading site defaults... "
+    . "$prefix/etc/config.site"
+    echo ok
+fi
 
 # Test for availability of pkg-config
 PKG_CONFIG=`command -v pkg-config`
@@ -161,22 +191,23 @@
 
 # generate vars.mk
 cat > "$TEMP_DIR/vars.mk" << __EOF__
-PREFIX="$PREFIX"
-EPREFIX="$EPREFIX"
-BINDIR="$BINDIR"
-SBINDIR="$SBINDIR"
-LIBDIR="$LIBDIR"
-LIBEXECDIR="$LIBEXECDIR"
-DATADIR="$DATADIR"
-SYSCONFDIR="$SYSCONFDIR"
-SHAREDSTATEDIR="$SHAREDSTATEDIR"
-LOCALSTATEDIR="$LOCALSTATEDIR"
-INCLUDEDIR="$INCLUDEDIR"
-INFODIR="$INFODIR"
-MANDIR="$MANDIR"
+prefix="$prefix"
+exec_prefix="$exec_prefix"
+bindir="$bindir"
+sbindir="$sbindir"
+libdir="$libdir"
+libexecdir="$libexecdir"
+datarootdir="$datarootdir"
+datadir="$datadir"
+sysconfdir="$sysconfdir"
+sharedstatedir="$sharedstatedir"
+localstatedir="$localstatedir"
+runstatedir="$runstatedir"
+includedir="$includedir"
+infodir="$infodir"
+mandir="$mandir"
+localedir="$localedir"
 __EOF__
-sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk"
-
 
 # toolchain detection utilities
 . make/toolchain.sh
@@ -405,8 +436,8 @@
 echo "configure finished"
 echo
 echo "Build Config:"
-echo "  PREFIX:    $PREFIX"
-echo "  TOOLCHAIN: $TOOLCHAIN_NAME"
+echo "  PREFIX:      $prefix"
+echo "  TOOLCHAIN:   $TOOLCHAIN_NAME"
 echo
 
 # generate the config.mk file
--- a/make/cc.mk	Fri Oct 06 21:21:10 2023 +0200
+++ b/make/cc.mk	Mon Oct 30 17:40:34 2023 +0100
@@ -6,6 +6,3 @@
 DEBUG_CC_FLAGS = -g
 RELEASE_CC_FLAGS = -O3 -DNDEBUG
 LDFLAGS =
-
-SHLIB_CFLAGS = -fPIC
-SHLIB_LDFLAGS = -shared
\ No newline at end of file
--- a/make/configure.vm	Fri Oct 06 21:21:10 2023 +0200
+++ b/make/configure.vm	Mon Oct 30 17:40:34 2023 +0100
@@ -14,19 +14,23 @@
 touch "$TEMP_DIR/features"
 
 # define standard variables
-PREFIX=/usr
-EPREFIX=
-BINDIR=
-SBINDIR=
-LIBDIR=
-LIBEXECDIR=
-DATADIR=
-SYSCONFDIR=
-SHAREDSTATEDIR=
-LOCALSTATEDIR=
-INCLUDEDIR=
-INFODIR=
-MANDIR=
+# also define standard prefix (this is where we will search for config.site)
+prefix=/usr
+exec_prefix=
+bindir=
+sbindir=
+libdir=
+libexecdir=
+datarootdir=
+datadir=
+sysconfdir=
+sharedstatedir=
+localstatedir=
+runstatedir=
+includedir=
+infodir=
+localedir=
+mandir=
 
 # custom variables
 #foreach( $var in $vars )
@@ -68,12 +72,14 @@
   --sysconfdir=DIR        system configuration files [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
 
 #if( $options.size() > 0 )
 Options:
@@ -106,19 +112,21 @@
 for ARG in "$@"
 do
     case "$ARG" in
-        "--prefix="*)         PREFIX=${D}{ARG#--prefix=} ;;
-        "--exec-prefix="*)    EPREFIX=${D}{ARG#--exec-prefix=} ;;
-        "--bindir="*)         BINDIR=${D}{ARG#----bindir=} ;;
-        "--sbindir="*)        SBINDIR=${D}{ARG#--sbindir=} ;;
-        "--libdir="*)         LIBDIR=${D}{ARG#--libdir=} ;;
-        "--libexecdir="*)     LIBEXECDIR=${D}{ARG#--libexecdir=} ;;
-        "--datadir="*)        DATADIR=${D}{ARG#--datadir=} ;;
-        "--sysconfdir="*)     SYSCONFDIR=${D}{ARG#--sysconfdir=} ;;
-        "--sharedstatedir="*) SHAREDSTATEDIR=${D}{ARG#--sharedstatedir=} ;;
-        "--localstatedir="*)  LOCALSTATEDIR=${D}{ARG#--localstatedir=} ;;
-        "--includedir="*)     INCLUDEDIR=${D}{ARG#--includedir=} ;;
-        "--infodir="*)        INFODIR=${D}{ARG#--infodir=} ;;
-        "--mandir"*)          MANDIR=${D}{ARG#--mandir} ;;
+        "--prefix="*)         prefix=${D}{ARG#--prefix=} ;;
+        "--exec-prefix="*)    exec_prefix=${D}{ARG#--exec-prefix=} ;;
+        "--bindir="*)         bindir=${D}{ARG#----bindir=} ;;
+        "--sbindir="*)        sbindir=${D}{ARG#--sbindir=} ;;
+        "--libdir="*)         libdir=${D}{ARG#--libdir=} ;;
+        "--libexecdir="*)     libexecdir=${D}{ARG#--libexecdir=} ;;
+        "--datarootdir="*)    datarootdir=${D}{ARG#--datarootdir=} ;;
+        "--datadir="*)        datadir=${D}{ARG#--datadir=} ;;
+        "--sysconfdir="*)     sysconfdir=${D}{ARG#--sysconfdir=} ;;
+        "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;;
+        "--localstatedir="*)  localstatedir=${D}{ARG#--localstatedir=} ;;
+        "--includedir="*)     includedir=${D}{ARG#--includedir=} ;;
+        "--infodir="*)        infodir=${D}{ARG#--infodir=} ;;
+        "--mandir"*)          mandir=${D}{ARG#--mandir} ;;
+        "--localedir"*)       localedir=${D}{ARG#--localedir} ;;
         "--help"*) printhelp; abort_configure ;;
         "--debug")           BUILD_TYPE="debug" ;;
         "--release")         BUILD_TYPE="release" ;;
@@ -135,19 +143,41 @@
 
 ## Begin unparsed content. **
 #[[
-# set dir variables
-: ${EPREFIX:="$PREFIX"}
-: ${BINDIR:="$EPREFIX/bin"}
-: ${SBINDIR:="$EPREFIX/sbin"}
-: ${LIBDIR:="$EPREFIX/lib"}
-: ${LIBEXECDIR:="$EPREFIX/libexec"}
-: ${DATADIR:="$PREFIX/share"}
-: ${SYSCONFDIR:="$PREFIX/etc"}
-: ${SHAREDSTATEDIR:="$PREFIX/com"}
-: ${LOCALSTATEDIR:="$PREFIX/var"}
-: ${INCLUDEDIR:="$PREFIX/include"}
-: ${INFODIR:="$PREFIX/info"}
-: ${MANDIR:="$PREFIX/man"}
+
+# set defaults for dir variables
+: ${exec_prefix:="$prefix"}
+: ${bindir:='${exec_prefix}/bin'}
+: ${sbindir:='${exec_prefix}/sbin'}
+: ${libdir:='${exec_prefix}/lib'}
+: ${libexecdir:='${exec_prefix}/libexec'}
+: ${datarootdir:='${prefix}/share'}
+: ${datadir:='${datarootdir}'}
+: ${sysconfdir:='${prefix}/etc'}
+: ${sharedstatedir:='${prefix}/com'}
+: ${localstatedir:='${prefix}/var'}
+: ${runstatedir:='${localstatedir}/run'}
+: ${includedir:='${prefix}/include'}
+: ${infodir:='${datarootdir}/info'}
+: ${mandir:='${datarootdir}/man'}
+: ${localedir:='${datarootdir}/locale'}
+
+# check if a config.site exists and load it
+if [ -n "$CONFIG_SITE" ]; then
+    # CONFIG_SITE may contain space separated file names
+    for cs in $CONFIG_SITE; do
+        printf "loading defaults from $cs... "
+        . "$cs"
+        echo ok
+    done
+elif [ -f "$prefix/share/config.site" ]; then
+    printf "loading site defaults... "
+    . "$prefix/share/config.site"
+    echo ok
+elif [ -f "$prefix/etc/config.site" ]; then
+    printf "loading site defaults... "
+    . "$prefix/etc/config.site"
+    echo ok
+fi
 
 # Test for availability of pkg-config
 PKG_CONFIG=`command -v pkg-config`
@@ -203,25 +233,26 @@
 
 # generate vars.mk
 cat > "$TEMP_DIR/vars.mk" << __EOF__
-PREFIX="$PREFIX"
-EPREFIX="$EPREFIX"
-BINDIR="$BINDIR"
-SBINDIR="$SBINDIR"
-LIBDIR="$LIBDIR"
-LIBEXECDIR="$LIBEXECDIR"
-DATADIR="$DATADIR"
-SYSCONFDIR="$SYSCONFDIR"
-SHAREDSTATEDIR="$SHAREDSTATEDIR"
-LOCALSTATEDIR="$LOCALSTATEDIR"
-INCLUDEDIR="$INCLUDEDIR"
-INFODIR="$INFODIR"
-MANDIR="$MANDIR"
+prefix="$prefix"
+exec_prefix="$exec_prefix"
+bindir="$bindir"
+sbindir="$sbindir"
+libdir="$libdir"
+libexecdir="$libexecdir"
+datarootdir="$datarootdir"
+datadir="$datadir"
+sysconfdir="$sysconfdir"
+sharedstatedir="$sharedstatedir"
+localstatedir="$localstatedir"
+runstatedir="$runstatedir"
+includedir="$includedir"
+infodir="$infodir"
+mandir="$mandir"
+localedir="$localedir"
 #foreach( $var in $vars )
 ${var.varName}="${D}${var.varName}"
 #end
 __EOF__
-sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk"
-
 
 # toolchain detection utilities
 . make/toolchain.sh
@@ -577,8 +608,8 @@
 echo "configure finished"
 echo
 echo "Build Config:"
-echo "  PREFIX:    $PREFIX"
-echo "  TOOLCHAIN: $TOOLCHAIN_NAME"
+echo "  PREFIX:      $prefix"
+echo "  TOOLCHAIN:   $TOOLCHAIN_NAME"
 #if ( $options.size() > 0 )
 echo "Options:"
 cat "$TEMP_DIR/options"
--- a/make/uwproj.xsd	Fri Oct 06 21:21:10 2023 +0200
+++ b/make/uwproj.xsd	Mon Oct 30 17:40:34 2023 +0100
@@ -8,6 +8,14 @@
     <xs:element name="project" type="ProjectType"/>
 
     <xs:complexType name="ProjectType">
+        <xs:annotation>
+            <xs:documentation>
+                The root element of an uwproj project.
+                Consists of an optional <code>config</code> element
+                and an arbitrary number of <code>dependency</code>
+                and <code>target</code> elements.
+            </xs:documentation>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="config" type="ConfigType" minOccurs="0"/>
             <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/>
@@ -16,12 +24,31 @@
     </xs:complexType>
 
     <xs:complexType name="ConfigType">
+        <xs:annotation>
+            <xs:documentation>
+                The configuration section.
+                Consists of an arbitrary number of <code>var</code> elements.
+            </xs:documentation>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="ConfigVarType">
+        <xs:annotation>
+            <xs:documentation>
+                The definition of a configuration variable.
+                <p>
+                    Configuration variables are supposed to be used in the configure script and are also
+                    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.
+                </p>
+            </xs:documentation>
+        </xs:annotation>
         <xs:simpleContent>
             <xs:extension base="xs:string">
                 <xs:attribute name="name" type="xs:string" use="required"/>
@@ -31,6 +58,13 @@
     </xs:complexType>
 
     <xs:complexType name="PkgConfigType">
+        <xs:annotation>
+            <xs:documentation>
+                Instructs configure to invoke <code>pkg-config</code>, if present on the system, to determine
+                compiler and linker flags. The text body of this element defines the package name to search.
+                To constrain the allowed versions, use the attributes <code>atleast, exact, max</code>.
+            </xs:documentation>
+        </xs:annotation>
         <xs:simpleContent>
             <xs:extension base="xs:string">
                 <xs:attribute name="atleast" type="xs:string"/>
@@ -41,6 +75,12 @@
     </xs:complexType>
 
     <xs:simpleType name="LangType">
+        <xs:annotation>
+            <xs:documentation>
+                Requests a compiler for the specified language. Allowed values are
+                c, cpp.
+            </xs:documentation>
+        </xs:annotation>
         <xs:restriction base="xs:string">
             <xs:enumeration value="c"/>
             <xs:enumeration value="cpp"/>
@@ -48,14 +88,40 @@
     </xs:simpleType>
 
     <xs:complexType name="DependencyType">
+        <xs:annotation>
+            <xs:documentation>
+                Declares a dependency.
+                <p>
+                    If the optional <code>name</code> attribute is omitted, the dependency is global
+                    and must be satisfied, otherwise configuration shall fail.
+                    A <em>named dependency</em> can be referenced by a target (or is implicitly referenced
+                    by the default target, if no targets are specified).
+                    Multiple declarations for the same named dependency may exist, in which case each declaration
+                    is checked one after another, until one block is satisfied. The result of the first satisfied
+                    dependency declaration is supposed to be applied to the config file.
+                </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 dependency declaration if the detected platform is not
+                    matching the filter specification of these attributes.
+                </p>
+            </xs:documentation>
+        </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:element name="lang" type="LangType"/>
             <xs:element name="cflags" type="FlagsType"/>
             <xs:element name="cxxflags" type="FlagsType"/>
             <xs:element name="ldflags" type="FlagsType"/>
             <xs:element name="pkgconfig" type="PkgConfigType"/>
-            <xs:element name="test" type="xs:string"/>
-            <xs:element name="make" type="xs:string"/>
+            <xs:element name="test" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>
+                        Specifies a custom command that shall be executed to test whether this dependency is satisfied.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="make" type="MakeVarType"/>
         </xs:choice>
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="platform" type="xs:string"/>
@@ -63,6 +129,13 @@
     </xs:complexType>
 
     <xs:complexType name="FlagsType">
+        <xs:annotation>
+            <xs:documentation>
+                Instructs configure to append the contents of the element's body to the respective flags variable.
+                If the optional <code>exec</code> flag is set to <code>true</code>, the contents are supposed to be
+                executed under command substitution <em>at configuration time</em> before they are applied.
+            </xs:documentation>
+        </xs:annotation>
         <xs:simpleContent>
             <xs:extension base="xs:string">
                 <xs:attribute name="exec" type="xs:boolean" default="false"/>
@@ -71,6 +144,25 @@
     </xs:complexType>
 
     <xs:complexType name="TargetType">
+        <xs:annotation>
+            <xs:documentation>
+                Declares a build target that is supposed to be configured.
+                <p>
+                    If no build target is declared explicitly, an implicit default
+                    target is generated, which has the <code>alldependencies</code>
+                    flag set.
+                </p>
+                <p>
+                    The optional <code>name</code> attribute is also used to generate a prefix
+                    for the compiler and linker flags variables.
+                    Furthermore, a target may consist of an arbitrary number of <code>feature</code>,
+                    <code>option</code>, and <code>define</code> elements.
+                    Named dependencies can be listed (separated by comma) in the <code>dependencies</code>
+                    element. If this target shall use <em>all</em> available named dependencies, the empty
+                    element <code>alldependencies</code> can be used as a shortcut.
+                </p>
+            </xs:documentation>
+        </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:element name="feature" type="FeatureType"/>
             <xs:element name="option" type="OptionType"/>
@@ -84,6 +176,18 @@
     </xs:complexType>
 
     <xs:complexType name="FeatureType">
+        <xs:annotation>
+            <xs:documentation>
+                Declares an optional feature, that can be enabled during configuration, if all
+                <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.
+                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
+                specified with the <code>arg</code> attribute. Otherwise, the <code>name</code> is used by default.
+            </xs:documentation>
+        </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:group ref="TargetDataGroup"/>
         </xs:choice>
@@ -93,14 +197,31 @@
     </xs:complexType>
 
     <xs:complexType name="OptionType">
+        <xs:annotation>
+            <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
+                (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
+                explicitly specified by using the command line argument).
+            </xs:documentation>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
-        <xs:attribute name="arg" type="xs:string"/>
+        <xs:attribute name="arg" type="xs:string" use="required"/>
     </xs:complexType>
 
     <xs:complexType name="OptionValueType">
+        <xs:annotation>
+            <xs:documentation>
+                Declares a possible value for the option (in the <code>str</code> attribute) and
+                the conditions (<code>dependencies</code>) and effects, the value has.
+            </xs:documentation>
+        </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:group ref="TargetDataGroup"/>
         </xs:choice>
@@ -108,6 +229,14 @@
     </xs:complexType>
 
     <xs:complexType name="OptionDefaultType">
+        <xs:annotation>
+            <xs:documentation>
+                Specifies a default value for this option. Multiple default values can be specified, in which case
+                they are checked one after another for availability. With the optional <code>platform</code> attribute,
+                the default value can be constrained to a <em>single</em> specific platform and is supposed to be
+                skipped by configure, when this platform is not detected.
+            </xs:documentation>
+        </xs:annotation>
         <xs:attribute name="value" type="xs:string" use="required"/>
         <xs:attribute name="platform" type="xs:string"/>
     </xs:complexType>
@@ -116,16 +245,37 @@
         <xs:choice>
             <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="make" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="make" type="MakeVarType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:choice>
     </xs:group>
 
     <xs:complexType name="DefineType">
+        <xs:annotation>
+            <xs:documentation>
+                Specifies C/C++ pre-processor definitions that are supposed to
+                be appended to the compiler flags, if supported.
+                (Note: for example, Fortran also supports C/C++ style pre-processor definitions under
+                certain circumstances)
+            </xs:documentation>
+        </xs:annotation>
         <xs:attribute name="name" type="xs:string" use="required"/>
         <xs:attribute name="value" type="xs:string"/>
     </xs:complexType>
 
     <xs:simpleType name="DependenciesType">
+        <xs:annotation>
+            <xs:documentation>A comma-separated list of named dependencies.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="MakeVarType">
+        <xs:annotation>
+            <xs:documentation>
+                The text contents in the body of this element are supposed to be appended literally
+                to the config file without prior processing.
+            </xs:documentation>
+        </xs:annotation>
         <xs:restriction base="xs:string"/>
     </xs:simpleType>
 </xs:schema>
\ No newline at end of file

mercurial