nodist_EXTRA_libcvc4_noinst_la_SOURCES = dummy.cpp
nodist_EXTRA_libcvc4_la_SOURCES = dummy.cpp
libcvc4_noinst_la_SOURCES =
-libcvc4_la_SOURCES =
+libcvc4_la_SOURCES = subversion_versioninfo.cpp
libcvc4_la_LIBADD = \
@builddir@/util/libutil.la \
@builddir@/expr/libexpr.la \
include/cvc4_public.h \
include/cvc4parser_public.h
+subversion_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}'`; \
+ else \
+ issvn=false; \
+ branch=unknown; \
+ rev=0; \
+ mods=false; \
+ fi; \
+ echo "#include \"util/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;"; \
+ ) >"$@"
+svninfo: svninfo.tmp
+ $(AM_V_GEN)diff -q svninfo.tmp svninfo &>/dev/null || mv svninfo.tmp svninfo || true
+# .PHONY ensures it's always rebuilt
+.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
+
install-data-local: $(publicheaders)
$(mkinstalldirs) $(DESTDIR)$(prefix)$(includedir)/cvc4
@for f in $(publicheaders); do \
Command* cmd;
if( options.interactive ) {
InteractiveShell shell(exprMgr, options);
+ Message() << Configuration::getPackageName()
+ << " " << Configuration::getVersionString();
+ if(Configuration::isSubversionBuild()) {
+ Message() << " [subversion " << Configuration::getSubversionBranchName()
+ << " r" << Configuration::getSubversionRevision()
+ << (Configuration::hasSubversionModifications() ?
+ " (with modifications)" : "")
+ << "]";
+ }
+ Message() << (Configuration::isDebugBuild() ? " DEBUG" : "")
+ << " assertions:"
+ << (Configuration::isAssertionBuild() ? "on" : "off")
+ << endl;
if(replayParser != NULL) {
// have the replay parser use the declarations input interactively
replayParser->useDeclarationsFrom(shell.getParser());
return USING_TLS;
}
+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;
+}
+
}/* CVC4 namespace */
/** Private default ctor: Disallow construction of this class */
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;
+
public:
static std::string getName();
static bool isBuiltWithCudd();
static bool isBuiltWithTlsSupport();
-};
+
+ static bool isSubversionBuild();
+ static const char* getSubversionBranchName();
+ static unsigned getSubversionRevision();
+ static bool hasSubversionModifications();
+
+};/* class Configuration */
}/* CVC4 namespace */
fputs(Configuration::about().c_str(), stdout);
printf("\n");
printf("version : %s\n", Configuration::getVersionString().c_str());
+ if(Configuration::isSubversionBuild()) {
+ printf("subversion : yes [%s r%u%s]\n",
+ Configuration::getSubversionBranchName(),
+ Configuration::getSubversionRevision(),
+ Configuration::hasSubversionModifications() ?
+ " (with modifications)" : "");
+ } else {
+ printf("subversion : %s\n", Configuration::isSubversionBuild() ? "yes" : "no");
+ }
printf("\n");
printf("library : %u.%u.%u\n",
Configuration::getVersionMajor(),