Integrated \NAT@citex and \NAT@parse@date
[latex-mlastyle.git] / Makefile
index 9a09208209e93029949b05f633a0995493742172..c6fa6c751629dc137a172440a4c1820ffb05d43a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,6 @@ FAKEROOT=`[ -x /usr/bin/fakeroot ] && echo /usr/bin/fakeroot`
 
 %.bbl: %.bib
        $(BIBTEX) $*.aux
-       $(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo
-       $(MAKEINDEX) -s gind.ist -o $*.ind $*.idx
 
 %.bib: %.dtx
        $(LATEX) $<
@@ -30,6 +28,9 @@ FAKEROOT=`[ -x /usr/bin/fakeroot ] && echo /usr/bin/fakeroot`
 %.dvi: %.sty %.dtx %.bbl
        $(LATEX) $*.dtx
        $(LATEX) $*.dtx
+       $(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo
+       $(MAKEINDEX) -s gind.ist -o $*.ind $*.idx
+       $(LATEX) $*.dtx
 
 %.ps: %.dvi
        $(DVIPS) -o $@ $<
@@ -53,10 +54,8 @@ clean:
 
 distclean: clean
        rm -f mlastyle.sty mlastyle.dvi mlastyle.ps mlastyle.pdf
-       rm -rf $(LTXDIR) $(DOCDIR) $(SRCDIR) $(BSTDIR)
-       rmdir `dirname $(LTXDIR)` `dirname $(DOCDIR)`
-       rmdir `dirname $(SRCDIR)` `dirname $(BSTDIR)`
-       rmdir tex doc source bibtex
+       rm -rf $(LTXDIR)/* $(DOCDIR)/* $(SRCDIR)/* $(BSTDIR)/*
+       [ ! -d $(LTXDIR) ] || rmdir -p $(LTXDIR) $(DOCDIR) $(SRCDIR) $(BSTDIR)
 
 tar:   mlastyle.sty mlastyle.dvi clean
        mkdir mlastyle-$(VERSION)