[libvirt-designer 2/3] Automatically set min versions in README

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Minimum libvirt-gconfig and libosinfo versions appear in both
README and configure.ac, which means they easily get out of sync.
This commit renames README to README.in so that we can substitute
the configure.ac version in the README file. This way they are always
in sync.
---
 Makefile.am         | 1 +
 README => README.in | 4 ++--
 autogen.sh          | 4 ++++
 configure.ac        | 5 +++++
 4 files changed, 12 insertions(+), 2 deletions(-)
 rename README => README.in (93%)

diff --git a/Makefile.am b/Makefile.am
index b928f83..9ef319a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,7 @@ EXTRA_DIST = \
 	$(PACKAGE).spec \
 	$(pkgconfig_DATA:%.pc=%.pc.in) \
 	AUTHORS.in \
+	README.in \
 	$(NULL)
 
 DISTCLEAN_FILES = $(PACKAGE).spec $(pkgconfig_DATA)
diff --git a/README b/README.in
similarity index 93%
rename from README
rename to README.in
index b7ca356..2fd8090 100644
--- a/README
+++ b/README.in
@@ -27,8 +27,8 @@ Or to install into a private user specific location
 The following mandatory dependencies are required in order to
 build libvirt-designer
 
-  libvirt-gconfig  >= 0.1.3  (part of libvirt-glib project releases)
-  libosinfo        >= 0.0.5
+  libvirt-gconfig  >= @LIBVIRT_GCONFIG_REQUIRED@ (part of libvirt-glib project releases)
+  libosinfo        >= @LIBOSINFO_REQUIRED@
 
 
 Communication
diff --git a/autogen.sh b/autogen.sh
index 9a0c976..72ce2c0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -41,6 +41,10 @@ fi
 # exists at all times :-(
 touch ChangeLog AUTHORS
 
+# README is auto-generated from README.in at configure time,
+# but automake requires that it exists at autogen.sh time
+touch README
+
 mkdir -p build-aux
 libtoolize --copy --force
 aclocal -I m4
diff --git a/configure.ac b/configure.ac
index 89128d3..7167cd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,10 @@ LIBVIRT_GCONFIG_REQUIRED=0.1.7
 LIBVIRT_GOBJECT_REQUIRED=0.1.3
 GOBJECT_INTROSPECTION_REQUIRED=0.10.8
 
+# for proper substitution in README.in
+AC_SUBST(LIBOSINFO_REQUIRED)
+AC_SUBST(LIBVIRT_GCONFIG_REQUIRED)
+
 LIBVIRT_DESIGNER_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
 LIBVIRT_DESIGNER_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
 LIBVIRT_DESIGNER_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
@@ -145,6 +149,7 @@ fi
 AM_CONDITIONAL([WITH_VALA], [test "x$enable_vala" = "xyes"])
 
 AC_OUTPUT(Makefile
+          README
           libvirt-designer/Makefile
           libvirt-designer.spec
           libvirt-designer-1.0.pc
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]