doc/Makefile.in: drop nasmdoc.ps as a usable documentation file
[nasm.git] / doc / Makefile.in
blob0e142d377661258a8de108f9a487bc6912184900
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 RM_F = rm -f
31 RM_RF = rm -rf
33 SRCS = nasmdoc.src inslist.src changes.src version.src
34 OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
36 .SUFFIXES: .pfa .ph
38 all: $(OUT)
40 os2: nasm.inf
42 inslist.src: inslist.pl ../x86/insns.dat
43 $(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
45 .PHONY: html
46 html: html/nasmdoc0.html
48 RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
50 html/nasmdoc0.html: $(SRCS) rdsrc.pl
51 $(RDSRC) -ohtml html nasmdoc.src
53 nasmdoc.dip: $(SRCS) rdsrc.pl
54 $(RDSRC) dip nasmdoc.src
56 nasmdoc.texi: $(SRCS) rdsrc.pl
57 $(RDSRC) texi nasmdoc.src
59 nasmdoc.txt: $(SRCS) rdsrc.pl
60 $(RDSRC) txt nasmdoc.src
62 version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
63 $(PERL) $(top_srcdir)/version.pl docsrc \
64 < $(top_srcdir)/version > version.src
66 nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
67 pswidth.ph nasmlogo.eps psfonts.ph head.ps
68 $(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
69 > nasmdoc.ps
71 nasmdoc.pdf: nasmdoc.ps
72 $(PERL) pspdf.pl nasmdoc.ps nasmdoc.pdf
74 .PHONY: info
75 info: info/nasm.info
77 info/nasm.info: nasmdoc.texi
78 mkdir -p info
79 $(MAKEINFO) $<
80 mv -f *.info *.info-* info
82 # DVI output from texinfo (optional)
83 nasmdoc.dvi: nasmdoc.texi
84 $(TEXI2DVI) nasmdoc.texi
86 # Rules for building an OS/2 book
87 nasmdoc.ipf: nasmdoc.texi
88 $(TEXI2IPF) $< >$@
90 nasm.inf: nasmdoc.ipf
91 $(IPFC) -i -s $< $@
93 clean:
94 -$(RM_F) *.rtf *.hpj *.texi *.gid *.ipf *.dip
95 -$(RM_F) *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
96 -$(RM_F) inslist.src version.src
97 -$(RM_F) nasmdoc*.ps
99 spotless: clean
100 -$(RM_RF) html info
101 -$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
103 install: all
104 mkdir -p $(INSTALLROOT)$(infodir)
105 $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
106 mkdir -p $(INSTALLROOT)$(docdir)/html
107 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
108 $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)