From ad863476103b4bc2f8be90f5d7639b8fecc5ab52 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 12 May 2009 12:32:27 +0200 Subject: [PATCH] /src/rt/release.sh: Allow building a debug version When running '/src/rt/release.sh --debug', you will end up with an msys-1.0.dll that is not stripped, and which contains debug information. Signed-off-by: Johannes Schindelin --- src/rt/release.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/rt/release.sh b/src/rt/release.sh index d6eaf733..264913e2 100644 --- a/src/rt/release.sh +++ b/src/rt/release.sh @@ -8,6 +8,12 @@ cd "$(dirname "$0")" mkdir -p build cd build +debug= +test "a$1" = "a--debug" && debug=t +debug_clean= +test "$debug" = "$(cat debug.txt 2>/dev/null)" || debug_clean=t +echo "$debug" > debug.txt + if ! test -e $src then curl -o $src $mirror/$src @@ -37,9 +43,12 @@ git am ../../patches/*.patch || (test -d bld || mkdir bld) && cd bld && DLL=i686-pc-msys/winsup/cygwin/new-msys-1.0.dll && - (test -f Makefile || ../source/configure --prefix=/usr) && + (test -f Makefile && test -z "$debug_clean" || + ../source/configure --prefix=/usr) && + (test -z "$debug" || perl -i.bak -pe 's/-O2//g' $(find -name Makefile)) && + (test -z "$debug_clean" || make clean) && (make || test -f $DLL) && - strip $DLL && + (test ! -z "$debug" || strip $DLL) && rebase -b 0x30000000 $DLL && mv $DLL /bin/) && cd / && -- 2.11.4.GIT