doc: generate proper XHTML for the contents and index
[nasm.git] / doc / Makefile.in
blobac091e99778431614d2d70331b2c7721a6f31e12
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)
22 PDFOPT = @PDFOPT@
24 RM_F = rm -f
25 RM_RF = rm -rf
26 CP_F = cp -f
28 SRCS = nasmdoc.src inslist.src changes.src version.src
29 OUT = html nasmdoc.txt nasmdoc.pdf
31 .SUFFIXES: .pfa .ph
33 all: $(OUT)
35 inslist.src: inslist.pl ../x86/insns.dat
36 $(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
38 .PHONY: html
39 html: $(SRCS) rdsrc.pl nasmdoc.css nasmlogw.png
40 mkdir -p html
41 $(MAKE) html/nasmdoc0.html html/nasmdoc.css html/nasmlogw.png
43 RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
45 html/nasmdoc0.html: $(SRCS) rdsrc.pl
46 $(RM_F) html/*.html
47 $(RDSRC) -ohtml html nasmdoc.src
49 html/nasmdoc.css: nasmdoc.css
50 $(CP_F) nasmdoc.css html/nasmdoc.css
52 html/nasmlogw.png: nasmlogw.png
53 $(CP_F) nasmlogw.png html/nasmlogw.png
55 nasmdoc.dip: $(SRCS) rdsrc.pl
56 $(RDSRC) dip nasmdoc.src
58 nasmdoc.txt: $(SRCS) rdsrc.pl
59 $(RDSRC) txt nasmdoc.src
61 version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
62 $(PERL) $(top_srcdir)/version.pl docsrc \
63 < $(top_srcdir)/version > version.src
65 nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
66 pswidth.ph nasmlogo.eps psfonts.ph head.ps
67 $(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
68 > nasmdoc.ps
70 nasmdoc.pdf: nasmdoc.ps pspdf.pl
71 $(PERL) pspdf.pl $(PDFOPT) nasmdoc.ps nasmdoc.pdf
73 clean:
74 -$(RM_F) *.rtf *.hpj *.texi *.gid *.ipf *.dip
75 -$(RM_F) *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
76 -$(RM_F) inslist.src version.src
77 -$(RM_F) nasmdoc*.ps
79 spotless: clean
80 -$(RM_RF) html info
81 -$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
83 install: all
84 mkdir -p $(INSTALLROOT)$(infodir)
85 $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
86 mkdir -p $(INSTALLROOT)$(docdir)/html
87 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
88 $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)