From f5e2a7df6b4e31cb8bdf4047c13f1b2b9ac3b352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Sun, 7 Jan 2024 18:07:14 +0100 Subject: [PATCH] add checkibw makefile --- thesis/checkbiw/doc/Makefile | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 thesis/checkbiw/doc/Makefile diff --git a/thesis/checkbiw/doc/Makefile b/thesis/checkbiw/doc/Makefile new file mode 100644 index 0000000..e688fd4 --- /dev/null +++ b/thesis/checkbiw/doc/Makefile @@ -0,0 +1,49 @@ +TXTFILES := mustread.txt manpage.txt +BIBFILES := own.bib + +# NOTE: Remember to check out the gosh submodule using +# git submodule init +# git submodule update +GOSHDIR := ../../gosh +GOSH := $(GOSHDIR)/gosh +TXT2TEX_OPT := --style manual.gosh +TXT2MAN_OPT := --style $(GOSHDIR)/man.gosh + +TEXFILES := $(patsubst %.txt, %.tex,$(TXTFILES)) +PDFFILES := $(TEXFILES:.tex=.pdf) + +MANPAGES := checkbiw.1 bugsinwriting.7 + +all:: mustread.pdf $(MANPAGES) + +# Make sure the corresponding txt files are the first dependency of +# each manpage -- the rule to create the manpages depends on this. +checkbiw.1: manpage.txt +bugsinwriting.7: mustread.txt +$(MANPAGES): $(GOSHDIR)/man.gosh $(GOSH) + +$(TEXFILES): manual.gosh $(GOSH) +$(PDFFILES) $(DVIFILES): $(BIBFILES) + +clean:: + rm -f *.aux *.bbl *.blg *.log *.ps *.toc *.pdf *.dvi *.idx *.new \ + $(TEXFILES) $(MANPAGES) + +cleanall:: clean + rm -f *~ + +$(MANPAGES): + $(GOSH) $(TXT2MAN_OPT) $< > $@.new + mv $@.new $@ + +.PRECIOUS: .tex +%.tex: %.txt + $(GOSH) $(TXT2TEX_OPT) $< > $@.new + mv $@.new $@ + +%.pdf: %.tex + pdflatex $< + bibtex $(basename $<) || true + pdflatex $< + pdflatex $< +