Skip to content

Commit

Permalink
WL#5665: Removal of the autotools-based build system
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Davi Arnaut committed Nov 20, 2010
1 parent c8c3620 commit 53e5f36
Show file tree
Hide file tree
Showing 112 changed files with 59 additions and 11,348 deletions.
3 changes: 1 addition & 2 deletions BUILD/FINISH.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ extra_configs="$extra_configs $local_infile_configs"
configure="./configure $base_configs $extra_configs"

commands="\
$make -k maintainer-clean || true
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
/bin/rm -rf configure;
/bin/rm -rf CMakeCache.txt CMakeFiles/
path=`dirname $0`
Expand Down
77 changes: 0 additions & 77 deletions BUILD/Makefile.am

This file was deleted.

39 changes: 5 additions & 34 deletions BUILD/autorun.sh
Original file line number Diff line number Diff line change
@@ -1,38 +1,9 @@
#!/bin/sh
# Create MySQL autotools infrastructure
# Create MySQL cmake configure wrapper

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

# Handle "glibtoolize" (e.g., for native OS X autotools) as another
# name for "libtoolize". Use the first one, either name, found in PATH.
LIBTOOLIZE=libtoolize # Default
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
for dir in $PATH
do
if test -x $dir/glibtoolize
then
LIBTOOLIZE=glibtoolize
break
elif test -x $dir/libtoolize
then
break
fi
done
IFS="$save_ifs"

rm -rf configure
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"

# --add-missing instructs automake to install missing auxiliary files
# and --force to overwrite them if they already exist
automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
# Do not use autotools generated configure directly. Instead, use a script
# that will either call CMake or original configure shell script at build
# time (CMake is preferred if installed).
mv configure configure.am
cp BUILD/cmake_configure.sh configure
chmod a+x configure
# Use a configure script that will call CMake.
path=`dirname $0`
cp $path/cmake_configure.sh $path/../configure
chmod +x $path/../configure
11 changes: 7 additions & 4 deletions BUILD/cmake_configure.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/sh
# Choose whether to use autoconf created configure
# of perl script that calls cmake.

# Ensure cmake and perl are there
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_PERL=no
scriptdir=`dirname $0`
if test "$HAVE_CMAKE" = "no"
then
sh $scriptdir/configure.am "$@"
echo "CMake is required to build MySQL."
exit 1
elif test "$HAVE_PERL" = "no"
then
echo "Perl is required to build MySQL using the configure to CMake translator."
exit 1
else
perl $scriptdir/cmake/configure.pl "$@"
fi
Expand Down
39 changes: 0 additions & 39 deletions Docs/Makefile.am

This file was deleted.

Loading

0 comments on commit 53e5f36

Please sign in to comment.