summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hitreport/Makefile
blob: 08b80f62f9354135c70aeb0f4dd53c31a70c919c (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
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
62
63
# Makefile for HITReport

PACKAGE = hitreport
REPORT  = hitreport-example

SOURCES = $(PACKAGE).ins $(PACKAGE).dtx
CLSFILE = dtx-style.sty $(PACKAGE).cls

LATEXMK = latexmk
SHELL  := /bin/bash
NPM    ?= npm

# make deletion work on Windows
ifdef SystemRoot
	RM = del /Q
else
	RM = rm -f
endif

.PHONY: all all-dev clean distclean dist report viewreport spine viewspine doc viewdoc cls check save savepdf test FORCE_MAKE

report: $(REPORT).pdf

all: report

all-dev: doc all

cls: $(CLSFILE)

$(CLSFILE): $(SOURCES)
	xetex $(PACKAGE).ins

doc: $(PACKAGE).pdf

$(PACKAGE).pdf: cls FORCE_MAKE
	$(LATEXMK) $(PACKAGE).dtx

$(REPORT).pdf: cls FORCE_MAKE
	$(LATEXMK) $(REPORT)

viewdoc: doc
	$(LATEXMK) -pv $(PACKAGE).dtx

viewreport: report
	$(LATEXMK) -pv $(REPORT)


clean:
	$(LATEXMK) -c $(PACKAGE).dtx $(REPORT)

cleanall: clean
	-@$(RM) $(PACKAGE).pdf $(REPORT).pdf

distclean: cleanall
	-@$(RM) $(CLSFILE)
	-@$(RM) -r dist


dist: check all-dev
	# use l3build for CTAN release (zip with .tds.zip)
	l3build ctan --config build-ctan
	# use gulp for GitHub release (zip with generated file)
	$(NPM) run build -- --version=$(version)