# # Makefile for LaTeX packages # Author: Stanislav Kruchinin # TARGET=disser SUBCLASS=gost732 TEXMF=/usr/share/texmf DESTDIR=$(TEXMF)/tex/latex/$(TARGET) DOCDIR=$(TEXMF)/doc/latex/$(TARGET) TEX=latex PDFTEX=pdflatex TEXFLAGS= INSTFILES=*.cls *.rtx DOCFILES=*.dvi *.pdf CLEXT= *.log *.out *.aux *.dvi *.idx *.glo *.toc *.bak *.bbl *.blg CLFILES=$(INSTFILES) $(DOCFILES) $(CLEXT) all: class doc class: *.cls doc: dvi pdf dvi: $(TARGET).dvi $(SUBCLASS).dvi pdf: $(TARGET).pdf $(SUBCLASS).pdf install: all mkdir -p $(DESTDIR) mkdir -p $(DOCDIR) cp $(INSTFILES) $(DESTDIR) cp $(DOCFILES) $(DOCDIR) clean: rm -f $(CLFILES) %.cls: %.ins $(TEX) $< %.dvi: %.dtx $(TEX) $(TEXFLAGS) $< $(TEX) $(TEXFLAGS) $< %.pdf: %.dtx $(PDFTEX) $(TEXFLAGS) $< $(PDFTEX) $(TEXFLAGS) $< help: @echo "Targets:" @echo " all - (default) build classes and documentation" @echo " class - build classes" @echo " clean - remove ouptut files" @echo " doc - build DVI and PDF versions of documentation" @echo " dvi - build DVI version of documentation" @echo " pdf - build PDF version of documentation" @echo " install - install package and documentation" @echo " help - show help"