Commit Graph

138 Commits

Author SHA1 Message Date
Michal Privoznik
e396de03f3 docs: Distribute subsite.xsl
So, I've ran into very interesting problem lately. When doing the
following, I've encountered an error:

  libvirt.git $ make dist && tar -xJf libvirt-2.2.0.tar.xz && \
                cd libvirt-2.2.0 && ./configure && \
                rm docs/formatdomain.html && make -C docs

  make: Entering directory 'docs'
  make: *** No rule to make target 'formatdomain.html', needed by 'web'.  Stop.
  make: Leaving directory 'docs'

I had no idea what was going on, so I've nailed down the commit
that "broke it" via running git-bisect. It was this one:
7659bd9221. But that shed no more light until I realized
that the commit might actually just exposed a problem we had. And
guess what - I've nailed it down. Of course we are not
distributing subsite.xsl that's why make prints error message.
Very misleading one I must say.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-08-08 11:49:35 +02:00
Erik Skultety
52dbacc07a admin: enable both admin API functionality and tarball distribution
This patch enables admin socket creation in daemon's code, bumps the library
version in libvirt_admin_public.syms, and performs all necessary modifications
to our makefiles so that admin API can finally be included in the tarball,
and eventually become part of an rpm package (a patch later in this series).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-06-26 00:21:06 +02:00
Andrea Bolognani
22a592a4fe docs: Pass relative paths to apibuild.py
Since commit d195cffa2e, both $(srcdir) and $(abs_builddir)
are passed to the apibuild.py script; however, since the
former is a relative path and the latter an absolute one, the
script might not be able to detect whether they point to the
same location.

Pass both as relative paths to avoid the issue.
2016-04-26 09:20:11 +02:00
Peter Krempa
d195cffa2e docs: apibuild: Fix VPATH build
libvirt-common.h is generated into builddir/include/libvirt. apibuild.py
only operated on srcdir/inlcude/libvirt. With VPATH build
srcdir/docs/libvirt-libvirt-common.html would not get generated and make
RPM failed.
2016-04-25 08:49:30 +02:00
Peter Krempa
9928387473 api: Generate docs for libvirt-common.h
Since commit f5d9c5d00c moved the virTypedParam stuff into
libvirt-common we did not generate any docs for them and neither did we
populate them into libvirt-api.xml. This broke the sanity check in
libvirt python. Fix it by generating docs for libvirt-common.h too.
2016-04-21 15:39:08 +02:00
Michal Privoznik
8ed7c3a2cf docs: Don't leave any documentation behind
Our uninstall script is not exact counterpart of install one.
Therefore we are leaving couple of files behind. This should not
happen.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-04-20 17:34:06 +02:00
Michal Privoznik
265bb873c8 docs: Uninstall libvirt logo too
While we could leave it behind as an indelible sign that libvirt
has been running on host, other users might not be that fond of
it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-04-20 17:34:00 +02:00
Cole Robinson
e14c5069c5 docs: website: Remove the et.redhat.com footer
This is long since obsolete, just scrap it all
2016-03-10 11:06:25 -05:00
Michal Privoznik
0f396a4159 docs: Try harder to uninstall
Imagine you have partially installed libvirt, or maybe you're
just running 'make uninstall' from a different version than 'make
install' has been ran. One way or another, we are doing plain
'rm' instead of 'rm -f' and thus not trying hard enough when
uninstalling. In the rest of our code we stick with -f switch. Do
that for docs too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-23 12:05:01 +01:00
Cole Robinson
a6cfd22eba docs: fix syntax-check long line error 2016-01-20 10:27:24 -05:00
Daniel P. Berrange
7659bd9221 docs: fix generation of docs from VPATH build
When generating docs in a VPATH build we get a failure to
create a file due to the 'internals' subdir not existing:

  Generating internals/locking.html.tmp
  /bin/sh: line 3: internals/locking.html.tmp: No such file or directory
  rm: cannot remove ‘internals/locking.html.tmp’: No such file or directory
  Makefile:2229: recipe for target 'internals/locking.html.tmp' failed
  make: *** [internals/locking.html.tmp] Error 1

For some reason, make has decided to run the target

  %.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated)

instead of the target

  internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in

