Merge branch 'nasm-2.03.x'
[nasm/autotest.git] / doc / Makefile.in
blob76ec1df0c496a95d1cd027156610ba01576cf79f
2 # UNIX Makefile for NASM documentation
5 srcdir = @srcdir@
6 VPATH = @srcdir@
7 prefix = @prefix@
8 exec_prefix = @exec_prefix@
9 bindir = @bindir@
10 mandir = @mandir@
11 docdir = $(prefix)/doc/nasm
12 infodir = @infodir@
13 datarootdir = @datarootdir@
15 INSTALL = @INSTALL@
16 INSTALL_PROGRAM = @INSTALL_PROGRAM@
17 INSTALL_DATA = @INSTALL_DATA@
19 PERL = perl
20 MAKEINFO = makeinfo
21 TEXI2DVI = texi2dvi
22 PS2PDF = ps2pdf # Part of GhostScript
24 SRCS = nasmdoc.src
25 OUT = info html nasmdoc.ps nasmdoc.pdf
27 # exports
28 export srcdir
29 export PERL
31 all: $(OUT)
33 os2: nasm.inf
35 inslist.src: inslist.pl ../insns.dat
36 $(PERL) $(srcdir)/inslist.pl
38 .PHONY: html
39 html: html/nasmdoc0.html
41 html/nasmdoc0.html: nasmdoc.src rdsrc.pl inslist.src
42 mkdir -p html
43 $(PERL) $(srcdir)/rdsrc.pl html < $<
44 mv -f *.html html
46 nasmdoc.dip: nasmdoc.src rdsrc.pl inslist.src
47 $(PERL) $(srcdir)/rdsrc.pl dip < $<
49 nasmdoc.texi: nasmdoc.src rdsrc.pl inslist.src
50 $(PERL) $(srcdir)/rdsrc.pl texi < $<
52 nasmdoc.txt: nasmdoc.src rdsrc.pl inslist.src
53 $(PERL) $(srcdir)/rdsrc.pl txt < $<
55 nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \
56 genps.pl psfonts.ph pswidth.ph head.ps
57 $(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps
59 nasmdoc.pdf: nasmdoc.ps
60 $(PS2PDF) nasmdoc.ps
62 .PHONY: info
63 info: info/nasm.info
65 info/nasm.info: nasmdoc.texi
66 mkdir -p info
67 $(MAKEINFO) $<
68 mv -f *.info *.info-* info
70 # DVI output from texinfo (optional)
71 nasmdoc.dvi: nasmdoc.texi
72 $(TEXI2DVI) nasmdoc.texi
74 # Rules for building an OS/2 book
75 nasmdoc.ipf: nasmdoc.texi
76 texi2ipf $< >$@
78 nasm.inf: nasmdoc.ipf
79 ipfc -i -s $< $@
81 clean:
82 -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
83 -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
85 spotless: clean
86 -rm -rf html info
87 -rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi
88 -rm -f nasmdoc*.ps inslist.src
90 install: all
91 $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
92 mkdir -p $(INSTALLROOT)$(docdir)/html
93 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
94 $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)