fix mix of spaces and tabs

Sat, 02 Sep 2023 18:30:36 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 02 Sep 2023 18:30:36 +0200
changeset 32
c3132f7f19da
parent 31
4c6060dad560
child 33
b77d51b3c9bb

fix mix of spaces and tabs

test/make/configure.vm file | annotate | diff | comparison | revisions
--- a/test/make/configure.vm	Sat Sep 02 18:19:43 2023 +0200
+++ b/test/make/configure.vm	Sat Sep 02 18:30:36 2023 +0200
@@ -55,8 +55,8 @@
 TEMP_DIR=".tmp-`uname -n`"
 mkdir -p $TEMP_DIR
 if [ $? -ne 0 ]; then
-	echo "Cannot create tmp dir"
-	echo "Abort"
+    echo "Cannot create tmp dir"
+    echo "Abort"
 fi
 touch $TEMP_DIR/options
 touch $TEMP_DIR/features
@@ -71,8 +71,8 @@
 # help text
 printhelp()
 {
-	echo "Usage: $0 [OPTIONS]..."
-	cat << __EOF__
+    echo "Usage: $0 [OPTIONS]..."
+    cat << __EOF__
 Installation directories:
   --prefix=PREFIX         path prefix for architecture-independent files
                           [/usr]
@@ -120,64 +120,64 @@
 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} ;;
-		"--help"*) printhelp; rm -Rf $TEMP_DIR; exit 1 ;;
-	#foreach( $opt in $options )
-    	"--${opt.getArgument()}="*) ${opt.getVarName()}=${D}{ARG#--${opt.getArgument()}=} ;;
+        "--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} ;;
+        "--help"*) printhelp; rm -Rf $TEMP_DIR; exit 1 ;;
+    #foreach( $opt in $options )
+        "--${opt.getArgument()}="*) ${opt.getVarName()}=${D}{ARG#--${opt.getArgument()}=} ;;
     #end
-	#foreach( $feature in $features )
-		"--enable-${feature.arg}") ${feature.getVarName()}=on ;;
-		"--disable-${feature.arg}") unset ${feature.getVarName()} ;;
-	#end
-		"-"*) echo "unknown option: $ARG"; rm -Rf $TEMP_DIR; exit 1 ;;
-	esac
+    #foreach( $feature in $features )
+        "--enable-${feature.arg}") ${feature.getVarName()}=on ;;
+        "--disable-${feature.arg}") unset ${feature.getVarName()} ;;
+    #end
+        "-"*) echo "unknown option: $ARG"; rm -Rf $TEMP_DIR; exit 1 ;;
+    esac
 done
 
 # set dir variables
 if [ -z "$BINDIR" ]; then
-	BINDIR=$EPREFIX/bin
+    BINDIR=$EPREFIX/bin
 fi
 if [ -z "$SBINDIR" ]; then
-	SBINDIR=$EPREFIX/sbin
+    SBINDIR=$EPREFIX/sbin
 fi
 if [ -z "$LIBDIR" ]; then
-	LIBDIR=$EPREFIX/lib
+    LIBDIR=$EPREFIX/lib
 fi
 if [ -z "$LIBEXEC" ]; then
-	LIBEXECDIR=$EPREFIX/libexec
+    LIBEXECDIR=$EPREFIX/libexec
 fi
 if [ -z "$DATADIR" ]; then
-	DATADIR=$PREFIX/share
+    DATADIR=$PREFIX/share
 fi
 if [ -z "$SYSCONFDIR" ]; then
-	SYSCONFDIR=$PREFIX/etc
+    SYSCONFDIR=$PREFIX/etc
 fi
 if [ -z "$SHAREDSTATEDIR" ]; then
-	SHAREDSTATEDIR=$PREFIX/com
+    SHAREDSTATEDIR=$PREFIX/com
 fi
 if [ -z "$LOCALSTATEDIR" ]; then
-	LOCALSTATEDIR=$PREFIX/var
+    LOCALSTATEDIR=$PREFIX/var
 fi
 if [ -z "$INCLUDEDIR" ]; then
-	INCLUDEDIR=$PREFIX/include
+    INCLUDEDIR=$PREFIX/include
 fi
 if [ -z "$INFODIR" ]; then
-	INFODIR=$PREFIX/info
+    INFODIR=$PREFIX/info
 fi
 if [ -z "$MANDIR" ]; then
