From f026fe6d5ef32125ee5809c27d9a15b58449b8b5 Mon Sep 17 00:00:00 2001 From: malc Date: Thu, 12 Apr 2018 09:20:50 +0300 Subject: [PATCH] Continue (Sh|m)ake-iication --- build.sh | 25 +++++++++++++++++++++++++ man/Makefile | 12 ------------ 2 files changed, 25 insertions(+), 12 deletions(-) delete mode 100644 man/Makefile diff --git a/build.sh b/build.sh index b34d7a6..f0745dd 100755 --- a/build.sh +++ b/build.sh @@ -162,6 +162,31 @@ isfresh "$outd/help.ml" '$cmd$(eval $keycmd)$ver' || { echo "k='$cmd$(eval $keycmd)$ver'" >"$outd/help.ml.past" } && vecho "fresh $outd/help.ml" + +case "${2-}" in + man) + md=$outd/man + mkdir -p $md + for m in llpp llppac llpphtml; do + man=$srcd/man/$m.man + xml=$md/$m.xml + out=$md/$m.1 + ketcmd="digest $xml $man" + conf="$srcd/man/asciidoc.conf" + cmd="asciidoc -d manpage -b docbook -f $conf -o '$xml' '$man'" + isfresh "$xml" "$cmd$(eval $keycmd)" || { + eval $cmd + echo "k='$cmd$(eval $keycmd)'" >"$md/$m.past" + } + ketcmd="digest $out $xml" + isfresh "$out" "$cmd$(eval $keycmd)" || { + xmlto man -o $md $xml + } + done + shift;; + *) ;; +esac + # following is disgusting (from "generalize everything" perspective), # but generic method of derviving .ml's location from .mli's is not # immediately obvious diff --git a/man/Makefile b/man/Makefile deleted file mode 100644 index 4da0913..0000000 --- a/man/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -.PHONY: all -all: llpp.1 llppac.1 llpphtml.1 - -%.1: %.xml - xmlto man -o . $< - -%.xml: %.man asciidoc.conf - asciidoc -d manpage -b docbook -f asciidoc.conf -o $@ $< - -.PHONY: clean -clean: - rm -f llpp.1 llppac.1 llpphtml.1 -- 2.11.4.GIT