From 668ea8dfcd13c14ea859a3ee60ffbd33725af91a Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 5 Oct 2009 17:49:39 +0100 Subject: [PATCH] Add the real virt-top version to help display. --- .gitignore | 1 + ChangeLog | 4 ++++ configure.ac | 1 + virt-top/.depend | 8 ++++++-- virt-top/Makefile.in | 6 +++++- virt-top/virt_top.ml | 6 ++++-- virt-top/virt_top_version.ml.in | 22 ++++++++++++++++++++++ 7 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 virt-top/virt_top_version.ml.in diff --git a/.gitignore b/.gitignore index 286658a..0bd598b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ mlvirsh/mlvirsh_gettext.ml virt-ctrl/virt_ctrl_gettext.ml virt-df/virt_df_gettext.ml virt-top/virt_top_gettext.ml +virt-top/virt_top_version.ml po/*.mo po/*.po.bak virt-df/virt_df_lvm2_lexer.ml diff --git a/ChangeLog b/ChangeLog index bf49f1e..955b0a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-10-05 Richard Jones + Version 1.0.4 for release. + + Fix changelog and manifest files. + gitlog-to-changelog: If the date field is empty, don't barf. Added Jim Meyering's gitlog-to-changelog program. diff --git a/configure.ac b/configure.ac index d764d0f..7b698fa 100644 --- a/configure.ac +++ b/configure.ac @@ -218,6 +218,7 @@ AC_CONFIG_FILES([Makefile Make.rules po/Makefile virt-top/Makefile + virt-top/virt_top_version.ml ]) if test "x$MAKENSIS" != "x"; then AC_CONFIG_FILES([wininstaller.nsis]) diff --git a/virt-top/.depend b/virt-top/.depend index 29dc253..b8f78e4 100644 --- a/virt-top/.depend +++ b/virt-top/.depend @@ -10,9 +10,13 @@ virt_top_gettext.cmo: virt_top_gettext.cmx: virt_top_main.cmo: virt_top_gettext.cmo virt_top.cmi virt_top_main.cmx: virt_top_gettext.cmx virt_top.cmx -virt_top.cmo: virt_top_utils.cmi virt_top_gettext.cmo virt_top.cmi -virt_top.cmx: virt_top_utils.cmx virt_top_gettext.cmx virt_top.cmi +virt_top.cmo: virt_top_version.cmo virt_top_utils.cmi virt_top_gettext.cmo \ + virt_top.cmi +virt_top.cmx: virt_top_version.cmx virt_top_utils.cmx virt_top_gettext.cmx \ + virt_top.cmi virt_top_utils.cmo: virt_top_gettext.cmo virt_top_utils.cmi virt_top_utils.cmx: virt_top_gettext.cmx virt_top_utils.cmi +virt_top_version.cmo: +virt_top_version.cmx: virt_top_xml.cmo: virt_top_gettext.cmo virt_top.cmi virt_top_xml.cmx: virt_top_gettext.cmx virt_top.cmx diff --git a/virt-top/Makefile.in b/virt-top/Makefile.in index 2eedf89..64c222e 100755 --- a/virt-top/Makefile.in +++ b/virt-top/Makefile.in @@ -38,7 +38,11 @@ ifeq ($(pkg_gettext),yes) OCAMLCPACKAGES += -package gettext-stub endif -OBJS := virt_top_gettext.cmo virt_top_utils.cmo virt_top.cmo +OBJS := \ + virt_top_version.cmo \ + virt_top_gettext.cmo \ + virt_top_utils.cmo \ + virt_top.cmo ifeq ($(pkg_xml_light),yes) OBJS += virt_top_xml.cmo OCAMLCPACKAGES += -package xml-light diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index 5c7e265..3ad7afc 100644 --- a/virt-top/virt_top.ml +++ b/virt-top/virt_top.ml @@ -1545,8 +1545,10 @@ and show_help (_, _, _, _, _, hostname, (* Banner at the top of the screen. *) let banner = - sprintf (f_ "virt-top %s (libvirt %d.%d.%d) by Red Hat") - Libvirt_version.version libvirt_major libvirt_minor libvirt_release in + sprintf (f_ "virt-top %s ocaml-libvirt %s libvirt %d.%d.%d by Red Hat") + Virt_top_version.version + Libvirt_version.version + libvirt_major libvirt_minor libvirt_release in let banner = pad cols banner in attron A.reverse; mvaddstr 0 0 banner; diff --git a/virt-top/virt_top_version.ml.in b/virt-top/virt_top_version.ml.in new file mode 100644 index 0000000..12d72fb --- /dev/null +++ b/virt-top/virt_top_version.ml.in @@ -0,0 +1,22 @@ +(* 'top'-like tool for libvirt domains. + (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. + http://libvirt.org/ + + 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 this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + This file contains all code which requires CSV support. +*) + +let version = "@PACKAGE_VERSION@" -- 1.8.3.1