~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/b

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# ---------------------------------------------------------------------------
 
3
# New and improved build script for wrapping build-wxpython.py and
 
4
# only needing to use super-simple one or two letter command line args.
 
5
# ---------------------------------------------------------------------------
 
6
 
 
7
set -o errexit
 
8
#set -o xtrace
 
9
 
 
10
# Why are these not being translated already like they used to be? 
 
11
if [ "$OSTYPE" = "cygwin" ]; then
 
12
    TOOLS=`cygpath -u $TOOLS`
 
13
    #PROJECTS=`cygpath -u $PROJECTS`
 
14
fi
 
15
 
 
16
 
 
17
if [ "$PYTHON" = "" ]; then
 
18
    case $1 in 
 
19
        23 | 2.3) VER=23; PYVER=2.3; shift ;;
 
20
        24 | 2.4) VER=24; PYVER=2.4; shift ;;
 
21
        25 | 2.5) VER=25; PYVER=2.5; shift ;;
 
22
        26 | 2.6) VER=26; PYVER=2.6; shift ;;
 
23
        27 | 2.7) VER=27; PYVER=2.7; shift ;;
 
24
        30 | 3.0) VER=30; PYVER=3.0; shift ;;
 
25
        
 
26
        *) VER=27; PYVER=2.7
 
27
    esac
 
28
        
 
29
    if [ "$OSTYPE" = "cygwin" ]; then
 
30
        PYTHON=$TOOLS/python$VER/python.exe
 
31
    else
 
32
        PYTHON=python$PYVER
 
33
    fi
 
34
fi
 
35
echo "Using:" `which $PYTHON`
 
36
$PYTHON -c "import sys;print sys.version, '\n'"
 
37
 
 
38
 
 
39
if [ "$SWIG" = "" ]; then
 
40
    if [ "$OSTYPE" = "cygwin" ]; then
 
41
        SWIG=$PROJECTS\\SWIG-1.3.29\\swig.exe
 
42
    else
 
43
        SWIG=/opt/swig/bin/swig-1.3.29
 
44
    fi
 
45
fi
 
46
export SWIG
 
47
 
 
48
function show_help {
 
49
    echo "build commands:"
 
50
    echo "    c       clean"
 
51
    echo "    cw      clean only wx"
 
52
    echo "    cp      clean only wxPython"
 
53
    echo "    ce      clean only extension modules"
 
54
    echo ""
 
55
    echo "    cb      clean both debug and release (MSW)"
 
56
    echo ""
 
57
    echo "    d       build debug (default)"
 
58
    echo "    r       build release"
 
59
    echo "    b       build both debug and release (MSW)"
 
60
    echo ""
 
61
    echo "    t       touch all *.i files"
 
62
}
 
63
 
 
64
 
 
65
ARGS="--reswig --unicode --build_dir=../bld --prefix=/opt/wx/2.9 --cairo"
 
66
DEBUG="--debug"
 
67
BOTH="no"
 
68
 
 
69
case $1 in 
 
70
      c) ARGS="$ARGS --clean";             shift ;;
 
71
     cw) ARGS="$ARGS --clean=wx";          shift ;;
 
72
     cp) ARGS="$ARGS --clean=py";          shift ;;
 
73
     ce) ARGS="$ARGS --clean=pyext";       shift ;;
 
74
 
 
75
     cb) BOTH="yes"; ARGS="$ARGS --clean";        shift ;;
 
76
    cbw) BOTH="yes"; ARGS="$ARGS --clean=wx";     shift ;;
 
77
    cbp) BOTH="yes"; ARGS="$ARGS --clean=py";     shift ;;
 
78
    cbe) BOTH="yes"; ARGS="$ARGS --clean=pyext";  shift ;;
 
79
 
 
80
      d) DEBUG="--debug";            shift ;;
 
81
      r) DEBUG="";                   shift ;;
 
82
      b) BOTH="yes";                 shift ;;
 
83
 
 
84
      t) find . -name "*.i" | xargs -t touch; echo "*.i files touched"; exit 0 ;;
 
85
   help) show_help; exit 0 ;;
 
86
esac
 
87
 
 
88
 
 
89
if [ "$OSTYPE" = "cygwin" -a "$BOTH" = "yes" ]; then
 
90
    set -o xtrace
 
91
    $PYTHON -u ./build-wxpython.py $ARGS --debug $@
 
92
    $PYTHON -u ./build-wxpython.py $ARGS $@
 
93
else
 
94
    set -o xtrace
 
95
    $PYTHON -u ./build-wxpython.py $ARGS $DEBUG $@
 
96
fi