From: John Ellson Date: Mon, 7 Oct 2013 20:25:23 +0000 (-0400) Subject: extracting version definitions from configure.ac X-Git-Tag: LAST_LIBGRAPH~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b277fedaaa80dbbdd49f56448a3b540fd0f81a4;p=graphviz extracting version definitions from configure.ac --- diff --git a/.gitignore b/.gitignore index cffcfc37b..10382d70e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ syntax: glob *~ *.o *.a -graphviz*.tar.gz +graphviz*.tar.gz* +rtest*.tar.gz* *.la *.lai *.lo @@ -27,6 +28,7 @@ Doxyfile doxygen INSTALL aclocal.m4 +version.m4 ast_common.h builddate.h stamp-h1 diff --git a/autogen.sh b/autogen.sh index cb6342fbb..bdd1bb206 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,12 +11,33 @@ export LIBTOOLIZE echo "autogen.sh: running: $LIBTOOLIZE --copy --force --ltdl" $LIBTOOLIZE --copy --force --ltdl +# Use "now" if we can't get time of last commit +GRAPHVIZ_VERSION_DATE=$( date -u +%Y%m%d.%H%M ) + +# initialize version for a "stable" build +cat >./version.m4 < unstable series +dnl even => stable series +dnl For the micro number: 0 => in-progress development +dnl timestamp => tar-file snapshot or release +m4_define(graphviz_version_major, 2) +m4_define(graphviz_version_minor, 35) +dnl NB: the next line gets changed to a date/time string for development releases +m4_define(graphviz_version_micro, 0) +m4_define(graphviz_version_date, $GRAPHVIZ_VERSION_DATE) +m4_define(graphviz_collection, "stable") +EOF + autoreconf -v --install --force || exit 1 # ensure config/depcomp exists even if still using automake-1.4 # otherwise "make dist" fails. touch config/depcomp -# don't use any old cache, but create a new one -rm -f config.cache -./configure -C "$@" +# suppress automatic ./configure if there are any args +if test $# -eq 0; then + # don't use any old cache, but create a new one + rm -f config.cache + ./configure -C "$@" +fi diff --git a/configure.ac b/configure.ac index 69a730e03..6b09635bf 100644 --- a/configure.ac +++ b/configure.ac @@ -4,32 +4,32 @@ # Try to use version available on FC8 AC_PREREQ(2.61) -dnl graphviz package version number, (as distinct from shared library version) -dnl For the minor number: odd => unstable series -dnl even => stable series -dnl For the micro number: 0 => in-progress development (from cvs) -dnl timestamp => tar-file snapshot or release -m4_define(graphviz_version_major, 2) -m4_define(graphviz_version_minor, 35) -#NB: the next line gets changed to a date/time string for development releases -m4_define(graphviz_version_micro, 0) +# set: +# graphviz_version_major +# graphviz_version_minor +# graphviz_version_micro +# graphviz_collection +# graphviz_version_date +m4_include(./version.m4) AC_INIT([graphviz],[graphviz_version_major.graphviz_version_minor.graphviz_version_micro],[http://www.graphviz.org/]) GRAPHVIZ_VERSION_MAJOR=graphviz_version_major() GRAPHVIZ_VERSION_MINOR=graphviz_version_minor() GRAPHVIZ_VERSION_MICRO=graphviz_version_micro() -AC_SUBST([GRAPHVIZ_VERSION_MAJOR]) -AC_SUBST([GRAPHVIZ_VERSION_MINOR]) -AC_SUBST([GRAPHVIZ_VERSION_MICRO]) -VERSION_DATE=`date -u +%Y%m%d.%H%M` -AC_SUBST([VERSION_DATE]) +#NB: "stable" or "development" +GRAPHVIZ_COLLECTION=graphviz_collection() -#NB: "stable" on the next line gets changed to "development" when building a development release -GRAPHVIZ_COLLECTION=stable +#NB: date/time of last commit - or "now" +GRAPHVIZ_VERSION_DATE=graphviz_version_date() GRAPHVIZ_SOURCES=graphviz/$GRAPHVIZ_COLLECTION/SOURCES + +AC_SUBST([GRAPHVIZ_VERSION_MAJOR]) +AC_SUBST([GRAPHVIZ_VERSION_MINOR]) +AC_SUBST([GRAPHVIZ_VERSION_MICRO]) +AC_SUBST([GRAPHVIZ_VERSION_DATE]) AC_SUBST([GRAPHVIZ_COLLECTION]) AC_SUBST([GRAPHVIZ_SOURCES]) @@ -192,7 +192,7 @@ DEFAULT_DPI=96 AC_DEFINE_UNQUOTED(DEFAULT_DPI,$DEFAULT_DPI,Default DPI.) AC_DEFINE_UNQUOTED(BROWSER,"$BROWSER",[Command to open a browser on a URL]) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) +AM_INIT_AUTOMAKE([no-define]) # Suppress verbose compile lines m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])