# This is Makefile to build the thesis, paper and screen version # $Id: Makefile,v 1.23 2001/11/26 14:01:31 antos Exp $ # To build the thesis, run # texexec --once thesis; bibtex thesis; make # to create the bibliography first. # # The goals here produce the thesis in ps, pdf and screen version, the same # for the user guide, and screen interactive versions of the program # listings. The goal names are self-explaining. # # Troubleshooting: # # When creating cweb listings, if it fails, delete the *.toc files in # ../src/ directory. The sources in ../src/ must be compiled in advance, of # course. # # After compilation of thesis, check if the diagrams are OK. To be on the # safe side, run each goal twice (in between you may touch defs.tex to make # make recompile). ### ALL ######### .PHONY: all all: thesis userguide all_cweb ### THESIS ###### .PHONY: thesis thesis: thesis-p.ps thesis-p.pdf thesis-s.pdf # Files to build the thesis text (thesis must be first!) THESIS_FILES = thesis.tex defs.tex e-thesis.tex \ front.tex intro.tex patterns.tex current.tex tpatlib.tex \ struct.tex topatgen.tex conclusion.tex \ cdrom.tex userguide.tex \ thesis.bbl # Building the thesis thesis-p.ps: thesis-p.dvi dvips $< -o $@ thesis-p.dvi: $(THESIS_FILES) texexec $< --suffix=-p thesis-p.pdf: $(THESIS_FILES) texexec $< --suffix=-p --pdf thesis-s.pdf: $(THESIS_FILES) texexec $< --pdf --mode=screen --suffix=-s # Stand-alone version of the user guide .PHONY: userguide userguide: userguide-p.ps userguide-p.pdf userguide-s.pdf USERGUIDE_FILES = userguide.tex defs.tex userguide-p.ps: userguide-p.dvi dvips userguide-p.dvi -o userguide-p.ps userguide-p.dvi: $(USERGUIDE_FILES) texexec $< --suffix=-p userguide-p.pdf: $(USERGUIDE_FILES) texexec $< --pdf --suffix=-p userguide-s.pdf: $(USERGUIDE_FILES) texexec $< --pdf --mode=screen --suffix=-s ### SOURCES ####### # Pretty printing the source files # Turn off the default rule %.tex: %.w .PHONY: all_cweb all_cweb_paper all_cweb_screen all_cweb: all_cweb_screen # all_cweb_paper all_cweb_paper: c-patlib-p.pdf c-opatgen-p.pdf all_cweb_screen:c-patlib-s.pdf c-opatgen-s.pdf CWEB_E_FILES = defs.tex e-cweb.tex CWEB_PATH_PREFIX = ../src/ PATLIB_FILES = $(CWEB_PATH_PREFIX)patlib.tex \ $(CWEB_PATH_PREFIX)patlib.idx \ $(CWEB_PATH_PREFIX)patlib.scn # We have to delete the toc file as it stops our compilation if there is # plain version of it .PHONY: c-patlib-toc-rm c-patlib-toc-rm: # -rm $(CWEB_PATH_PREFIX)/patlib.toc c-patlib-p.pdf: c-patlib.tex $(PATLIB_FILES) $(CWEB_E_FILES) c-patlib-toc-rm texexec --pdf --suffix=-p $< c-patlib-s.pdf: c-patlib.tex $(PATLIB_FILES) $(CWEB_E_FILES) c-patlib-toc-rm texexec --pdf --suffix=-s --mode=screen $< OPATGEN_FILES = $(CWEB_PATH_PREFIX)opatgen.tex \ $(CWEB_PATH_PREFIX)opatgen.idx \ $(CWEB_PATH_PREFIX)opatgen.scn .PHONY: c-opatgen-toc-rm c-opatgen-toc-rm: # -rm $(CWEB_PATH_PREFIX)/opatgen.toc c-opatgen-p.pdf:c-opatgen.tex $(OPATGEN_FILES) $(CWEB_E_FILES) c-opatgen-toc-rm texexec --pdf --suffix=-p $< c-opatgen-s.pdf:c-opatgen.tex $(OPATGEN_FILES) $(CWEB_E_FILES) c-opatgen-toc-rm texexec --pdf --suffix=-s --mode=screen $< ### MISC ########## .PHONY: purge zip purge: texutil --purge zip: $(THESIS_FILES) zip all.zip $^