Sat, 15 Nov 2025 08:30:00 +0100
update uwproj
| configure | file | annotate | diff | comparison | revisions | |
| make/configure.vm | file | annotate | diff | comparison | revisions | |
| make/toolchain.sh | file | annotate | diff | comparison | revisions | |
| make/uwproj.xsd | file | annotate | diff | comparison | revisions |
--- a/configure Thu Nov 13 17:47:00 2025 +0100 +++ b/configure Sat Nov 15 08:30:00 2025 +0100 @@ -184,6 +184,7 @@ "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; + "--runstatedir="*) runstatedir=${ARG#--runstatedir=} ;; "--includedir="*) includedir=${ARG#--includedir=} ;; "--infodir="*) infodir=${ARG#--infodir=} ;; "--mandir"*) mandir=${ARG#--mandir} ;; @@ -217,10 +218,28 @@ : ${libexecdir:='${exec_prefix}/libexec'} : ${datarootdir:='${prefix}/share'} : ${datadir:='${datarootdir}'} -: ${sysconfdir:='${prefix}/etc'} : ${sharedstatedir:='${prefix}/com'} -: ${localstatedir:='${prefix}/var'} -: ${runstatedir:='${localstatedir}/run'} +if [ -z "$sysconfdir" ]; then + if [ "$prefix" = '/usr' ]; then + sysconfdir='/etc' + else + sysconfdir='${prefix}/etc' + fi +fi +if [ -z "$localstatedir" ]; then + if [ "$prefix" = '/usr' ]; then + localstatedir='/var' + else + localstatedir='${prefix}/var' + fi +fi +if [ -z "$runstatedir" ]; then + if [ "$prefix" = '/usr' ]; then + runstatedir='/var/run' + else + runstatedir='${prefix}/var' + fi +fi : ${includedir:='${prefix}/include'} : ${infodir:='${datarootdir}/info'} : ${mandir:='${datarootdir}/man'}
--- a/make/configure.vm Thu Nov 13 17:47:00 2025 +0100 +++ b/make/configure.vm Sat Nov 15 08:30:00 2025 +0100 @@ -115,7 +115,7 @@ Options: #foreach( $opt in $options ) - --${opt.argument}=${opt.valuesString} +${opt.helpText} #end #end #if( $features.size() > 0 ) @@ -206,6 +206,7 @@ "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; + "--runstatedir="*) runstatedir=${D}{ARG#--runstatedir=} ;; "--includedir="*) includedir=${D}{ARG#--includedir=} ;; "--infodir="*) infodir=${D}{ARG#--infodir=} ;; "--mandir"*) mandir=${D}{ARG#--mandir} ;; @@ -214,8 +215,8 @@ "--debug") BUILD_TYPE="debug" ;; "--release") BUILD_TYPE="release" ;; #foreach( $opt in $options ) - "--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;; - "--${opt.argument}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;; + "--${opt.arg}="*) ${opt.varName}=${D}{ARG#--${opt.arg}=} ;; + "--${opt.arg}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;; #end #foreach( $feature in $features ) "--enable-${feature.arg}") ${feature.varName}=on ;; @@ -236,10 +237,28 @@ : ${libexecdir:='${exec_prefix}/libexec'} : ${datarootdir:='${prefix}/share'} : ${datadir:='${datarootdir}'} -: ${sysconfdir:='${prefix}/etc'} : ${sharedstatedir:='${prefix}/com'} -: ${localstatedir:='${prefix}/var'} -: ${runstatedir:='${localstatedir}/run'} +if [ -z "$sysconfdir" ]; then + if [ "$prefix" = '/usr' ]; then + sysconfdir='/etc' + else + sysconfdir='${prefix}/etc' + fi +fi +if [ -z "$localstatedir" ]; then + if [ "$prefix" = '/usr' ]; then + localstatedir='/var' + else + localstatedir='${prefix}/var' + fi +fi +if [ -z "$runstatedir" ]; then + if [ "$prefix" = '/usr' ]; then + runstatedir='/var/run' + else + runstatedir='${prefix}/var' + fi +fi : ${includedir:='${prefix}/include'} : ${infodir:='${datarootdir}/info'} : ${mandir:='${datarootdir}/man'} @@ -651,9 +670,9 @@ #end #foreach( $opt in $target.options ) -# Option: --${opt.argument} +# Option: --${opt.arg} if [ -z "${D}${opt.varName}" ]; then - echo "auto-detecting option '${opt.argument}'" + echo "auto-detecting option '${opt.arg}'" SAVED_ERROR="$ERROR" SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" ERROR=1 @@ -664,7 +683,7 @@ if isplatform "$optdef.platform"; then #end if $optdef.func ; then - echo " ${opt.argument}: ${optdef.valueName}" >> "$TEMP_DIR/options" + echo " ${opt.arg}: ${optdef.valueName}" >> "$TEMP_DIR/options" ERROR=0 break fi @@ -676,28 +695,28 @@ done if [ $ERROR -ne 0 ]; then SAVED_ERROR=1 - SAVED_DEPENDENCIES_FAILED="option '${opt.argument}' $SAVED_DEPENDENCIES_FAILED" + SAVED_DEPENDENCIES_FAILED="option '${opt.arg}' $SAVED_DEPENDENCIES_FAILED" fi ERROR="$SAVED_ERROR" DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" else - echo "checking option ${opt.argument} = ${D}${opt.varName}" + echo "checking option ${opt.arg} = ${D}${opt.varName}" if false; then false #foreach( $optval in $opt.values ) elif [ "${D}${opt.varName}" = "${optval.value}" ]; then - echo " ${opt.argument}: ${D}${opt.varName}" >> $TEMP_DIR/options + echo " ${opt.arg}: ${D}${opt.varName}" >> $TEMP_DIR/options if $optval.func ; then : else ERROR=1 - DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED" + DEPENDENCIES_FAILED="option '${opt.arg}' $DEPENDENCIES_FAILED" fi #end else echo echo "Invalid option value - usage:" - echo " --${opt.argument}=${opt.valuesString}" + echo " --${opt.arg}=${opt.valuesString}" abort_configure fi fi
--- a/make/toolchain.sh Thu Nov 13 17:47:00 2025 +0100 +++ b/make/toolchain.sh Sat Nov 15 08:30:00 2025 +0100 @@ -3,7 +3,7 @@ # toolchain detection # -TAIL=tail +TAIL="tail" if isplatform "bsd" && notisplatform "openbsd"; then C_COMPILERS="clang gcc cc" CPP_COMPILERS="clang++ g++ CC" @@ -24,14 +24,13 @@ check_c_compiler() { - command -v $1 2>&1 >/dev/null - if [ $? -ne 0 ]; then + if ! command -v "$1" >/dev/null 2>&1 ; then return 1 fi cat > "$TEMP_DIR/test.c" << __EOF__ /* test file */ #include <stdio.h> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) printf("toolchain:msc\n"); #elif defined(__clang__) @@ -45,7 +44,7 @@ #endif printf("wsize:%d\n", (int)sizeof(void*)*8); #ifdef __STDC_VERSION__ - printf("stdcversion:%d\n", __STDC_VERSION__); + printf("stdcversion:%ld\n", (long int)__STDC_VERSION__); #endif return 0; } @@ -56,14 +55,13 @@ check_cpp_compiler() { - command -v $1 2>&1 >/dev/null - if [ $? -ne 0 ]; then + if ! command -v "$1" >/dev/null 2>&1 ; then return 1 fi cat > "$TEMP_DIR/test.cpp" << __EOF__ /* test file */ #include <iostream> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) std::cout << "toolchain:msc" << std::endl; #elif defined(__clang__) @@ -83,21 +81,6 @@ $1 -o "$TEMP_DIR/checkcc" $CXXFLAGS $LDFLAGS "$TEMP_DIR/test.cpp" 2> /dev/null } -create_libtest_source() -{ - # $1: filename - # $2: optional include - cat > "$TEMP_DIR/$1" << __EOF__ -/* libtest file */ -int main(int argc, char **argv) { - return 0; -} -__EOF__ - if [ -n "$2" ]; then - echo "#include <$2>" >> "$TEMP_DIR/$1" - fi -} - parse_toolchain_properties() { info_file="$1"
--- a/make/uwproj.xsd Thu Nov 13 17:47:00 2025 +0100 +++ b/make/uwproj.xsd Sat Nov 15 08:30:00 2025 +0100 @@ -228,7 +228,9 @@ <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 + Optionally, a description for the help text of the resulting configure script can be specified by + a <code>desc</code> element. + Then, the next 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 @@ -236,6 +238,7 @@ </xs:documentation> </xs:annotation> <xs:sequence> + <xs:element name="desc" type="xs:string" minOccurs="0"/> <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence>