-docs_html := $(addsuffix .html, $(subst .txt,,$(dtxt)) $(txt))
-html: $(docs_html)
-gz_docs := $(addsuffix .gz, $(docs) $(docs_html))
-rsync_docs := $(gz_docs) $(docs) $(docs_html)
-
-# external manpages which we host ourselves, since some packages
-# (currently just Xapian) doesn't host manpages themselves.
-xtxt :=
-xtxt += .copydatabase.1
-xtxt += .xapian-compact.1
-xtxt := $(addprefix Documentation/.x/, $(addsuffix .txt, $(xtxt)))
-xdocs := $(xtxt)
-xdocs_html := $(addsuffix .html, $(subst .txt,,$(xtxt)))
-gz_xdocs := $(addsuffix .gz, $(xdocs) $(xdocs_html))
-rsync_xdocs := $(gz_xdocs) $(xdocs_html) $(xdocs)
-xdoc: $(xdocs) $(xdocs_html)
-
-Documentation/.x/%.txt::
- @-mkdir -p $(@D)
- $(PERL) -w Documentation/extman.perl $@ >$@+
- mv $@+ $@
+# check for internal API changes:
+check :: NEWS .NEWS.atom.check NEWS.html
+
+.NEWS.atom.check: NEWS.atom
+ $(XMLSTARLET) val NEWS.atom || \
+ { e=$$?; test $$e -eq 0 || test $$e -eq 127; }
+ >$@