# # $Id: Makefile,v 1.5 2000/06/25 18:52:38 rgb Exp $ # #====================================================================== # THIS IS A "GENERIC" MAKEFILE FOR LATEX PROJECTS # # make alone makes only the $(DVI) file, running latex twice # so that all references and toc's are correct. # # make ps makes $(PS) (and $(DVI) if necessary) # make pdf makes $(PDF) (and $(PS) and $(DVI) as necessary) # make clean deletes all transient build files and output formats. # make tar makes $(TAR) from >>all<< the sources # make gz makes $(TARGZ) from >>all<< the sources # make cvs does a cvs commit and creates the timestamp $(CVS) # make sync does a cvs commit and runs synccvs to list of # CVSROOT hosts # #======================================================================= # This is the main source file, which should have the same base name # as the project (CVS and build directory). SOURCE = als.tex # The list of includes are things required for the build to work. Examples # might be included .tex or .sty files, embedded .eps files, and so forth. # Naturally, anything on this list should be in the CVS tree. INCLUDE = beowulf.fig beowulf.eps cluster.fig cluster.eps \ bscaling.Tis10.eps bscaling.Tis0.eps bscaling.Tis1.eps \ bscaling.Tis1.Psq.eps \ scaling.sm # All sources (tex and ps) SOURCES = $(SOURCE) $(INCLUDE) DIR = $(SOURCE:.tex=) DVI = $(SOURCE:.tex=.dvi) AUX = $(SOURCE:.tex=.aux) LOG = $(SOURCE:.tex=.log) ERR = $(SOURCE:.tex=.err) PS = $(SOURCE:.tex=.ps) PDF = $(SOURCE:.tex=.pdf) TAR = $(SOURCE:.tex=.tar) CVS = $(SOURCE:.tex=.cvs.time) # Build targets (from rules) all: $(DVI) ps: $(DVI) $(PS) pdf: $(DVI) $(PS) $(PDF) # Build targets (from commands) tar: $(SOURCES) rm -f $(DVI) $(AUX) $(LOG) $(ERR) $(PS) $(PDF) tar -cvpf $(TAR) -C .. $(DIR) gz: $(SOURCES) $(TAR) gzip $(TAR) cvs: echo "New Checkin at `date`" >> $(CVS) # Will force a commit and increment revision cvs commit . # doesn't sync (yet). cat $(CVS) | \ sed -e '/^New Checkin/d' >> $(CVS).tmp mv $(CVS).tmp $(CVS) sync: echo "New Checkin at `date`" >> $(CVS) # Will force a commit and increment revision cvs commit . # Do the commit synccvs $(DIR) ganesh synccvs $(DIR) rgb # synccvs $(DIR) lilith # Probably bombs unless lilith is up. cat $(CVS) | \ sed -e '/^New Checkin/d' >> $(CVS).tmp mv $(CVS).tmp $(CVS) # Clean up all the junk build files and output formats to save space. clean: rm -f $(DVI) $(AUX) $(LOG) $(ERR) $(PS) $(PDF) # Rule for making dvi out of tex. Do it twice to build table of contents # and resolve forward references. %.dvi:%.tex latex $< $@ latex $< $@ # Rule for making postscript image %.ps:%.dvi dvips -o $@ $< # Rule for making pdf out of a postscript image %.pdf:%.ps ps2pdf $<