From b8941c8f67a2cb804e0152fa06555d56b0af20ec Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 14 Jun 2017 13:46:05 +0200 Subject: [PATCH] move tfm.tex to doc --- doc/makefile | 31 +++++++++++++++++++++++++++++++ tfm.tex => doc/tfm.tex | 0 makefile | 23 ----------------------- makefile_include.mk | 6 ++++++ 4 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 doc/makefile rename tfm.tex => doc/tfm.tex (100%) diff --git a/doc/makefile b/doc/makefile new file mode 100644 index 0000000..af64450 --- /dev/null +++ b/doc/makefile @@ -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 \ No newline at end of file diff --git a/tfm.tex b/doc/tfm.tex similarity index 100% rename from tfm.tex rename to doc/tfm.tex diff --git a/makefile b/makefile index f6176cc..931bd90 100644 --- a/makefile +++ b/makefile @@ -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$ diff --git a/makefile_include.mk b/makefile_include.mk index d8d1b78..8287f9b 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -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