Mon, 30 Oct 2023 17:40:34 +0100
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 |
1.1 --- a/configure Fri Oct 06 21:21:10 2023 +0200 1.2 +++ b/configure Mon Oct 30 17:40:34 2023 +0100 1.3 @@ -14,19 +14,23 @@ 1.4 touch "$TEMP_DIR/features" 1.5 1.6 # define standard variables 1.7 -PREFIX=/usr 1.8 -EPREFIX= 1.9 -BINDIR= 1.10 -SBINDIR= 1.11 -LIBDIR= 1.12 -LIBEXECDIR= 1.13 -DATADIR= 1.14 -SYSCONFDIR= 1.15 -SHAREDSTATEDIR= 1.16 -LOCALSTATEDIR= 1.17 -INCLUDEDIR= 1.18 -INFODIR= 1.19 -MANDIR= 1.20 +# also define standard prefix (this is where we will search for config.site) 1.21 +prefix=/usr 1.22 +exec_prefix= 1.23 +bindir= 1.24 +sbindir= 1.25 +libdir= 1.26 +libexecdir= 1.27 +datarootdir= 1.28 +datadir= 1.29 +sysconfdir= 1.30 +sharedstatedir= 1.31 +localstatedir= 1.32 +runstatedir= 1.33 +includedir= 1.34 +infodir= 1.35 +localedir= 1.36 +mandir= 1.37 1.38 # custom variables 1.39 1.40 @@ -56,12 +60,14 @@ 1.41 --sysconfdir=DIR system configuration files [PREFIX/etc] 1.42 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1.43 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1.44 + --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] 1.45 --libdir=DIR object code libraries [EPREFIX/lib] 1.46 --includedir=DIR C header files [PREFIX/include] 1.47 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1.48 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1.49 --infodir=DIR info documentation [DATAROOTDIR/info] 1.50 --mandir=DIR man documentation [DATAROOTDIR/man] 1.51 + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1.52 1.53 __EOF__ 1.54 } 1.55 @@ -73,19 +79,21 @@ 1.56 for ARG in "$@" 1.57 do 1.58 case "$ARG" in 1.59 - "--prefix="*) PREFIX=${ARG#--prefix=} ;; 1.60 - "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; 1.61 - "--bindir="*) BINDIR=${ARG#----bindir=} ;; 1.62 - "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; 1.63 - "--libdir="*) LIBDIR=${ARG#--libdir=} ;; 1.64 - "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; 1.65 - "--datadir="*) DATADIR=${ARG#--datadir=} ;; 1.66 - "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; 1.67 - "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; 1.68 - "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; 1.69 - "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; 1.70 - "--infodir="*) INFODIR=${ARG#--infodir=} ;; 1.71 - "--mandir"*) MANDIR=${ARG#--mandir} ;; 1.72 + "--prefix="*) prefix=${ARG#--prefix=} ;; 1.73 + "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;; 1.74 + "--bindir="*) bindir=${ARG#----bindir=} ;; 1.75 + "--sbindir="*) sbindir=${ARG#--sbindir=} ;; 1.76 + "--libdir="*) libdir=${ARG#--libdir=} ;; 1.77 + "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;; 1.78 + "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; 1.79 + "--datadir="*) datadir=${ARG#--datadir=} ;; 1.80 + "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; 1.81 + "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; 1.82 + "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; 1.83 + "--includedir="*) includedir=${ARG#--includedir=} ;; 1.84 + "--infodir="*) infodir=${ARG#--infodir=} ;; 1.85 + "--mandir"*) mandir=${ARG#--mandir} ;; 1.86 + "--localedir"*) localedir=${ARG#--localedir} ;; 1.87 "--help"*) printhelp; abort_configure ;; 1.88 "--debug") BUILD_TYPE="debug" ;; 1.89 "--release") BUILD_TYPE="release" ;; 1.90 @@ -94,19 +102,41 @@ 1.91 done 1.92 1.93 1.94 -# set dir variables 1.95 -: ${EPREFIX:="$PREFIX"} 1.96 -: ${BINDIR:="$EPREFIX/bin"} 1.97 -: ${SBINDIR:="$EPREFIX/sbin"} 1.98 -: ${LIBDIR:="$EPREFIX/lib"} 1.99 -: ${LIBEXECDIR:="$EPREFIX/libexec"} 1.100 -: ${DATADIR:="$PREFIX/share"} 1.101 -: ${SYSCONFDIR:="$PREFIX/etc"} 1.102 -: ${SHAREDSTATEDIR:="$PREFIX/com"} 1.103 -: ${LOCALSTATEDIR:="$PREFIX/var"} 1.104 -: ${INCLUDEDIR:="$PREFIX/include"} 1.105 -: ${INFODIR:="$PREFIX/info"} 1.106 -: ${MANDIR:="$PREFIX/man"} 1.107 + 1.108 +# set defaults for dir variables 1.109 +: ${exec_prefix:="$prefix"} 1.110 +: ${bindir:='${exec_prefix}/bin'} 1.111 +: ${sbindir:='${exec_prefix}/sbin'} 1.112 +: ${libdir:='${exec_prefix}/lib'} 1.113 +: ${libexecdir:='${exec_prefix}/libexec'} 1.114 +: ${datarootdir:='${prefix}/share'} 1.115 +: ${datadir:='${datarootdir}'} 1.116 +: ${sysconfdir:='${prefix}/etc'} 1.117 +: ${sharedstatedir:='${prefix}/com'} 1.118 +: ${localstatedir:='${prefix}/var'} 1.119 +: ${runstatedir:='${localstatedir}/run'} 1.120 +: ${includedir:='${prefix}/include'} 1.121 +: ${infodir:='${datarootdir}/info'} 1.122 +: ${mandir:='${datarootdir}/man'} 1.123 +: ${localedir:='${datarootdir}/locale'} 1.124 + 1.125 +# check if a config.site exists and load it 1.126 +if [ -n "$CONFIG_SITE" ]; then 1.127 + # CONFIG_SITE may contain space separated file names 1.128 + for cs in $CONFIG_SITE; do 1.129 + printf "loading defaults from $cs... " 1.130 + . "$cs" 1.131 + echo ok 1.132 + done 1.133 +elif [ -f "$prefix/share/config.site" ]; then 1.134 + printf "loading site defaults... " 1.135 + . "$prefix/share/config.site" 1.136 + echo ok 1.137 +elif [ -f "$prefix/etc/config.site" ]; then 1.138 + printf "loading site defaults... " 1.139 + . "$prefix/etc/config.site" 1.140 + echo ok 1.141 +fi 1.142 1.143 # Test for availability of pkg-config 1.144 PKG_CONFIG=`command -v pkg-config` 1.145 @@ -161,22 +191,23 @@ 1.146 1.147 # generate vars.mk 1.148 cat > "$TEMP_DIR/vars.mk" << __EOF__ 1.149 -PREFIX="$PREFIX" 1.150 -EPREFIX="$EPREFIX" 1.151 -BINDIR="$BINDIR" 1.152 -SBINDIR="$SBINDIR" 1.153 -LIBDIR="$LIBDIR" 1.154 -LIBEXECDIR="$LIBEXECDIR" 1.155 -DATADIR="$DATADIR" 1.156 -SYSCONFDIR="$SYSCONFDIR" 1.157 -SHAREDSTATEDIR="$SHAREDSTATEDIR" 1.158 -LOCALSTATEDIR="$LOCALSTATEDIR" 1.159 -INCLUDEDIR="$INCLUDEDIR" 1.160 -INFODIR="$INFODIR" 1.161 -MANDIR="$MANDIR" 1.162 +prefix="$prefix" 1.163 +exec_prefix="$exec_prefix" 1.164 +bindir="$bindir" 1.165 +sbindir="$sbindir" 1.166 +libdir="$libdir" 1.167 +libexecdir="$libexecdir" 1.168 +datarootdir="$datarootdir" 1.169 +datadir="$datadir" 1.170 +sysconfdir="$sysconfdir" 1.171 +sharedstatedir="$sharedstatedir" 1.172 +localstatedir="$localstatedir" 1.173 +runstatedir="$runstatedir" 1.174 +includedir="$includedir" 1.175 +infodir="$infodir" 1.176 +mandir="$mandir" 1.177 +localedir="$localedir" 1.178 __EOF__ 1.179 -sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk" 1.180 - 1.181 1.182 # toolchain detection utilities 1.183 . make/toolchain.sh 1.184 @@ -405,8 +436,8 @@ 1.185 echo "configure finished" 1.186 echo 1.187 echo "Build Config:" 1.188 -echo " PREFIX: $PREFIX" 1.189 -echo " TOOLCHAIN: $TOOLCHAIN_NAME" 1.190 +echo " PREFIX: $prefix" 1.191 +echo " TOOLCHAIN: $TOOLCHAIN_NAME" 1.192 echo 1.193 1.194 # generate the config.mk file
2.1 --- a/make/cc.mk Fri Oct 06 21:21:10 2023 +0200 2.2 +++ b/make/cc.mk Mon Oct 30 17:40:34 2023 +0100 2.3 @@ -6,6 +6,3 @@ 2.4 DEBUG_CC_FLAGS = -g 2.5 RELEASE_CC_FLAGS = -O3 -DNDEBUG 2.6 LDFLAGS = 2.7 - 2.8 -SHLIB_CFLAGS = -fPIC 2.9 -SHLIB_LDFLAGS = -shared 2.10 \ No newline at end of file
3.1 --- a/make/configure.vm Fri Oct 06 21:21:10 2023 +0200 3.2 +++ b/make/configure.vm Mon Oct 30 17:40:34 2023 +0100 3.3 @@ -14,19 +14,23 @@ 3.4 touch "$TEMP_DIR/features" 3.5 3.6 # define standard variables 3.7 -PREFIX=/usr 3.8 -EPREFIX= 3.9 -BINDIR= 3.10 -SBINDIR= 3.11 -LIBDIR= 3.12 -LIBEXECDIR= 3.13 -DATADIR= 3.14 -SYSCONFDIR= 3.15 -SHAREDSTATEDIR= 3.16 -LOCALSTATEDIR= 3.17 -INCLUDEDIR= 3.18 -INFODIR= 3.19 -MANDIR= 3.20 +# also define standard prefix (this is where we will search for config.site) 3.21 +prefix=/usr 3.22 +exec_prefix= 3.23 +bindir= 3.24 +sbindir= 3.25 +libdir= 3.26 +libexecdir= 3.27 +datarootdir= 3.28 +datadir= 3.29 +sysconfdir= 3.30 +sharedstatedir= 3.31 +localstatedir= 3.32 +runstatedir= 3.33 +includedir= 3.34 +infodir= 3.35 +localedir= 3.36 +mandir= 3.37 3.38 # custom variables 3.39 #foreach( $var in $vars ) 3.40 @@ -68,12 +72,14 @@ 3.41 --sysconfdir=DIR system configuration files [PREFIX/etc] 3.42 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 3.43 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 3.44 + --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] 3.45 --libdir=DIR object code libraries [EPREFIX/lib] 3.46 --includedir=DIR C header files [PREFIX/include] 3.47 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 3.48 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 3.49 --infodir=DIR info documentation [DATAROOTDIR/info] 3.50 --mandir=DIR man documentation [DATAROOTDIR/man] 3.51 + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 3.52 3.53 #if( $options.size() > 0 ) 3.54 Options: 3.55 @@ -106,19 +112,21 @@ 3.56 for ARG in "$@" 3.57 do 3.58 case "$ARG" in 3.59 - "--prefix="*) PREFIX=${D}{ARG#--prefix=} ;; 3.60 - "--exec-prefix="*) EPREFIX=${D}{ARG#--exec-prefix=} ;; 3.61 - "--bindir="*) BINDIR=${D}{ARG#----bindir=} ;; 3.62 - "--sbindir="*) SBINDIR=${D}{ARG#--sbindir=} ;; 3.63 - "--libdir="*) LIBDIR=${D}{ARG#--libdir=} ;; 3.64 - "--libexecdir="*) LIBEXECDIR=${D}{ARG#--libexecdir=} ;; 3.65 - "--datadir="*) DATADIR=${D}{ARG#--datadir=} ;; 3.66 - "--sysconfdir="*) SYSCONFDIR=${D}{ARG#--sysconfdir=} ;; 3.67 - "--sharedstatedir="*) SHAREDSTATEDIR=${D}{ARG#--sharedstatedir=} ;; 3.68 - "--localstatedir="*) LOCALSTATEDIR=${D}{ARG#--localstatedir=} ;; 3.69 - "--includedir="*) INCLUDEDIR=${D}{ARG#--includedir=} ;; 3.70 - "--infodir="*) INFODIR=${D}{ARG#--infodir=} ;; 3.71 - "--mandir"*) MANDIR=${D}{ARG#--mandir} ;; 3.72 + "--prefix="*) prefix=${D}{ARG#--prefix=} ;; 3.73 + "--exec-prefix="*) exec_prefix=${D}{ARG#--exec-prefix=} ;; 3.74 + "--bindir="*) bindir=${D}{ARG#----bindir=} ;; 3.75 + "--sbindir="*) sbindir=${D}{ARG#--sbindir=} ;; 3.76 + "--libdir="*) libdir=${D}{ARG#--libdir=} ;; 3.77 + "--libexecdir="*) libexecdir=${D}{ARG#--libexecdir=} ;; 3.78 + "--datarootdir="*) datarootdir=${D}{ARG#--datarootdir=} ;; 3.79 + "--datadir="*) datadir=${D}{ARG#--datadir=} ;; 3.80 + "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; 3.81 + "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; 3.82 + "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; 3.83 + "--includedir="*) includedir=${D}{ARG#--includedir=} ;; 3.84 + "--infodir="*) infodir=${D}{ARG#--infodir=} ;; 3.85 + "--mandir"*) mandir=${D}{ARG#--mandir} ;; 3.86 + "--localedir"*) localedir=${D}{ARG#--localedir} ;; 3.87 "--help"*) printhelp; abort_configure ;; 3.88 "--debug") BUILD_TYPE="debug" ;; 3.89 "--release") BUILD_TYPE="release" ;; 3.90 @@ -135,19 +143,41 @@ 3.91 3.92 ## Begin unparsed content. ** 3.93 #[[ 3.94 -# set dir variables 3.95 -: ${EPREFIX:="$PREFIX"} 3.96 -: ${BINDIR:="$EPREFIX/bin"} 3.97 -: ${SBINDIR:="$EPREFIX/sbin"} 3.98 -: ${LIBDIR:="$EPREFIX/lib"} 3.99 -: ${LIBEXECDIR:="$EPREFIX/libexec"} 3.100 -: ${DATADIR:="$PREFIX/share"} 3.101 -: ${SYSCONFDIR:="$PREFIX/etc"} 3.102 -: ${SHAREDSTATEDIR:="$PREFIX/com"} 3.103 -: ${LOCALSTATEDIR:="$PREFIX/var"} 3.104 -: ${INCLUDEDIR:="$PREFIX/include"} 3.105 -: ${INFODIR:="$PREFIX/info"} 3.106 -: ${MANDIR:="$PREFIX/man"} 3.107 + 3.108 +# set defaults for dir variables 3.109 +: ${exec_prefix:="$prefix"} 3.110 +: ${bindir:='${exec_prefix}/bin'} 3.111 +: ${sbindir:='${exec_prefix}/sbin'} 3.112 +: ${libdir:='${exec_prefix}/lib'} 3.113 +: ${libexecdir:='${exec_prefix}/libexec'} 3.114 +: ${datarootdir:='${prefix}/share'} 3.115 +: ${datadir:='${datarootdir}'} 3.116 +: ${sysconfdir:='${prefix}/etc'} 3.117 +: ${sharedstatedir:='${prefix}/com'} 3.118 +: ${localstatedir:='${prefix}/var'} 3.119 +: ${runstatedir:='${localstatedir}/run'} 3.120 +: ${includedir:='${prefix}/include'} 3.121 +: ${infodir:='${datarootdir}/info'} 3.122 +: ${mandir:='${datarootdir}/man'} 3.123 +: ${localedir:='${datarootdir}/locale'} 3.124 + 3.125 +# check if a config.site exists and load it 3.126 +if [ -n "$CONFIG_SITE" ]; then 3.127 + # CONFIG_SITE may contain space separated file names 3.128 + for cs in $CONFIG_SITE; do 3.129 + printf "loading defaults from $cs... " 3.130 + . "$cs" 3.131 + echo ok 3.132 + done 3.133 +elif [ -f "$prefix/share/config.site" ]; then 3.134 + printf "loading site defaults... " 3.135 + . "$prefix/share/config.site" 3.136 + echo ok 3.137 +elif [ -f "$prefix/etc/config.site" ]; then 3.138 + printf "loading site defaults... " 3.139 + . "$prefix/etc/config.site" 3.140 + echo ok 3.141 +fi 3.142 3.143 # Test for availability of pkg-config 3.144 PKG_CONFIG=`command -v pkg-config` 3.145 @@ -203,25 +233,26 @@ 3.146 3.147 # generate vars.mk 3.148 cat > "$TEMP_DIR/vars.mk" << __EOF__ 3.149 -PREFIX="$PREFIX" 3.150 -EPREFIX="$EPREFIX" 3.151 -BINDIR="$BINDIR" 3.152 -SBINDIR="$SBINDIR" 3.153 -LIBDIR="$LIBDIR" 3.154 -LIBEXECDIR="$LIBEXECDIR" 3.155 -DATADIR="$DATADIR" 3.156 -SYSCONFDIR="$SYSCONFDIR" 3.157 -SHAREDSTATEDIR="$SHAREDSTATEDIR" 3.158 -LOCALSTATEDIR="$LOCALSTATEDIR" 3.159 -INCLUDEDIR="$INCLUDEDIR" 3.160 -INFODIR="$INFODIR" 3.161 -MANDIR="$MANDIR" 3.162 +prefix="$prefix" 3.163 +exec_prefix="$exec_prefix" 3.164 +bindir="$bindir" 3.165 +sbindir="$sbindir" 3.166 +libdir="$libdir" 3.167 +libexecdir="$libexecdir" 3.168 +datarootdir="$datarootdir" 3.169 +datadir="$datadir" 3.170 +sysconfdir="$sysconfdir" 3.171 +sharedstatedir="$sharedstatedir" 3.172 +localstatedir="$localstatedir" 3.173 +runstatedir="$runstatedir" 3.174 +includedir="$includedir" 3.175 +infodir="$infodir" 3.176 +mandir="$mandir" 3.177 +localedir="$localedir" 3.178 #foreach( $var in $vars ) 3.179 ${var.varName}="${D}${var.varName}" 3.180 #end 3.181 __EOF__ 3.182 -sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk" 3.183 - 3.184 3.185 # toolchain detection utilities 3.186 . make/toolchain.sh 3.187 @@ -577,8 +608,8 @@ 3.188 echo "configure finished" 3.189 echo 3.190 echo "Build Config:" 3.191 -echo " PREFIX: $PREFIX" 3.192 -echo " TOOLCHAIN: $TOOLCHAIN_NAME" 3.193 +echo " PREFIX: $prefix" 3.194 +echo " TOOLCHAIN: $TOOLCHAIN_NAME" 3.195 #if ( $options.size() > 0 ) 3.196 echo "Options:" 3.197 cat "$TEMP_DIR/options"
4.1 --- a/make/uwproj.xsd Fri Oct 06 21:21:10 2023 +0200 4.2 +++ b/make/uwproj.xsd Mon Oct 30 17:40:34 2023 +0100 4.3 @@ -8,6 +8,14 @@ 4.4 <xs:element name="project" type="ProjectType"/> 4.5 4.6 <xs:complexType name="ProjectType"> 4.7 + <xs:annotation> 4.8 + <xs:documentation> 4.9 + The root element of an uwproj project. 4.10 + Consists of an optional <code>config</code> element 4.11 + and an arbitrary number of <code>dependency</code> 4.12 + and <code>target</code> elements. 4.13 + </xs:documentation> 4.14 + </xs:annotation> 4.15 <xs:sequence> 4.16 <xs:element name="config" type="ConfigType" minOccurs="0"/> 4.17 <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/> 4.18 @@ -16,12 +24,31 @@ 4.19 </xs:complexType> 4.20 4.21 <xs:complexType name="ConfigType"> 4.22 + <xs:annotation> 4.23 + <xs:documentation> 4.24 + The configuration section. 4.25 + Consists of an arbitrary number of <code>var</code> elements. 4.26 + </xs:documentation> 4.27 + </xs:annotation> 4.28 <xs:sequence> 4.29 <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/> 4.30 </xs:sequence> 4.31 </xs:complexType> 4.32 4.33 <xs:complexType name="ConfigVarType"> 4.34 + <xs:annotation> 4.35 + <xs:documentation> 4.36 + The definition of a configuration variable. 4.37 + <p> 4.38 + Configuration variables are supposed to be used in the configure script and are also 4.39 + written to the resulting config file (in contrast to make variables, which are only 4.40 + written to the config file). 4.41 + The <code>name</code> attribute is mandatory, the value is defined by the text body of the element. 4.42 + The optional Boolean <code>exec</code> attribute (false by default) controls, whether the entire 4.43 + definition is automatically executed under command substitution. 4.44 + </p> 4.45 + </xs:documentation> 4.46 + </xs:annotation> 4.47 <xs:simpleContent> 4.48 <xs:extension base="xs:string"> 4.49 <xs:attribute name="name" type="xs:string" use="required"/> 4.50 @@ -31,6 +58,13 @@ 4.51 </xs:complexType> 4.52 4.53 <xs:complexType name="PkgConfigType"> 4.54 + <xs:annotation> 4.55 + <xs:documentation> 4.56 + Instructs configure to invoke <code>pkg-config</code>, if present on the system, to determine 4.57 + compiler and linker flags. The text body of this element defines the package name to search. 4.58 + To constrain the allowed versions, use the attributes <code>atleast, exact, max</code>. 4.59 + </xs:documentation> 4.60 + </xs:annotation> 4.61 <xs:simpleContent> 4.62 <xs:extension base="xs:string"> 4.63 <xs:attribute name="atleast" type="xs:string"/> 4.64 @@ -41,6 +75,12 @@ 4.65 </xs:complexType> 4.66 4.67 <xs:simpleType name="LangType"> 4.68 + <xs:annotation> 4.69 + <xs:documentation> 4.70 + Requests a compiler for the specified language. Allowed values are 4.71 + c, cpp. 4.72 + </xs:documentation> 4.73 + </xs:annotation> 4.74 <xs:restriction base="xs:string"> 4.75 <xs:enumeration value="c"/> 4.76 <xs:enumeration value="cpp"/> 4.77 @@ -48,14 +88,40 @@ 4.78 </xs:simpleType> 4.79 4.80 <xs:complexType name="DependencyType"> 4.81 + <xs:annotation> 4.82 + <xs:documentation> 4.83 + Declares a dependency. 4.84 + <p> 4.85 + If the optional <code>name</code> attribute is omitted, the dependency is global 4.86 + and must be satisfied, otherwise configuration shall fail. 4.87 + A <em>named dependency</em> can be referenced by a target (or is implicitly referenced 4.88 + by the default target, if no targets are specified). 4.89 + Multiple declarations for the same named dependency may exist, in which case each declaration 4.90 + is checked one after another, until one block is satisfied. The result of the first satisfied 4.91 + dependency declaration is supposed to be applied to the config file. 4.92 + </p> 4.93 + <p> 4.94 + The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and 4.95 + the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers. 4.96 + The configure script shall skip this dependency declaration if the detected platform is not 4.97 + matching the filter specification of these attributes. 4.98 + </p> 4.99 + </xs:documentation> 4.100 + </xs:annotation> 4.101 <xs:choice minOccurs="0" maxOccurs="unbounded"> 4.102 <xs:element name="lang" type="LangType"/> 4.103 <xs:element name="cflags" type="FlagsType"/> 4.104 <xs:element name="cxxflags" type="FlagsType"/> 4.105 <xs:element name="ldflags" type="FlagsType"/> 4.106 <xs:element name="pkgconfig" type="PkgConfigType"/> 4.107 - <xs:element name="test" type="xs:string"/> 4.108 - <xs:element name="make" type="xs:string"/> 4.109 + <xs:element name="test" type="xs:string"> 4.110 + <xs:annotation> 4.111 + <xs:documentation> 4.112 + Specifies a custom command that shall be executed to test whether this dependency is satisfied. 4.113 + </xs:documentation> 4.114 + </xs:annotation> 4.115 + </xs:element> 4.116 + <xs:element name="make" type="MakeVarType"/> 4.117 </xs:choice> 4.118 <xs:attribute name="name" type="xs:string"/> 4.119 <xs:attribute name="platform" type="xs:string"/> 4.120 @@ -63,6 +129,13 @@ 4.121 </xs:complexType> 4.122 4.123 <xs:complexType name="FlagsType"> 4.124 + <xs:annotation> 4.125 + <xs:documentation> 4.126 + Instructs configure to append the contents of the element's body to the respective flags variable. 4.127 + If the optional <code>exec</code> flag is set to <code>true</code>, the contents are supposed to be 4.128 + executed under command substitution <em>at configuration time</em> before they are applied. 4.129 + </xs:documentation> 4.130 + </xs:annotation> 4.131 <xs:simpleContent> 4.132 <xs:extension base="xs:string"> 4.133 <xs:attribute name="exec" type="xs:boolean" default="false"/> 4.134 @@ -71,6 +144,25 @@ 4.135 </xs:complexType> 4.136 4.137 <xs:complexType name="TargetType"> 4.138 + <xs:annotation> 4.139 + <xs:documentation> 4.140 + Declares a build target that is supposed to be configured. 4.141 + <p> 4.142 + If no build target is declared explicitly, an implicit default 4.143 + target is generated, which has the <code>alldependencies</code> 4.144 + flag set. 4.145 + </p> 4.146 + <p> 4.147 + The optional <code>name</code> attribute is also used to generate a prefix 4.148 + for the compiler and linker flags variables. 4.149 + Furthermore, a target may consist of an arbitrary number of <code>feature</code>, 4.150 + <code>option</code>, and <code>define</code> elements. 4.151 + Named dependencies can be listed (separated by comma) in the <code>dependencies</code> 4.152 + element. If this target shall use <em>all</em> available named dependencies, the empty 4.153 + element <code>alldependencies</code> can be used as a shortcut. 4.154 + </p> 4.155 + </xs:documentation> 4.156 + </xs:annotation> 4.157 <xs:choice minOccurs="0" maxOccurs="unbounded"> 4.158 <xs:element name="feature" type="FeatureType"/> 4.159 <xs:element name="option" type="OptionType"/> 4.160 @@ -84,6 +176,18 @@ 4.161 </xs:complexType> 4.162 4.163 <xs:complexType name="FeatureType"> 4.164 + <xs:annotation> 4.165 + <xs:documentation> 4.166 + Declares an optional feature, that can be enabled during configuration, if all 4.167 + <code>dependencies</code> are satisfied. 4.168 + If a feature is enabled, all <code>define</code> and <code>make</code> definitions are 4.169 + supposed to be applied to the config file. 4.170 + In case the optional <code>default</code> attribute is set to true, the feature is enabled by default 4.171 + and is supposed to be automatically disabled (without error) when the dependencies are not satisfied. 4.172 + The name that is supposed to be used for the --enable and --disable arguments can be optionally 4.173 + specified with the <code>arg</code> attribute. Otherwise, the <code>name</code> is used by default. 4.174 + </xs:documentation> 4.175 + </xs:annotation> 4.176 <xs:choice minOccurs="0" maxOccurs="unbounded"> 4.177 <xs:group ref="TargetDataGroup"/> 4.178 </xs:choice> 4.179 @@ -93,14 +197,31 @@ 4.180 </xs:complexType> 4.181 4.182 <xs:complexType name="OptionType"> 4.183 + <xs:annotation> 4.184 + <xs:documentation> 4.185 + Declares a configuration option. 4.186 + The option argument name is specified with the <code>arg</code> attribute. 4.187 + Then, the children of this element specify possible <code>values</code> by defining the conditions 4.188 + (in terms of dependencies) and effects (in terms of defines and make variables) of each value. 4.189 + Finally, a set of <code>default</code>s is specified which supposed to automagically select the most 4.190 + appropriate value for a specific platform under the available dependencies (in case the option is not 4.191 + explicitly specified by using the command line argument). 4.192 + </xs:documentation> 4.193 + </xs:annotation> 4.194 <xs:sequence> 4.195 <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/> 4.196 <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/> 4.197 </xs:sequence> 4.198 - <xs:attribute name="arg" type="xs:string"/> 4.199 + <xs:attribute name="arg" type="xs:string" use="required"/> 4.200 </xs:complexType> 4.201 4.202 <xs:complexType name="OptionValueType"> 4.203 + <xs:annotation> 4.204 + <xs:documentation> 4.205 + Declares a possible value for the option (in the <code>str</code> attribute) and 4.206 + the conditions (<code>dependencies</code>) and effects, the value has. 4.207 + </xs:documentation> 4.208 + </xs:annotation> 4.209 <xs:choice minOccurs="0" maxOccurs="unbounded"> 4.210 <xs:group ref="TargetDataGroup"/> 4.211 </xs:choice> 4.212 @@ -108,6 +229,14 @@ 4.213 </xs:complexType> 4.214 4.215 <xs:complexType name="OptionDefaultType"> 4.216 + <xs:annotation> 4.217 + <xs:documentation> 4.218 + Specifies a default value for this option. Multiple default values can be specified, in which case 4.219 + they are checked one after another for availability. With the optional <code>platform</code> attribute, 4.220 + the default value can be constrained to a <em>single</em> specific platform and is supposed to be 4.221 + skipped by configure, when this platform is not detected. 4.222 + </xs:documentation> 4.223 + </xs:annotation> 4.224 <xs:attribute name="value" type="xs:string" use="required"/> 4.225 <xs:attribute name="platform" type="xs:string"/> 4.226 </xs:complexType> 4.227 @@ -116,16 +245,37 @@ 4.228 <xs:choice> 4.229 <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/> 4.230 <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/> 4.231 - <xs:element name="make" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 4.232 + <xs:element name="make" type="MakeVarType" minOccurs="0" maxOccurs="unbounded"/> 4.233 </xs:choice> 4.234 </xs:group> 4.235 4.236 <xs:complexType name="DefineType"> 4.237 + <xs:annotation> 4.238 + <xs:documentation> 4.239 + Specifies C/C++ pre-processor definitions that are supposed to 4.240 + be appended to the compiler flags, if supported. 4.241 + (Note: for example, Fortran also supports C/C++ style pre-processor definitions under 4.242 + certain circumstances) 4.243 + </xs:documentation> 4.244 + </xs:annotation> 4.245 <xs:attribute name="name" type="xs:string" use="required"/> 4.246 <xs:attribute name="value" type="xs:string"/> 4.247 </xs:complexType> 4.248 4.249 <xs:simpleType name="DependenciesType"> 4.250 + <xs:annotation> 4.251 + <xs:documentation>A comma-separated list of named dependencies.</xs:documentation> 4.252 + </xs:annotation> 4.253 + <xs:restriction base="xs:string"/> 4.254 + </xs:simpleType> 4.255 + 4.256 + <xs:simpleType name="MakeVarType"> 4.257 + <xs:annotation> 4.258 + <xs:documentation> 4.259 + The text contents in the body of this element are supposed to be appended literally 4.260 + to the config file without prior processing. 4.261 + </xs:documentation> 4.262 + </xs:annotation> 4.263 <xs:restriction base="xs:string"/> 4.264 </xs:simpleType> 4.265 </xs:schema> 4.266 \ No newline at end of file