Commit 8e94f128 authored by Tor Didriksen's avatar Tor Didriksen

Bug#20136840 REMOVE REMAINING REFERENCES TO BZR IN CMAKE SCRIPTS

Patch for 5.5
parent 12f17f08
[MYSQL]
post_commit_to = "commits@lists.mysql.com"
post_push_to = "commits@lists.mysql.com"
tree_name = "mysql-5.5"
This diff is collapsed.
...@@ -434,7 +434,7 @@ CONFIGURE_FILE( ...@@ -434,7 +434,7 @@ CONFIGURE_FILE(
INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake)
# Source: This can be done during the cmake phase, all information is # Source: This can be done during the cmake phase, all information is
# available, but should be repeated on each "make" just in case someone # available, but should be repeated on each "make" just in case someone
# does "cmake ; make ; bzr pull ; make". # does "cmake ; make ; git pull ; make".
CREATE_INFO_SRC(${CMAKE_BINARY_DIR}/Docs) CREATE_INFO_SRC(${CMAKE_BINARY_DIR}/Docs)
ADD_CUSTOM_TARGET(INFO_SRC ALL ADD_CUSTOM_TARGET(INFO_SRC ALL
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/info_src.cmake COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/info_src.cmake
......
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(CPACK_SOURCE_IGNORE_FILES SET(CPACK_SOURCE_IGNORE_FILES
\\\\.bzr/
\\\\.bzr-mysql
\\\\.bzrignore
CMakeCache\\\\.txt CMakeCache\\\\.txt
cmake_dist\\\\.cmake cmake_dist\\\\.cmake
CPackSourceConfig\\\\.cmake CPackSourceConfig\\\\.cmake
......
...@@ -39,9 +39,9 @@ SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") ...@@ -39,9 +39,9 @@ SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
# Create an "INFO_SRC" file with information about the source (only). # Create an "INFO_SRC" file with information about the source (only).
# We use "bzr version-info", if possible, and the "VERSION" contents. # We use "git log", if possible, and the "VERSION" contents.
# #
# Outside development (BZR tree), the "INFO_SRC" file will not be modified # Outside development (git tree), the "INFO_SRC" file will not be modified
# provided it exists (from "make dist" or a source tarball creation). # provided it exists (from "make dist" or a source tarball creation).
MACRO(CREATE_INFO_SRC target_dir) MACRO(CREATE_INFO_SRC target_dir)
...@@ -83,7 +83,7 @@ MACRO(CREATE_INFO_SRC target_dir) ...@@ -83,7 +83,7 @@ MACRO(CREATE_INFO_SRC target_dir)
FILE(APPEND ${INFO_SRC} FILE(APPEND ${INFO_SRC}
"MySQL source ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\n") "MySQL source ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\n")
ELSEIF(EXISTS ${INFO_SRC}) ELSEIF(EXISTS ${INFO_SRC})
# Outside a BZR tree, there is no need to change an existing "INFO_SRC", # Outside a git tree, there is no need to change an existing "INFO_SRC",
# it cannot be improved. # it cannot be improved.
ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/Docs/INFO_SRC) ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/Docs/INFO_SRC)
# If we are building from a source distribution, it also contains "INFO_SRC". # If we are building from a source distribution, it also contains "INFO_SRC".
......
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
# The sole purpose of this cmake control file is to create the "INFO_SRC" file. # The sole purpose of this cmake control file is to create the "INFO_SRC" file.
# As long as and "bzr pull" (or "bzr commit") is followed by a "cmake", # As long as and "git pull" (or "git commit") is followed by a "cmake",
# the call in top level "CMakeLists.txt" is sufficient. # the call in top level "CMakeLists.txt" is sufficient.
# This file is to provide a separate target for the "make" phase, # This file is to provide a separate target for the "make" phase,
# to ensure the BZR revision-id is correct even after a sequence # to ensure the git commit hash is correct even after a sequence
# cmake ; make ; bzr pull ; make # cmake ; make ; git pull ; make
# Get the macros which handle the "INFO_*" files. # Get the macros which handle the "INFO_*" files.
......
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Make source distribution # Make source distribution
# If bzr is present, run bzr export. # If git is present, run git archive.
# Otherwise, just run cpack with source configuration. # Otherwise, just run cpack with source configuration.
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@") SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
...@@ -22,7 +22,6 @@ SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") ...@@ -22,7 +22,6 @@ SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@") SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@") SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@") SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@")
SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@") SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@")
SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@") SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@")
...@@ -40,38 +39,8 @@ SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}) ...@@ -40,38 +39,8 @@ SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME})
FILE(REMOVE_RECURSE ${PACKAGE_DIR}) FILE(REMOVE_RECURSE ${PACKAGE_DIR})
FILE(REMOVE ${PACKAGE_DIR}.tar.gz ) FILE(REMOVE ${PACKAGE_DIR}.tar.gz )
# Only allow bzr if source dir itself is a bzr repository # Only allow git if source dir itself is a git repository
IF(BZR_EXECUTABLE) IF(GIT_EXECUTABLE)
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" root
OUTPUT_VARIABLE BZR_ROOT
ERROR_VARIABLE BZR_ROOT_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0 OR NOT BZR_ROOT STREQUAL ${CMAKE_SOURCE_DIR})
MESSAGE(STATUS "This is not a bzr repository")
SET(BZR_EXECUTABLE)
ENDIF()
ENDIF()
IF(BZR_EXECUTABLE)
MESSAGE(STATUS "Running bzr export")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export
${PACKAGE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
SET(BZR_EXECUTABLE)
ENDIF()
ENDIF()
IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" rev-parse --show-toplevel COMMAND "${GIT_EXECUTABLE}" rev-parse --show-toplevel
OUTPUT_VARIABLE GIT_ROOT OUTPUT_VARIABLE GIT_ROOT
...@@ -87,7 +56,7 @@ IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE) ...@@ -87,7 +56,7 @@ IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE) IF(GIT_EXECUTABLE)
MESSAGE(STATUS "Running git archive -o ${PACKAGE_DIR}.tar") MESSAGE(STATUS "Running git archive -o ${PACKAGE_DIR}.tar")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" archive --format=tar COMMAND "${GIT_EXECUTABLE}" archive --format=tar
...@@ -116,8 +85,8 @@ IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE) ...@@ -116,8 +85,8 @@ IF(GIT_EXECUTABLE AND NOT BZR_EXECUTABLE)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(NOT BZR_EXECUTABLE AND NOT GIT_EXECUTABLE) IF(NOT GIT_EXECUTABLE)
MESSAGE(STATUS "bzr/git not found or source dir is not a repo, use CPack") MESSAGE(STATUS "git not found or source dir is not a repo, use CPack")
IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
# In-source build is the worst option, we have to cleanup source tree. # In-source build is the worst option, we have to cleanup source tree.
......
...@@ -33,7 +33,7 @@ if ($dir_bin =~ m|/usr/|) { ...@@ -33,7 +33,7 @@ if ($dir_bin =~ m|/usr/|) {
$dir_docs = glob "$dir_docs/MySQL-server*"; $dir_docs = glob "$dir_docs/MySQL-server*";
} }
} else { } else {
# tar.gz package, Windows, or developer work (in BZR) # tar.gz package, Windows, or developer work (in git)
$dir_docs = $dir_bin; $dir_docs = $dir_bin;
$dir_docs =~ s|/lib||; $dir_docs =~ s|/lib||;
if(-d "$dir_docs/docs") { if(-d "$dir_docs/docs") {
......
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -245,7 +245,7 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED) ...@@ -245,7 +245,7 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
ENDIF() ENDIF()
FOREACH(tool glibtoolize libtoolize aclocal autoconf autoheader automake gtar FOREACH(tool glibtoolize libtoolize aclocal autoconf autoheader automake gtar
tar bzr) tar git)
STRING(TOUPPER ${tool} TOOL) STRING(TOUPPER ${tool} TOOL)
FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable") FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable")
MARK_AS_ADVANCED(${TOOL}_EXECUTABLE) MARK_AS_ADVANCED(${TOOL}_EXECUTABLE)
...@@ -263,8 +263,7 @@ ADD_CUSTOM_TARGET(dist ...@@ -263,8 +263,7 @@ ADD_CUSTOM_TARGET(dist
ADD_CUSTOM_TARGET(distclean ADD_CUSTOM_TARGET(distclean
COMMAND ${CMAKE_COMMAND} -E echo WARNING: distclean target is not functional COMMAND ${CMAKE_COMMAND} -E echo WARNING: distclean target is not functional
COMMAND ${CMAKE_COMMAND} -E echo Use 'bzr clean-tree' with --unknown and/or COMMAND ${CMAKE_COMMAND} -E echo Use 'git clean -fdx' instead
--ignored parameter instead
VERBATIM VERBATIM
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment