diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-17 21:38:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-17 21:38:40 +0000 |
commit | 92df70634c796daf81679360e2cc092d28cb6edc (patch) | |
tree | a3403716b50edd585d1ec3d100964b8e5030abeb /Master/texmf-dist/source/latex/icite/Makefile | |
parent | 39948ee1306a518baab7bd81a847e11249643885 (diff) |
icite (17mar19)
git-svn-id: svn://tug.org/texlive/trunk@50429 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/icite/Makefile')
-rw-r--r-- | Master/texmf-dist/source/latex/icite/Makefile | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/Master/texmf-dist/source/latex/icite/Makefile b/Master/texmf-dist/source/latex/icite/Makefile index 8709733dd9c..35bf3e4a63d 100644 --- a/Master/texmf-dist/source/latex/icite/Makefile +++ b/Master/texmf-dist/source/latex/icite/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 $(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 $(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 $(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 $(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: @@ -61,7 +56,7 @@ clean: lualatex rm -rf .backup find -iname "*~" -or -iname "*.pdf" | xargs rm -rf find ./* -type f -iname "Makefile" $(findopts) > ls-R - find ./* -type f -iname "samples/*" $(findoptsi) >> ls-R + find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R rsync -avPr --files-from=ls-R . .backup rm -rf * cp -p -r .backup/* . @@ -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 |