NASM 2.14rc14
[nasm.git] / doc / Makefile.in
blob27e6fadb97b6d1c5440799619ab31504cd228a80
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 = @docdir@
13 htmldir = @htmldir@
14 infodir = @infodir@
15 datarootdir = @datarootdir@
17 INSTALL = @INSTALL@
18 INSTALL_PROGRAM = @INSTALL_PROGRAM@
19 INSTALL_DATA = @INSTALL_DATA@
21 PERL = perl -I$(srcdir)
23 PDFOPT = @PDFOPT@
25 MKDIR = mkdir
26 RM_F = rm -f
27 RM_RF = rm -rf
28 CP_F = cp -f
29 CP_UF = cp -ufv
31 # Auxiliary files referenced by the HTML files
32 HTMLAUX = nasmdoc.css local.css nasmlogw.png
34 SRCS = nasmdoc.src inslist.src changes.src version.src
35 OUT = html nasmdoc.txt nasmdoc.pdf
37 .SUFFIXES:
38 .SUFFIXES: .pfa .ph
40 all: $(OUT)
42 inslist.src: inslist.pl ../x86/insns.dat
43 $(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
45 .PHONY: html
46 html: $(HTMLAUX)
47 $(MKDIR) -p html
48 for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
49 $(MAKE) html/nasmdoc0.html
51 RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
53 html/nasmdoc0.html: $(SRCS) rdsrc.pl
54 $(RM_F) html/*.html
55 $(RDSRC) -ohtml html nasmdoc.src
57 nasmdoc.dip: $(SRCS) rdsrc.pl
58 $(RDSRC) dip nasmdoc.src
60 nasmdoc.txt: $(SRCS) rdsrc.pl
61 $(RDSRC) txt nasmdoc.src
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 genps.pl afmmetrics.ph ttfmetrics.ph \
68 pswidth.ph nasmlogo.eps psfonts.ph head.ps
69 $(PERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
70 -headps $(srcdir)/head.ps nasmdoc.dip \
71 > nasmdoc.ps
73 nasmdoc.pdf: nasmdoc.ps pspdf.pl
74 $(PERL) $(srcdir)/pspdf.pl $(PDFOPT) nasmdoc.ps nasmdoc.pdf
76 clean:
77 -$(RM_F) *.rtf *.hpj *.texi *.gid *.ipf *.dip
78 -$(RM_F) *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
79 -$(RM_F) inslist.src version.src
80 -$(RM_F) nasmdoc*.ps
82 spotless: clean
83 -$(RM_RF) html info
84 -$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
86 install: all
87 $(MKDIR) -p $(DESTDIR)$(htmldir)
88 $(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
89 $(MKDIR) -p $(DESTDIR)$(docdir)
90 $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(DESTDIR)$(docdir)