[LTP] [PATCH 11/11] docparse: Generate html and pdf using asciidoc{, tor}

Li Wang
2020-10-23T06:18:42Z

Cyril Hrubis <chrubis@suse.cz> wrote:

> --- a/docparse/Makefile
> +++ b/docparse/Makefile
> @@ -1,19 +1,77 @@
> # SPDX-License-Identifier: GPL-2.0-or-later
> # Copyright (c) 2019 Cyril Hrubis <chrubis@suse.cz>
> +# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
>
> top_srcdir ?= ..
>
> include $(top_srcdir)/include/mk/env_pre.mk
> include $(top_srcdir)/include/mk/functions.mk
>
> +ifeq ($(METADATA_GENERATOR),asciidoctor)
> +METADATA_GENERATOR_CMD := asciidoctor
> +METADATA_GENERATOR_PARAMS := -d book metadata.txt
> +METADATA_GENERATOR_PARAMS_HTML := -b xhtml
> +METADATA_GENERATOR_PARAMS_PDF := -b pdf -r asciidoctor-pdf
> +else ifeq ($(METADATA_GENERATOR),asciidoc)
> +METADATA_GENERATOR_CMD := a2x
> +METADATA_GENERATOR_PARAMS := --xsltproc-opts "--stringparam toc.section.depth 1" -d book -L --resource="$(PWD)" metadata.txt
> +METADATA_GENERATOR_PARAMS_HTML := -f xhtml
> +METADATA_GENERATOR_PARAMS_PDF := -f pdf
> +METADATA_GENERATOR_PARAMS_HTML_CHUNKED := -f chunked
> +else ifeq ($(METADATA_GENERATOR),)
> +$(error 'METADATA_GENERATOR' not not configured, run ./configure in the root directory)
> +else
> +$(error '$(METADATA_GENERATOR)' not supported, only asciidoctor and asciidoc are supported)
> +endif
> +
> +ifdef VERBOSE
> +METADATA_GENERATOR_PARAMS += -v
> +endif
> +
> +CLEAN_TARGETS := *.txt

I guess the generated *.css *.js files should be deleted as well.

--
Regards,
Li Wang