2021-02-04 18:01:45 +01:00
|
|
|
all: ug.pdf ug.html
|
2020-11-04 12:56:35 +01:00
|
|
|
|
|
|
|
TTYOPT=-rPO=4m -rLL=72m
|
2020-11-09 12:09:22 +01:00
|
|
|
PDFOPT=-dpaper=a4 -rPO=4c -rLL=13c
|
2021-01-26 12:57:09 +01:00
|
|
|
#MMOPT=-dpaper=a4 -rpo=5c -rll=13c
|
2020-11-09 12:09:22 +01:00
|
|
|
PREPROC=-k -t -p -R
|
2021-01-26 12:57:09 +01:00
|
|
|
POSTPROC=
|
2021-01-26 22:44:15 +01:00
|
|
|
REGISTERS=-dcurdate="`date '+%Y-%m-%d'`"
|
|
|
|
REGISTERS+=-dgitcommit="`git rev-parse HEAD`"
|
2021-02-04 14:49:02 +01:00
|
|
|
|
|
|
|
PREPROC+=$(REGISTERS)
|
2021-02-04 18:01:45 +01:00
|
|
|
HTML_OPT=$(PREPROC) -P-Dimg -P-i120 -Thtml
|
2021-01-26 12:57:09 +01:00
|
|
|
# Embed fonts?
|
|
|
|
#POSTPROC+=-P -e
|
2020-10-07 18:34:08 +02:00
|
|
|
|
2021-02-01 11:09:53 +01:00
|
|
|
blackbox.pdf: blackbox.ms Makefile
|
|
|
|
REFER=ref.i groff -ms $(PREPROC) -dpaper=a4 -rPO=2c -rLL=17c -Tpdf $< > $@
|
2021-01-25 20:02:25 +01:00
|
|
|
|
2021-02-08 18:53:10 +01:00
|
|
|
%.html: %.ms Makefile
|
2021-02-04 15:03:28 +01:00
|
|
|
mkdir -p img
|
2021-02-04 14:49:02 +01:00
|
|
|
REFER=ref.i groff -ms -mwww $(HTML_OPT) $< > $@
|
|
|
|
echo $(HTML_OPT)
|
2021-02-08 18:53:10 +01:00
|
|
|
sed -i '/<\/head>/i<link rel="stylesheet" href="s.css">' $@
|
2021-02-04 14:49:02 +01:00
|
|
|
sed -i 's/^<a name="\([^"]*\)"><\/a>/<a name="\1" href="#\1">\§<\/a>/g' $@
|
|
|
|
#sed -i '/<h1 /,/<hr>/s/^<a href="#[0-9]\+\.[0-9]\+\.[0-9]\+.*//' $@
|
|
|
|
sed -i '/<h1 /,/<hr>/s/^<a href="#[0-9]\+\.[0-9]\+.*//' $@
|
2021-01-26 22:44:15 +01:00
|
|
|
|
2020-11-09 12:09:22 +01:00
|
|
|
%.pdf: %.ms Makefile
|
2021-02-04 14:49:02 +01:00
|
|
|
REFER=ref.i groff -ms -mwww $(PREPROC) $(PDFOPT) -Tpdf $< > $@
|
2020-10-30 12:22:19 +01:00
|
|
|
-killall -HUP mupdf
|
2020-10-07 18:34:08 +02:00
|
|
|
|
2020-11-04 12:56:35 +01:00
|
|
|
%.utf8: %.ms
|
2021-02-04 14:49:02 +01:00
|
|
|
REFER=ref.i groff -ms -mwww $(PREPROC) $(TTYOPT) -Tutf8 $^ > $@
|
2020-11-04 12:56:35 +01:00
|
|
|
|
|
|
|
%.ascii: %.ms
|
2021-02-04 14:49:02 +01:00
|
|
|
REFER=ref.i groff -ms -mwww -c $(PREPROC) $(TTYOPT) -Tascii $^ > $@
|
2021-02-04 15:03:28 +01:00
|
|
|
|
|
|
|
doc.tar.gz: ug.pdf ug.html s.css
|
|
|
|
tar czf $@ $^ img s.css
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf img ug.pdf ug.html doc.tar.gz
|