doc/changes.src: document the RDPID instruction
[nasm.git] / doc / Makefile.in
blobdc81fb1ea6f4501bc22ac7a4f5ae3a2166df1ff4
2 # UNIX Makefile for NASM documentation
5 top_srcdir = @top_srcdir@
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 datarootdir = @datarootdir@
16 INSTALL = @INSTALL@
17 INSTALL_PROGRAM = @INSTALL_PROGRAM@
18 INSTALL_DATA = @INSTALL_DATA@
20 PERL = perl -I$(srcdir)
21 MAKEINFO = makeinfo
22 TEXI2DVI = texi2dvi
23 TEXI2IPF = texi2ipf
24 IPFC = ipfc
26 ACRODIST = @ACRODIST@ # Acrobat Distiller
27 PSTOPDF = @PSTOPDF@ # BSD/MacOS X utility
28 PS2PDF = @PS2PDF@ # Part of GhostScript
30 SRCS = nasmdoc.src inslist.src changes.src version.src
31 OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
33 # exports
34 export srcdir
35 export PERL
37 all: $(OUT)
39 os2: nasm.inf
41 inslist.src: inslist.pl ../insns.dat
42 $(PERL) $(srcdir)/inslist.pl $(srcdir)/../insns.dat
44 .PHONY: html
45 html: html/nasmdoc0.html
47 RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
49 html/nasmdoc0.html: $(SRCS) rdsrc.pl
50 mkdir -p html
51 $(RDSRC) html "$<"
52 mv -f *.html html
54 nasmdoc.dip: $(SRCS) rdsrc.pl
55 $(RDSRC) dip "$<"
57 nasmdoc.texi: $(SRCS) rdsrc.pl
58 $(RDSRC) texi "$<"
60 nasmdoc.txt: $(SRCS) rdsrc.pl
61 $(RDSRC) txt "$<"
63 version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
64 $(PERL) $(top_srcdir)/version.pl docsrc \
65 < $(top_srcdir)/version > version.src
67 nasmdoc.ps: nasmdoc.dip nasmlogo.eps \
68 genps.pl psfonts.ph pswidth.ph head.ps
69 $(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
70 > nasmdoc.ps
72 nasmdoc.pdf: nasmdoc.ps
73 $(ACRODIST) -n -q --nosecurity -o $@ $< || \
74 $(PS2PDF) $< $@ || \
75 $(PSTOPDF) $< -o $@
77 .PHONY: info
78 info: info/nasm.info
80 info/nasm.info: nasmdoc.texi
81 mkdir -p info
82 $(MAKEINFO) $<
83 mv -f *.info *.info-* info
85 # DVI output from texinfo (optional)
86 nasmdoc.dvi: nasmdoc.texi
87 $(TEXI2DVI) nasmdoc.texi
89 # Rules for building an OS/2 book
90 nasmdoc.ipf: nasmdoc.texi
91 $(TEXI2IPF) $< >$@
93 nasm.inf: nasmdoc.ipf
94 $(IPFC) -i -s $< $@
96 clean:
97 -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
98 -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
99 -rm -f inslist.src version.src
101 spotless: clean
102 -rm -rf html info
103 -rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi
104 -rm -f nasmdoc*.ps
106 install: all
107 mkdir -p $(INSTALLROOT)$(infodir)
108 $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
109 mkdir -p $(INSTALLROOT)$(docdir)/html
110 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
111 $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)