nodist_EXTRA_libcvc4_la_SOURCES = dummy.cpp
libcvc4_la_SOURCES = \
git_versioninfo.cpp \
- svn_versioninfo.cpp \
api/cvc4cpp.h \
api/cvc4cppkind.h \
api/cvc4cpp.cpp \
$(top_builddir)/src/.subdirs
CLEANFILES = \
- svn_versioninfo.cpp \
- svninfo.tmp \
- svninfo \
git_versioninfo.cpp \
gitinfo.tmp \
gitinfo \
theory/type_enumerator_template.cpp \
theory/uf/kinds
-svn_versioninfo.cpp: svninfo
- $(AM_V_GEN)( \
- if test -s svninfo; then \
- issvn=true; \
- branch=`grep '^URL: ' svninfo | sed 's,.*/cvc4/,,'`; \
- rev=`grep '^Revision: ' svninfo | awk '{print$$2}'`; \
- mods=`grep '^Modifications: ' svninfo | awk '{print$$2} END { if(!NR) print "false" }'`; \
- else \
- issvn=false; \
- branch=unknown; \
- rev=0; \
- mods=false; \
- fi; \
- echo "#include \"base/configuration.h\""; \
- echo "const bool ::CVC4::Configuration::IS_SUBVERSION_BUILD = $$issvn;"; \
- echo "const char* const ::CVC4::Configuration::SUBVERSION_BRANCH_NAME = \"$$branch\";"; \
- echo "const unsigned ::CVC4::Configuration::SUBVERSION_REVISION = $$rev;"; \
- echo "const bool ::CVC4::Configuration::SUBVERSION_HAS_MODIFICATIONS = $$mods;"; \
- ) >"$@"
-# This .tmp business is to keep from having to re-compile options.cpp
-# (and then re-link the libraries) if nothing has changed.
-svninfo: svninfo.tmp
- $(AM_V_GEN)if diff -q svninfo.tmp svninfo &>/dev/null; then rm -f svninfo.tmp; else mv svninfo.tmp svninfo; fi
-# .PHONY ensures the .tmp version is always rebuilt (to check for any changes)
-.PHONY: svninfo.tmp
-svninfo.tmp:
- $(AM_V_GEN)(cd "$(top_srcdir)" && svn info && echo "Modifications: `test -z \"\`svn status -q\`\" && echo false || echo true`") >"$@" 2>/dev/null || true
-
git_versioninfo.cpp: gitinfo
$(AM_V_GEN)( \
if test -s gitinfo; then \
ss << "This is CVC4 version " << CVC4_RELEASE_STRING;
if (Configuration::isGitBuild()) {
ss << " [" << Configuration::getGitId() << "]";
- } else if (CVC4::Configuration::isSubversionBuild()) {
- ss << " [" << Configuration::getSubversionId() << "]";
}
ss << "\ncompiled with " << Configuration::getCompiler()
<< "\non " << Configuration::getCompiledDateTime() << "\n\n";
return ss.str();
}
-bool Configuration::isSubversionBuild() {
- return IS_SUBVERSION_BUILD;
-}
-
-const char* Configuration::getSubversionBranchName() {
- return SUBVERSION_BRANCH_NAME;
-}
-
-unsigned Configuration::getSubversionRevision() {
- return SUBVERSION_REVISION;
-}
-
-bool Configuration::hasSubversionModifications() {
- return SUBVERSION_HAS_MODIFICATIONS;
-}
-
-std::string Configuration::getSubversionId() {
- if(! isSubversionBuild()) {
- return "";
- }
-
- stringstream ss;
- ss << "subversion " << getSubversionBranchName() << " r" << getSubversionRevision()
- << ( ::CVC4::Configuration::hasSubversionModifications() ? " (with modifications)" : "" );
- return ss.str();
-}
-
std::string Configuration::getCompiler() {
stringstream ss;
#ifdef __GNUC__
Configuration();
// these constants are filled in by the build system
- static const bool IS_SUBVERSION_BUILD;
- static const char* const SUBVERSION_BRANCH_NAME;
- static const unsigned SUBVERSION_REVISION;
- static const bool SUBVERSION_HAS_MODIFICATIONS;
static const bool IS_GIT_BUILD;
static const char* const GIT_BRANCH_NAME;
static const char* const GIT_COMMIT;
static bool hasGitModifications();
static std::string getGitId();
- static bool isSubversionBuild();
- static const char* getSubversionBranchName();
- static unsigned getSubversionRevision();
- static bool hasSubversionModifications();
- static std::string getSubversionId();
-
static std::string getCompiler();
static std::string getCompiledDateTime();
<< " " << Configuration::getVersionString();
if(Configuration::isGitBuild()) {
Message() << " [" << Configuration::getGitId() << "]";
- } else if(Configuration::isSubversionBuild()) {
- Message() << " [" << Configuration::getSubversionId() << "]";
}
Message() << (Configuration::isDebugBuild() ? " DEBUG" : "")
<< " assertions:"
<< (Configuration::hasGitModifications() ? " (with modifications)" : "")
<< "]";
print_config("scm", ss.str());
- } else if(Configuration::isSubversionBuild()) {
- std::stringstream ss;
- ss << "svn ["
- << Configuration::getSubversionBranchName() << " r"
- << Configuration::getSubversionRevision()
- << (Configuration::hasSubversionModifications()
- ? " (with modifications)" : "")
- << "]";
- print_config("scm", ss.str());
} else {
print_config_cond("scm", false);
}