From 7a358d205e3ac770dfbb4770813cd159d961daa8 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 22 Jan 2007 10:10:37 +0000 Subject: [PATCH] Print errors/warnings to the /dev/stderr (to be shown in the Install Wizard log window) --- config_files/build.csh | 15 ++++++++------- config_files/build.sh | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/config_files/build.csh b/config_files/build.csh index b6d62a9..ec0b9c0 100755 --- a/config_files/build.csh +++ b/config_files/build.csh @@ -247,7 +247,7 @@ foreach module (${modules}) # echo possible errors ######################################################### if ( $verbose_level > 0 ) then - cat ${LOG_DIR}/build_configure_${module}.log | grep ": error:" + cat ${LOG_DIR}/build_configure_${module}.log | grep -E "(failed|: error:)" > /dev/stderr endif endif endif @@ -323,10 +323,10 @@ foreach module (${modules}) # echo possible errors ######################################################### if ( $verbose_level > 0 ) then - cat ${LOG_DIR}/configure_${module}.log | grep ": error:" + cat ${LOG_DIR}/configure_${module}.log | grep ": error:" > /dev/stderr endif if ( $verbose_level > 1 ) then - cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" + cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" > /dev/stderr endif endif endif @@ -350,7 +350,7 @@ foreach module (${modules}) ######################################################### # print make errors ######################################################### - cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' + cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' > /dev/stderr ######################################################### # print compiler errors and warnings # Note: here awk is used to concatenate together several lines of single @@ -359,10 +359,10 @@ foreach module (${modules}) ######################################################### if ( $verbose_level > 0 ) then ###cat ${LOG_DIR}/make_${module}.log | grep ": error" - cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ + cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ > /dev/stderr endif if ( $verbose_level > 1 ) then - cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ + cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ > /dev/stderr endif ######################################################### # perform make dev_docs step if -t flag is given @@ -373,6 +373,7 @@ foreach module (${modules}) if ( "$dd" != "" ) then echo "... Performing make dev_docs" make dev_docs >& ${LOG_DIR}/make_dev_docs_${module}.log + cat ${LOG_DIR}/make_dev_docs_${module}.log | grep '[*][*][*]' > /dev/stderr endif endif cd ${module_build} @@ -380,7 +381,6 @@ foreach module (${modules}) # perform make if -i or -p flags are given ######################################################### if ( $is_install == 1 && $sts == 0 || "${module}" == "KERNEL" ) then - echo "... Performing make install" ######################################################### # deleting build directory if -d flag is given ######################################################### @@ -388,6 +388,7 @@ foreach module (${modules}) echo "... Removing $px" rm -rf $px endif + echo "... Performing make install" make install >& ${LOG_DIR}/make_install_${module}.log set sts=$status ######################################################### diff --git a/config_files/build.sh b/config_files/build.sh index c81ffb5..b0adfa5 100755 --- a/config_files/build.sh +++ b/config_files/build.sh @@ -255,7 +255,7 @@ for module in ${modules}; do # echo possible errors ######################################################### if [ $verbose_level -gt 0 ] ; then - cat ${LOG_DIR}/build_configure_${module}.log | grep ": error:" + cat ${LOG_DIR}/build_configure_${module}.log | grep -E "(failed|: error:)" > /dev/stderr fi fi fi @@ -333,10 +333,10 @@ for module in ${modules}; do # echo possible errors ######################################################### if [ $verbose_level -gt 0 ] ; then - cat ${LOG_DIR}/configure_${module}.log | grep ": error:" + cat ${LOG_DIR}/configure_${module}.log | grep ": error:" > /dev/stderr fi if [ $verbose_level -gt 1 ] ; then - cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" + cat ${LOG_DIR}/configure_${module}.log | grep ": WARNING:" > /dev/stderr fi fi fi @@ -360,7 +360,7 @@ for module in ${modules}; do ######################################################### # print make errors ######################################################### - cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' + cat ${LOG_DIR}/make_${module}.log | grep '[*][*][*]' > /dev/stderr ######################################################### # print compiler errors and warnings # Note: here awk is used to concatenate together several lines of single @@ -369,10 +369,10 @@ for module in ${modules}; do ######################################################### if [ $verbose_level -gt 0 ] ; then ###cat ${LOG_DIR}/make_${module}.log | grep ": error" - cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ + cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep "${module_src}/[A-Za-z_0-9./]*:" | sed s@"^${module_src}/src/"@@ > /dev/stderr fi if [ $verbose_level -gt 1 ] ; then - cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ + cat ${LOG_DIR}/make_${module}.log | awk 'substr($0,0,1)!=" " {print ""} {printf $0} END {print ""}' | grep ": warning" | sed s@"^${module_src}/src/"@@ > /dev/stderr fi ######################################################### # perform make dev_docs step if -t flag is given @@ -383,6 +383,7 @@ for module in ${modules}; do if [ "$dd" != "" ] ; then echo "... Performing make dev_docs" make dev_docs >& ${LOG_DIR}/make_dev_docs_${module}.log + cat ${LOG_DIR}/make_dev_docs_${module}.log | grep '[*][*][*]' > /dev/stderr fi fi cd ${module_build} @@ -390,7 +391,6 @@ for module in ${modules}; do # perform make if -i or -p flags are given ######################################################### if [ $is_install -eq 1 ] && [ $sts -eq 0 ] || [ "${module}" == "KERNEL" ] ; then - echo "... Performing make install" ######################################################### # deleting build directory if -d flag is given ######################################################### @@ -398,6 +398,7 @@ for module in ${modules}; do echo "... Removing $px" rm -rf $px fi + echo "... Performing make install" make install >& ${LOG_DIR}/make_install_${module}.log sts=$? ######################################################### -- 2.39.2