2 TEXMFDIR=`if id|grep '^uid=0' >/dev/null; then kpsewhich --expand-path='$$TEXMFLOCAL'; else kpsewhich --expand-path='$$HOMETEXMF'; fi`
3 INSTALLDIR=$(TEXMFDIR)/tex/latex/mlastyle
4 DOCDIR=$(TEXMFDIR)/doc/latex/mlastyle
5 BSTDIR=$(TEXMFDIR)/bst/mlastyle
6 VERSION=`grep '^\\\\def\\\\fileversion' mlastyle.dtx | sed 's/^\\\\def\\\\fileversion{\\(.*\\)\\.\\(.*\\)}/\\1_\\2/'`
10 MAKEINDEX=/usr/bin/makeindex
13 .SUFFIXES: .sty .ins .dtx .dvi .ps .pdf .ind .idx .gls .glo
14 .PHONY: clean distclean tar zip install target
17 $(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo
18 $(MAKEINDEX) -s gind.ist -o $*.ind $*.idx
23 %.dvi: %.sty %.dtx %.ind
33 # $(MAKEINDEX) -s gind.ist $(*D)/$(*F)
34 # $(MAKEINDEX) -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo
44 target: mlastyle.sty mlastyle.dvi instructions
46 all: mlastyle.sty mlastyle.dvi mlastyle.pdf mlastyle.ps zip tar
48 mlastyle: mlastyle.sty
51 rm -f *.glo *.gls *.idx *.ilg *.ind *.toc *.log *.aux *.blg *.bbl *~
54 rm -f mlastyle.sty mlastyle.dvi mlastyle.ps mlastyle.pdf
56 tar: mlastyle.sty mlastyle.dvi clean
58 tar czCf .. mlastyle.tar.gz \
59 $(SRCDIR)/README $(SRCDIR)/Makefile \
60 $(SRCDIR)/mlastyle.dtx \
61 $(SRCDIR)/mlastyle.ins \
62 $(SRCDIR)/mlastyle.dvi
65 zip: mlastyle.sty mlastyle.dvi clean
66 mkdirhier tex/latex/mlastyle/
67 mkdirhier doc/latex/mlastyle/
68 mkdirhier source/latex/mlastyle/
69 mkdirhier bibtex/bst/mlastyle/
70 cp *.sty tex/latex/mlastyle/
71 cp mlastyle.dvi README doc/latex/mlastyle/
72 cp mlastyle.dtx mlastyle.ins Makefile source/latex/mlastyle/
73 cp *.bst bibtex/bst/mlastyle/
75 zip -r mlastyle.zip tex doc source bibtex
76 rm -rf tex doc source bibtex
80 if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi
81 if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi
82 if [ ! -d $(BSTDIR) ]; then mkdirhier $(BSTDIR); fi
83 install -m644 mlastyle.sty $(INSTALLDIR)
84 install -m644 mlastyle.bst $(BSTDIR)
85 install -m644 mlastyle.dvi $(DOCDIR)
89 @echo "Now run make install, or copy mlastyle.sty to a directory"
90 @echo "in the LaTeX search path"
93 mlastyle.sty: mlastyle.ins mlastyle.dtx
95 mlastyle.dvi: mlastyle.sty