1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
NAME = dccpaper
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: $(NAME).pdf clean
@exit 0
source: $(NAME).dtx
tex -interaction=batchmode $(NAME).dtx >/dev/null
ijdc-v9.cls idcc.cls $(NAME)-base.sty $(NAME)-apacite.bib $(NAME)-biblatex.bib README.md: source
$(NAME).pdf: $(NAME).dtx ijdc-v9.cls $(NAME)-biblatex.bib $(NAME)-by.pdf
lualatex -recorder -interaction=batchmode $(NAME).dtx >/dev/null
biber $(NAME)
lualatex -recorder -interaction=batchmode $(NAME).dtx >/dev/null
lualatex -recorder -interaction=batchmode $(NAME).dtx >/dev/null
clean:
rm -f $(NAME).{aux,bbl,bcf,blg,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,ins,lsttemp,log,markdown.in,markdown.lua,markdown.out,out,run.xml,synctex.gz} $(NAME)-base.doc ijdc-v9.doc idcc.doc
rm -rf _markdown_$(NAME)
distclean: clean
rm -f $(NAME).pdf ijdc-v9.cls idcc.cls $(NAME)-base.sty $(NAME)-{biblatex,apacite}.bib
inst: all
mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
cp {ijdc-v9,idcc}.cls $(NAME)-base.sty $(NAME)-by.{eps,pdf} $(UTREE)/tex/latex/$(NAME)
cp $(NAME).pdf $(NAME)-{biblatex,apacite}.bib README.md $(UTREE)/doc/latex/$(NAME)
mktexlsr
uninst:
rm -r $(UTREE)/{tex,source,doc}/latex/$(NAME)
mktexlsr
install: all
sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
sudo cp {ijdc-v9,idcc}.cls $(NAME)-base.sty $(NAME)-by.{eps,pdf} $(LOCAL)/tex/latex/$(NAME)
sudo cp $(NAME).pdf $(NAME)-{biblatex,apacite}.bib README.md $(LOCAL)/doc/latex/$(NAME)
mktexlsr
uninstall:
sudo rm -r $(LOCAL)/{tex,source,doc}/latex/$(NAME)
mktexlsr
zip: all
mkdir $(TDIR)
cp {ijdc-v9,idcc}.cls $(NAME)-base.sty $(NAME)-by.{eps,pdf} $(NAME).{dtx,pdf} README.md Makefile $(TDIR)
cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
ctan: all
mkdir $(TDIR)
cp $(NAME).{dtx,pdf} $(NAME)-by.{eps,pdf} README.md Makefile $(TDIR)
cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
|