aboutsummaryrefslogtreecommitdiffstats
path: root/doc/Makefile.in
blob: 8d308ca6ef9ff83333768d3a84b9e52b8224ce1f (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
67
68
69
70
71
72
73
74
75
# $Id$
#
# UNIX Makefile for NASM documentation
#

srcdir		= @srcdir@
VPATH		= @srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
mandir		= @mandir@
docdir		= $(prefix)/doc/nasm
infodir		= @infodir@

INSTALL		= @INSTALL@
INSTALL_PROGRAM	= @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@

PERL		= perl
MAKEINFO	= makeinfo
TEXI2DVI        = texi2dvi
PS2PDF          = ps2pdf	# Part of GhostScript

SRCS		= nasmdoc.src
OUT		= nasm.info nasmdoc.ps nasmdoc.pdf

all: $(OUT)

os2: nasm.inf

.SUFFIXES: .src .texi .info .ps .rtf .hpj .dvi .pdf .txt .pl .ipf .inf

# Consider html, txt and ps output a side effect
nasmdoc.texi: nasmdoc.src rdsrc.pl
	mkdir -p html
	$(PERL) $(srcdir)/rdsrc.pl < $<
	mv -f *.html html

nasmdoc.ps: nasmdoc.texi
	: Generated by side effect

nasm.info: info/nasm.info

info/nasm.info: nasmdoc.texi
	mkdir -p info
	$(MAKEINFO) $<
	mv -f *.info *.info-* info

# DVI output from texinfo (optional)
nasmdoc.dvi: nasmdoc.texi
	$(TEXI2DVI) nasmdoc.texi

# PDF output
nasmdoc.pdf: nasmdoc.ps
	$(PS2PDF) nasmdoc.ps nasmdoc.pdf

# Rules for building an OS/2 book
nasmdoc.ipf: nasmdoc.texi
	texi2ipf $< >$@

nasm.inf: nasmdoc.ipf
	ipfc -i -s $< $@

clean:
	-rm -f *.rtf *.hpj *.texi *.ph *.gid *.ipf
	-rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr

spotless: clean
	-rm -rf html info *.hlp *.txt *.ps *.inf *.pdf *.dvi

install: all
	$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
	mkdir -p $(INSTALLROOT)$(docdir)/html
	$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
	$(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)