update uwproj configure template

Fri, 05 Jan 2024 20:35:13 +0100

author
Mike Becker <universe@uap-core.de>
date
Fri, 05 Jan 2024 20:35:13 +0100
changeset 796
fec90b848f4b
parent 795
00ba1bfa4ab4
child 797
e0300c2c4e95

update uwproj configure template

configure file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
--- a/configure	Fri Jan 05 00:12:11 2024 +0100
+++ b/configure	Fri Jan 05 20:35:13 2024 +0100
@@ -256,24 +256,34 @@
     return 0
 }
 
+print_check_msg()
+{
+    if [ -z "$1" ]; then
+        shift
+        printf "$@"
+    fi
+}
+
 dependency_error_coverage()
 {
-    printf "checking for coverage... "
+    print_check_msg "$dep_checked_coverage" "checking for coverage... "
     # dependency coverage
     while true
     do
         TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}"
         TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
-        echo yes
+        print_check_msg "$dep_checked_coverage" "yes\n"
+        dep_checked_coverage=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_coverage" "no\n"
+    dep_checked_coverage=1
     return 0
 }
 dependency_error_pandoc()
 {
-    printf "checking for pandoc... "
+    print_check_msg "$dep_checked_pandoc" "checking for pandoc... "
     # dependency pandoc
     while true
     do
@@ -282,16 +292,18 @@
         else
             break
         fi
-        echo yes
+        print_check_msg "$dep_checked_pandoc" "yes\n"
+        dep_checked_pandoc=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_pandoc" "no\n"
+    dep_checked_pandoc=1
     return 0
 }
 dependency_error_c()
 {
-    printf "checking for c... "
+    print_check_msg "$dep_checked_c" "checking for c... "
     # dependency c platform="mingw"
     while true
     do
@@ -309,7 +321,8 @@
 SHLIB_EXT=.dll
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
@@ -330,7 +343,8 @@
 SHLIB_EXT=.dylib
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
@@ -351,16 +365,18 @@
 SHLIB_EXT=.so
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_c" "no\n"
+    dep_checked_c=1
     return 0
 }
 dependency_error_file_tools()
 {
-    printf "checking for file-tools... "
+    print_check_msg "$dep_checked_file_tools" "checking for file-tools... "
     # dependency file-tools
     while true
     do
@@ -374,16 +390,18 @@
 SYMLINK=/bin/ln -s
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_file_tools" "yes\n"
+        dep_checked_file_tools=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_file_tools" "no\n"
+    dep_checked_file_tools=1
     return 0
 }
 dependency_error_doxygen()
 {
-    printf "checking for doxygen... "
+    print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
     # dependency doxygen
     while true
     do
@@ -392,17 +410,16 @@
         else
             break
         fi
-        echo yes
+        print_check_msg "$dep_checked_doxygen" "yes\n"
+        dep_checked_doxygen=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_doxygen" "no\n"
+    dep_checked_doxygen=1
     return 0
 }
 
-
-
-
 # start collecting dependency information
 echo > "$TEMP_DIR/flags.mk"
 
@@ -684,3 +701,4 @@
 rm -Rf "$TEMP_DIR"
 
 
+
--- a/make/configure.vm	Fri Jan 05 00:12:11 2024 +0100
+++ b/make/configure.vm	Fri Jan 05 20:35:13 2024 +0100
@@ -286,10 +286,18 @@
     return 0
 }
 
+print_check_msg()
+{
+    if [ -z "$1" ]; then
+        shift
+        printf "$@"
+    fi
+}
+
 #foreach( $dependency in $namedDependencies )
 dependency_error_${dependency.id}()
 {
-    printf "checking for ${dependency.name}... "
+    print_check_msg "${D}dep_checked_${dependency.id}" "checking for ${dependency.name}... "
     #foreach( $sub in $dependency.subdependencies )
     # dependency $sub.fullName
     while true
@@ -346,19 +354,18 @@
 $sub.make
 __EOF__
         #end
-        echo yes
+        print_check_msg "${D}dep_checked_${dependency.id}" "yes\n"
+        dep_checked_${dependency.id}=1
         return 1
     done
 
     #end
-    echo no
+    print_check_msg "${D}dep_checked_${dependency.id}" "no\n"
+    dep_checked_${dependency.id}=1
     return 0
 }
 #end
 
-
-
-
 # start collecting dependency information
 echo > "$TEMP_DIR/flags.mk"
 
@@ -397,13 +404,15 @@
         fi
         #end
         #foreach( $pkg in $dependency.pkgconfig )
-        printf "checking for pkg-config package $pkg.name... "
+        print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "checking for pkg-config package $pkg.name... "
         if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then
-            echo yes
+            print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "yes\n"
+            dep_pkgconfig_checked_${pkg.id}=1
             TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`"
             TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`"
         else
-            echo no
+            print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "no\n"
+            dep_pkgconfig_checked_${pkg.id}=1
             ERROR=1
             break
         fi
@@ -638,3 +647,4 @@
 rm -Rf "$TEMP_DIR"
 
 
+

mercurial