[gtk-doc] Generate version.xml from configure
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 30 Aug 2013 23:38:47 +0000 (19:38 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Fri, 30 Aug 2013 23:38:47 +0000 (19:38 -0400)
Even though this is not what autoconf recommends, it reduces doc
rebuilds when version doesn't change but configure changes.

configure.ac
docs/reference/Makefile.am
docs/reference/version.xml.in [new file with mode: 0644]

index 47834c1..c3f57a9 100644 (file)
@@ -398,6 +398,7 @@ test/api/Makefile
 test/shaping/Makefile
 docs/Makefile
 docs/reference/Makefile
+docs/reference/version.xml
 ])
 
 AC_OUTPUT
index 65dabbb..f5309ee 100644 (file)
@@ -1,4 +1,4 @@
-## Process this file with automake to produce Makefile.in
+# Process this file with automake to produce Makefile.in
 
 # We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
@@ -70,12 +70,7 @@ HTML_IMAGES=
 
 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
 # e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files= \
-       version.xml \
-       $(NULL)
-
-version.xml: $(top_srcdir)/configure.ac
-       $(AM_V_GEN) echo $(HB_VERSION_MAJOR).$(HB_VERSION_MINOR).$(HB_VERSION_MICRO) > $@
+content_files= version.xml
 
 # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
 # These files must be listed here *and* in content_files
@@ -98,7 +93,7 @@ include $(top_srcdir)/gtk-doc.make
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
+EXTRA_DIST += version.xml.in
 
 # Files not to distribute
 # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
diff --git a/docs/reference/version.xml.in b/docs/reference/version.xml.in
new file mode 100644 (file)
index 0000000..de213c2
--- /dev/null
@@ -0,0 +1 @@
+@HB_VERSION@