move tfm.tex to doc

This commit is contained in:
Steffen Jaeckel 2017-06-14 13:46:05 +02:00
parent 53baae2c99
commit b8941c8f67
4 changed files with 37 additions and 23 deletions

31
doc/makefile Normal file
View File

@ -0,0 +1,31 @@
ifeq ($V,1)
silent=
silent_stdout=
else
silent=@
silent_stdout= > /dev/null
endif
docdvi: tfm.tex
cp tfm.tex tfm.bak
touch --reference=tfm.tex tfm.bak
(printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y tfm.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > tfm-deterministic.tex
printf "%s\n" "\pdfinfo{" >> tfm-deterministic.tex
printf "%s\n" " /CreationDate (\fixedpdfdate)" >> tfm-deterministic.tex
printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> tfm-deterministic.tex
cat tfm.tex >> tfm-deterministic.tex
mv tfm-deterministic.tex tfm.tex
touch --reference=tfm.bak tfm.tex
touch tfm.ind
latex tfm $(silent_stdout)
latex tfm $(silent_stdout)
makeindex tfm
latex tfm $(silent_stdout)
tfm.pdf: docdvi
latex tfm $(silent_stdout)
pdflatex tfm $(silent_stdout)
sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' tfm.pdf
mv tfm.bak tfm.tex
docs: tfm.pdf

View File

@ -148,29 +148,6 @@ stest: $(LIBNAME) demo/stest.o
rsatest: $(LIBNAME) demo/rsa.o
$(CC) $(CFLAGS) demo/rsa.o $(LIBNAME) -o rsatest
docdvi: tfm.tex
cp tfm.tex tfm.bak
touch --reference=tfm.tex tfm.bak
(printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y tfm.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > tfm-deterministic.tex
printf "%s\n" "\pdfinfo{" >> tfm-deterministic.tex
printf "%s\n" " /CreationDate (\fixedpdfdate)" >> tfm-deterministic.tex
printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> tfm-deterministic.tex
cat tfm.tex >> tfm-deterministic.tex
mv tfm-deterministic.tex tfm.tex
touch --reference=tfm.bak tfm.tex
touch tfm.ind
latex tfm >/dev/null
latex tfm >/dev/null
makeindex tfm
latex tfm >/dev/null
docs: docdvi
latex tfm >/dev/null
pdflatex tfm >/dev/null
sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' tfm.pdf
mv tfm.bak tfm.tex
mv -f tfm.pdf doc
# $Source$
# $Revision$
# $Date$

View File

@ -91,6 +91,12 @@ clean:
rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.out tfm.toc test test.exe
cd mtest; MAKE=${MAKE} ${MAKE} clean
docs:
$(MAKE) -C doc/ $@ V=$(V)
doc/tfm.pdf:
$(MAKE) -C doc/ tfm.pdf V=$(V)
.PHONY: pre_gen
pre_gen:
perl gen.pl