]> granicus.if.org Git - graphviz/commitdiff
extracting version definitions from configure.ac
authorJohn Ellson <ellson@research.att.com>
Mon, 7 Oct 2013 20:25:23 +0000 (16:25 -0400)
committerJohn Ellson <ellson@research.att.com>
Mon, 7 Oct 2013 20:25:23 +0000 (16:25 -0400)
.gitignore
autogen.sh
configure.ac

index cffcfc37bb3a2063f9edcb26c9fe0f2bd56c4828..10382d70e916b7efc68950380efdcda547367726 100644 (file)
@@ -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
index cb6342fbbefa9d2f7639db01fa4e3ffc337ef518..bdd1bb206eb6077a9624db60fc3464bc7f356028 100755 (executable)
@@ -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 <<EOF
+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
+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
index 69a730e03cf00b08d14a887dcc065f65528cc2ed..6b09635bffa6b2ae6ed02cc277803f00427c386d 100644 (file)
@@ -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])])