diff options
author | Joerg Bruehe <joerg@mysql.com> | 2011-02-11 15:55:25 +0100 |
---|---|---|
committer | Joerg Bruehe <joerg@mysql.com> | 2011-02-11 15:55:25 +0100 |
commit | fd21e07d6bc53594ba4e50663b2afe857c4f2dfb (patch) | |
tree | c02a941a6e42f9e13695b2dfbb49599fa8c3a217 /CMakeLists.txt | |
parent | f7dc30c843912f047fdc1d6f196228c0366b3729 (diff) | |
download | mariadb-git-fd21e07d6bc53594ba4e50663b2afe857c4f2dfb.tar.gz |
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 059d68e0a3c..235a65a6437 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -317,6 +317,24 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in ${CMAKE_BINARY_DIR}/include/mysql_version.h ) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc) +CONFIGURE_FILE( + ${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in ${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY) + +# Handle the "INFO_*" files. +INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) +# Source: This can be done during the cmake phase, all information is +# available, but should be repeated on each "make" just in case someone +# does "cmake ; make ; bzr pull ; make". +CREATE_INFO_SRC(${CMAKE_BINARY_DIR}/Docs) +ADD_CUSTOM_TARGET(INFO_SRC ALL + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/info_src.cmake + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) +# Build flags: This must be postponed to the make phase. +ADD_CUSTOM_TARGET(INFO_BIN ALL + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/info_bin.cmake + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) # Packaging IF(WIN32) @@ -344,6 +362,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") OPTIONAL ) INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) + INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) IF(UNIX) INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) ENDIF() |