fix tabs in toolchain.sh

Fri, 19 Jan 2024 21:12:08 +0100

author
Mike Becker <universe@uap-core.de>
date
Fri, 19 Jan 2024 21:12:08 +0100
changeset 100
bc1ee09417aa
parent 99
bc40111b8acb
child 101
7f40964bf1e9

fix tabs in toolchain.sh

src/main/resources/make/toolchain.sh file | annotate | diff | comparison | revisions
--- a/src/main/resources/make/toolchain.sh	Fri Jan 19 21:10:03 2024 +0100
+++ b/src/main/resources/make/toolchain.sh	Fri Jan 19 21:12:08 2024 +0100
@@ -11,56 +11,56 @@
 
 check_c_compiler()
 {
-	cat > "$TEMP_DIR/test.c" << __EOF__
+  cat > "$TEMP_DIR/test.c" << __EOF__
 /* test file */
 #include <stdio.h>
 int main(int argc, char **argv) {
 #if defined(__clang__)
-	printf("clang\n");
+  printf("clang\n");
 #elif defined(__GNUC__)
-	printf("gcc\n");
+  printf("gcc\n");
 #elif defined(__sun)
-	printf("suncc\n");
+  printf("suncc\n");
 #else
-	printf("unknown\n");
+  printf("unknown\n");
 #endif
-	return 0;
+  return 0;
 }
 __EOF__
-	rm -f "$TEMP_DIR/checkcc"
-	$1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
+  rm -f "$TEMP_DIR/checkcc"
+  $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
 }
 
 check_cpp_compiler()
 {
-	cat > "$TEMP_DIR/test.cpp" << __EOF__
+  cat > "$TEMP_DIR/test.cpp" << __EOF__
 /* test file */
 #include <iostream>
 int main(int argc, char **argv) {
 #if defined(__clang__)
-	std::cout << "clang" << std::endl;
+  std::cout << "clang" << std::endl;
 #elif defined(__GNUC__)
-	std::cout << "gcc" << std::endl;
+  std::cout << "gcc" << std::endl;
 #elif defined(__sun)
-	std::cout << "suncc" << std::endl;
+  std::cout << "suncc" << std::endl;
 #else
-	std::cout << "cc" << std::endl;
+  std::cout << "cc" << std::endl;
 #endif
-	return 0;
+  return 0;
 }
 __EOF__
-	rm -f "$TEMP_DIR/checkcc"
-	$1 -o "$TEMP_DIR/checkcc" $CXXFLAGS $LDFLAGS "$TEMP_DIR/test.cpp" 2> /dev/null
+  rm -f "$TEMP_DIR/checkcc"
+  $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__
+  cat > "$TEMP_DIR/$1" << __EOF__
 /* libtest file */
 int main(int argc, char **argv) {
-	return 0;
+  return 0;
 }
 __EOF__
   if [ -n "$2" ]; then
@@ -77,7 +77,7 @@
   fi
   create_libtest_source "test.c" "$2"
   rm -f "$TEMP_DIR/checklib"
-	$TOOLCHAIN_CC -o "$TEMP_DIR/checklib" $CFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.c" 2> /dev/null
+  $TOOLCHAIN_CC -o "$TEMP_DIR/checklib" $CFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.c" 2> /dev/null
 }
 
 check_cpp_lib()
@@ -87,20 +87,20 @@
   if [ -z "$TOOLCHAIN_CXX" ]; then
     return 1
   fi
-	create_libtest_source "test.cpp" "$2"
+  create_libtest_source "test.cpp" "$2"
   rm -f "$TEMP_DIR/checklib"
-	$TOOLCHAIN_CXX -o "$TEMP_DIR/checklib" $CXXFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.cpp" 2> /dev/null
+  $TOOLCHAIN_CXX -o "$TEMP_DIR/checklib" $CXXFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.cpp" 2> /dev/null
 }
 
 check_lib()
 {
   # $1: libname
   # $2: optional include
-	if [ -n "$TOOLCHAIN_CC" ]; then
-		check_c_lib "$1" "$2"
-	elif  [ -n "$TOOLCHAIN_CXX" ]; then
-	  check_cpp_lib "$1" "$2"
-	fi
+  if [ -n "$TOOLCHAIN_CC" ]; then
+    check_c_lib "$1" "$2"
+  elif  [ -n "$TOOLCHAIN_CXX" ]; then
+    check_cpp_lib "$1" "$2"
+  fi
 }
 
 detect_c_compiler()

mercurial