Support generating PDF using ps2pdf with special annotations in the
[platform/upstream/nasm.git] / doc / Makefile.in
1 # $Id$
2 #
3 # UNIX Makefile for NASM documentation
4 #
5
6 srcdir          = @srcdir@
7 VPATH           = @srcdir@
8 prefix          = @prefix@
9 exec_prefix     = @exec_prefix@
10 bindir          = @bindir@
11 mandir          = @mandir@
12 docdir          = $(prefix)/doc/nasm
13 infodir         = @infodir@
14
15 INSTALL         = @INSTALL@
16 INSTALL_PROGRAM = @INSTALL_PROGRAM@
17 INSTALL_DATA    = @INSTALL_DATA@
18
19 PERL            = perl
20 MAKEINFO        = makeinfo
21 TEXI2DVI        = texi2dvi
22 PS2PDF          = ps2pdf        # Part of GhostScript
23
24 SRCS            = nasmdoc.src
25 OUT             = nasm.info nasmdoc.ps nasmdoc.pdf
26
27 all: $(OUT)
28
29 os2: nasm.inf
30
31 .SUFFIXES: .src .texi .info .ps .rtf .hpj .dvi .pdf .txt .pl .ipf .inf
32
33 # Consider html, txt and ps output a side effect
34 nasmdoc.texi: nasmdoc.src rdsrc.pl
35         mkdir -p html
36         $(PERL) $(srcdir)/rdsrc.pl < $<
37         mv -f *.html html
38
39 nasmdoc.ps: nasmdoc.texi
40         : Generated by side effect
41
42 nasm.info: info/nasm.info
43
44 info/nasm.info: nasmdoc.texi
45         mkdir -p info
46         $(MAKEINFO) $<
47         mv -f *.info *.info-* info
48
49 # DVI output from texinfo (optional)
50 nasmdoc.dvi: nasmdoc.texi
51         $(TEXI2DVI) nasmdoc.texi
52
53 # PDF output
54 nasmdoc.pdf: nasmdoc.ps
55         $(PS2PDF) nasmdoc.ps nasmdoc.pdf
56
57 # Rules for building an OS/2 book
58 nasmdoc.ipf: nasmdoc.texi
59         texi2ipf $< >$@
60
61 nasm.inf: nasmdoc.ipf
62         ipfc -i -s $< $@
63
64 clean:
65         -rm -f *.rtf *.hpj *.texi *.ph *.gid *.ipf
66         -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
67
68 spotless: clean
69         -rm -rf html info *.hlp *.txt *.ps *.inf *.pdf *.dvi
70
71 install: all
72         $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
73         mkdir -p $(INSTALLROOT)$(docdir)/html
74         $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
75         $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)