-	MANDIR=$PREFIX/man
+    MANDIR=$PREFIX/man
 fi
 
 which pkg-config > /dev/null
@@ -213,8 +213,8 @@
 
 for p in $PLATFORM
 do
-	PLATFORM_NAME=$p
-	break
+    PLATFORM_NAME=$p
+    break
 done
 echo $PLATFORM_NAME
 
@@ -327,23 +327,23 @@
     # dependency $sub.name $sub.getPlatformString()
     while true
     do
-    	#if( $sub.platform )
-    	if isnotplatform "${sub.platform}"; then
+        #if( $sub.platform )
+        if isnotplatform "${sub.platform}"; then
             break
         fi
-    	#end
-		#foreach( $not in $sub.getNotList() )
-		if isplatform "${not}"; then
+        #end
+        #foreach( $not in $sub.getNotList() )
+        if isplatform "${not}"; then
             break
         fi
-		#end
+        #end
         #if( $sub.pkgconfig.size() > 0 )
         if [ -z "$PKG_CONFIG" ]; then
-        	break
+            break
         fi
         #end
         #foreach( $pkg in $sub.pkgconfig )
-		$PKG_CONFIG $pkg.getPkgConfigParam()
+        $PKG_CONFIG $pkg.getPkgConfigParam()
         if [ $? -ne 0 ] ; then
             break
         fi
@@ -365,22 +365,22 @@
         #foreach( $test in $sub.tests )
         $test > /dev/null
         if [ $? -ne 0 ]; then
-        	break
+            break
         fi
         #end
-		#if ( $sub.make.length() > 0 )
-		cat >> $TEMP_DIR/make.mk << __EOF__
-# Dependency: $dependency.name		
+        #if ( $sub.make.length() > 0 )
+        cat >> $TEMP_DIR/make.mk << __EOF__
+# Dependency: $dependency.name        
 $sub.make
 __EOF__
         #end
-		echo yes
+        echo yes
         return 0
     done
-	
-	#end
-	echo no
-	return 1
+    
+    #end
+    echo no
+    return 1
 }
 #end
 
@@ -393,16 +393,16 @@
 #foreach( $dependency in $dependencies )
 while true
 do
-	#if( $dependency.platform )
+    #if( $dependency.platform )
     if isnotplatform "${dependency.platform}"; then
         break
     fi
     #end
-	#foreach( $not in $dependency.getNotList() )
+    #foreach( $not in $dependency.getNotList() )
     if isplatform "${not}"; then
         break
     fi
-	#end
+    #end
     while true
     do
         #if( $dependency.pkgconfig.size() > 0 )
@@ -413,7 +413,7 @@
         #end
         #foreach( $pkg in $dependency.pkgconfig )
         printf "checking for pkg-config package $pkg.getPkgConfigParam()... "
-		$PKG_CONFIG $pkg.getPkgConfigParam()
+        $PKG_CONFIG $pkg.getPkgConfigParam()
         if [ $? -ne 0 ]; then
             echo no
             ERROR=1
@@ -437,8 +437,8 @@
         TEMP_$flags.varName="$TEMP_$flags.varName $flags.value"    
         #end
         #end
-		#if ( $dependency.make.length() > 0 )
-		cat >> $TEMP_DIR/make.mk << __EOF__
+        #if ( $dependency.make.length() > 0 )
+        cat >> $TEMP_DIR/make.mk << __EOF__
 $dependency.make
 __EOF__
         #end
@@ -470,25 +470,25 @@
 #foreach( $val in $opt.values )
 ${val.func}()
 {
-	VERR=0
-	#foreach( $dep in $val.dependencies )
-	dependency_$dep
-	if [ $? -ne 0 ]; then
-		VERR=1
-	fi
-	#end
-	if [ $VERR -ne 0 ]; then
-		return 1
-	fi
-	#foreach( $def in $val.defines )
-		TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
-	#end
-	#if( $val.hasMake() )
-	cat >> $TEMP_DIR/make.mk << __EOF__
+    VERR=0
+    #foreach( $dep in $val.dependencies )
+    dependency_$dep
+    if [ $? -ne 0 ]; then
+        VERR=1
+    fi
+    #end
+    if [ $VERR -ne 0 ]; then
+        return 1
+    fi
+    #foreach( $def in $val.defines )
+        TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
+    #end
+    #if( $val.hasMake() )
+    cat >> $TEMP_DIR/make.mk << __EOF__
 $val.make
 __EOF__
-	#end
-	return 0
+    #end
+    return 0
 }
 #end
 #end
