diff --git a/Makefile b/Makefile index 04e4a154..8dfc375f 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ all: help clean: rm -rf *.zwc doc/zsdoc/zinit{'','-additional','-autoload','-install','-side'}.zsh.adoc doc/zsdoc/data/ + $(ZSH) 'zinit delete --yes zdharma-continuum/zshelldoc; exit' container-build: ## build docker image docker build \ @@ -30,8 +31,10 @@ container-shell: ## start shell in docker container --platform=linux/x86_64 \ --tty \ $(CONTAINTER_NAME):latest +deps: + $(ZSH) "zi for make'PREFIX=$${ZPFX} install' nocompile zdharma-continuum/zshelldoc" -doc: clean +doc: clean deps cd doc; $(ZSH) -df "zsd -v --scomm --cignore '(\#*FUNCTION:[[:space:]][\+\@\:∞\.\~\-\-a-zA-Z0-9]*[\[]*|}[[:space:]]\#[[:space:]][\]]*)' $(DOC_SRC); make -C ./zsdoc pdf" doc-container: diff --git a/doc/zsdoc/Makefile b/doc/zsdoc/Makefile index ff5a95e1..be0f8a4c 100644 --- a/doc/zsdoc/Makefile +++ b/doc/zsdoc/Makefile @@ -1,57 +1,81 @@ -# This Makefile is to convert supplied Asciidoc files into -# other formats like pdf and man. The files contain Zplugin's -# code documentation. -# -# *.adoc files are generated by Makefile from upper (i.e. top) -# directory. +.EXPORT_ALL_VARIABLES: -all: man pdf +SRC := $(shell zsh -c "echo {'git-process-output','rpm2cpio'}.zsh zinit{'','-additional','-autoload','-install','-side'}.zsh") -# MANUALS -# Converted with a2x from asciidoc package +PDF_SRC := $(foreach wrd,$(SRC),$(wrd).pdf) +PDF_CMD := asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf -man: man/zinit.zsh.1 man/zinit-side.zsh.1 man/zinit-install.zsh.1 man/zinit-autoload.zsh.1 +MAN_SRC := $(foreach wrd,$(SRC),man/$(wrd)) +MAN_CMD := a2x --verbose -L --doctype manpage --format manpage -D man -man/zinit.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man zinit.zsh.adoc +HTML_SRC := $(foreach wrd,$(SRC),html/$(wrd).html) +HTML_CMD := asciidoctor -a reproducible -b html -r asciidoctor-pdf -D html -man/zinit-side.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man zinit-side.zsh.adoc +RUBYOPT="-E utf-8:utf-8" -man/zinit-install.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man zinit-install.zsh.adoc +.PHONY: all clean man pdf test -man/zinit-autoload.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man zinit-autoload.zsh.adoc +all: clean dirs pdf + +dirs: + mkdir -p html man pdf # PDFS -# Uses asciidoctor not a2x (i.e. not asciidoc) +# uses asciidoctor not a2x +# html: dirs $(HTML_SRC) +# html/git-process-output.zsh.html: +# $(HTML_CMD) git-process-output.zsh.adoc +# html/rpm2cpio.zsh.html: +# $(HTML_CMD) rpm2cpio.zsh.adoc +# html/zinit-additional.zsh.html: +# $(HTML_CMD) zinit-additional.zsh.adoc +# html/zinit-autoload.zsh.html: +# $(HTML_CMD) zinit-autoload.zsh.adoc +# html/zinit-install.zsh.html: +# $(HTML_CMD) zinit-install.zsh.adoc +# html/zinit-side.zsh.html: +# $(HTML_CMD) zinit-side.zsh.adoc +# html/zinit.zsh.html: +# $(HTML_CMD) zinit.zsh.adoc -pdf: pdf/zinit.zsh.pdf pdf/zinit-side.zsh.pdf pdf/zinit-install.zsh.pdf pdf/zinit-autoload.zsh.pdf +# Manual pages +# uses a2x from asciidoc package +man: dirs $(MAN_SRC) +man/git-process-output.zsh: + $(HTML_CMD) git-process-output.zsh.adoc +man/rpm2cpio.zsh: + $(HTML_CMD) rpm2cpio.zsh.adoc +man/zinit-additional.zsh: + $(HTML_CMD) zinit-additional.zsh.adoc +man/zinit-autoload.zsh: + $(HTML_CMD) zinit-autoload.zsh.adoc +man/zinit-install.zsh: + $(HTML_CMD) zinit-install.zsh.adoc +man/zinit-side.zsh: + $(MAN_CMD) zinit-side.zsh.adoc +man/zinit.zsh: + $(MAN_CMD) zinit.zsh.adoc -pdf/zinit.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit.zsh.adoc +# PDFS +# uses asciidoctor not a2x +html: dirs $(HTML_SRC) -pdf/zinit-side.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-side.zsh.adoc - -pdf/zinit-install.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-install.zsh.adoc - -pdf/zinit-autoload.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-autoload.zsh.adoc +html/git-process-output.zsh.html: + $(HTML_CMD) git-process-output.zsh.adoc +html/rpm2cpio.zsh.html: + $(HTML_CMD) rpm2cpio.zsh.adoc +html/zinit-additional.zsh.html: + $(HTML_CMD) zinit-additional.zsh.adoc +html/zinit-autoload.zsh.html: + $(HTML_CMD) zinit-autoload.zsh.adoc +html/zinit-install.zsh.html: + $(HTML_CMD) zinit-install.zsh.adoc +html/zinit-side.zsh.html: + $(HTML_CMD) zinit-side.zsh.adoc +html/zinit.zsh.html: + $(HTML_CMD) zinit.zsh.adoc clean: - rm -rf man pdf data + rm -rf data html man pdf -.PHONY: man pdf clean - -# vim:noet:sts=8:ts=8 +# vim: set fenc=utf8 ffs=unix ft=make list noet sw=4 ts=4 tw=72: diff --git a/doc/zsdoc/git-process-output.zsh.adoc b/doc/zsdoc/git-process-output.zsh.adoc index 4da67c59..8a36996a 100644 --- a/doc/zsdoc/git-process-output.zsh.adoc +++ b/doc/zsdoc/git-process-output.zsh.adoc @@ -1,27 +1,18 @@ -git-process-output.zsh(1) -========================= -:compat-mode!: NAME ----- + git-process-output.zsh - a shell script -SYNOPSIS --------- Documentation automatically generated with `zshelldoc' -FUNCTIONS ---------- - +== FUNCTIONS print_my_line print_my_line_compress timeline -DETAILS -------- +=== DETAILS -Script Body -~~~~~~~~~~~ +==== Script Body Has 113 line(s). Calls functions: @@ -32,8 +23,7 @@ Has 113 line(s). Calls functions: Uses feature(s): _eval_, _read_, _setopt_, _trap_ -print_my_line -~~~~~~~~~~~~~ +==== print_my_line ____ @@ -42,6 +32,7 @@ ____ $3 - total objects $4 - receiving percentage $5 - resolving percentage + ____ Has 13 line(s). Doesn't call other functions. @@ -50,8 +41,7 @@ Called by: Script-Body -print_my_line_compress -~~~~~~~~~~~~~~~~~~~~~~ +==== print_my_line_compress Has 12 line(s). Doesn't call other functions. @@ -59,12 +49,12 @@ Called by: Script-Body -timeline -~~~~~~~~ +==== timeline ____ Code by leoj3n + ____ Has 15 line(s). Doesn't call other functions. diff --git a/doc/zsdoc/rpm2cpio.zsh.adoc b/doc/zsdoc/rpm2cpio.zsh.adoc index 930bdf31..7af8b7fc 100644 --- a/doc/zsdoc/rpm2cpio.zsh.adoc +++ b/doc/zsdoc/rpm2cpio.zsh.adoc @@ -1,24 +1,15 @@ -rpm2cpio.zsh(1) -=============== -:compat-mode!: NAME ----- + rpm2cpio.zsh - a shell script -SYNOPSIS --------- Documentation automatically generated with `zshelldoc' -FUNCTIONS ---------- +== FUNCTIONS +=== DETAILS -DETAILS -------- - -Script Body -~~~~~~~~~~~ +==== Script Body Has 51 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.). diff --git a/doc/zsdoc/zinit-install.zsh.adoc b/doc/zsdoc/zinit-install.zsh.adoc index 2c97b019..a47515c7 100644 --- a/doc/zsdoc/zinit-install.zsh.adoc +++ b/doc/zsdoc/zinit-install.zsh.adoc @@ -850,7 +850,7 @@ ____ ____ -Has 549 line(s). Doesn't call other functions. +Has 573 line(s). Doesn't call other functions. Uses feature(s): _autoload_, _bindkey_, _compdef_, _compdump_, _eval_, _read_, _setopt_, _unfunction_, _zle_, _zstyle_ diff --git a/doc/zsdoc/zinit.zsh.adoc b/doc/zsdoc/zinit.zsh.adoc index 7a8d8e17..eb1ed8ed 100644 --- a/doc/zsdoc/zinit.zsh.adoc +++ b/doc/zsdoc/zinit.zsh.adoc @@ -85,7 +85,7 @@ PRECMD-HOOK @zinit-scheduler ==== Script Body -Has 244 line(s). Calls functions: +Has 240 line(s). Calls functions: Script-Body |-- +zinit-message @@ -1908,7 +1908,7 @@ ____ ____ -Has 117 line(s). Doesn't call other functions. +Has 120 line(s). Doesn't call other functions. Called by: @@ -1931,7 +1931,7 @@ ____ ____ -Has 549 line(s). Doesn't call other functions. +Has 573 line(s). Doesn't call other functions. Uses feature(s): _autoload_, _bindkey_, _compdef_, _compdump_, _eval_, _read_, _setopt_, _unfunction_, _zle_, _zstyle_