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(){
################################################
compile_hss() {
cd $OPENAIRCN_DIR/OPENAIRHSS
pwd
OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*`
if [ $1 -eq 1 ]; then
echo_info "build a clean EPC"
bash_exec "rm -rf obj*"
bash_exec "rm configure"
if [ "$1" -eq 1 ]; then
echo_info "build a clean HSS"
rm -rfv obj*
rm -rfv m4
rm -rfv .autom4*
rm -fv configure
fi
OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*`
if [ ! -n "$OBJ_DIR" ]; then
OBJ_DIR="objs"
bash_exec "mkdir -m 777 ./$OBJ_DIR"
echo_success "Created $OBJ_DIR directory"
mkdir --verbose -m 777 ./$OBJ_DIR
else
OBJ_DIR=`basename $OBJ_DIR`
fi
if [ ! -f $OBJ_DIR/Makefile ]; then
if [ ! -d "m4" ]; then
mkdir -m 777 m4
if [ ! -f "$OBJ_DIR"/Makefile ]; then
if [ ! -d m4 ]; then
mkdir --verbose -m 777 m4
fi
echo_success "Invoking autogen"
./autogen.sh
......@@ -656,13 +659,17 @@ compile_hss() {
return 1
fi
cd $OBJ_DIR
echo_success "Invoking configure from "`pwd`
echo_success "Invoking configure"
../configure
if [ $? -ne 0 ]; then
return 1
fi
else
cd $OBJ_DIR
fi
if [ -f Makefile ]; then
echo_success "Compiling..."pwd
echo_success "Compiling..."
make ; #-j $NUM_CPU
if [ $? -ne 0 ]; then
echo_error "Build failed, exiting"
......
......@@ -63,6 +63,7 @@ declare RUN=0
declare DISABLE_CHECK_INSTALLED_SOFTWARE=0
declare OAI_CLEAN=0
declare CLEAN_IPTABLES=0
declare CLEAN_HSS=0
declare OAI_TEST=0
declare XFORMS=0
......@@ -111,6 +112,7 @@ fi
-c | --clean)
rm -rf ./.lock_oaibuild
OAI_CLEAN=1
CLEAN_HSS=1
echo "setting clean flag to: $OAI_CLEAN"
echo "may check package installation, and recompile OAI"
shift;
......@@ -618,7 +620,8 @@ build_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=$?
if [ $hss_compiled -eq 1 ]; then
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