Fixed distclean target
[latex-mlastyle.git] / Makefile
index 9a09208209e93029949b05f633a0995493742172..ab16ecb886c3003f704dda449ecedbce732c5ed1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,10 +53,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)