mkfile (1224B)
1 # Requirements for generation of manpages on the host: 2 # - asciidoctor (and Ruby, etc...) 3 # - Plan9 mk in path 4 # - util-linux sources fetched with 01-cross.sh 5 # 6 # Generating manpages and making them available for installation scripts: 7 # 0. Fetch sources if not already with 01-cross.sh 8 # 1. Set GR (export GR=...) to the location from lib/env.sh, then: 9 # (cd $GR/src; gunzip -dc pkg/util-linux-*.tar.gz | tar -xf -) 10 # 2. find $GR/src/util-linux-* -name '*.adoc' -exec \ 11 # cp {} fil/util-linux-galeb/ \; 12 # 3. cp -R $GR/src/util-linux-*/man-common fil/util-linux-galeb/ 13 # 4. cd fil/util-linux-galeb; mk 14 # 5. Rerun 01-cross.sh, then 02-chroot.sh, etc as normal 15 # 16 adocs=`{find . -name '*.adoc' | grep -vf blacklist | sed 's,^./,,g'} 17 outputdirs=man/man1 man/man3 man/man8 18 manpages1=${adocs:%.1.adoc=man/man1/%.1} 19 manpages3=${adocs:%.3.adoc=man/man3/%.3} 20 manpages8=${adocs:%.8.adoc=man/man8/%.8} 21 22 man/man1/%.1: %.1.adoc 23 asciidoctor -b manpage -D man/man1 $stem.1.adoc 24 25 man/man3/%.3: %.3.adoc 26 asciidoctor -b manpage -D man/man3 $stem.3.adoc 27 28 man/man8/%.8: %.8.adoc 29 asciidoctor -b manpage -D man/man8 $stem.8.adoc 30 31 generate:V: dirs $manpages1 $manpages3 $manpages8 32 33 dirs:QV: 34 mkdir -p $outputdirs 35 36 clean:V: 37 rm -fr man