Skip to content

Commit

Permalink
ZI's code documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-o committed Nov 12, 2021
1 parent be2b41e commit 09fbcaf
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docs/zsdoc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This Makefile is to convert supplied Asciidoc files into
# other formats like pdf and man. The files contain ZI's
# code documentation.
# *.adoc files are generated root directory Makefile.

all: man pdf

# MAN
# Converted with a2x from asciidoc package

man: man/zinit.zsh.1 man/zinit-side.zsh.1 man/zinit-install.zsh.1 man/zinit-autoload.zsh.1

man/zinit.zsh.1:
@mkdir -p man
a2x --verbose -L --doctype manpage --format manpage -D man zinit.zsh.adoc

man/zinit-side.zsh.1:
@mkdir -p man
a2x --verbose -L --doctype manpage --format manpage -D man zinit-side.zsh.adoc

man/zinit-install.zsh.1:
@mkdir -p man
a2x --verbose -L --doctype manpage --format manpage -D man zinit-install.zsh.adoc

man/zinit-autoload.zsh.1:
@mkdir -p man
a2x --verbose -L --doctype manpage --format manpage -D man zinit-autoload.zsh.adoc

# PDF
# Uses asciidoctor not a2x (i.e. not asciidoc)

pdf: pdf/zinit.zsh.pdf pdf/zinit-side.zsh.pdf pdf/zinit-install.zsh.pdf pdf/zinit-autoload.zsh.pdf

pdf/zinit.zsh.pdf:
@mkdir -p pdf
asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit.zsh.adoc

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

clean:
rm -rf man pdf data

.PHONY: man pdf clean
3 changes: 3 additions & 0 deletions lib/zcompile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env zsh

zcompile "$@"

0 comments on commit 09fbcaf

Please sign in to comment.