aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3453fd958e8d40978b6f82436d611c533b7a7893 (plain)
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
all: pdf html


pdf:
	mkdir -p build
	pdflatex -output-directory build $(NAME).tex
	pdflatex -output-directory build $(NAME).tex

minify:
	ps2pdf -dPrinted=false build/$(NAME).pdf build/$(NAME).min.pdf

html:
	mkdir -p html

ifeq ($(findstring htmlconf.cfg,$(wildcard *.cfg)),)
	$(eval HTMLCONF=)
else
	$(eval HTMLCONF=--config htmlconf)
endif
	make4ht -d html $(HTMLCONF) $(NAME).tex
	make4ht -d html $(HTMLCONF) $(NAME).tex
	cat ../custom.css >> html/$(NAME).css
	rm $(NAME).4ct $(NAME).4tc $(NAME).aux $(NAME).dvi $(NAME).idv $(NAME).lg $(NAME).log $(NAME).tmp $(NAME).xref $(NAME).css $(NAME)*.html


.PHONY: all pdf html