2014-02-15 12:01:14 +01:00
|
|
|
all: package doc
|
|
|
|
package: $(DTX.sty) $(DTX.cls)
|
|
|
|
doc: $(DTX.pdf) $(EXAMPLE.pdf)
|
|
|
|
|
2016-04-15 11:26:01 +02:00
|
|
|
$(DTX.sty) $(DTX.cls): $(INS) $(DTX)
|
|
|
|
$(PDFLATEX) $(INS)
|
|
|
|
|
|
|
|
|
|
|
|
$(EXAMPLE.pdf): %.pdf: %.tex $(DTX.sty) $(DTX.cls) $(EXAMPLE.deps)
|
2014-02-15 12:01:14 +01:00
|
|
|
$(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
|
2016-04-15 11:26:01 +02:00
|
|
|
@if (grep 'Please (re)run BibTeX' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
|
|
|
|
then bibtex $(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
|
|
|
|
|
|
|
|
%.ind:
|
|
|
|
touch $@
|
|
|
|
|
2016-04-15 11:26:01 +02:00
|
|
|
$(DTX.pdf): %.pdf: %.dtx $(DTX.sty) $(DTX.cls)
|
2014-02-15 12:01:14 +01:00
|
|
|
$(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
|
|
|
|
|
2016-06-12 11:02:32 +02:00
|
|
|
clean-local:
|
2016-06-12 10:54:23 +02:00
|
|
|
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg *.run.xml *.synctex.gz
|
2014-02-15 12:01:14 +01:00
|
|
|
|
2016-06-12 11:02:32 +02:00
|
|
|
distclean-local: clean-local
|
|
|
|
rm -f *.aux *.ind *.gls *.ps *.dvi *.toc *.thm *.bbl *.bcf *-blx.bib
|
2014-02-15 12:01:14 +01:00
|
|
|
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)
|
2016-04-15 11:26:01 +02:00
|
|
|
cp $(DTX.src) $(TDS.src) $(TDSDIR.src)
|
2014-02-15 12:01:14 +01:00
|
|
|
cp $(DTX.sty) $(DTX.cls) $(TDS.tex) $(TDSDIR.tex)
|
|
|
|
cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(TDSDIR.doc)
|
2016-04-15 12:22:39 +02:00
|
|
|
@for d in $(TDS.exdirs); do cp -R $$d $(TDSDIR.doc); done
|
2014-02-15 12:01:14 +01:00
|
|
|
|
|
|
|
lctan:
|
|
|
|
mkdir -p $(CTANDIR)
|
2016-04-15 11:54:55 +02:00
|
|
|
cp $(DTX.src) $(DTX.sty) $(DTX.cls) $(TDS.src) $(TDS.tex) $(CTANDIR)
|
2014-02-15 12:01:14 +01:00
|
|
|
cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(CTANDIR)
|
2016-04-15 12:22:39 +02:00
|
|
|
@for d in $(TDS.exdirs); do cp -R $$d $(CTANDIR); done
|
2016-04-15 11:26:01 +02:00
|
|
|
|
|
|
|
# sometimes (when bibLaTeX changes) we have to rerun biber; use make -B biber
|
|
|
|
biber:
|
|
|
|
pdflatex $(DTX.base:%=%.dtx)
|
|
|
|
biber $(DTX.base)
|