diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-06-29 21:19:05 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-06-29 21:20:05 -0500 |
commit | 7d594d8346ee389e25cb6a160ec3bd9d9d7bad60 (patch) | |
tree | 49425fc9ca623128e7c2edd9c8bbc71e8e730268 /bin | |
parent | 4eb6eeadab0330a9f9d7063299e394b78662232e (diff) | |
download | conf-7d594d8346ee389e25cb6a160ec3bd9d9d7bad60.tar.gz conf-7d594d8346ee389e25cb6a160ec3bd9d9d7bad60.zip |
improve the perl-building script a bunch
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/p | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -1,14 +1,31 @@ #!/bin/bash +_clean () { + git clean -dfx + ctags *.c *.h +} + _configure () { - ./Configure -des -Dusedevel -DDEBUGGING -Dusethreads -Uversiononly -Accflags="-Wall -Wextra" -Doptimize="-g -O0 -ggdb3" + # XXX breaks when building Compress::Raw::Zlib, nobody else can reproduce? + # ./Configure -des -Dusedevel -DDEBUGGING -Dusethreads -Uversiononly -Accflags="-Wall -Wextra" -Doptimize="-g -O0 -ggdb3" + # can't do this with -Werror, not everything (external modules, say) is + # -Werror clean + # ./Configure -des -Dusedevel -Accflags="-Wall -Wextra" + ./Configure -des -Dusedevel } _make () { - make -j9 + if [[ ! -e Makefile ]]; then + _configure + fi + # -Werror at configure time seems to confuse Configure, so do it here + make -j9 OPTIMIZE="-O2 -Werror" } _test () { + if [[ ! -e perl ]]; then + _make + fi export TEST_JOBS=9 if [ -n "$*" ]; then make test_harness TEST_FILES="$*" @@ -21,15 +38,22 @@ cmd=$1 shift case $cmd in - configure) + cl|clean) + _clean $@ + ;; + c|conf|configure) _configure $@ ;; - make) + m|make) _make $@ ;; - test) + t|test) _test $@ ;; + a|all) + _clean + _test + ;; *) echo "Usage: p <command> [args...]" 1>&2 exit 1 |