@@ -513,8 +513,8 @@
 #foreach( $dependency in $target.dependencies )
 dependency_$dependency
 if [ $? -ne 0 ]; then
-	DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
-	ERROR=1
+    DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
+    ERROR=1
 fi
 #end
 
@@ -522,15 +522,15 @@
 #foreach( $feature in $target.features )
 if [ ! -z "$${feature.getVarName()}" ]; then
 #foreach( $dependency in $feature.dependencies )
-	# check dependency
-	dependency_$dependency
-	if [ $? -ne 0 ]; then
-		# "auto" features can fail and are just disabled in this case
-		if [ $${feature.getVarName()} != "auto" ]; then
-			DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
-			ERROR=1
-		fi
-	fi
+    # check dependency
+    dependency_$dependency
+    if [ $? -ne 0 ]; then
+        # "auto" features can fail and are just disabled in this case
+        if [ $${feature.getVarName()} != "auto" ]; then
+            DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
+            ERROR=1
+        fi
+    fi
 #end
 fi
 #end
@@ -538,44 +538,44 @@
 #foreach( $opt in $target.options )
 # Option: --${opt.argument}
 if [ -z ${D}${opt.getVarName()} ]; then
-	SAVED_ERROR=$ERROR
-	SAVED_DEPENDENCIES_FAILED=$DEPENDENCIES_FAILED
-	ERROR=0
-	while true
-	do
-		#foreach( $optdef in $opt.defaults )
-		#if( $optdef.platform )
-		if isplatform "$optdef.platform"; then
-		#end
-		$optdef.func
-		if [ $? -eq 0 ]; then
-			echo "  ${opt.argument}: ${optdef.valueName}" >> $TEMP_DIR/options
-			ERROR=0
-			break
-		fi
-		#if( $optdef.platform )
-		fi
-		#end
-		#end
-		break
-	done
-	if [ $ERROR -ne 0 ]; then
-		SAVED_ERROR=1
-	fi
-	ERROR=$SAVED_ERROR
-	DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED=
+    SAVED_ERROR=$ERROR
+    SAVED_DEPENDENCIES_FAILED=$DEPENDENCIES_FAILED
+    ERROR=0
+    while true
+    do
+        #foreach( $optdef in $opt.defaults )
+        #if( $optdef.platform )
+        if isplatform "$optdef.platform"; then
+        #end
+        $optdef.func
+        if [ $? -eq 0 ]; then
+            echo "  ${opt.argument}: ${optdef.valueName}" >> $TEMP_DIR/options
+            ERROR=0
+            break
+        fi
+        #if( $optdef.platform )
+        fi
+        #end
+        #end
+        break
+    done
+    if [ $ERROR -ne 0 ]; then
+        SAVED_ERROR=1
+    fi
+    ERROR=$SAVED_ERROR
+    DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED=
 else
-	if false; then
-		false
-	#foreach( $optval in $opt.values )
-	elif [ ${D}${opt.getVarName()} = "${optval.value}" ]; then
-		echo "  ${opt.argument}: ${D}${opt.getVarName()}" >> $TEMP_DIR/options
-		$optval.func
-		if [ $? -ne 0 ]; then
-			ERROR=1
-		fi
-	#end
-	fi
+    if false; then
+        false
+    #foreach( $optval in $opt.values )
+    elif [ ${D}${opt.getVarName()} = "${optval.value}" ]; then
+        echo "  ${opt.argument}: ${D}${opt.getVarName()}" >> $TEMP_DIR/options
+        $optval.func
+        if [ $? -ne 0 ]; then
+            ERROR=1
+        fi
+    #end
+    fi
 fi
 #end
 
@@ -592,11 +592,11 @@
 
 #end
 if [ $ERROR -ne 0 ]; then
-	echo
-	echo "Error: Unresolved dependencies"
-	echo $DEPENDENCIES_FAILED
-	rm -Rf $TEMP_DIR
-	exit 1
+    echo
+    echo "Error: Unresolved dependencies"
+    echo $DEPENDENCIES_FAILED
+    rm -Rf $TEMP_DIR
+    exit 1
 fi
 
 echo "configure finished"

mercurial