Commit 19f525f8 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6342 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ae0e7d99
...@@ -631,24 +631,27 @@ check_install_asn1c(){ ...@@ -631,24 +631,27 @@ check_install_asn1c(){
################################################ ################################################
compile_hss() { compile_hss() {
cd $OPENAIRCN_DIR/OPENAIRHSS cd $OPENAIRCN_DIR/OPENAIRHSS
pwd
OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*` if [ "$1" -eq 1 ]; then
if [ $1 -eq 1 ]; then echo_info "build a clean HSS"
echo_info "build a clean EPC" rm -rfv obj*
bash_exec "rm -rf obj*" rm -rfv m4
bash_exec "rm configure" rm -rfv .autom4*
rm -fv configure
fi fi
OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*`
if [ ! -n "$OBJ_DIR" ]; then if [ ! -n "$OBJ_DIR" ]; then
OBJ_DIR="objs" OBJ_DIR="objs"
bash_exec "mkdir -m 777 ./$OBJ_DIR" mkdir --verbose -m 777 ./$OBJ_DIR
echo_success "Created $OBJ_DIR directory"
else else
OBJ_DIR=`basename $OBJ_DIR` OBJ_DIR=`basename $OBJ_DIR`
fi fi
if [ ! -f $OBJ_DIR/Makefile ]; then if [ ! -f "$OBJ_DIR"/Makefile ]; then
if [ ! -d "m4" ]; then if [ ! -d m4 ]; then
mkdir -m 777 m4 mkdir --verbose -m 777 m4
fi fi
echo_success "Invoking autogen" echo_success "Invoking autogen"
./autogen.sh ./autogen.sh
...@@ -656,13 +659,17 @@ compile_hss() { ...@@ -656,13 +659,17 @@ compile_hss() {
return 1 return 1
fi fi
cd $OBJ_DIR cd $OBJ_DIR
echo_success "Invoking configure from "`pwd` echo_success "Invoking configure"
../configure ../configure
if [ $? -ne 0 ]; then
return 1
fi
else else
cd $OBJ_DIR cd $OBJ_DIR
fi fi
if [ -f Makefile ]; then if [ -f Makefile ]; then
echo_success "Compiling..."pwd echo_success "Compiling..."
make ; #-j $NUM_CPU make ; #-j $NUM_CPU
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo_error "Build failed, exiting" echo_error "Build failed, exiting"
......
...@@ -63,6 +63,7 @@ declare RUN=0 ...@@ -63,6 +63,7 @@ declare RUN=0
declare DISABLE_CHECK_INSTALLED_SOFTWARE=0 declare DISABLE_CHECK_INSTALLED_SOFTWARE=0
declare OAI_CLEAN=0 declare OAI_CLEAN=0
declare CLEAN_IPTABLES=0 declare CLEAN_IPTABLES=0
declare CLEAN_HSS=0
declare OAI_TEST=0 declare OAI_TEST=0
declare XFORMS=0 declare XFORMS=0
...@@ -111,6 +112,7 @@ fi ...@@ -111,6 +112,7 @@ fi
-c | --clean) -c | --clean)
rm -rf ./.lock_oaibuild rm -rf ./.lock_oaibuild
OAI_CLEAN=1 OAI_CLEAN=1
CLEAN_HSS=1
echo "setting clean flag to: $OAI_CLEAN" echo "setting clean flag to: $OAI_CLEAN"
echo "may check package installation, and recompile OAI" echo "may check package installation, and recompile OAI"
shift; shift;
...@@ -618,7 +620,8 @@ build_hss(){ ...@@ -618,7 +620,8 @@ build_hss(){
###################################### ######################################
echo_info "5. compile HSS" echo_info "5. compile HSS"
output=$(compile_hss $OAI_CLEAN >> bin/install_log.txt 2>&1 ) # Bad behaviour of $OAI_CLEAN with ./.lock_oaibuild ...
output=$(compile_hss $CLEAN_HSS >> bin/install_log.txt 2>&1 )
hss_compiled=$? hss_compiled=$?
if [ $hss_compiled -eq 1 ]; then if [ $hss_compiled -eq 1 ]; then
echo_error "Failed in compiling hss target: check the installation log file bin/install_log.txt" echo_error "Failed in compiling hss target: check the installation log file bin/install_log.txt"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment