2014-02-15 12:01:14 +01:00
|
|
|
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 $<)
|
2015-11-20 12:22:53 +01:00
|
|
|
@if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
|
2014-02-15 12:13:10 +01:00
|
|
|
then biber $(patsubst %.dtx, %, $(firstword $<));fi
|
2014-02-15 12:01:14 +01:00
|
|
|
@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)
|
|
|
|
$(PDFLATEX) $(patsubst %.pdf,%.ins,$@)
|
|
|
|
$(PDFLATEX) $(firstword $<)
|
2015-11-20 12:22:53 +01:00
|
|
|
@if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
|
2014-02-15 12:13:10 +01:00
|
|
|
then biber $(patsubst %.dtx, %, $(firstword $<));fi
|
2014-02-15 12:01:14 +01:00
|
|
|
@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
|
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
2015-11-20 12:22:53 +01:00
|
|
|
$(DTX.cls): %.cls: %.ins %.dtx
|
2014-02-15 12:01:14 +01:00
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
2015-11-20 12:22:53 +01:00
|
|
|
$(DTX.sty.ltxml): %.sty.ltxml: %.ins %.dtx
|
2014-02-15 12:01:14 +01:00
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
2015-11-20 12:22:53 +01:00
|
|
|
$(DTX.cls.ltxml): %.cls.ltxml: %.ins %.dtx
|
2014-02-15 12:01:14 +01:00
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f *.aux *.ind *.gls *.ps *.dvi *.toc *.xml *.omdoc *.thm
|
|
|
|
rm -Rf auto
|
|
|
|
|
|
|
|
filedate:
|
|
|
|
@for d in $(DTX); do \
|
|
|
|
$(FILEDATEPROG) $$d ; \
|
|
|
|
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
|
|
|
|
|
|
|
|
# copy stuff around for making the TeX Directory Structure
|
|
|
|
ltds:
|
|
|
|
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) $(DTX.cls) $(TDS.tex) $(TDSDIR.tex)
|
|
|
|
cp $(DTX.sty.ltxml) $(DTX.cls.ltxml) $(TDSDIR.tex) || echo "omitting ltxml files"
|
|
|
|
cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(TDSDIR.doc)
|
2015-11-22 12:12:58 +01:00
|
|
|
@for d in $(TDS.exdirs); do cp -R $(TDS.exdirs) $(TDSDIR.doc); done
|
2014-02-15 12:01:14 +01:00
|
|
|
|
|
|
|
lctan:
|
|
|
|
mkdir -p $(CTANDIR)
|
|
|
|
cp $(DTX) $(TDS.src) $(DTX.sty) $(DTX.cls) $(TDS.tex) $(CTANDIR)
|
|
|
|
cp $(DTX.sty.ltxml) $(DTX.cls.ltxml) $(CTANDIR) || echo "omitting ltxml files"
|
|
|
|
cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(CTANDIR)
|
2015-11-22 12:15:26 +01:00
|
|
|
@for d in $(TDS.exdirs); do cp -R $(TDS.exdirs) $(TDSDIR.doc); done
|