Removing '$(acl_generated)' from the first target, inexplicably
causes make to now run the correct target for the internals/
files.

Rather than figure this out, lets just combine the two targets
into one.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-01-20 12:22:19 +00:00
Michal Privoznik
8c67ab6684 Expand $(wildcard) correctly
So after da176bf6b7 and friend we have switched to $(wildcard
some/path/*.xml) instead of enumerating the files explicitly.
This is nice, however it makes distcheck build from VPATH fail.
The reason is that it's is not obvious to what does the wildcard
refer to: srcdir or builddir?

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-01-12 17:16:33 +01:00
Cole Robinson
f7d0f12407 build: Kill docs/schemas/Makefile.am
Move the logic to docs/Makefile.am, and simplify it with a wildcard
expression.
2016-01-11 11:45:14 -05:00
Erik Skultety
a20b623748 libvirt: introduce libvirt/libvirt-common.h.in
As it turned out, we need to share some enums and declarations between
libvirt.h and libvirt-admin.h, but since our policy forbids direct includes of
libvirt*.h, there has to be some header exempt from this rule. This patch moves
the relevant part of code from libvirt.h.in to libvirt-common.h.in. Moreover,
since there is no need to have libvirt.h generated anymore, introduce a new
header libvirt.h which was previosly ignored from git and make the common
header ignored and generated instead.
2015-11-30 09:36:19 +01:00
Martin Kletzander
6d91d70190 Revert "docs: Drop unused rule for internals/%.html.tmp target"
This reverts commit e5470dd0e0.

This has been ACK'd by the original author in the original mail thread:
https://www.redhat.com/archives/libvir-list/2015-September/msg00310.html

The reason to revert this is due to the patch breaking the generation of
internal subsites.  The original issue still needs to be dealt with,
though.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-09-09 11:52:24 +02:00
Martin Kletzander
0f3989c172 docs: Remove last use of double semicolon in Makefile
Double semicolons have special meaning in makefiles, but they would have
to be combined with other rules witch such separators in order to be
used as intended.  Since there are no other rules like that, let's
clean it up.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-09-08 15:07:08 +02:00
Guido Günther
e5470dd0e0 docs: Drop unused rule for internals/%.html.tmp target
We're using the %.html.tmp for all html files now so drop the unused one
and rather make sure the needed directory exists.

This fixes build failures as described in

    https://www.redhat.com/archives/libvir-list/2015-August/msg00603.html
2015-08-20 10:19:27 +02:00
Martin Kletzander
1bcc88bbdd Temporarily disable admin API
Don't listen on the admin socket in the daemon and comment out the
admin devel files out of specfile.

Library is still being compiled and installed in order to link easily
without any disturbing modifications to the daemon code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-06-28 11:34:25 +08:00
Michal Privoznik
c0b7d3126b docs: Don't keep temporary files around
In my previous fix (1310b1358) I've tried to solve an ordering
issue.  Well, while it worked it has a side effect of keeping a
temporary file around. My patch was buggy in that sense. Solve
this by properly marking the dependency without any side effect.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-06-26 12:49:30 +02:00
Michal Privoznik
1310b1358c docs: Properly mark acl.html dependencies
The acl.html file includes aclperms.htmlinc which is generated.
However, acl.html is generated too from acl.html.tmp. And in fact,
this is the place where the aclperms file is needed. Fix the
dependency in Makefile.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-06-23 15:43:06 +02:00
Martin Kletzander
878bf2a3c9 Add XML files with admin API specification
No online docs are build from it since it doesn't really fit into our
document structure and new page will need to be created for it, but this
is at least a heads-up commit for easier parsing in order to build some
documentation (or python bindings) later on.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-06-16 13:46:20 +02:00
Michal Privoznik
f58a3a51fc Cleanup srcdir usage
In a lot places we use path like this:

  $(srcdir)/../src/....

when in fact it can be:

  $(top_srcdir)/src/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-04-27 16:03:31 +02:00
Ian Campbell
a2a35d0164 docs: Create html documentation even if XHTML1 DTD is not available to validate
On a Debian system lacking the w3c-dtd-xhtml package the build fails
with:

        $ make -C docs/ formatcaps.html
        make: Entering directory '/local/scratch/ianc/devel/libvirt.git/docs'
        Generating formatcaps.html.tmp
        I/O error : Attempt to load network entity http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
        formatcaps.html.in:2: warning: failed to load external entity "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
        C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
                                                                                       ^
        I/O error : Attempt to load network entity http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
        ../docs/sitemap.html.in:2: warning: failed to load external entity "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
        C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
                                                                                       ^
        missing XHTML1 DTD
        rm formatcaps.html.tmp
        make: Leaving directory '/local/scratch/ianc/devel/libvirt.git/docs'
        $ ls docs/formatcaps*
        docs/formatcaps.html.in

https://www.redhat.com/archives/libvir-list/2009-November/msg00413.html
suggests that the XHTML1 DTD should not be a hard requirement and the
docs should be generated but not validated if it is not available.

Therefore when the DTD is not available arrange for the .html.tmp file
to be propagated to the .html output.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Daniel Veillard <veillard@redhat.com>
2014-12-04 11:57:16 +01:00
John Ferlan
bc3b568103 docs: More html/docs changes from libvirt.h.in split
This changes the display from:

libvirt-storage: APIs for management of storages

to

libvirt-storage: APIs for management of storage pools and volumes

In making that change I expected my build tree html output to be
regenerated; however, it wasn't because the dependency for the separated
libvirt-storage.h wasn't there.  It was only present for libvirt.h.in

So I added each in the order displayed on the docs/html/index.html page
2014-12-03 16:15:14 -05:00
Martin Kletzander
b79d195b72 build, docs: Let make see the dependencies for html/*.html
Make was not able to realize the dependencies for html/*.html files when
running 'make -j9 dist'.  All the files are generated together with
html/index.html, so simply separating them into another variable and
adding one block into the dependency chain solves the issue.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-12-02 07:50:18 +01:00
Martin Kletzander
af1b89d1d4 docs: Correct invalid hyperlinks
Since libvirt.h was split into multiple files and similarly
docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks.  The
same happens for all the html.in files that used <code class='docref'>
tag, because page.xsl has no idea where to point the link that's found.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-12-02 07:30:10 +01:00
Nehal J Wani
0798efcc40 docs: Remove references to unused libvirt-libvirt.html
The libvirt-libvirt.html file is no longer generated so
should not be referenced by the Makefile.am
2014-11-20 15:14:42 +00:00
Daniel P. Berrange
47fb613873 Fix API docs for header file re-organization
The API docs generators were broken by the header file
re-organization. Specifically

 * html/libvirt-libvirt.html was empty (and should be deleted)
 * Makefile.am didn't install html/libvirt-libvirt-*.html
 * hvsupport.html was mostly empty
 * sitemap.html.in didn't list the new html/*.html files
2014-11-13 10:20:26 +00:00
Jiri Denemark
0543e0d212 docs: Load libvirt_access*.xml from build dir
The xml files are generated in build directory and thus docs/newapi.xsl
was not able to find them in a VPATH build.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2013-09-23 14:16:45 +02:00
Daniel Veillard
a41e95db50 Repair the search on libvirt.org
First make sure that the input is xhtml as the stylesheets expect
namespaced element, then use a span element instead of a as a
is treated specially, finally adjust the makefile to check for
the new span element and replace it with the PHP code
2013-09-12 17:18:32 +08:00
Eric Blake
cd3fa76222 build: shipped files must not depend on BUILT_SOURCES
'make distcheck' was failing with:
make[3]: Entering directory `/home/eblake/libvirt-tmp2/libvirt-1.1.1/_build/docs'
perl ../../docs/genaclperms.pl ../../src/access/viraccessperm.h > ../../docs/aclperms.htmlinc
/bin/sh: ../../docs/aclperms.htmlinc: Permission denied

when simulating the case of a user doing a VPATH build from a
read-only source tree.  The culprit?  BUILT_SOURCES are _always_
built, and so must NOT be built into srcdir and need not be part
of the tarball.  On the other hand, shipped files must never
depend on files in the builddir.  While it would be possible to
fix the problem by generating aclperms.htmlinc into builddir,
we then have the problem that we ship acl.html - we'd have to
rejigger a lot of things to not ship pre-built html.  So this
patch goes the other direction - we don't need BUILT_SOURCES,
but instead ensure that we have proper dependencies so that
all files in srcdir are up-to-date at the time the tarball is
created.  And because we ship html files in the tarball, that
implies we don't expect users to be able to rebuild them, so
we must not clean any files that would trigger a rebuild except
under the maintainer rules.

* docs/Makefile.am (BUILT_SOURCES): Delete.
(CLEANFILES): Downgrade aclperms.htmlinc cleanup...
(maintainer-clean-local): ...and move hvsupport.html.in...
(MAINTAINERCLEANFILES): ...to a maintainer action.
(hvsupport.html.in): Write into srcdir.
(hvsupport.html): Ensure files are built in order.
(aclperms.htmlinc): Honor silent make.
(EXTRA_DIST): Ship aclperms.htmlinc.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-30 20:45:22 -06:00
Eric Blake
f06eb52fff build: fix 'make distcheck' out of the box
With the 1.1.1 tarball, if a user does 'make && make distcheck',
things pass, but if they do 'make distcheck' after 'make clean',
there is an odd failure:

  GEN      ../../docs/devhelp/index.html
I/O error : Permission denied
I/O error : Permission denied
runtime error: file ../../docs/devhelp/devhelp.xsl line 43 element document
xsltDocumentElem: unable to save to ../../docs/devhelp/libvirt-virterror.html
I/O error : Permission denied
I/O error : Permission denied

This implies that the rules for 'make dist' are missing a
dependency - the generated documentation needs to be up-to-date
before creating the tarball, or else the tarball will be missing
files, where the end user will end up trying to rebuild files in
srcdir, and that fails when srcdir is read-only.

1.1.1 plus this patch now works without issues (other issues have
crept in to 1.1.2-rc1 that prevent 'make distcheck' from working,
but those will be cleaned up in later patches).

* docs/Makefile.am (dist-local): New dependency.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-30 19:36:35 -06:00
Daniel P. Berrange
da13f2c70c Add documentation for access control system
This adds two new pages to the website, acl.html describing
the general access control framework and permissions models,
and aclpolkit.html describing the use of polkit as an
access control driver.

page.xsl is modified to support a new syntax

  <div id="include" filename="somefile.htmlinc"/>

which will cause the XSL transform to replace that <div>
with the contents of 'somefile.htmlinc'. We use this in
the acl.html.in file, to pull the table of permissions
for each libvirt object. This table is autogenerated
from the enums in src/access/viraccessperms.h by the
genaclperms.pl script.

newapi.xsl is modified so that the list of permissions
checks shown against each API will link to the description
of the permissions in acl.html

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-08-09 17:13:02 +01:00
Eric Blake
d21d40bf0c maint: split long lines in Makefiles
Makefiles are another easy file to enforce line limits.

Mostly straightforward; interesting tricks worth noting:
src/Makefile.am: $(confdir) was already defined, use it in more places
tests/Makefile.am: path_add and VG required some interesting compression

* cfg.mk (sc_prohibit_long_lines): Add another test.
* Makefile.am: Fix offenders.
* daemon/Makefile.am: Likewise.
* docs/Makefile.am: Likewise.
* python/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-07-19 05:25:35 -06:00
Eric Blake
d7f53c7b97 maint: use LGPL correctly
Several files called out COPYING or COPYING.LIB instead of using
the normal boilerplate.  It's especially important that we don't
call out COPYING from an LGPL file, since COPYING is traditionally
used for the GPL.  A few files were lacking copyright altogether.

* src/rpc/gendispatch.pl: Add missing copyright.
* Makefile.nonreentrant: Likewise.
* src/check-symfile.pl: Likewise.
* src/check-symsorting.pl: Likewise.
* src/driver.h: Likewise.
* src/internal.h: Likewise.
* tools/libvirt-guests.sh.in: Likewise.
* tools/virt-pki-validate.in: Mention copyright in comment, not just code.
* tools/virt-sanlock-cleanup.in: Likewise.
* src/rpc/genprotocol.pl: Spell out license terms.
* src/xen/xend_internal.h: Likewise.
* src/xen/xend_internal.c: Likewise.
* Makefile.am: Likewise.
* daemon/Makefile.am: Likewise.
* docs/Makefile.am: Likewise.
* docs/schemas/Makefile.am: Likewise.
* examples/apparmor/Makefile.am: Likewise.
* examples/domain-events/events-c/Makefile.am: Likewise.
* examples/dominfo/Makefile.am: Likewise.
* examples/domsuspend/Makefile.am: Likewise.
* examples/hellolibvirt/Makefile.am: Likewise.
* examples/openauth/Makefile.am: Likewise.
* examples/python/Makefile.am: Likewise.
* examples/systemtap/Makefile.am: Likewise.
* examples/xml/nwfilter/Makefile.am: Likewise.
* gnulib/lib/Makefile.am: Likewise.
* gnulib/tests/Makefile.am: Likewise.
* include/Makefile.am: Likewise.
* include/libvirt/Makefile.am: Likewise.
* python/Makefile.am: Likewise.
* python/tests/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
* tools/Makefile.am: Likewise.
* configure.ac: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-05-20 14:03:48 -06:00
Daniel P. Berrange
039e30805c Ensure stub todo.html.in file is HTML5
If no todo.cfg is present, make sure the stub is in HTML5
format and clearly states that the config was not available

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-07 15:45:50 +01:00
Daniel P. Berrange
f2f9742d4d Fix multiple formatting problems in HTML docs
The rule generating the HTML docs passing the --html flag
to xsltproc. This makes it use the legacy HTML parser, which
either ignores or tries to fix all sorts of broken XML tags.
There's no reason why we should be writing broken XML in
the first place, so removing --html and adding the XHTML
doctype to all files forces us to create good XML.

This adds the XHTML doc type and fixes many, many XML tag
problems it exposes.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-03 15:56:15 +01:00
Michal Privoznik
5e5ca84e31 test: Return Libvirt logo as domain screenshot
This is just a bare Easter Egg. Whenever a user runs virDomainScreenshot
over a domain in test driver, he'll get the Libvirt PNG logo in return.
2013-04-02 14:38:56 +02:00
Jiri Denemark
1640fafc6a docs: Generate documentation for virTypedParams* APIs 2013-01-21 18:41:26 +01:00
Jiri Denemark
c72e327456 docs: event.c source file was renamed as virevent.c 2013-01-21 18:40:28 +01:00
Viktor Mihajlovski
8691551070 build: Fix RPM build errors related to libvirt-lxc API
Added missing entries to makefile and spec.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2013-01-18 09:48:17 -07:00
Daniel P. Berrange
3d1596b048 Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.

The actual APIs are

  int virDomainLxcOpenNamespace(virDomainPtr domain,
                                int **fdlist,
                                unsigned int flags);

  int virDomainLxcEnterNamespace(virDomainPtr domain,
                                 unsigned int nfdlist,
                                 int *fdlist,
                                 unsigned int *noldfdlist,
                                 int **oldfdlist,
                                 unsigned int flags);

which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.

NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-01-14 13:58:34 +00:00
Daniel P. Berrange
f24404a324 Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
Cole Robinson
7146d41634 docs: Fix installation of internals/*.html
We were just installing them in the top level html directory, which
broke navigation and overwrote other pages.

https://bugzilla.redhat.com/show_bug.cgi?id=837825
2012-10-22 16:15:12 -04:00
Eric Blake
d51024aee6 build: don't fail when xsltproc is missing
On a machine without xsltproc, the build failed with:

Scripting search.php
/usr/local/bin/bash: line 1: search.php.tmp: No such file or directory
rm: ./search.php: No such file or directory

Regression introduced in commit 28183590.

* docs/Makefile.am (%.php): Skip in the same conditions when the
.tmp file is skipped.
2012-09-05 12:05:55 -06:00
Martin Kletzander
2818359075 docs: autogenerate search.php
This patch makes search.php autogenerated from search.php.in, thus
removing hardcoded menus, footer etc. and the search.php is added to
.gitignore.

There is new rule added for *.php files (to make it bit less
hardcoded) that takes *.php.code.in and injects it inside the
generated *.php (xslt was not happy about php code in the source xml).
2012-08-10 10:58:38 +02:00
Eric Blake
7bff56a0d1 build: fix 'make distcheck' issues
We had a distributed file (remote_protocol.h, which in turn was
a prereq to remote_driver.c) depending on a generated file
(libvirt_probes.h), which is a no-no for a VPATH build from a
read-only source tree (no wonder 'make distcheck' tests precisely
that situation):

     File `libvirt_driver_remote.la' does not exist.
       File `libvirt_driver_remote_la-remote_driver.lo' does not exist.
             Prerequisite `libvirt_probes.h' is newer than target `../../src/remote/remote_protocol.h'.
            Must remake target `../../src/remote/remote_protocol.h'.
Invoking recipe from Makefile:7464 to update target `../../src/remote/remote_protocol.h'.
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/libvirt-0.9.12/_build/src'
  GEN    ../../src/remote/remote_protocol.h
cannot create ../../src/remote/remote_protocol.h: Permission denied at ../../src/rpc/genprotocol.pl line 31.
make[3]: *** [../../src/remote/remote_protocol.h] Error 13

Rather than making distributed .c files depend on generated files, we
really want to ensure that compilation into .lo files is not attempted
until the generated files are present, done by this patch.  Since there
were two different sets of conditionally generated files that both
feed the .lo file, I had to introduce a new variable REMOTE_DRIVER_PREREQS
to keep automake happy.

After that fix, the next issue was that make treats './foo' and 'foo'
differently in determining whether an implicit %foo rule is applicable,
with the result that locking/qemu-sanlock.conf wasn't properly being
built at the right times.  Also, the output for using the .aug test
files was a bit verbose.

After fixing the src directory, the next error is related to the docs
directory, where the tarball is missing a stamp file and thus tries to
regenerate files that are already present:

  GEN    ../../docs/apibuild.py.stamp
Traceback (most recent call last):
  File "../../docs/apibuild.py", line 2511, in <module>
    rebuild("libvirt")
  File "../../docs/apibuild.py", line 2495, in rebuild
    builder.serialize()
  File "../../docs/apibuild.py", line 2424, in serialize
    output = open(filename, "w")
IOError: [Errno 13] Permission denied: '../../docs/libvirt-api.xml'
make[5]: *** [../../docs/apibuild.py.stamp] Error 1

and fixing that exposed another case of a distributed file (generated
html) depending on a built file (libvirt.h), but only when doing an
in-tree build, because of a file glob.

* src/Makefile.am ($(srcdir)/remote/remote_driver.c): Change...
(libvirt_driver_remote_la-remote_driver.lo): ...to the real
dependency.
($(builddir)/locking/%-sanlock.conf): Drop $(builddir), so that
rule gets run in time for test_libvirt_sanlock.aug.
(test_libvir*.aug): Cater to silent build.
(conf_DATA): Don't ship qemu-sanlock.conf in the tarball, since it
is trivial to regenerate.
* docs/Makefile.am (EXTRA_DIST): Ship our stamp file.
($(APIBUILD_STAMP)): Don't depend on generated file.
2012-06-05 09:20:12 -06:00
Eric Blake
c0057d9a49 build: fix stamp file name
Ever since commit c964b6a, make was trying to find the timestamp
of '""./apibuild.py".stamp"', but only touching 'apibuild.py.stamp',
and thus always rebuilding.  Reported by Daniel P. Berrange.

* docs/Makefile.am (APIBUILD, APIBUILD_STAMP): Omit bogus quotes.
2012-05-11 08:20:34 -06:00
Cole Robinson
c964b6aac1 docs: Serialize running apibuild.py
Use a witness file approach like we do for python/generator.py,
as suggested by Eric. Fixes the build issue reported here:

https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2012-04-27 12:37:47 -04:00
Daniel P. Berrange
4f4b496e78 Fix parallel build in docs/ directory
Every now & then, with parallel builds, we get a failure to
validate hvsupport.html.in.  I eventually noticed that this
is because we get 2 instances of the generator running at
once.

We already list hvsupport.html.in in BUILT_SOURCES but this
was not working. It turns out the flaw is that we were
adding deps to the 'all:' target instead of the 'all-am:'
target. BUILT_SOURCES is a dep of 'all', so any custom
targets written in Makefile.am must use 'all-am:' so that
they don't get run until BUILT_SOURCES are completely
generated

* docs/Makefile.am: s/all/all-am/
2012-04-04 14:33:27 +01:00