all: package doc package: $(DTX.sty) $(DTX.cls) doc: $(DTX.pdf) $(EXAMPLE.pdf) $(EXAMPLE.pdf): %.pdf: %.tex $(DTX.sty) $(DTX.cls) $(IMG) $(EXAMPLE.deps) pdflatex $(firstword $<) @if (grep Citation $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then bibtex $(patsubst %.dtx, %, $(firstword $<));fi @if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then makeindex\ -o $(patsubst %.dtx, %.ind, $(firstword $<))\ $(patsubst %.dtx, %.idx, $(firstword $<)); fi @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then pdflatex $(firstword $<); fi @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then pdflatex $(firstword $<); fi sty: $(DTX.sty) ltxml: $(DTX.ltxml) %.ind: touch $@ $(DTX.pdf): %.pdf: %.dtx $(IMG) latex $(patsubst %.pdf,%.ins,$@) pdflatex $(firstword $<) @if (grep Citation $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then bibtex $(patsubst %.dtx, %, $(firstword $<));fi @if (grep "Writing glossary file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then makeindex\ -o $(patsubst %.dtx, %.gls, $(firstword $<))\ $(patsubst %.dtx, %.glo, $(firstword $<)); fi @if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then makeindex\ -o $(patsubst %.dtx, %.ind, $(firstword $<))\ $(patsubst %.dtx, %.idx, $(firstword $<)); fi @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then pdflatex $(firstword $<); fi @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\ then pdflatex $(firstword $<); fi $(DTX.sty): %.sty: %.ins %.dtx latex $< $(DTX.sty.ltxml): %.sty.ltxml: %.ins %.dtx latex $< $(DTX.cls.ltxml): %.cls.ltxml: %.ins %.dtx latex $< $(DTX.cls): %.cls: %.ins %.dtx latex $< clean: rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg distclean: clean rm -f *.aux *.ind *.gls *.ps *.dvi *.toc *.xml *.omdoc rm -Rf auto filedate: @for d in $(DTX); do \ $(FILEDATEPROG) $$d $(PACKAGEDATE); \ done checksum: @for d in $(DTX); do \ $(CHECKSUMPROG) $$d --update ; \ done enablechecksum: @for d in $(DTX); do \ $(CHECKSUMPROG) $$d --enable ; \ done disablechecksum: @for d in $(DTX); do \ $(CHECKSUMPROG) $$d --disable ; \ done ltds: all #filedate checksum enablechecksum rm -Rf $(TDSDIR.doc);mkdir -p $(TDSDIR.doc) rm -Rf $(TDSDIR.tex);mkdir -p $(TDSDIR.tex) rm -Rf $(TDSDIR.src);mkdir -p $(TDSDIR.src) cp $(DTX) $(TDS.src) $(TDSDIR.src) cp $(DTX.sty.ltxml) $(DTX.cls.ltxml) $(DTX.sty) $(DTX.cls) $(TDS.tex) $(TDSDIR.tex) cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(TDSDIR.doc)