From e4585f6ce56ce0d037a0f545f21f9c7d28767386 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 17 Mar 2019 18:19:05 +0100 Subject: done documenting and added a section on icite and classics. new functions \AuthorTitleDelim and \TitlePageDelim --- Makefile | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 028aea7..35bf3e4 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,27 @@ LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) UTREE = $(shell kpsewhich --var-value TEXMFHOME) exts := md bib ins dtx html -extsi := tex +texsamples := $(basename $(wildcard $(PWD)/samples/*.tex)) findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") -findoptsi := $(foreach ext,$(extsi),-or -iname "*.$(ext)") + + +# Look into this later +# $(if $(wildcard $(PWD)/TMP/$(notdir $1).bcf),biber $(PWD)/TMP/$(notdir $1),) + +define dosamples + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + if [ -f $(PWD)/TMP/$(notdir $1)-primary.idx ]; \ + then texindy -M $(PWD)/TMP/$(notdir $1).xdy $(PWD)/TMP/$(notdir $1)-primary.idx >/dev/null; fi + if [ -f $(PWD)/TMP/$(notdir $1).bcf ]; then biber $(PWD)/TMP/$(notdir $1) >/dev/null; fi + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null +endef all: $(NAME).pdf # test -e README.md || exit 0 $(NAME).pdf: $(NAME).dtx + @ echo "Make documentation..." lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null biber $(NAME) >/dev/null lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null @@ -22,35 +36,16 @@ $(NAME).pdf: $(NAME).dtx 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 + @ echo "Make sample files..." if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi cp $(PWD)/samples/*.bib $(PWD)/TMP - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - texindy -M $(PWD)/TMP/icite-biblatex.xdy $(PWD)/TMP/pr-sources.idx - biber $(PWD)/TMP/icite-biblatex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - texindy -M $(PWD)/TMP/icite-nobiblatex.xdy $(PWD)/TMP/pr-sources.idx - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + $(foreach file,$(texsamples), $(call dosamples, $(file))) mv TMP/*.pdf samples/ samples: if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi cp $(PWD)/samples/*.bib $(PWD)/TMP - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - texindy -M $(PWD)/TMP/icite-biblatex.xdy $(PWD)/TMP/pr-sources.idx - biber $(PWD)/TMP/icite-biblatex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - texindy -M $(PWD)/TMP/icite-nobiblatex.xdy $(PWD)/TMP/pr-sources.idx - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex - lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + $(foreach file,$(texsamples), $(call dosamples, $(file))) mv TMP/*.pdf samples/ lualatex: @@ -109,9 +104,10 @@ package: distclean all cp -r samples/ doc/latex/$(NAME)/ mkdir -p source/latex/$(NAME)/ cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ - zip -r $(NAME).tds.zip tex doc source + # zip -r $(NAME).tds.zip tex doc source rm -rf tex/ source/ doc/ - tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ + # tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ + tar czf $(NAME)-$(VERS).tar.gz $(NAME)/ rm -rf $(NAME)/ .PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples -- cgit v1.2.3