From 67361972da8072e57f1afe3226bf387de99c5bb8 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 7 Mar 2021 13:47:53 +0100 Subject: improved makefile. new command/options for setting the language in the apparatus. new command \resetvlinenumber. improving verse patterns and documenting for v1.2 --- Makefile | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 694b884..649af77 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ SAMPLES := samples exts := md html ins dtx el findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") +define do_documentation + $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx >/dev/null +endef + all: sty $(NAME).pdf testsamples: @@ -23,24 +27,26 @@ sty: clean $(NAME).pdf: testsamples $(NAME).dtx @ echo "Making the sample files first..." - $(MAKE) --directory=$(SAMPLES) - @ echo "Building the documentation of $(NAME)..." - $(CMP) --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null - biber $(NAME) >/dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /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 - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + @ $(MAKE) --directory=$(SAMPLES) >/dev/null + @ echo "Done making samples" + @ echo "Building the documentation of $(NAME). Please be patient..." + @ $(do_documentation) + @ echo "Now calling biber" + @ biber $(NAME) >/dev/null + @ echo "Returning to lualatex..." + @ for run in {1..4}; do $(do_documentation); done + @ echo "Building indexes..." + @ 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 + @ echo "Final runs of lualatex..." + @ for run in {1..3}; do $(call do_documentation); done + @ echo "Done" samples: clean sty $(MAKE) --directory=$(SAMPLES) clean: testsamples + @ echo "Cleaning $(NAME) directory" rm -rf auto rm -f $(NAME).bib $(PWD)/TMP/*.bib rm -rf .backup @@ -66,12 +72,14 @@ uninst: rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/$(NAME).{el,elc} inst: uninst auctex all + @ echo "Installing $(NAME) locally" mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME) cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) cp -r samples/ $(UTREE)/doc/lualatex/$(NAME) + @ echo "Installation complete. Happy TeXing!" local: uninst auctex $(CMP) $(NAME).ins -- cgit v1.2.3