TARGET=disser TEXMF=/usr/share/texmf DESTDIR=$(TEXMF)/tex/latex/$(TARGET) DOCDIR=$(TEXMF)/doc/latex/$(TARGET) LATEX=latex INSTFILES=*.cls *.rtx DOCFILES=$(TARGET).dvi CLEANFILES=$(INSTFILES) *.log *.out *.aux *.dvi *.idx *.glo *.toc *.bak *.bbl *.blg all: *.cls doc install: all mkdir -p $(DESTDIR) mkdir -p $(DOCDIR) cp $(INSTFILES) $(DESTDIR) cp $(DOCFILES) $(DOCDIR) %.cls: %.ins $(LATEX) $< doc: $(TARGET).dvi $(TARGET).dvi: $(TARGET).dtx $(LATEX) $< $(LATEX) -src-specials $< clean: rm -f $(CLEANFILES)