Skip to content

Commit f6deb00

Browse files
author
Davi Arnaut
committed
WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced.
1 parent e1cba38 commit f6deb00

File tree

112 files changed

+59
-11348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+59
-11348
lines changed

BUILD/FINISH.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ extra_configs="$extra_configs $local_infile_configs"
44
configure="./configure $base_configs $extra_configs"
55

66
commands="\
7-
$make -k maintainer-clean || true
8-
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
7+
/bin/rm -rf configure;
98
/bin/rm -rf CMakeCache.txt CMakeFiles/
109
1110
path=`dirname $0`

BUILD/Makefile.am

Lines changed: 0 additions & 77 deletions
This file was deleted.

BUILD/autorun.sh

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,9 @@
11
#!/bin/sh
2-
# Create MySQL autotools infrastructure
2+
# Create MySQL cmake configure wrapper
33

44
die() { echo "$@"; exit 1; }
55

6-
# Handle "glibtoolize" (e.g., for native OS X autotools) as another
7-
# name for "libtoolize". Use the first one, either name, found in PATH.
8-
LIBTOOLIZE=libtoolize # Default
9-
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
10-
for dir in $PATH
11-
do
12-
if test -x $dir/glibtoolize
13-
then
14-
LIBTOOLIZE=glibtoolize
15-
break
16-
elif test -x $dir/libtoolize
17-
then
18-
break
19-
fi
20-
done
21-
IFS="$save_ifs"
22-
23-
rm -rf configure
24-
aclocal || die "Can't execute aclocal"
25-
autoheader || die "Can't execute autoheader"
26-
# --force means overwrite ltmain.sh script if it already exists
27-
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
28-
29-
# --add-missing instructs automake to install missing auxiliary files
30-
# and --force to overwrite them if they already exist
31-
automake --add-missing --force --copy || die "Can't execute automake"
32-
autoconf || die "Can't execute autoconf"
33-
# Do not use autotools generated configure directly. Instead, use a script
34-
# that will either call CMake or original configure shell script at build
35-
# time (CMake is preferred if installed).
36-
mv configure configure.am
37-
cp BUILD/cmake_configure.sh configure
38-
chmod a+x configure
6+
# Use a configure script that will call CMake.
7+
path=`dirname $0`
8+
cp $path/cmake_configure.sh $path/../configure
9+
chmod +x $path/../configure

BUILD/cmake_configure.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
#!/bin/sh
2-
# Choose whether to use autoconf created configure
3-
# of perl script that calls cmake.
42

53
# Ensure cmake and perl are there
64
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
7-
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
5+
perl --version >/dev/null 2>&1 || HAVE_PERL=no
86
scriptdir=`dirname $0`
97
if test "$HAVE_CMAKE" = "no"
108
then
11-
sh $scriptdir/configure.am "$@"
9+
echo "CMake is required to build MySQL."
10+
exit 1
11+
elif test "$HAVE_PERL" = "no"
12+
then
13+
echo "Perl is required to build MySQL using the configure to CMake translator."
14+
exit 1
1215
else
1316
perl $scriptdir/cmake/configure.pl "$@"
1417
fi

Docs/Makefile.am

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)