| 1 |
%.html : %.txt ; |
| 2 |
asciidoc -b xhtml11 $^ |
| 3 |
|
| 4 |
%.gz : %.txt ; |
| 5 |
asciidoc -d manpage -b docbook $^ |
| 6 |
#sed -i 's/<emphasis role="strong">/<emphasis role="bold">/g' `echo $^ |sed -e 's/.txt/.xml/'` |
| 7 |
xsltproc -nonet /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl `echo $^ |sed -e 's/.txt/.xml/'` >/dev/null |
| 8 |
# ugly hack to avoid '.sp' at the end of a sentence or paragraph: |
| 9 |
sed -i 's/\.sp//' `echo $^ |sed -e 's/.txt//'` |
| 10 |
gzip -f --best `echo $^ |sed -e 's/.txt//'` |
| 11 |
|
| 12 |
MANPAGES = grml-paste.1 |
| 13 |
|
| 14 |
all: doc |
| 15 |
|
| 16 |
doc: doc_man doc_html |
| 17 |
doc_html: $(addsuffix .html, $(MANPAGES)) |
| 18 |
doc_man: $(addsuffix .gz, $(MANPAGES)) |
| 19 |
|
| 20 |
clean: |
| 21 |
@for i in $(MANPAGES); do \ |
| 22 |
rm -f $$i.html $$i.xml $$i.gz; done |
| 23 |
|
| 24 |
lint: |
| 25 |
flake8 --max-line-length=120 grml-paste |