mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-02 22:52:21 +00:00
Start adding protocol file documentation
The protocol file is not documented and people have to read code to understand the specification. This can lead to unexpected or not optimal results so it's better to have it documented. The m4/spice_manual.m4 came from spice server and is meant to be reused. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
642308ecec
commit
3983097ed5
@ -1,7 +1,7 @@
|
||||
NULL =
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = python_modules common tests
|
||||
SUBDIRS = python_modules common tests docs
|
||||
|
||||
EXTRA_DIST = \
|
||||
spice_codegen.py \
|
||||
|
||||
@ -17,6 +17,7 @@ AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wall -Werror])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_SILENT_RULES([yes])
|
||||
LT_INIT
|
||||
SPICE_MANUAL
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
@ -50,6 +51,7 @@ AC_CONFIG_FILES([
|
||||
common/Makefile
|
||||
python_modules/Makefile
|
||||
tests/Makefile
|
||||
docs/Makefile
|
||||
])
|
||||
|
||||
AH_BOTTOM([
|
||||
|
||||
17
docs/Makefile.am
Normal file
17
docs/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
NULL =
|
||||
ASCIIDOC_FLAGS = -a icons -a toc
|
||||
|
||||
EXTRA_DIST = \
|
||||
spice_protocol.html \
|
||||
spice_protocol.txt \
|
||||
$(NULL)
|
||||
|
||||
if BUILD_HTML_MANUAL
|
||||
all-local: spice_protocol.html
|
||||
|
||||
spice_protocol.html: spice_protocol.txt
|
||||
$(AM_V_GEN) $(ASCIIDOC) -n $(ASCIIDOC_FLAGS) -o $@ $<
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
rm -f spice_protocol.html
|
||||
2
docs/spice_protocol.txt
Normal file
2
docs/spice_protocol.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Spice protocol format file
|
||||
==========================
|
||||
32
m4/spice_manual.m4
Normal file
32
m4/spice_manual.m4
Normal file
@ -0,0 +1,32 @@
|
||||
dnl SPICE_MANUAL
|
||||
dnl ------------
|
||||
dnl Check if user wants manuals to be compiled and
|
||||
dnl if all programs (asciidoc and a2x) are available
|
||||
dnl ------------
|
||||
dnl Shell defines:
|
||||
dnl - have_asciidoc yes or not is asciidoc program is available
|
||||
dnl Automake macros:
|
||||
dnl - A2X a2x program or empty
|
||||
dnl - ASCIIDOC asciidoc program or emtpy
|
||||
dnl - BUILD_MANUAL if asciidoc and a2x are available
|
||||
dnl - BUILD_HTML_MANUAL if asciidoc is available (html can be produced)
|
||||
dnl - BUILD_CHUNKED_MANUAL if a2x is available
|
||||
AC_DEFUN([SPICE_MANUAL],[
|
||||
AC_ARG_ENABLE([manual],
|
||||
AS_HELP_STRING([--enable-manual=@<:@auto/yes/no@:>@],
|
||||
[Build SPICE manual]),
|
||||
[],
|
||||
[enable_manual="auto"])
|
||||
if test "x$enable_manual" != "xno"; then
|
||||
AC_PATH_PROG([ASCIIDOC], [asciidoc])
|
||||
AS_IF([test -z "$ASCIIDOC" && test "x$enable_manual" = "xyes"],
|
||||
[AC_MSG_ERROR([asciidoc is missing and build of manual was requested])])
|
||||
AC_PATH_PROG([A2X], [a2x])
|
||||
AS_IF([test -z "$A2X" && test "x$enable_manual" = "xyes"],
|
||||
[AC_MSG_ERROR([a2x is missing and build of manual was requested])])
|
||||
fi
|
||||
AS_IF([test -n "$ASCIIDOC"], [have_asciidoc=yes], [have_asciidoc=no])
|
||||
AM_CONDITIONAL([BUILD_MANUAL], [test -n "$ASCIIDOC" || test -n "$A2X"])
|
||||
AM_CONDITIONAL([BUILD_HTML_MANUAL], [test -n "$ASCIIDOC"])
|
||||
AM_CONDITIONAL([BUILD_CHUNKED_MANUAL], [test -n "$A2X"])
|
||||
])
|
||||
Loading…
Reference in New Issue
Block a user