From da60a4f5c772acb67e5ed681d2335651d1dbbcd6 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 5 Mar 2019 21:16:48 +0100 Subject: done documenting icite --- Makefile | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 237b560..da0eb07 100644 --- a/Makefile +++ b/Makefile @@ -5,24 +5,28 @@ VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) UTREE = $(shell kpsewhich --var-value TEXMFHOME) all: $(NAME).pdf - test -e README.txt && mv README.txt README || exit 0 +# test -e README.md || exit 0 $(NAME).pdf: $(NAME).dtx lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null biber $(NAME) >/dev/null if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi - texindy loccit.idx >/dev/null + if [ -f loccit.idx ]; then texindy -M icite.xdy loccit.idx >/dev/null; fi + if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null -clean: - rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,listing,bcf,bib,bbl,blg,run.xml} - rm -f loccit.* +lualatex: + lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null +clean: lualatex + rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,xdy,listing,bcf,bib,bbl,blg,run.xml} + rm -f loccit.* primary.* rm -f *~ rm -rf auto/ distclean: clean uninst rm -rf _minted-* - rm -f $(NAME).{pdf,sty} README + rm -f $(NAME).{pdf,sty} rm -f *.zip *.tar.gz + pandoc -s README.md -o about.html inst: uninst all mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) @@ -34,25 +38,29 @@ local: uninst cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) uninst: rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) -#install: all -# sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) -# sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) -# sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) -# sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) +install: all + sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) + sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) + sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) + sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) +uninstall: + rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME) zip: all ln -sf . $(NAME) - zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}} + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,dtx,ins}} rm $(NAME) package: distclean all mkdir $(NAME)/ - cp README $(NAME).{dtx,ins,pdf} $(NAME)/ + cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/ mkdir -p tex/latex/$(NAME)/ cp $(NAME).sty tex/latex/$(NAME)/ mkdir -p doc/latex/$(NAME)/ cp $(NAME).pdf doc/latex/$(NAME)/ mkdir -p source/latex/$(NAME)/ - cp Makefile README $(NAME).{dtx,ins} source/latex/$(NAME)/ + cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ zip -r $(NAME).tds.zip tex doc source rm -rf tex/ source/ doc/ tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ rm -rf $(NAME)/ + +.PHONY: all clean lualatex distclean inst local uninst install uninstall zip package -- cgit v1.2.3