From: Maxim Mamontov Date: Tue, 15 Jan 2013 20:13:15 +0000 (+0200) Subject: Patch from SpiderX - build in debug mode. X-Git-Tag: 2.409~374 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/9324854ca8e3b5e09a16010e14860b530d68405f?ds=sidebyside Patch from SpiderX - build in debug mode. --- diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index 3781d1b4..e427b32e 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -16,21 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] -then - MAKEOPTS="-j1" - DEBUG="no" +if [ "$1" = "debug" ] +thenÑ + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - MAKEOPTS="-j1" - DEBUG="no" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 6a7c77f1..ea3914c7 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -16,21 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] +if [ "$1" = "debug" ] then - MAKEOPTS="-j1" - DEBUG="no" + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - MAKEOPTS="-j1" - DEBUG="no" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" diff --git a/projects/sgauth/build b/projects/sgauth/build index e3ad87f4..8b79bc52 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -16,21 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] +if [ "$1" = "debug" ] then - MAKEOPTS="-j1" - DEBUG="no" + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - MAKEOPTS="-j1" - DEBUG="no" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" diff --git a/projects/sgconf/build b/projects/sgconf/build index da81773a..a8a675be 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -16,21 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] +if [ "$1" = "debug" ] then - MAKEOPTS="-j1" - DEBUG="no" + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - MAKEOPTS="-j1" - DEBUG="no" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index 97970758..6816a436 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -16,21 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] +if [ "$1" = "debug" ] then - MAKEOPTS="-j1" - DEBUG="no" + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - MAKEOPTS="-j1" - DEBUG="no" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" diff --git a/projects/sgconv/build b/projects/sgconv/build index 601c0161..5084bd0d 100755 --- a/projects/sgconv/build +++ b/projects/sgconv/build @@ -16,11 +16,20 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root VAR_DIR="./inst/var/stargazer" -DEFS="-DDEBUG" -MAKEOPTS="-j1" + +if [ "$1" = "debug" ] +then + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" +else + DEFS="$DEFS -DNDEBUG" + DEBUG="no" +fi + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" -DEBUG="yes" if [ "$sys" = "Linux" ] then diff --git a/projects/stargazer/build b/projects/stargazer/build index 8a34c4fc..a323148b 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -35,23 +35,15 @@ MIN_XMLRPCC_VERSION="1.06.27" XMLRPC_FEATURES="c++2 abyss-server" -if [ -z "$1" ] +if [ "$1" = "debug" ] then + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" + DEBUG="yes" +else DEFS="$DEFS -DNDEBUG" - MAKEOPTS="-j1" DEBUG="no" -else - if [ "$1" = "debug" ] - then - DEFS="$DEFS -DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - DEBUG="yes" - else - DEFS="$DEFS -DNDEBUG" - MAKEOPTS="-j1" - DEBUG="no" - fi fi CXXFLAGS="$CXXFLAGS -I/usr/local/include"