1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/bin/make
DOC = fai-guide
MISC_DOC = classes_description.txt changelog.old
DOC2DIR = $(shell pwd)/../debian/fai-setup-storage/usr/share/doc/fai-setup-storage
OPT = --dblatex-opts "-P latex.output.revhistory=0"
free: text html pdf
# echo "`grep -c FIXME $(DOC).txt` FIXMEs left to fix:"
# grep FIXME $(DOC).txt
images:
ln -fs /usr/share/asciidoc/images images
html: $(DOC).txt images
asciidoc -a toc2 -a toclevels=3 --theme=flask $(DOC).txt
pdf: $(DOC).txt images
a2x $(OPT) -L --icons -a toc -a toclevels=3 -f pdf $(DOC).txt
rm -f $(DOC).xml $(DOC).fo
# a2x uses lynx, maybe use w3m instead
# which texwidth for text output?
# asciidoc --doctype=article -a "toc" -a "toclevels=3" -f /etc/asciidoc/text.conf -b html4 -o - "f-guide.txt" | lynx -dump -stdin >"./f-guide.text"
text: $(DOC).txt
a2x $(OPT) -L -a toc -a toclevels=3 -f text $(DOC).txt
# for openoffice
doc: html
unoconv --show >/dev/null 2>&1 || exit "Please install the unoconv package."
unoconv -f doc $(DOC).html
.NOTPARALLEL: free
all: free
install:
cp -dRp $(DOC)* $(DOCDIR)
cp -p $(MISC_DOC) $(DOCDIR)
cp -p setup-storage-call-graph.txt setup-storage-overview.txt $(DOC2DIR)
clean:
rm -rf images .a2x-icons grohtml-*.png
rm -f $(DOC).text $(DOC).html $(DOC).doc $(DOC).pdf $(DOC).xml $(DOC).ps* docbook-xsl.css
test:
asciidoc --version > /dev/null 2>&1 || exit "Please install the asciidoc package."
.PHONY: all test clean
|