mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-26 05:26:09 +00:00
build-sys: improve asciidoc rules to allow multiple targets
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
96700c849d
commit
57f2c61712
@ -1,18 +1,26 @@
|
||||
NULL =
|
||||
ASCIIDOC_FLAGS = -a icons -a toc
|
||||
CLEANFILES =
|
||||
|
||||
EXTRA_DIST = \
|
||||
meson.build \
|
||||
ASCIIDOC_FILES = \
|
||||
spice_protocol.txt \
|
||||
$(NULL)
|
||||
|
||||
if BUILD_HTML_MANUAL
|
||||
all-local: spice_protocol.html
|
||||
ASCIIDOC_FLAGS = -n -a icons -a toc
|
||||
|
||||
spice_protocol.html: spice_protocol.txt
|
||||
$(AM_V_GEN) $(ASCIIDOC) -n $(ASCIIDOC_FLAGS) -o $@ $<
|
||||
EXTRA_DIST = \
|
||||
$(ASCIIDOC_FILES) \
|
||||
meson.build \
|
||||
$(NULL)
|
||||
|
||||
if BUILD_HTML_MANUAL
|
||||
ASCIIDOC_HTML = $(ASCIIDOC_FILES:.txt=.html)
|
||||
|
||||
CLEANFILES += $(ASCIIDOC_HTML)
|
||||
|
||||
all-local: $(ASCIIDOC_HTML)
|
||||
|
||||
.txt.html:
|
||||
$(AM_V_GEN)$(ASCIIDOC) $(ASCIIDOC_FLAGS) -o $@ $<
|
||||
endif
|
||||
|
||||
CLEANFILES = spice_protocol.html
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
if get_option('manual')
|
||||
asciidoc = find_program('asciidoc', required : false)
|
||||
if asciidoc.found()
|
||||
custom_target('spice_protocol.html',
|
||||
input : files('spice_protocol.txt'),
|
||||
output : 'spice_protocol.html',
|
||||
build_by_default : true,
|
||||
command : [asciidoc, '-n', '-a', 'icons', '-a', 'toc', '-o', '@OUTPUT@', '@INPUT@'])
|
||||
foreach f: ['spice_protocol.txt']
|
||||
custom_target('HTML for @0@'.format(f),
|
||||
input : f,
|
||||
output : '@BASENAME@.html',
|
||||
build_by_default : true,
|
||||
command : [asciidoc, '-n', '-a', 'icons', '-a', 'toc', '-o', '@OUTPUT@', '@INPUT@'])
|
||||
endforeach
|
||||
endif
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user