On 06/25/2010 09:30 AM, Eric Blake wrote:
The rule of thumb for generated files:
If they are distributed, they should be generated in $(srcdir);
otherwise, they should be built by the end user in $(builddir).
Since our .xml docs are built with python, and we want them
available even to end users that don't build with python, we
want them distributed; hence, they must live in $(srcdir).
Tested with 'make distcheck' in both an in-tree build and a
VPATH build.
* docs/Makefile.am (dot_html_in, patches): Massage wildcard
correctly.
(EXTRA_DIST): Remove redundant listing of xml files.
(api, web, maintainer-clean-local): Update location.
(html/index.html): Likewise, and dump all generated files in
correct location.
($(devhelphtml)): Since we distribute .xml, build it in srcdir.
(html/%-%.html, html/%-virterror.html, %-api.xml, %-refs.xml):
Rewrite with...
(python_generated_files): ...new macro.
* docs/apibuild.py (srcPref): Define.
(docBuilder.serialize): Put output in srcdir.
(docBuilder.serialize_xrefs_references): Update location.
(rebuild): Look for built libvirt.h in builddir.
---
No change from
https://www.redhat.com/archives/libvir-list/2010-June/msg00051.html.
Correction: per Matthias' review at
https://www.redhat.com/archives/libvir-list/2010-June/msg00087.html, I
had indeed changed this patch some compared to last time.
Diff in this version from the previous: revert change to apibuild.py
that produced corrupt output names in docs/libvirt-refs.xml, and fix
$(devhelphtml) to use -o directory for all generated files rather than
-o file for just the primary file.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org