mirror of https://github.com/citusdata/citus.git
Merge pull request #1700 from citusdata/improve_build_metadata
Improve build metadata generated by configure cr: @pykellopull/1712/head
commit
e4072a3dbb
File diff suppressed because it is too large
Load Diff
36
configure.in
36
configure.in
|
@ -12,13 +12,28 @@ AC_COPYRIGHT([Copyright (c) 2012-2017, Citus Data, Inc.])
|
|||
AC_PROG_SED
|
||||
AC_PROG_AWK
|
||||
|
||||
# CITUS_VERSION definition
|
||||
AC_DEFINE_UNQUOTED(CITUS_VERSION, "$PACKAGE_VERSION", [Citus version as a string])
|
||||
# CITUS_NAME definition
|
||||
AC_DEFINE_UNQUOTED(CITUS_NAME, "$PACKAGE_NAME", [Citus full name as a string])
|
||||
|
||||
case $PACKAGE_NAME in
|
||||
'Citus Enterprise') citus_edition=enterprise ;;
|
||||
Citus) citus_edition=community ;;
|
||||
*) AC_MSG_ERROR([Unrecognized package name.]) ;;
|
||||
esac
|
||||
|
||||
# CITUS_EDITION definition
|
||||
AC_DEFINE_UNQUOTED(CITUS_EDITION, "$citus_edition", [Citus edition as a string])
|
||||
|
||||
# CITUS_MAJORVERSION definition
|
||||
[CITUS_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`]
|
||||
AC_DEFINE_UNQUOTED(CITUS_MAJORVERSION, "$CITUS_MAJORVERSION", [Citus major version as a string])
|
||||
|
||||
# CITUS_VERSION definition
|
||||
PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
|
||||
[CITUS_VERSION="$PACKAGE_VERSION$withval"],
|
||||
[CITUS_VERSION="$PACKAGE_VERSION"])
|
||||
AC_DEFINE_UNQUOTED(CITUS_VERSION, "$CITUS_VERSION", [Citus version as a string])
|
||||
|
||||
# CITUS_VERSION_NUM definition
|
||||
# awk -F is a regex on some platforms, and not on others, so make "." a tab
|
||||
[CITUS_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
|
||||
|
@ -86,6 +101,23 @@ SAVE_CFLAGS="$CFLAGS"
|
|||
AC_PROG_CC([$($PG_CONFIG --cc)])
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
|
||||
host_guess=`${SHELL} $srcdir/config/config.guess`
|
||||
|
||||
# Create compiler version string
|
||||
if test x"$GCC" = x"yes" ; then
|
||||
cc_string=`${CC} --version | sed q`
|
||||
case $cc_string in [[A-Za-z]]*) ;; *) cc_string="GCC $cc_string";; esac
|
||||
elif test x"$SUN_STUDIO_CC" = x"yes" ; then
|
||||
cc_string=`${CC} -V 2>&1 | sed q`
|
||||
else
|
||||
cc_string=$CC
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF([void *])
|
||||
|
||||
AC_DEFINE_UNQUOTED(CITUS_VERSION_STR,
|
||||
["$PACKAGE_NAME $CITUS_VERSION on $host_guess, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
|
||||
[A string containing the version number, platform, and C compiler])
|
||||
|
||||
# Locate source and build directory of the postgres we're building
|
||||
# against. Can't rely on either still being present, but e.g. optional
|
||||
|
|
|
@ -12,7 +12,7 @@ EXTVERSIONS = 5.0 5.0-1 5.0-2 \
|
|||
6.1-1 6.1-2 6.1-3 6.1-4 6.1-5 6.1-6 6.1-7 6.1-8 6.1-9 6.1-10 6.1-11 6.1-12 6.1-13 6.1-14 6.1-15 6.1-16 6.1-17 \
|
||||
6.2-1 6.2-2 6.2-3 6.2-4 \
|
||||
7.0-1 7.0-2 7.0-3 7.0-4 7.0-5 7.0-6 7.0-7 7.0-8 7.0-9 7.0-10 7.0-11 7.0-12 7.0-13 7.0-14 7.0-15 \
|
||||
7.1-1
|
||||
7.1-1 7.1-2
|
||||
|
||||
# All citus--*.sql files in the source directory
|
||||
DATA = $(patsubst $(citus_abs_srcdir)/%.sql,%.sql,$(wildcard $(citus_abs_srcdir)/$(EXTENSION)--*--*.sql))
|
||||
|
@ -172,6 +172,8 @@ $(EXTENSION)--7.0-15.sql: $(EXTENSION)--7.0-14.sql $(EXTENSION)--7.0-14--7.0-15.
|
|||
cat $^ > $@
|
||||
$(EXTENSION)--7.1-1.sql: $(EXTENSION)--7.0-15.sql $(EXTENSION)--7.0-15--7.1-1.sql
|
||||
cat $^ > $@
|
||||
$(EXTENSION)--7.1-2.sql: $(EXTENSION)--7.1-1.sql $(EXTENSION)--7.1-1--7.1-2.sql
|
||||
cat $^ > $@
|
||||
|
||||
NO_PGXS = 1
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/* citus--7.1-1--7.1-2 */
|
||||
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.citus_version()
|
||||
RETURNS text
|
||||
LANGUAGE C STABLE STRICT
|
||||
AS 'MODULE_PATHNAME', $$citus_version$$;
|
||||
COMMENT ON FUNCTION pg_catalog.citus_version()
|
||||
IS 'Citus version string';
|
|
@ -1,6 +1,6 @@
|
|||
# Citus extension
|
||||
comment = 'Citus distributed database'
|
||||
default_version = '7.1-1'
|
||||
default_version = '7.1-2'
|
||||
module_pathname = '$libdir/citus'
|
||||
relocatable = false
|
||||
schema = pg_catalog
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* citus_version.c
|
||||
*
|
||||
* This file contains functions for displaying the Citus version string
|
||||
*
|
||||
* Copyright (c) 2017, Citus Data, Inc.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "citus_version.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
|
||||
/* exports for SQL callable functions */
|
||||
PG_FUNCTION_INFO_V1(citus_version);
|
||||
|
||||
|
||||
Datum
|
||||
citus_version(PG_FUNCTION_ARGS)
|
||||
{
|
||||
PG_RETURN_TEXT_P(cstring_to_text(CITUS_VERSION_STR));
|
||||
}
|
|
@ -10,18 +10,27 @@
|
|||
*/
|
||||
|
||||
|
||||
/* Citus edition as a string */
|
||||
#undef CITUS_EDITION
|
||||
|
||||
/* Extension version expected by this Citus build */
|
||||
#undef CITUS_EXTENSIONVERSION
|
||||
|
||||
/* Citus major version as a string */
|
||||
#undef CITUS_MAJORVERSION
|
||||
|
||||
/* Citus full name as a string */
|
||||
#undef CITUS_NAME
|
||||
|
||||
/* Citus version as a string */
|
||||
#undef CITUS_VERSION
|
||||
|
||||
/* Citus version as a number */
|
||||
#undef CITUS_VERSION_NUM
|
||||
|
||||
/* A string containing the version number, platform, and C compiler */
|
||||
#undef CITUS_VERSION_STR
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -70,5 +79,8 @@
|
|||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
/* This file is created manually */
|
||||
|
||||
/* Citus full name as a string */
|
||||
#undef CITUS_NAME
|
||||
|
||||
/* Citus edition as a string */
|
||||
#undef CITUS_EDITION
|
||||
|
||||
/* Extension version expected by this Citus build */
|
||||
#undef CITUS_EXTENSIONVERSION
|
||||
|
||||
|
@ -12,5 +18,8 @@
|
|||
/* Citus version as a number */
|
||||
#undef CITUS_VERSION_NUM
|
||||
|
||||
/* A string containing the version number, platform, and C compiler */
|
||||
#undef CITUS_VERSION_STR
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
#undef HAVE_LIBCURL
|
||||
|
|
Loading…
Reference in New Issue