Remove CHANGES preprocessing, as it didn't work with VPATH builds
authorPetri Lehtinen <petri@digip.org>
Thu, 21 Jan 2010 18:53:05 +0000 (20:53 +0200)
committerPetri Lehtinen <petri@digip.org>
Thu, 21 Jan 2010 18:53:05 +0000 (20:53 +0200)
The problem is that Sphinx can only read input files from a single
directory. In VPATH builds, the source and build trees are separate,
and the changes.rst went into the build tree.

This patch solves the issue by using cfunc as the Sphinx default role.

CHANGES
doc/.gitignore
doc/Makefile.am
doc/changes.rst [moved from doc/changes.rst.in with 70% similarity]
doc/conf.py

diff --git a/CHANGES b/CHANGES
index bd87659..4bba484 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,13 +3,13 @@ Version 1.2 (in development)
 
 * New functions:
 
-  - ``json_equal()``: Test whether two JSON values are equal
-  - ``json_copy()`` and ``json_deep_copy()``: Make shallow and deep
-    copies of JSON values
+  - `json_equal()`: Test whether two JSON values are equal
+  - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
+    of JSON values
   - Add a version of all functions taking a string argument that
-    doesn't check for valid UTF-8: ``json_string_nocheck()``,
-    ``json_string_set_nocheck()``, ``json_object_set_nocheck()``,
-    ``json_object_set_new_nocheck()``
+    doesn't check for valid UTF-8: `json_string_nocheck()`,
+    `json_string_set_nocheck()`, `json_object_set_nocheck()`,
+    `json_object_set_new_nocheck()`
 
 * New encoding flags:
 
@@ -23,8 +23,7 @@ Version 1.2 (in development)
   - Revise and unify whitespace usage in encoder: Add spaces between
     array and object items, never append newline to output.
   - Remove const qualifier from the ``json_t`` parameter in
-    ``json_string_set()``, ``json_integer_set()`` and
-    ``json_real_set``.
+    `json_string_set()`, `json_integer_set()` and `json_real_set`.
   - Use ``int32_t`` internally for representing Unicode code points
     (int is not enough on all platforms)
 
@@ -54,7 +53,7 @@ Version 1.1.2
 Released 2009-11-08
 
 * Fix a bug where an error message was not produced if the input file
-  could not be opened in ``json_load_file()``
+  could not be opened in `json_load_file()`
 * Fix an assertion failure in decoder caused by a minus sign without a
   digit after it
 * Remove an unneeded include of ``stdint.h`` in ``jansson.h``
@@ -131,7 +130,7 @@ Version 1.0.1
 
 Released 2009-09-04
 
-* Fixed broken ``json_is_boolean()``
+* Fixed broken `json_is_boolean()`
 
 
 Version 1.0
index 3152c88..69fa449 100644 (file)
@@ -1,2 +1 @@
 _build/
-changes.rst
index e0dbe15..1a3f560 100644 (file)
@@ -1,19 +1,10 @@
-EXTRA_DIST = \
-       conf.py apiref.rst gettingstarted.rst github_commits.c index.rst \
-       tutorial.rst ext/refcounting.py
+EXTRA_DIST = conf.py apiref.rst changes.rst gettingstarted.rst         \
+       github_commits.c index.rst tutorial.rst ext/refcounting.py
 
 SPHINXBUILD = sphinx-build
 SPHINXOPTS = -d _build/doctrees -W
 
-# Convert json_*() functions to :cfunc: cross references in
-# ../CHANGES, and add a header from changes.rst.in
-changes.rst: changes.rst.in ../CHANGES
-       set -e; \
-       cat changes.rst.in >$@; \
-       sed -r -e 's/``(json_[a-z_]+\(\))``/:cfunc:`\1`/g' ../CHANGES \
-               >>$@
-
-html-local: changes.rst
+html-local:
        $(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html
 
 install-html-local: html
similarity index 70%
rename from doc/changes.rst.in
rename to doc/changes.rst
index f57d1ed..ea56843 100644 (file)
@@ -2,3 +2,4 @@
 Changes in Jansson
 ******************
 
+.. include:: ../CHANGES
index 10f444d..be0a673 100644 (file)
@@ -72,7 +72,7 @@ release = '1.1.3+'
 exclude_trees = ['_build']
 
 # The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+default_role = 'cfunc'
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 #add_function_parentheses = True