Browse Source

check if amd64/bin exists

rafael 8 years ago
parent
commit
0977104bdf
2 changed files with 16 additions and 0 deletions
  1. 15 0
      BUILD
  2. 1 0
      BUILD.conf

+ 15 - 0
BUILD

@@ -96,6 +96,19 @@ check_lib_dir()
 	fi
 }
 
+check_bin_dir()
+{
+        if [ ! -d "$BIN_DIR" ]
+        then
+                mkdir "$BIN_DIR"
+                if [ $? -ne 0 ]
+                then
+                        echo "ERROR creating <$BIN_DIR> directory"
+                fi
+        fi
+}
+
+
 build_libs()
 {
 	export HARVEY="$_BUILD_DIR"
@@ -182,6 +195,7 @@ else
 					fi
 					;;
 			"all")
+					check_bin_dir
 					check_lib_dir
 					build_go_utils
 					build_libs
@@ -208,6 +222,7 @@ else
 					build_go_utils
 					;;
 			"cmd")
+					check_bin_dir
 					build_cmds
 					;;
 			"cleanall"|"cleancmd"|"cleankernel"|"cleanklibs"|"cleanlibs")

+ 1 - 0
BUILD.conf

@@ -8,6 +8,7 @@ BASEDIR=${_BUILD_DIR}
 INC_DIR=${BASEDIR}/sys/include
 INC_ARCH=${BASEDIR}/${ARCH}/include
 LIB_DIR=${BASEDIR}/${ARCH}/lib
+BIN_DIR=${BASEDIR}/${ARCH}/bin
 SRC_DIR=${BASEDIR}/sys/src
 UTIL_DIR=${_BUILD_DIR}/util
 CMD_DIR=${SRC_DIR}/cmd