diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-21 16:45:19 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-21 16:45:19 -0400 |
commit | 3ab52e74b1de1c0be647eb36386ef5e16baeb60d (patch) | |
tree | 7f2b9db65ab74b3eda2e75c7c1062cc3f75e42fc | |
parent | 3d326956ef79cd1b623afa65b994a26b17dc6f24 (diff) | |
download | fork-ledger-3ab52e74b1de1c0be647eb36386ef5e16baeb60d.tar.gz fork-ledger-3ab52e74b1de1c0be647eb36386ef5e16baeb60d.tar.bz2 fork-ledger-3ab52e74b1de1c0be647eb36386ef5e16baeb60d.zip |
Tools changes to build for multiple targets
This makes it easier for me to build a version of ledger with
optimizations, one for coverage analysis, one for profiling, etc.
-rwxr-xr-x | tools/buildall | 10 | ||||
-rwxr-xr-x | tools/myacprep | 53 | ||||
-rwxr-xr-x | tools/prepall | 12 | ||||
-rwxr-xr-x | tools/proof | 9 |
4 files changed, 71 insertions, 13 deletions
diff --git a/tools/buildall b/tools/buildall new file mode 100755 index 00000000..5faf66e5 --- /dev/null +++ b/tools/buildall @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +(cd ~/Products/ledger && make "$@") & +(cd ~/Products/ledger-gcov && make "$@") & +(cd ~/Products/ledger-gprof && make "$@") & +(cd ~/Products/ledger-opt && make "$@") & + +wait diff --git a/tools/myacprep b/tools/myacprep index 7c4e2c14..39ed4f23 100755 --- a/tools/myacprep +++ b/tools/myacprep @@ -1,21 +1,48 @@ #!/bin/sh -OUT=$HOME/Products/ledger +OUT=$HOME/Products +SWITCHES="" -if [ "$1" = "--local" ]; then - OUT="" -elif [ "$1" = "--output" ]; then - OUT="" -fi +saw_opt=false +while [ -n "$1" ]; do + case "$1" in + --local) + OUT="" + SWITCHES="$SWITCHES --local" + shift 1 ;; + --output) + OUT="" + shift 1 + SWITCHES="$SWITCHES --output $1" + shift 1 ;; + --gprof) + OUT="$OUT/ledger-gprof" + SWITCHES="$SWITCHES $1 --release" + saw_opt=true + shift 1 ;; + --gcov) + OUT="$OUT/ledger-gcov" + SWITCHES="$SWITCHES $1 --debug --devel" + saw_opt=true + shift 1 ;; + --opt) + OUT="$OUT/ledger-opt" + SWITCHES="$SWITCHES $1 --release" + saw_opt=true + shift 1 ;; + esac +done -SWITCHES="" -SWITCHES="$SWITCHES --pch" # build using pre-compiled headers -SWITCHES="$SWITCHES --warn" # show full compiler warnings -SWITCHES="$SWITCHES --debug" # enable debug code generation -SWITCHES="$SWITCHES --devel" # use GLIBCXX_DEBUG if possible +if [ $saw_opt = false ]; then + SWITCHES="$SWITCHES --pch" # build using pre-compiled headers + SWITCHES="$SWITCHES --warn" # show full compiler warnings + SWITCHES="$SWITCHES --debug" # enable debug code generation + SWITCHES="$SWITCHES --devel" # use GLIBCXX_DEBUG if possible + OUT="$OUT/ledger" +fi -if [ -n "$OUT" -a -d "$OUT" ]; then - # build in another directory, if it exists and there were no +if [ -n "$OUT" ]; then + [ -d "$OUT" ] || mkdir -p "$OUT" SWITCHES="$SWITCHES --output $OUT" fi diff --git a/tools/prepall b/tools/prepall new file mode 100755 index 00000000..d6eedfdd --- /dev/null +++ b/tools/prepall @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +tools/myacprep --opt +tools/myacprep --gprof +tools/myacprep --gcov +tools/myacprep + +touch ~/Products/ledger-gcov/config.status +touch ~/Products/ledger-gprof/config.status +touch ~/Products/ledger-opt/touch config.status diff --git a/tools/proof b/tools/proof new file mode 100755 index 00000000..d135b606 --- /dev/null +++ b/tools/proof @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +tools/prepall +tools/buildall clean check + +cd ~/Products/ledger +make release-distcheck |