File: bootstrap

package info (click to toggle)
mysql%2B%2B 3.1.0-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,640 kB
  • sloc: cpp: 35,569; sh: 3,113; makefile: 946; perl: 786
file content (105 lines) | stat: -rwxr-xr-x 1,908 bytes parent folder | download | duplicates (2)
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
100
101
102
103
104
105
#!/bin/sh

ARGS=1
BF_OPTIONS=
MAINT_FLAGS="--cache-file=config.cache"
while [ $ARGS != 0 ]
do
	case "$1" in
		bat)
			cmd /c bootstrap.bat $BF_OPTIONS
			exit 0
			;;

		nodoc)
			BF_OPTIONS="-DBUILDDOCS=no $BF_OPTIONS"
			shift
			;;

		noex)
			BF_OPTIONS="-DBUILDEXAMPLES=no $BF_OPTIONS"
			shift
			;;

		nolib)
			BF_OPTIONS="-DBUILDLIBRARY=no $BF_OPTIONS"
			shift
			;;

		nomaint)
			MAINT_FLAGS=
			shift
			;;

		noopt)
			export CXXFLAGS="-g -O0"
			shift
			;;

		pedantic)
			export CXXFLAGS="-g -O2 -ansi -pedantic -Wall -W -Wold-style-cast -Wfloat-equal -Wwrite-strings -Wno-overloaded-virtual -Wno-long-long -Wno-variadic-macros -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
			shift
			;;

		*)
			ARGS=0
			;;
	esac
done

rm -f config.cache

# Do Bakefile stuff first
set -x &&
	for d in 3 5 8 ; do mkdir -p vc200$d ; done &&
	bakefilize &&
	bakefile_gen $BF_OPTIONS &&
	bakefile -f gnu -o Makefile.simple -DBUILDLIBRARY=no mysql++.bkl &&
	set +x &&
	success=shonuff

# Get rid of INSTALL symlink added by bakefilize.  We already have
# INSTALL.txt.
rm -f INSTALL

# If that succeeded, move on to autotools stuff, etc.
set +x
if [ -n "$success" ]
then
	mv autoconf_inc.m4 config > /dev/null 2>&1	# don't care if it fails

	# Find location of Bakefile's stock M4 autoconf macros
	for d in /usr /usr/local
	do
		BAKEFILE_M4=$d/share/aclocal
		if [ -e $BAKEFILE_M4/bakefile.m4 ] ; then break ; fi
	done
	if [ ! -e $BAKEFILE_M4/bakefile.m4 ]
	then
		echo
		echo "Failed to find bakefile.m4.  Add the directory containing"
		echo "this to the bootstrap script."
		echo
		exit 1
	fi

	success=
	set -x &&
		aclocal -I config -I $BAKEFILE_M4 &&
		autoheader &&
		autoconf &&
		./configure $MAINT_FLAGS $* &&
		make lib/querydef.h lib/ssqls.h &&
		set +x &&
		success=awyeah
fi

# Detect failure in any part of above
if [ -z "$success" ]
then
	echo
    echo BOOTSTRAP FAILED!
    echo
    exit 1
fi