Remove CHANGES preprocessing, as it didn't work with VPATH builds

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.
This commit is contained in:
Petri Lehtinen 2010-01-21 20:53:05 +02:00
parent e921e63b54
commit 78594e9bd3
5 changed files with 14 additions and 24 deletions

19
CHANGES
View File

@ -3,13 +3,13 @@ Version 1.2 (in development)
* New functions: * New functions:
- ``json_equal()``: Test whether two JSON values are equal - `json_equal()`: Test whether two JSON values are equal
- ``json_copy()`` and ``json_deep_copy()``: Make shallow and deep - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
copies of JSON values of JSON values
- Add a version of all functions taking a string argument that - Add a version of all functions taking a string argument that
doesn't check for valid UTF-8: ``json_string_nocheck()``, doesn't check for valid UTF-8: `json_string_nocheck()`,
``json_string_set_nocheck()``, ``json_object_set_nocheck()``, `json_string_set_nocheck()`, `json_object_set_nocheck()`,
``json_object_set_new_nocheck()`` `json_object_set_new_nocheck()`
* New encoding flags: * New encoding flags:
@ -23,8 +23,7 @@ Version 1.2 (in development)
- Revise and unify whitespace usage in encoder: Add spaces between - Revise and unify whitespace usage in encoder: Add spaces between
array and object items, never append newline to output. array and object items, never append newline to output.
- Remove const qualifier from the ``json_t`` parameter in - Remove const qualifier from the ``json_t`` parameter in
``json_string_set()``, ``json_integer_set()`` and `json_string_set()`, `json_integer_set()` and `json_real_set`.
``json_real_set``.
- Use ``int32_t`` internally for representing Unicode code points - Use ``int32_t`` internally for representing Unicode code points
(int is not enough on all platforms) (int is not enough on all platforms)
@ -54,7 +53,7 @@ Version 1.1.2
Released 2009-11-08 Released 2009-11-08
* Fix a bug where an error message was not produced if the input file * 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 * Fix an assertion failure in decoder caused by a minus sign without a
digit after it digit after it
* Remove an unneeded include of ``stdint.h`` in ``jansson.h`` * Remove an unneeded include of ``stdint.h`` in ``jansson.h``
@ -131,7 +130,7 @@ Version 1.0.1
Released 2009-09-04 Released 2009-09-04
* Fixed broken ``json_is_boolean()`` * Fixed broken `json_is_boolean()`
Version 1.0 Version 1.0

1
doc/.gitignore vendored
View File

@ -1,2 +1 @@
_build/ _build/
changes.rst

View File

@ -1,19 +1,10 @@
EXTRA_DIST = \ EXTRA_DIST = conf.py apiref.rst changes.rst gettingstarted.rst \
conf.py apiref.rst gettingstarted.rst github_commits.c index.rst \ github_commits.c index.rst tutorial.rst ext/refcounting.py
tutorial.rst ext/refcounting.py
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
SPHINXOPTS = -d _build/doctrees -W SPHINXOPTS = -d _build/doctrees -W
# Convert json_*() functions to :cfunc: cross references in html-local:
# ../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
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html $(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html
install-html-local: html install-html-local: html

View File

@ -2,3 +2,4 @@
Changes in Jansson Changes in Jansson
****************** ******************
.. include:: ../CHANGES

View File

@ -72,7 +72,7 @@ release = '1.1.3+'
exclude_trees = ['_build'] exclude_trees = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents. # 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. # If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True #add_function_parentheses = True