summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/bibtex/bath-bst/Makefile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-30 17:02:40 +0000
committerKarl Berry <karl@freefriends.org>2018-04-30 17:02:40 +0000
commitdf4e67cafb69771234fe6eade1d37f23746c3b89 (patch)
tree16b3b71e4c79ea75b2bb3153a4d17a9318647ec4 /Master/texmf-dist/doc/bibtex/bath-bst/Makefile
parent913dde112deea35963a9f86cb1952762f64d37d9 (diff)
bath-bst (23apr18)
git-svn-id: svn://tug.org/texlive/trunk@47507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/bibtex/bath-bst/Makefile')
-rw-r--r--Master/texmf-dist/doc/bibtex/bath-bst/Makefile72
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/bibtex/bath-bst/Makefile b/Master/texmf-dist/doc/bibtex/bath-bst/Makefile
new file mode 100644
index 00000000000..63bb81e2777
--- /dev/null
+++ b/Master/texmf-dist/doc/bibtex/bath-bst/Makefile
@@ -0,0 +1,72 @@
+NAME = bath-bst
+BST1 = bath.bst
+BST2 = bathx.bst
+SHELL = bash
+PWD = $(shell pwd)
+TEMP := $(shell mktemp -d -t tmp.XXXXXXXXXX)
+TDIR = $(TEMP)/$(NAME)
+VERS = $(shell ltxfileinfo -v $(NAME).dtx)
+LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
+UTREE = $(shell kpsewhich --var-value TEXMFHOME)
+
+.PHONY: source clean distclean inst install uninst uninstall zip ctan
+
+all: $(BST1) $(BST2) $(NAME)-v1.pdf $(NAME).pdf clean
+ @exit 0
+
+source: $(BST1) $(BST2) $(NAME).bib $(NAME)-v1.tex $(NAME)-v1.bib
+
+$(BST1) $(BST2) $(NAME).bib $(NAME)-v1.tex $(NAME)-v1.bib: $(NAME).dtx
+ luatex -interaction=batchmode $(NAME).dtx >/dev/null
+
+$(NAME).pdf: $(NAME).dtx $(BST2) $(NAME).bib
+ latexmk -silent -lualatex -synctex=1 -interaction=batchmode $(NAME).dtx >/dev/null
+ @echo "Compilation of main PDF complete."
+
+$(NAME)-v1.pdf: $(NAME)-v1.tex $(BST1) $(NAME)-v1.bib
+ latexmk -silent -lualatex -synctex=1 -interaction=batchmode $(NAME)-v1.tex >/dev/null
+ @echo "Compilation of test PDF complete."
+
+clean:
+ rm -f $(NAME){,-v1}.{aux,bbl,bcf,blg,doc,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,listing,log,nav,out,run.xml,snm,synctex.gz,tcbtemp,toc,vrb}
+ rm -f $(NAME){,-v1}.markdown.in
+ rm -rf _markdown_$(NAME)
+
+distclean: clean
+ rm -f $(NAME).{pdf,bib,ins} $(BST1) $(BST2) $(NAME)-v1.{pdf,bib,tex}
+
+inst: all
+ mkdir -p $(UTREE)/{source,doc}/bibtex/$(NAME)
+ mkdir -p $(UTREE)/bibtex/bst/$(NAME)
+ cp $(NAME).dtx $(NAME).ins $(UTREE)/source/bibtex/$(NAME)
+ cp $(NAME).{bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(UTREE)/doc/bibtex/$(NAME)
+ cp $(BST1) $(BST2) $(UTREE)/bibtex/bst/$(NAME)
+ mktexlsr
+
+uninst:
+ rm -r $(UTREE)/{source,doc}/bibtex/$(NAME)
+ rm -r $(UTREE)/bibtex/bst/$(NAME)
+ mktexlsr
+
+install: all
+ sudo mkdir -p $(LOCAL)/{source,doc}/bibtex/$(NAME)
+ sudo mkdir -p $(LOCAL)/bibtex/bst/$(NAME)
+ sudo cp $(NAME).dtx $(NAME).ins $(LOCAL)/source/bibtex/$(NAME)
+ sudo cp $(NAME).{bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(LOCAL)/doc/bibtex/$(NAME)
+ sudo cp $(BST1) $(BST2) $(LOCAL)/bibtex/bst/$(NAME)
+ mktexlsr
+
+uninstall:
+ sudo rm -r $(LOCAL)/{source,doc}/bibtex/$(NAME)
+ sudo rm -r $(LOCAL)/bibtex/bst/$(NAME)
+ mktexlsr
+
+zip: all
+ mkdir $(TDIR)
+ cp $(NAME).{dtx,bib,pdf} $(NAME)-v1.{pdf,bib,tex} $(BST1) $(BST2) README.md Makefile $(TDIR)
+ cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
+
+ctan: all
+ mkdir $(TDIR)
+ cp $(NAME).{dtx,pdf} $(NAME)-v1.pdf README.md Makefile $(TDIR)
+ cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)