-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (37 loc) · 1.01 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
SHELL=/bin/sh
FILE=main
OUTDIR=out
WEBDIR=htmlout
VIEWER=xpdf
BROWSER=firefox
LILYBOOK_PDF=lilypond-book --output=$(OUTDIR) --pdf $(FILE).lytex
LILYBOOK_HTML=lilypond-book --output=$(WEBDIR) $(FILE).lytex
PDF=cd $(OUTDIR) && pdflatex $(FILE)
HTML=cd $(WEBDIR) && latex2html $(FILE)
PREVIEW=$(VIEWER) $(OUTDIR)/$(FILE).pdf &
all: pdf web keep
pdf:
$(LILYBOOK_PDF) # begin with tab
$(PDF) # begin with tab
$(PDF) # begin with tab
$(PREVIEW) # begin with tab
web:
$(LILYBOOK_HTML) # begin with tab
$(HTML) # begin with tab
cp -R $(WEBDIR)/$(FILE)/ ./ # begin with tab
$(BROWSER) $(FILE)/$(FILE).html & # begin with tab
keep: pdf
cp $(OUTDIR)/$(FILE).pdf $(FILE).pdf # begin with tab
clean:
rm -rf $(OUTDIR) # begin with tab
web-clean:
rm -rf $(WEBDIR) # begin with tab
archive:
tar -cvvf myproject.tar \ # begin this line with tab
--exclude=out/* \
--exclude=htmlout/* \
--exclude=myproject/* \
--exclude=*midi \
--exclude=*pdf \
--exclude=*~ \
../396twopartexercises/*