-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
60 lines (40 loc) · 1.33 KB
/
Makefile
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
##
export TEXMFHOME="~/texmf:"
PACKAGE = guitar-fretboard
cleanext := $(wildcard *.dvi *.aux *.glo *.ilg *.ind *.toc *.hd *.idx *.listing *.log *.out _minted-*)
listings := $(wildcard $(PACKAGE)-*.tex wildcard $(PACKAGE)-*.md5 wildcard $(PACKAGE)-*.pdf)
objects := $(PACKAGE).pdf standalone.png
LATEX := $(shell which latex)
PDFLATEX := $(shell which pdflatex)
XELATEX := $(shell which xelatex)
PANDOC := $(shell which pandoc)
PDF_PROCESSOR := $(XELATEX)
CTANDIR := $(PACKAGE)
CTANDIST = Makefile README.md README \
$(PACKAGE).pdf $(PACKAGE).sty \
standalone.tex standalone.pdf
all: $(objects) README
#%.sty:
# $(RM) -f $@
# $(LATEX) '\let\install=y\input{$<}'
standalone.png: standalone.tex
$(PDF_PROCESSOR) -shell-escape $<
%.pdf: %.tex
$(PDF_PROCESSOR) -shell-escape $<
#makeindex -s gind.ist $(PACKAGE).idx
$(PDF_PROCESSOR) -shell-escape $<
#$(PDF_PROCESSOR) -shell-escape $<
clean:
$(RM) -fr $(cleanext) $(listings) $(PACKAGE).zip
distclean: clean
$(RM) -rf $(objects) README $(CTANDIR) standalone.pdf
README: README.md
$(PANDOC) -t plain -o $@ $<
CTAN: all README clean
mkdir -p $(CTANDIR)
cp $(CTANDIST) $(CTANDIR)
zip -ll -q -r -X $(CTANDIR).zip $(CTANDIR)
.PHONY: %.dty
# lily:
# #lilypond-book --latex-program=pdflatex --pdf --lily-output-dir=out test-ly.lytex
# lilypond-book --output=out --pdf test-ly.lytex