SRCDIR=mlastyle TEXMFDIR=`if id|grep '^uid=0' >/dev/null; then kpsewhich --expand-path='$$TEXMFLOCAL'; else kpsewhich --expand-path='$$HOMETEXMF'; fi` INSTALLDIR=$(TEXMFDIR)/tex/latex/mlastyle DOCDIR=$(TEXMFDIR)/doc/latex/mlastyle BSTDIR=$(TEXMFDIR)/bst/mlastyle VERSION=`grep '^\\\\def\\\\fileversion' mlastyle.dtx | sed 's/^\\\\def\\\\fileversion{\\(.*\\)\\.\\(.*\\)}/\\1_\\2/'` LATEX=latex PDFLATEX=pdflatex DVIPS=dvips MAKEINDEX=/usr/bin/makeindex .SUFFIXES: .sty .ins .dtx .dvi .ps .pdf .ind .idx .gls .glo .PHONY: clean distclean tar zip install target %.ind: %.idx $(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo $(MAKEINDEX) -s gind.ist -o $*.ind $*.idx %.idx: %.dtx $(LATEX) $< %.dvi: %.sty %.dtx %.ind $(LATEX) $*.dtx $(LATEX) $*.dtx %.sty: %.ins %.dtx $(LATEX) $*.ins #.dtx.dvi: # $(LATEX) $< # $(LATEX) $< # $(MAKEINDEX) -s gind.ist $(*D)/$(*F) # $(MAKEINDEX) -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo # $(LATEX) $< %.ps: %.dvi $(DVIPS) -o $@ $< %.pdf: %.dtx %.ind $(PDFLATEX) $*.dtx $(PDFLATEX) $*.dtx target: mlastyle.sty mlastyle.dvi instructions all: mlastyle.sty mlastyle.dvi mlastyle.pdf mlastyle.ps zip tar mlastyle: mlastyle.sty clean: rm -f *.glo *.gls *.idx *.ilg *.ind *.toc *.log *.aux *.blg *.bbl *~ distclean: clean rm -f mlastyle.sty mlastyle.dvi mlastyle.ps mlastyle.pdf tar: mlastyle.sty mlastyle.dvi clean rm -f mlastyle.tar.gz tar czCf .. mlastyle.tar.gz \ $(SRCDIR)/README $(SRCDIR)/Makefile \ $(SRCDIR)/mlastyle.dtx \ $(SRCDIR)/mlastyle.ins \ $(SRCDIR)/mlastyle.dvi zip: mlastyle.sty mlastyle.dvi clean mkdirhier tex/latex/mlastyle/ mkdirhier doc/latex/mlastyle/ mkdirhier source/latex/mlastyle/ mkdirhier bibtex/bst/mlastyle/ cp *.sty tex/latex/mlastyle/ cp mlastyle.dvi README doc/latex/mlastyle/ cp mlastyle.dtx mlastyle.ins Makefile source/latex/mlastyle/ cp *.bst bibtex/bst/mlastyle/ rm -f mlastyle.zip zip -r mlastyle.zip tex doc source bibtex rm -rf tex doc source bibtex install: all if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi if [ ! -d $(BSTDIR) ]; then mkdirhier $(BSTDIR); fi install -m644 mlastyle.sty $(INSTALLDIR) install -m644 mlastyle.bst $(BSTDIR) install -m644 mlastyle.dvi $(DOCDIR) texhash instructions: @echo "Now run make install, or copy mlastyle.sty to a directory" @echo "in the LaTeX search path" mlastyle.sty: mlastyle.ins mlastyle.dtx mlastyle.dvi: mlastyle.sty