Fixed Change History generation
[latex-mlastyle.git] / Makefile
index 0b08d71e88d6e1403bd436f6f927c1c93e05bc36..a09258a737cac13db33de68a1d2023c77f2f2df6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,23 +10,22 @@ DVIPS=dvips
 MAKEINDEX=/usr/bin/makeindex
 
 
-.SUFFIXES: .sty .ins .dtx .dvi .ps .pdf
-.PHONY: clean distclean tar zip install
+.SUFFIXES: .sty .ins .dtx .dvi .ps .pdf .ind .idx .gls .glo
+.PHONY: clean distclean tar zip install target
 
 %.ind: %.idx
-       $(MAKEINDIX) -s gglo.ist -o $@ $<
-       $(MAKEINDEX) -s gind.ist $<
+       $(MAKEINDEX) -s gglo.ist -o $*.gls $*.glo
+       $(MAKEINDEX) -s gind.ist -o $*.ind $*.idx
 
 %.idx: %.dtx
        $(LATEX) $<
 
-%.dvi: %.dtx %.ind
+%.dvi: %.sty %.dtx %.ind
        $(LATEX) $*.dtx
        $(LATEX) $*.dtx
 
 %.sty: %.ins %.dtx
        $(LATEX) $*.ins
-       $(LATEX) $<
 
 #.dtx.dvi:
 #      $(LATEX) $<
@@ -42,20 +41,19 @@ MAKEINDEX=/usr/bin/makeindex
        $(PDFLATEX) $*.dtx
        $(PDFLATEX) $*.dtx
 
-target: mlastyle.sty mlastyle.dvi
+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
-       rm -f *~
+       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:   all clean
+tar:   mlastyle.sty mlastyle.dvi clean
        rm -f mlastyle.tar.gz
        tar czCf .. mlastyle.tar.gz \
          $(SRCDIR)/README $(SRCDIR)/Makefile \
@@ -64,7 +62,7 @@ tar:  all clean
          $(SRCDIR)/mlastyle.dvi
 
 
-zip:   all clean
+zip:   mlastyle.sty mlastyle.dvi clean
        mkdirhier tex/latex/mlastyle/
        mkdirhier doc/latex/mlastyle/
        mkdirhier source/latex/mlastyle/
@@ -73,7 +71,7 @@ zip:  all clean
        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
+       rm -f mlastyle.zip
        zip -r mlastyle.zip tex doc source bibtex
        rm -rf tex doc source bibtex
 
@@ -87,8 +85,8 @@ install: all
        install -m644 mlastyle.dvi $(DOCDIR)
        texhash
 
-ausgabe:
-       @echo "Please copy mlastyle.sty to a directory"
+instructions:
+       @echo "Now run make install, or copy mlastyle.sty to a directory"
        @echo "in the LaTeX search path"