From: vsr Date: Tue, 17 Dec 2013 07:17:44 +0000 (+0000) Subject: Fix a bug: wrong processing of -j option X-Git-Tag: V7_3_0rc1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=458013ed264c1b8af1fa98ef2888975c70d048f7;p=tools%2Finstall.git Fix a bug: wrong processing of -j option Small improvement of log files --- diff --git a/config_files/build.sh b/config_files/build.sh index 97af0a0..4fc0b14 100755 --- a/config_files/build.sh +++ b/config_files/build.sh @@ -322,6 +322,9 @@ fi BUILD_DIR=$(pwd) LOG_DIR=${BUILD_DIR}/LOGS +if [ "${nbjobs}" != "" ] ; then + nbjobs="-j${nbjobs}" +fi ### # create log directory @@ -343,7 +346,6 @@ for module in ${modules} ; do module_src=${!module_src} module_build=${BUILD_DIR}/${module}_BUILD without_gui=0 - if [ "${nbjobs}" != "" ] ; then nbjobs="-j${nbjobs}" ; fi cd ${BUILD_DIR} @@ -431,7 +433,7 @@ for module in ${modules} ; do px="${prefix}/${module}${vx}" ### - # run CMake + # run cmake ### echo ".... Running cmake" @@ -452,7 +454,11 @@ for module in ${modules} ; do fi # run cmake - ( cd ${module_build} && cmake ${module_src} -DCMAKE_INSTALL_PREFIX=${px} ${module_cmake_options} >& ${LOG_DIR}/${module}_cmake.log ) + + echo "========================================================================" > ${LOG_DIR}/${module}_cmake.log + echo "cmake ${module_src} -DCMAKE_INSTALL_PREFIX=${px} ${module_cmake_options}" >> ${LOG_DIR}/${module}_cmake.log + echo "========================================================================" >> ${LOG_DIR}/${module}_cmake.log + ( cd ${module_build} && cmake ${module_src} -DCMAKE_INSTALL_PREFIX=${px} ${module_cmake_options} >> ${LOG_DIR}/${module}_cmake.log 2>&1 ) sts=$? # print errors/warnings @@ -475,7 +481,10 @@ for module in ${modules} ; do echo ".... Running make" # run make - ( cd ${module_build} && make ${nbjobs} >& ${LOG_DIR}/${module}_make.log ) + echo "========================================================================" > ${LOG_DIR}/${module}_make.log + echo "make ${nbjobs}" >> ${LOG_DIR}/${module}_make.log + echo "========================================================================" >> ${LOG_DIR}/${module}_make.log + ( cd ${module_build} && make ${nbjobs} >> ${LOG_DIR}/${module}_make.log 2>&1 ) sts=$? # print errors/warnings @@ -504,7 +513,10 @@ for module in ${modules} ; do supports_build_tui ${module} if [ "$?" = "0" ] ; then echo ".... Running make dev_docs" - ( cd ${module_build} && make dev_docs >& ${LOG_DIR}/${module}_make_devdocs.log ) + echo "========================================================================" > ${LOG_DIR}/${module}_make_devdocs.log + echo "make dev_docs" >> ${LOG_DIR}/${module}_make_devdocs.log + echo "========================================================================" >> ${LOG_DIR}/${module}_make_devdocs.log + ( cd ${module_build} && make dev_docs >> ${LOG_DIR}/${module}_make_devdocs.log 2>&1 ) cat ${LOG_DIR}/${module}_make_devdocs.log | grep '[*][*][*]' >&2 fi fi @@ -526,7 +538,10 @@ for module in ${modules} ; do ### echo ".... Running make install" - ( cd ${module_build} && make install >& ${LOG_DIR}/${module}_make_install.log ) + echo "========================================================================" > ${LOG_DIR}/${module}_make_install.log + echo "make install" >> ${LOG_DIR}/${module}_make_install.log + echo "========================================================================" >> ${LOG_DIR}/${module}_make_install.log + ( cd ${module_build} && make install >> ${LOG_DIR}/${module}_make_install.log 2>&1 ) sts=$? if [ "${sts}" != "0" ] ; then