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
14 .PHONY: clean distclean tar zip install target
17 $(MAKEINDIX) -s gglo.ist -o $@ $<
18 $(MAKEINDEX) -s gind.ist $<
34 # $(MAKEINDEX) -s gind.ist $(*D)/$(*F)
35 # $(MAKEINDEX) -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo
45 target: mlastyle.sty mlastyle.dvi
47 all: mlastyle.sty mlastyle.dvi mlastyle.pdf mlastyle.ps zip tar
49 mlastyle: mlastyle.sty
52 rm -f *.glo *.gls *.idx *.ilg *.ind *.toc *.log *.aux *.blg *.bbl
56 rm -f mlastyle.sty mlastyle.dvi mlastyle.ps mlastyle.pdf
58 tar: mlastyle.sty mlastyle.dvi clean
60 tar czCf .. mlastyle.tar.gz \
61 $(SRCDIR)/README $(SRCDIR)/Makefile \
62 $(SRCDIR)/mlastyle.dtx \
63 $(SRCDIR)/mlastyle.ins \
64 $(SRCDIR)/mlastyle.dvi
67 zip: mlastyle.sty mlastyle.dvi clean
68 mkdirhier tex/latex/mlastyle/
69 mkdirhier doc/latex/mlastyle/
70 mkdirhier source/latex/mlastyle/
71 mkdirhier bibtex/bst/mlastyle/
72 cp *.sty tex/latex/mlastyle/
73 cp mlastyle.dvi README doc/latex/mlastyle/
74 cp mlastyle.dtx mlastyle.ins Makefile source/latex/mlastyle/
75 cp *.bst bibtex/bst/mlastyle/
77 zip -r mlastyle.zip tex doc source bibtex
78 rm -rf tex doc source bibtex
82 if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi
83 if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi
84 if [ ! -d $(BSTDIR) ]; then mkdirhier $(BSTDIR); fi
85 install -m644 mlastyle.sty $(INSTALLDIR)
86 install -m644 mlastyle.bst $(BSTDIR)
87 install -m644 mlastyle.dvi $(DOCDIR)
91 @echo "Please copy mlastyle.sty to a directory"
92 @echo "in the LaTeX search path"
95 mlastyle.sty: mlastyle.ins mlastyle.dtx
97 mlastyle.dvi: mlastyle.sty