summaryrefslogtreecommitdiff
path: root/doc/latex/Makefile
blob: afbe73ada939a49ce38ececf15f46e2140b1ed05 (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
64
65
66
.PHONY: all .FORCE
.DEFAULT_GOAL := all

ifeq ($(strip $(V)),)
        E := @echo
        Q := @
else
        E := @\#
        Q :=
endif

export E Q

define msg-gen
        $(E) "  GEN     " $(1)
endef

define msg-clean
        $(E) "  CLEAN   " $(1)
endef

RM		?= rm -f
XELATEX		?= xelatex
XELATEX-OPTS	?= -output-driver="xdvipdfmx -V 3" -8bit

tex-d		+= src/16bit.tex
tex-d		+= src/32bit.tex
tex-d		+= src/64bit.tex
tex-d		+= src/changelog.tex
tex-d		+= src/contact.tex
tex-d		+= src/directive.tex
tex-d		+= src/idxconf.ist
tex-d		+= src/inslist.tex
tex-d		+= src/intro.tex
tex-d		+= src/language.tex
tex-d		+= src/macropkg.tex
tex-d		+= src/mixsize.tex
tex-d		+= src/nasmlogo.eps
tex-d		+= src/ndisasm.tex
tex-d		+= src/outfmt.tex
tex-d		+= src/preproc.tex
tex-d		+= src/running.tex
tex-d		+= src/source.tex
tex-d		+= src/trouble.tex
tex-d		+= src/version.tex
tex-y		+= src/nasm.tex

$(tex-y): $(tex-d)
	@true

nasm.pdf: $(tex-y) .FORCE
	$(call msg-gen,$@)
	$(Q) $(XELATEX) $(XELATEX-OPTS) $^
	$(Q) $(XELATEX) $(XELATEX-OPTS) $^
all-y += nasm.pdf

# Default target
all: $(all-y)

clean:
	$(call msg-clean,nasm)
	$(Q) $(RM) ./nasm.aux ./nasm.idx ./nasm.ilg ./nasm.ind ./nasm.log
	$(Q) $(RM) ./nasm.out ./nasm.pdf ./nasm.toc

# Disable implicit rules in _this_ Makefile.
.SUFFIXES: