[nnfw/cmd] Remove alias setting (#8359)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 25 Oct 2019 02:08:27 +0000 (11:08 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Fri, 25 Oct 2019 02:08:27 +0000 (11:08 +0900)
* [nnfw/cmd] Remove alias setting

Remove alias setting in command
Directory alias will be set on Makefile
Add and fix build path checking message

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Fix bug

infra/nnfw/command/build
infra/nnfw/command/configure
infra/nnfw/command/install
infra/nnfw/config/build.configuration

index c9fe814..18b54a7 100644 (file)
@@ -2,8 +2,10 @@
 
 import "build.configuration"
 
-if [[ ! -d "${BUILD_ALIAS}" ]]; then
-  echo "'${BUILD_ALIAS}' does not exist. Please run 'configure' first"
+BUILD_PATH="${NNFW_BUILD_DIR:-${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/obj}"
+
+if [[ ! -d "${BUILD_PATH}" ]]; then
+  echo "[ERROR] '${BUILD_PATH}' does not exist. Please run 'configure' first"
   exit 255
 fi
 
@@ -20,5 +22,5 @@ if [ "${PARALLEL_BUILD}" == "1" ]; then
   fi
 fi
 
-cd ${BUILD_ALIAS}
+cd ${BUILD_PATH}
 make -j ${NPROCS} "$@"
index 4ebf844..cf4718e 100644 (file)
@@ -2,14 +2,22 @@
 
 import "build.configuration"
 
-BUILD_PATH="${NNFW_BUILD_DIR:-${BUILD_ALIAS}}"
-INSTALL_PATH="${NNFW_INSTALL_PREFIX:-${INSTALL_ALIAS}}"
+BUILD_PATH="${NNFW_BUILD_DIR:-${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/obj}"
+INSTALL_PATH="${NNFW_INSTALL_PREFIX:-${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/out}"
 
 # Create "BUILD_PATH"
 mkdir -p "${BUILD_PATH}"
 
-# Create "INSTALL_PATH"
-mkdir -p "${INSTALL_PATH}"
+if [ ! -d "${INSTALL_PATH}" ]; then
+  echo "[WARNING] Cannot find install directory '${INSTALL_PATH}'"
+  echo "          Try to make install directory"
+  mkdir -p "${INSTALL_PATH}"
+  if [ ! -d "${INSTALL_PATH}" ]; then
+    echo "[ERROR] Fail to make install directory '${INSTALL_PATH}'"
+    echo "        Please make '${INSTALL_PATH}' directory first"
+    exit 255
+  fi
+fi
 
 cd "${BUILD_PATH}"
 cmake "${NNFW_PROJECT_PATH}"/infra/nnfw -DCMAKE_INSTALL_PREFIX="${INSTALL_PATH}" "$@"
index 2bacb87..a3215bf 100644 (file)
@@ -2,15 +2,12 @@
 
 import "build.configuration"
 
-if [[ ! -d "${BUILD_ALIAS}" ]]; then
-  echo "'${BUILD_ALIAS}' does not exist. Please run 'configure' first"
-  exit 255
-fi
+BUILD_PATH="${NNFW_BUILD_DIR:-${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/obj}"
 
-if [[ ! -d "${INSTALL_ALIAS}" ]]; then
-  echo "'${INSTALL_ALIAS}' does not exist. Please run 'configure' first"
+if [[ ! -d "${BUILD_PATH}" ]]; then
+  echo "'${BUILD_PATH}' does not exist. Please run 'configure' first"
   exit 255
 fi
 
-cd ${BUILD_ALIAS}
+cd ${BUILD_PATH}
 make install
index cdbf3bf..c6c68bd 100644 (file)
@@ -1,5 +1 @@
 WORKSPACE_RPATH=${NNFW_WORKSPACE:-Product}
-
-# Soft link path to build and install directory
-BUILD_ALIAS=${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/obj
-INSTALL_ALIAS=${NNFW_PROJECT_PATH}/${WORKSPACE_RPATH}/out