From 8664de2230300967537d75a9ec51d15c400ca36d Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Sat, 20 Nov 2010 12:47:50 -0200 Subject: 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. VERSION: Add top-level version file. cmake/mysql_version.cmake: Get version information from the top-level VERSION file. Do not cache the version components (MAJOR_VERSION, etc). Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION. --- BUILD/FINISH.sh | 3 +- BUILD/Makefile.am | 77 ------------------------------------------------ BUILD/autorun.sh | 39 ++++-------------------- BUILD/cmake_configure.sh | 11 ++++--- 4 files changed, 13 insertions(+), 117 deletions(-) delete mode 100644 BUILD/Makefile.am (limited to 'BUILD') diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index b7f7a1db77e..e0d505a948f 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -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` diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am deleted file mode 100644 index 56c86e7a80c..00000000000 --- a/BUILD/Makefile.am +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (C) 2002, 2004-2005 MySQL AB -# -# This library 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 library 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., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA - -## Process this file with automake to create Makefile.in - -EXTRA_DIST = FINISH.sh \ - SETUP.sh \ - autorun.sh \ - cmake_configure.sh \ - build_mccge.sh \ - check-cpu \ - cleanup \ - compile-alpha \ - compile-alpha-debug \ - compile-amd64-debug-max \ - compile-amd64-debug-max-no-ndb \ - compile-amd64-gcov \ - compile-amd64-gprof \ - compile-amd64-max \ - compile-amd64-max-sci \ - compile-amd64-valgrind-max \ - compile-darwin-mwcc \ - compile-dist \ - compile-hpux11-parisc2-aCC \ - compile-ia64-debug-max \ - compile-irix-mips64-mipspro \ - compile-pentium \ - compile-pentium-debug \ - compile-pentium-debug-max \ - compile-pentium-debug-max-no-embedded \ - compile-pentium-debug-max-no-ndb \ - compile-pentium-debug-openssl \ - compile-pentium-debug-yassl \ - compile-pentium-gcov \ - compile-pentium-gprof \ - compile-pentium-icc \ - compile-pentium-icc-valgrind-max \ - compile-pentium-icc-yassl \ - compile-pentium-max \ - compile-pentium-myodbc \ - compile-pentium-pgcc \ - compile-pentium-valgrind-max \ - compile-pentium64 \ - compile-pentium64-debug \ - compile-pentium64-debug-max \ - compile-pentium64-gcov \ - compile-pentium64-gprof \ - compile-pentium64-max \ - compile-pentium64-max-sci \ - compile-pentium64-valgrind-max \ - compile-ppc \ - compile-ppc-debug \ - compile-ppc-debug-max \ - compile-ppc-debug-max-no-ndb \ - compile-ppc-max \ - compile-solaris-amd64 \ - compile-solaris-amd64-debug \ - compile-solaris-amd64-forte \ - compile-solaris-amd64-forte-debug \ - compile-solaris-sparc \ - compile-solaris-sparc-debug \ - compile-solaris-sparc-forte \ - compile-solaris-sparc-purify diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh index f4508ab12b6..e4ca52f00fe 100755 --- a/BUILD/autorun.sh +++ b/BUILD/autorun.sh @@ -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 diff --git a/BUILD/cmake_configure.sh b/BUILD/cmake_configure.sh index 80423205274..f5efc13e011 100644 --- a/BUILD/cmake_configure.sh +++ b/BUILD/cmake_configure.sh @@ -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 -- cgit v1.2.1