Commit 4ffb0744 authored by Karl Wette's avatar Karl Wette

Move build info (configure args/date, build date) to source files

- Having LAL..._CONFIGURE_ARGS in config headers clobbers compiler caches
  (e.g. ccache) every time LALSuite is re-configured, requiring a full
  rebuild. Moving this symbol to a source file ensures that only that file
  will need to be re-built on re-configuration.
- Requires disabling some version testing code in LALVersionTest and
  makefakedata_v2, which rely on LAL..._CONFIGURE_ARGS being defined in
  headers and source files. These version tests should be superceded by
  VCS info version checks.
- Each LAL library (and LALApps) now has a LAL...BuildInfo.h header which
  defines lal...ConfigureArgs, lal...ConfigureDate, and lal...BuildDate.
  These symbols are defined in a generated LAL...BuildInfo.c source file.
- Refs #1140
Original: 27e15b218b2e498addcbd709a0020bbc7e16d853
parent 58dceaf4
# -*- mode: autoconf; -*-
# lalsuite_build.m4 - top level build macros
#
# serial 77
# serial 78
# not present in older versions of pkg.m4
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
......@@ -229,6 +229,27 @@ AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[
AC_SUBST(GENERATE_VCS_INFO)
])
AC_DEFUN([LALSUITE_VERSION_CONFIGURE_INFO],[
# $0: define version/configure info
m4_pushdef([uppercase],m4_translit(AC_PACKAGE_NAME, [a-z], [A-Z]))
version_major=`echo "$VERSION" | cut -d. -f1`
version_minor=`echo "$VERSION" | cut -d. -f2`
version_micro=`echo "$VERSION" | cut -d. -f3`
version_devel=`echo "$VERSION" | cut -d. -f4-`
test -z "$version_micro" && version_micro=0
test -z "$version_devel" && version_devel=0
configure_date=`date +"%Y-%m-%dT%H:%M:%S%z"`
AC_DEFINE_UNQUOTED(uppercase[_VERSION],["$VERSION"],AC_PACKAGE_NAME[ Version])
AC_DEFINE_UNQUOTED(uppercase[_VERSION_MAJOR],[$version_major],AC_PACKAGE_NAME[ Version Major Number])
AC_DEFINE_UNQUOTED(uppercase[_VERSION_MINOR],[$version_minor],AC_PACKAGE_NAME[ Version Minor Number])
AC_DEFINE_UNQUOTED(uppercase[_VERSION_MICRO],[$version_micro],AC_PACKAGE_NAME[ Version Micro Number])
AC_DEFINE_UNQUOTED(uppercase[_VERSION_DEVEL],[$version_devel],AC_PACKAGE_NAME[ Version Devel Number])
AC_SUBST([ac_configure_args])
AC_SUBST([configure_date])
m4_popdef([uppercase])
# end $0
])
AC_DEFUN([LALSUITE_REQUIRE_CXX],[
# require a C++ compiler
lalsuite_require_cxx=true
......
......@@ -37,7 +37,7 @@ include/stamp-h1
lal-*.tar.gz
lal.spec
lib/lal/.vcsinfo
lib/lal/LALBuildDate.c
lib/lal/LALBuildInfo.c
lib/lal/LALVCSInfo.h
lib/lal/git_info.sed
lib/lal/git_version
......
......@@ -152,21 +152,8 @@ LALSUITE_ENABLE_NIGHTLY
# enable SWIG wrapping modules
LALSUITE_ENABLE_SWIG
# get version
lal_version_major=`echo "$VERSION" | cut -d. -f1`
lal_version_minor=`echo "$VERSION" | cut -d. -f2`
lal_version_micro=`echo "$VERSION" | cut -d. -f3`
lal_version_devel=`echo "$VERSION" | cut -d. -f4-`
test -z "$lal_version_micro" && lal_version_micro=0
test -z "$lal_version_devel" && lal_version_devel=0
lal_configure_date=`date +"%Y-%m-%dT%H:%M:%S%z"`
AC_DEFINE_UNQUOTED([LAL_VERSION],["$VERSION"],[LAL Version])
AC_DEFINE_UNQUOTED([LAL_VERSION_MAJOR],[$lal_version_major],[LAL Version Major Number])
AC_DEFINE_UNQUOTED([LAL_VERSION_MINOR],[$lal_version_minor],[LAL Version Minor Number])
AC_DEFINE_UNQUOTED([LAL_VERSION_MICRO],[$lal_version_micro],[LAL Version Micro Number])
AC_DEFINE_UNQUOTED([LAL_VERSION_DEVEL],[$lal_version_devel],[LAL Version Devel Number])
AC_DEFINE_UNQUOTED([LAL_CONFIGURE_ARGS],["$ac_configure_args"],[LAL Configure Arguments])
AC_DEFINE_UNQUOTED([LAL_CONFIGURE_DATE],["$lal_configure_date"],[LAL Configure Date])
# define version/configure info
LALSUITE_VERSION_CONFIGURE_INFO
# workaround broken libtool multilib support on sl6
LALSUITE_MULTILIB_LIBTOOL_HACK
......
......@@ -16,12 +16,6 @@
/* LAL Version Devel Number */
#undef LAL_VERSION_DEVEL
/* LAL Configure Arguments */
#undef LAL_CONFIGURE_ARGS
/* LAL Configure Date */
#undef LAL_CONFIGURE_DATE
/* Suppress debugging code */
#undef LAL_NDEBUG
......
/*
* LALBuildInfo.h - LAL Build Information Header
*
* 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
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright (C) 2013 Karl Wette
*/
#ifndef _LALBUILDINFO_H
#define _LALBUILDINFO_H
#ifdef __cplusplus
extern "C" {
#endif
/* configure arguments */
extern const char *const lalConfigureArgs;
/* configure date */
extern const char *const lalConfigureDate;
/* build date */
extern const char *const lalBuildDate;
#ifdef __cplusplus
}
#endif
#endif /* _LALBUILDINFO_H */
......@@ -5,12 +5,13 @@ lib_LTLIBRARIES = liblal.la
pkginclude_HEADERS = \
LALLibVCSInfo.h \
LALBuildInfo.h \
LALVCSInfo.h
liblal_la_SOURCES = \
LALEmpty.c \
LALVCSInfo.c
nodist_liblal_la_SOURCES = LALBuildDate.c
nodist_liblal_la_SOURCES = LALBuildInfo.c
liblal_la_DEPENDENCIES = \
$(top_builddir)/packages/std/src/libstd.la \
$(top_builddir)/packages/tools/src/libtools.la \
......@@ -31,7 +32,7 @@ bin_PROGRAMS = lal-version
lal_version_SOURCES = lal-version.c
lal_version_LDADD = liblal.la
CLEANFILES = \
MOSTLYCLEANFILES = \
lal-user-env.shell \
lal-user-env.sh \
lal-user-env.csh
......@@ -44,13 +45,8 @@ BUILT_SOURCES = \
lal-user-env.sh \
lal-user-env.csh
MOSTLYCLEANFILES = LALBuildDate.c
TESTS = lal-version
LALBuildDate.c: $(liblal_la_DEPENDENCIES)
$(AM_V_GEN)echo 'const char *lalBuildDate = "'`date +"%Y-%m-%dT%H:%M:%S%z"`'";' >$@
lal-user-env.shell: Makefile $(srcdir)/generate_user_env.awk
@echo "# source this file to access $(PACKAGE_NAME)" >$@
@echo "set LAL_PREFIX $(prefix)" >>$@
......@@ -72,6 +68,14 @@ gen-LALVCSInfo.h :
$(AM_V_at)$(GENERATE_VCS_INFO) LALVCSInfo.h $(srcdir)/LALVCSInfo.h.git
endif
MOSTLYCLEANFILES += LALBuildInfo.c
LALBuildInfo.c: Makefile $(liblal_la_DEPENDENCIES)
$(AM_V_GEN)echo '/* $@: generated by Makefile */' >$@; \
echo 'const char *const lalConfigureArgs = "'"$(ac_configure_args)"'";' >>$@; \
echo 'const char *const lalConfigureDate = "'"$(configure_date)"'";' >>$@; \
echo 'const char *const lalBuildDate = "'`date +"%Y-%m-%dT%H:%M:%S%z"`'";' >>$@
all-local: include-link
include-link: $(pkginclude_HEADERS)
@INCLUDEMKFILE@
......
......@@ -57,24 +57,14 @@ int main( void )
char msg[16384];
int verbose = 1;
if ( strcmp( LAL_VERSION, lalVersion ) ||
strcmp( LAL_CONFIGURE_ARGS, lalConfigureArgs ) ||
strcmp( LAL_CONFIGURE_DATE, lalConfigureDate ) )
if ( strcmp( LAL_VERSION, lalVersion ) )
{
fputs( "LAL Version Mismatch!\n\n", stderr );
fputs( "Header Version ", stderr );
fputs( LAL_VERSION, stderr );
fputs( "\nCompiled on ", stderr );
fputs( LAL_CONFIGURE_DATE, stderr );
fputs( "\nWith arguments ", stderr );
fputs( LAL_CONFIGURE_ARGS, stderr );
fputs( "\n\n", stderr );
fputs( "Library Version ", stderr );
fputs( lalVersion, stderr );
fputs( "\nCompiled on ", stderr );
fputs( lalConfigureDate, stderr );
fputs( "\nWith arguments ", stderr );
fputs( lalConfigureArgs, stderr );
fputs( "\n", stderr );
return 1;
}
......
......@@ -74,9 +74,6 @@ extern const int lalVersionMajor;
extern const int lalVersionMinor;
extern const int lalVersionMicro;
extern const int lalVersionDevel;
extern const char *const lalBuildDate;
extern const char *const lalConfigureArgs;
extern const char *const lalConfigureDate;
void LALVersion(LALStatus * status, CHAR * message, UINT4 size,
......
......@@ -30,14 +30,13 @@
#include <lal/LALStdio.h>
#include <lal/LALVersion.h>
#include <lal/LALVCSInfo.h>
#include <lal/LALBuildInfo.h>
const char *const lalVersion = LAL_VERSION;
const int lalVersionMajor = LAL_VERSION_MAJOR;
const int lalVersionMinor = LAL_VERSION_MINOR;
const int lalVersionMicro = LAL_VERSION_MICRO;
const int lalVersionDevel = LAL_VERSION_DEVEL;
const char *const lalConfigureArgs = LAL_CONFIGURE_ARGS;
const char *const lalConfigureDate = LAL_CONFIGURE_DATE;
/**
* \ingroup LALVersion_h
......
......@@ -62,24 +62,14 @@ int main( void )
int verbose = 1;
if ( strcmp( LAL_VERSION, lalVersion ) ||
strcmp( LAL_CONFIGURE_ARGS, lalConfigureArgs ) ||
strcmp( LAL_CONFIGURE_DATE, lalConfigureDate ) )
if ( strcmp( LAL_VERSION, lalVersion ) )
{
fputs( "LAL Version Mismatch!\n\n", stderr );
fputs( "Header Version ", stderr );
fputs( LAL_VERSION, stderr );
fputs( "\nCompiled on ", stderr );
fputs( LAL_CONFIGURE_DATE, stderr );
fputs( "\nWith arguments ", stderr );
fputs( LAL_CONFIGURE_ARGS, stderr );
fputs( "\n\n", stderr );
fputs( "Library Version ", stderr );
fputs( lalVersion, stderr );
fputs( "\nCompiled on ", stderr );
fputs( lalConfigureDate, stderr );
fputs( "\nWith arguments ", stderr );
fputs( lalConfigureArgs, stderr );
fputs( "\n", stderr );
return 1;
}
......
......@@ -131,6 +131,7 @@ src/inspiral/posterior/lalinference_bambi
src/inspiral/posterior/lalinference_pipe
src/inspiral/posterior/python_config.sed
src/inspiral/ssipe_config.sed
src/lalapps/LALAppsBuildInfo.c
src/lalapps/LALAppsVCSInfo.h
src/lalapps/git_version.py
src/lalapps/lalapps-user-env.csh
......
......@@ -86,27 +86,8 @@ LALSUITE_ENABLE_LALPULSAR
LALSUITE_ENABLE_LALINFERENCE
LALSUITE_ENABLE_LALSTOCHASTIC
# put version/configure info in config header
lalapps_version_major=`echo "$VERSION" | cut -d. -f1`
lalapps_version_minor=`echo "$VERSION" | cut -d. -f2`
lalapps_version_micro=`echo "$VERSION" | cut -d. -f3`
lalapps_version_devel=`echo "$VERSION" | cut -d. -f4-`
test -z "$lalapps_version_micro" && lalapps_version_micro=0
test -z "$lalapps_version_devel" && lalapps_version_devel=0
lalapps_configure_date=`date +"%Y-%m-%dT%H:%M:%S%z"`
AC_DEFINE_UNQUOTED([LALAPPS_VERSION],["$VERSION"],[LALApps Version])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MAJOR],[$lalapps_version_major],
[LALApps Version Major Number])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MINOR],[$lalapps_version_minor],
[LALApps Version Minor Number])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MICRO],[$lalapps_version_micro],
[LALApps Version Micro Number])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_DEVEL],[$lalapps_version_devel],
[LALApps Version Devel Number])
AC_DEFINE_UNQUOTED([LALAPPS_CONFIGURE_ARGS],["$ac_configure_args"],
[LALApps Configure Arguments])
AC_DEFINE_UNQUOTED([LALAPPS_CONFIGURE_DATE],["$lalapps_configure_date"],
[LALApps Configure Date])
# define version/configure info
LALSUITE_VERSION_CONFIGURE_INFO
# workaround broken libtool multilib support on sl6
LALSUITE_MULTILIB_LIBTOOL_HACK
......
......@@ -78,6 +78,7 @@ int main(void) {fputs("disabled, no gsl or no lal frame library support.\n", std
#include <lal/FrequencySeries.h>
#include <lal/LALVCSInfo.h>
#include <lalapps.h>
#include <LALAppsBuildInfo.h>
#include <LALAppsVCSInfo.h>
extern char *optarg;
......@@ -324,12 +325,12 @@ int WriteFrame(int argc,char *argv[],struct CommandLineArgsTag CLA)
/* Add lalapps info */
snprintf( lalappsconfargs, sizeof( lalappsconfargs), "LALApps Info:\n LALApps Version: %s\n Git Tag: %s\n Git ID: %s\n Configure Date: %s\n Configure Arguments: %s",
LALAPPS_VERSION , lalAppsVCSInfo.vcsTag, lalAppsVCSInfo.vcsId, LALAPPS_CONFIGURE_DATE , LALAPPS_CONFIGURE_ARGS );
LALAPPS_VERSION , lalAppsVCSInfo.vcsTag, lalAppsVCSInfo.vcsId, lalAppsConfigureDate, lalAppsConfigureArgs );
XLALFrameAddFrHistory( frame, __FILE__, lalappsconfargs);
/* Add lal info */
snprintf( lalconfargs, sizeof( lalconfargs), "LAL Info:\n LAL Version: %s\n Git Tag: %s\n Git ID: %s\n Configure Date: %s\n Configure Arguments: %s",
LAL_VERSION , lalHeaderVCSInfo.vcsTag, lalHeaderVCSInfo.vcsId, LAL_CONFIGURE_DATE , LAL_CONFIGURE_ARGS );
LAL_VERSION , lalHeaderVCSInfo.vcsTag, lalHeaderVCSInfo.vcsId, lalAppsConfigureDate, lalAppsConfigureArgs );
XLALFrameAddFrHistory( frame, __FILE__, lalconfargs);
/* Create string with all command line arguments and add it to history */
......
/*
* LALAppsBuildInfo.h - LALApps Build Information Header
*
* 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
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright (C) 2013 Karl Wette
*/
#ifndef _LALAPPSBUILDINFO_H
#define _LALAPPSBUILDINFO_H
#ifdef __cplusplus
extern "C" {
#endif
/* configure arguments */
extern const char *const lalAppsConfigureArgs;
/* configure date */
extern const char *const lalAppsConfigureDate;
/* build date */
extern const char *const lalAppsBuildDate;
#ifdef __cplusplus
}
#endif
#endif /* _LALAPPSBUILDINFO_H */
......@@ -31,10 +31,12 @@ liblalapps_la_SOURCES = \
getopt.c \
getopt1.c \
getopt.h \
LALAppsBuildInfo.h \
LALAppsVCSInfo.c \
LALAppsVCSInfo.h \
$(FRAMESRCS) \
$(LALMETAIOSRCS)
nodist_liblalapps_la_SOURCES = LALAppsBuildInfo.c
bin_PROGRAMS = \
lalapps_version \
......@@ -127,3 +129,11 @@ gen-git_version.py :
endif
TESTS = lalapps_version
MOSTLYCLEANFILES += LALAppsBuildInfo.c
LALAppsBuildInfo.c: Makefile $(liblalapps_la_DEPENDENCIES)
$(AM_V_GEN)echo '/* $@: generated by Makefile */' >$@; \
echo 'const char *const lalAppsConfigureArgs = "'"$(ac_configure_args)"'";' >>$@; \
echo 'const char *const lalAppsConfigureDate = "'"$(configure_date)"'";' >>$@; \
echo 'const char *const lalAppsBuildDate = "'`date +"%Y-%m-%dT%H:%M:%S%z"`'";' >>$@
......@@ -26,51 +26,62 @@
#include <lalapps.h>
#include <lal/LALMalloc.h>
#include <lal/LALStatusMacros.h>
#include <lal/LALBuildInfo.h>
#include <lal/LALVCSInfo.h>
#include <LALAppsBuildInfo.h>
#include <LALAppsVCSInfo.h>
#ifdef HAVE_LIBLALFRAME
#include <lal/LALFrameConfig.h>
#include <lal/LALFrameBuildInfo.h>
#include <lal/LALFrameVCSInfo.h>
#endif
#ifdef HAVE_LIBLALMETAIO
#include <lal/LALMetaIOConfig.h>
#include <lal/LALMetaIOBuildInfo.h>
#include <lal/LALMetaIOVCSInfo.h>
#endif
#ifdef HAVE_LIBLALXML
#include <lal/LALXMLConfig.h>
#include <lal/LALXMLBuildInfo.h>
#include <lal/LALXMLVCSInfo.h>
#endif
#ifdef HAVE_LIBLALSIMULATION
#include <lal/LALSimulationConfig.h>
#include <lal/LALSimulationBuildInfo.h>
#include <lal/LALSimulationVCSInfo.h>
#endif
#ifdef HAVE_LIBLALBURST
#include <lal/LALBurstConfig.h>
#include <lal/LALBurstBuildInfo.h>
#include <lal/LALBurstVCSInfo.h>
#endif
#ifdef HAVE_LIBLALINSPIRAL
#include <lal/LALInspiralConfig.h>
#include <lal/LALInspiralBuildInfo.h>
#include <lal/LALInspiralVCSInfo.h>
#endif
#ifdef HAVE_LIBLALPULSAR
#include <lal/LALPulsarConfig.h>
#include <lal/LALPulsarBuildInfo.h>
#include <lal/LALPulsarVCSInfo.h>
#endif
#ifdef HAVE_LIBLALINFERENCE
#include <lal/LALInferenceConfig.h>
#include <lal/LALInferenceBuildInfo.h>
#include <lal/LALInferenceVCSInfo.h>
#endif
#ifdef HAVE_LIBLALSTOCHASTIC
#include <lal/LALStochasticConfig.h>
#include <lal/LALStochasticBuildInfo.h>
#include <lal/LALStochasticVCSInfo.h>
#endif
......@@ -422,8 +433,8 @@ XLALGetVersionString( int level )
lalVCSInfo.vcsBranch,
lalVCSInfo.vcsTag,
lalVCSInfo.vcsStatus,
LAL_CONFIGURE_DATE ,
LAL_CONFIGURE_ARGS );
lalConfigureDate ,
lalConfigureArgs );
#ifdef HAVE_LIBLALFRAME
/* get lalframe info */
......@@ -442,8 +453,8 @@ XLALGetVersionString( int level )
lalFrameVCSInfo.vcsBranch,
lalFrameVCSInfo.vcsTag,
lalFrameVCSInfo.vcsStatus,
LALFRAME_CONFIGURE_DATE ,
LALFRAME_CONFIGURE_ARGS );
lalFrameConfigureDate ,
lalFrameConfigureArgs );
#endif
#ifdef HAVE_LIBLALMETAIO
......@@ -463,8 +474,8 @@ XLALGetVersionString( int level )
lalMetaIOVCSInfo.vcsBranch,
lalMetaIOVCSInfo.vcsTag,
lalMetaIOVCSInfo.vcsStatus,
LALMETAIO_CONFIGURE_DATE ,
LALMETAIO_CONFIGURE_ARGS );
lalMetaIOConfigureDate ,
lalMetaIOConfigureArgs );
#endif
#ifdef HAVE_LIBLALXML
......@@ -484,8 +495,8 @@ XLALGetVersionString( int level )
lalXMLVCSInfo.vcsBranch,
lalXMLVCSInfo.vcsTag,
lalXMLVCSInfo.vcsStatus,
LALXML_CONFIGURE_DATE ,
LALXML_CONFIGURE_ARGS );
lalXMLConfigureDate ,
lalXMLConfigureArgs );
#endif
#ifdef HAVE_LIBLALSIMULATION
......@@ -505,8 +516,8 @@ XLALGetVersionString( int level )
lalSimulationVCSInfo.vcsBranch,
lalSimulationVCSInfo.vcsTag,
lalSimulationVCSInfo.vcsStatus,
LALSIMULATION_CONFIGURE_DATE ,
LALSIMULATION_CONFIGURE_ARGS );
lalSimulationConfigureDate ,
lalSimulationConfigureArgs );
#endif
#ifdef HAVE_LIBLALBURST
......@@ -526,8 +537,8 @@ XLALGetVersionString( int level )
lalBurstVCSInfo.vcsBranch,
lalBurstVCSInfo.vcsTag,
lalBurstVCSInfo.vcsStatus,
LALBURST_CONFIGURE_DATE ,
LALBURST_CONFIGURE_ARGS );
lalBurstConfigureDate ,
lalBurstConfigureArgs );
#endif
#ifdef HAVE_LIBLALINSIRAL
......@@ -547,8 +558,8 @@ XLALGetVersionString( int level )
lalInspiralVCSInfo.vcsBranch,
lalInspiralVCSInfo.vcsTag,
lalInspiralVCSInfo.vcsStatus,
LALINSPIRAL_CONFIGURE_DATE ,
LALINSPIRAL_CONFIGURE_ARGS );
lalInspiralConfigureDate ,
lalInspiralConfigureArgs );
#endif
#ifdef HAVE_LIBLALPULSAR
......@@ -568,8 +579,8 @@ XLALGetVersionString( int level )
lalPulsarVCSInfo.vcsBranch,
lalPulsarVCSInfo.vcsTag,
lalPulsarVCSInfo.vcsStatus,
LALPULSAR_CONFIGURE_DATE ,
LALPULSAR_CONFIGURE_ARGS );
lalPulsarConfigureDate ,
lalPulsarConfigureArgs );
#endif
#ifdef HAVE_LIBLALINFERENCE
......@@ -589,8 +600,8 @@ XLALGetVersionString( int level )
lalInferenceVCSInfo.vcsBranch,
lalInferenceVCSInfo.vcsTag,
lalInferenceVCSInfo.vcsStatus,
LALINFERENCE_CONFIGURE_DATE ,
LALINFERENCE_CONFIGURE_ARGS );
lalInferenceConfigureDate ,
lalInferenceConfigureArgs );
#endif
#ifdef HAVE_LIBLALSTOCHASTIC
......@@ -610,8 +621,8 @@ XLALGetVersionString( int level )
lalStochasticVCSInfo.vcsBranch,
lalStochasticVCSInfo.vcsTag,
lalStochasticVCSInfo.vcsStatus,
LALSTOCHASTIC_CONFIGURE_DATE ,
LALSTOCHASTIC_CONFIGURE_ARGS );
lalStochasticConfigureDate ,
lalStochasticConfigureArgs );
#endif
/* add lalapps info */
......@@ -630,8 +641,8 @@ XLALGetVersionString( int level )
lalAppsVCSInfo.vcsBranch,
lalAppsVCSInfo.vcsTag,
lalAppsVCSInfo.vcsStatus,
LALAPPS_CONFIGURE_DATE ,
LALAPPS_CONFIGURE_ARGS );
lalAppsConfigureDate ,
lalAppsConfigureArgs );
break;
}
......
......@@ -394,16 +394,14 @@ int main(int argc,char *argv[]) {
/* check that LAL header and library versions are consistent */
if (
strcmp(lalVersion,LAL_VERSION) ||
strcmp(lalConfigureArgs,LAL_CONFIGURE_ARGS) ||
strcmp(lalConfigureDate,LAL_CONFIGURE_DATE) ||
fabs(lalVersionMajor-LAL_VERSION_MAJOR)>1.e-3 ||
fabs(lalVersionMinor-LAL_VERSION_MINOR)>1.e-3
) {
error( "Mismatch between compile time header versions and run-time library version:\n");
error( "LAL Version: %s\nMajor Version: %d\nMinor Version: %d\nConfig Args: %s\nBuild Date: %s\n",
lalVersion,lalVersionMajor,lalVersionMinor,lalConfigureArgs,lalConfigureDate);
error( "LAL Headers: %s\nMajor Version: %d\nMinor Version: %d\nConfig Args: %s\nBuild Date: %s\n",
LAL_VERSION, LAL_VERSION_MAJOR, LAL_VERSION_MINOR, LAL_CONFIGURE_ARGS, LAL_CONFIGURE_DATE);
error( "LAL Version: %s\nMajor Version: %d\nMinor Version: %d\n",
lalVersion,lalVersionMajor,lalVersionMinor);
error( "LAL Headers: %s\nMajor Version: %d\nMinor Version: %d\n",
LAL_VERSION, LAL_VERSION_MAJOR, LAL_VERSION_MINOR);
exit(1);
}
......
......@@ -404,16 +404,14 @@ int main(int argc,char *argv[]) {
/* check that LAL header and library versions are consistent */
if (
strcmp(lalVersion,LAL_VERSION) ||
strcmp(lalConfigureArgs,LAL_CONFIGURE_ARGS) ||
strcmp(lalConfigureDate,LAL_CONFIGURE_DATE) ||
fabs(lalVersionMajor-LAL_VERSION_MAJOR)>1.e-3 ||
fabs(lalVersionMinor-LAL_VERSION_MINOR)>1.e-3
) {
error( "Mismatch between compile time header versions and run-time library version:\n");
error( "LAL Version: %s\nMajor Version: %d\nMinor Version: %d\nConfig Args: %s\nBuild Date: %s\n",
lalVersion,lalVersionMajor,lalVersionMinor,lalConfigureArgs,lalConfigureDate);
error( "LAL Headers: %s\nMajor Version: %d\nMinor Version: %d\nConfig Args: %s\nBuild Date: %s\n",
LAL_VERSION, LAL_VERSION_MAJOR, LAL_VERSION_MINOR, LAL_CONFIGURE_ARGS, LAL_CONFIGURE_DATE);
error( "LAL Version: %s\nMajor Version: %d\nMinor Version: %d\n",
lalVersion,lalVersionMajor,lalVersionMinor);
error( "LAL Headers: %s\nMajor Version: %d\nMinor Version: %d\n",
LAL_VERSION, LAL_VERSION_MAJOR, LAL_VERSION_MINOR);
exit(1);
}
......
......@@ -14,6 +14,7 @@ libtool
python/__init__.py
python/git_version.py
src/LALBurstConfig.h
src/LALBurstBuildInfo.c
src/LALBurstVCSInfo.h
src/config.h
src/config.h.in
......
......@@ -56,27 +56,8 @@ LALSUITE_ENABLE_GCC_FLAGS
# enable SWIG wrapping modules
LALSUITE_ENABLE_SWIG
# put version/configure info in config header
lalburst_version_major=`echo "$VERSION" | cut -d. -f1`
lalburst_version_minor=`echo "$VERSION" | cut -d. -f2`
lalburst_version_micro=`echo "$VERSION" | cut -d. -f3`
lalburst_version_devel=`echo "$VERSION" | cut -d. -f4-`
test -z "$lalburst_version_micro" && lalburst_version_micro=0
test -z "$lalburst_version_devel" && lalburst_version_devel=0