summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-04-22 18:44:16 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2013-04-22 21:03:36 +0200
commitf2ab93da0ee69231245263e83917e8716b8449b6 (patch)
treedfe90a243f8d1f4b3e5c84416c1019b35dda96d8
parent2f1e780624e9f5fa207787cdef559ffe237b8b6f (diff)
Automatically set min versions in README
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.
-rw-r--r--Makefile.am1
-rw-r--r--README.in (renamed from README)4
-rwxr-xr-xautogen.sh4
-rw-r--r--configure.ac5
4 files changed, 12 insertions, 2 deletions
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
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 b4b8441..363221c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,10 @@ LIBVIRT_GCONFIG_REQUIRED=0.0.9
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