~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-127

« back to all changes in this revision

Viewing changes to bootstrap.sh

  • Committer: Continuous Integration
  • Date: 2012-09-30 21:56:56 UTC
  • mfrom: (2594.1.5 drizzle-7.2)
  • Revision ID: ci@drizzle.org-20120930215656-4kwlnton4wyejwir
Merge lp:~brianaker/drizzle/bootstrap/ Build: jenkins-Drizzle-Builder-52

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
32
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
33
 
34
 
if test -f configure; then make clean; make merge-clean; make distclean; fi;
35
 
 
36
 
rm -r -f autom4te.cache/ config.h config.log config.status 
37
 
./config/autorun.sh
38
 
if [ $(uname) = "Darwin" ];
39
 
then
40
 
  ./configure CC=clang CXX=clang++ --enable-assert
41
 
else
42
 
  ./configure --enable-assert
43
 
fi
44
 
make
 
34
die() { echo "$@"; exit 1; }
 
35
 
 
36
run() {
 
37
  echo "\`$@' $ARGS"
 
38
  $@ $ARGS
 
39
 
40
 
 
41
# -Werror
 
42
AUTORECONF_ERROR_FLAGS="--install --force --verbose -Wall"
 
43
 
 
44
if [ -d .git ]
 
45
then
 
46
  AUTORECONF_FLAGS=$AUTORECONF_ERROR_FLAGS
 
47
elif [ -d .bzr ]
 
48
then
 
49
  AUTORECONF_FLAGS=$AUTORECONF_ERROR_FLAGS
 
50
elif [ -d .svn ]
 
51
then
 
52
  AUTORECONF_FLAGS=$AUTORECONF_ERROR_FLAGS
 
53
elif [ -d .hg ]
 
54
then
 
55
  AUTORECONF_FLAGS=$AUTORECONF_ERROR_FLAGS
 
56
else
 
57
  AUTORECONF_FLAGS="--install --force --verbose -Wall"
 
58
fi
 
59
 
 
60
LIBTOOLIZE_FLAGS="--force --verbose"
 
61
 
 
62
if [ $(uname) = "Darwin" ]
 
63
then
 
64
  LIBTOOLIZE=glibtoolize
 
65
elif [ -z "$LIBTOOLIZE" ]
 
66
then 
 
67
  LIBTOOLIZE=libtoolize
 
68
fi
 
69
 
 
70
AUTORECONF=autoreconf
 
71
 
 
72
# Set ENV DEBUG in order to enable debugging
 
73
if [ -n "$DEBUG" ]
 
74
then 
 
75
  DEBUG="--enable-debug"
 
76
fi
 
77
 
 
78
# Set ENV ASSERT in order to enable assert
 
79
if [ -n "$ASSERT" ]
 
80
then 
 
81
  ASSERT="--enable-assert"
 
82
fi
 
83
 
 
84
# Set ENV MAKE in order to override "make"
 
85
if [ -z "$MAKE" ]
 
86
then 
 
87
  MAKE="make"
 
88
fi
 
89
 
 
90
# Set ENV MAKE_J in order to override "-j2"
 
91
if [ -z "$MAKE_J" ]
 
92
then
 
93
  MAKE_J="-j2"
 
94
fi
 
95
 
 
96
# Set ENV PREFIX in order to set --prefix for ./configure
 
97
if [ -n "$PREFIX" ]
 
98
then 
 
99
  PREFIX="--prefix=$PREFIX"
 
100
fi
 
101
 
 
102
if [ -f Makefile ]
 
103
then
 
104
  $MAKE $MAKE_J distclean
 
105
fi
 
106
 
 
107
run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute $LIBTOOLIZE"
 
108
run $AUTORECONF $AUTORECONF_FLAGS || die "Can't execute $AUTORECONF"
 
109
 
 
110
# If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV
 
111
if [ $(uname) = "Darwin" ]
 
112
then
 
113
  CC=clang CXX=clang++ ./configure $DEBUG $ASSERT $PREFIX || die "configure failed to run"
 
114
else
 
115
  ./configure $DEBUG $ASSERT $PREFIX || die "configure failed to run"
 
116
fi
 
117
 
 
118
# Set ENV MAKE_TARGET in order to override default of "all"
 
119
if [ -z "$MAKE_TARGET" ]
 
120
then 
 
121
  MAKE_TARGET="all"
 
122
fi
 
123
 
 
124
run $MAKE $MAKE_J $MAKE_TARGET || die "Can't execute make"