summaryrefslogtreecommitdiff
path: root/BUILD/FINISH.sh
blob: cc66ed09f5d29d6fc2cdac0699c6461a9bc40480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1335  USA

cflags="$c_warnings $extra_flags $EXTRA_FLAGS $EXTRA_CFLAGS"
cxxflags="$cxx_warnings $base_cxxflags $extra_flags $EXTRA_FLAGS $EXTRA_CXXFLAGS"
extra_configs="$extra_configs $local_infile_configs $EXTRA_CONFIGS"

configure="./configure $base_configs $extra_configs"

if test "$just_print" = "1" -a "$just_configure" = "1"
then
  just_print=""
  configure="$configure --print"
fi

if test "$AM_EXTRA_MAKEFLAGS" = "VERBOSE=1" -o "$verbose_make" = "1"
then
  configure="$configure --verbose"
fi

commands=""
# git clean -fdX removes all ignored (build) files
if test -d .git
then
    commands="\
git clean -fdX
cd ./libmariadb
git submodule update
git clean -fdX
cd ../storage/rocksdb/rocksdb
git clean -fdX
git submodule update
git clean -fdX
cd ../../maria/libmarias3
git submodule update
git clean -fdX
cd ../../..
cd storage/columnstore/columnstore
git submodule update
git clean -fdX
cd ../../..
cd wsrep-lib
git submodule update
git clean -fdX
cd .."
fi
commands="$commands
path=`dirname $0`
. \"$path/autorun.sh\""

if [ -z "$just_clean"]
then
    if test -d .git
    then
        commands="$commands
        git submodule update"
    fi
    commands="$commands
    CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\" CXXLDFLAGS=\"$CXXLDFLAGS\" $configure"
fi

if [ -z "$just_configure" -a -z "$just_clean" ]
then
  commands="$commands

$make $AM_MAKEFLAGS $AM_EXTRA_MAKEFLAGS
$make tags"

  if [ "x$strip" = "xyes" ]
  then
    commands="$commands

mkdir -p tmp
nm --numeric-sort sql/mysqld  > tmp/mysqld.sym
objdump -d sql/mysqld > tmp/mysqld.S
strip sql/mysqld"
  fi
fi

if test -z "$just_print"
then
  eval "set -x; $commands"
else
  echo "$commands"
fi