NASM 2.13.02rc1
[nasm.git] / doc / Makefile.in
blob2ddfd1eea6da2c18035dab0fbd3c5cfcfc27d8cf
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
27 CP_UF = cp -ufv
29 # Auxiliary files referenced by the HTML files
30 HTMLAUX = nasmdoc.css local.css nasmlogw.png
32 SRCS = nasmdoc.src inslist.src changes.src version.src
33 OUT = html nasmdoc.txt nasmdoc.pdf
35 .SUFFIXES: .pfa .ph
37 all: $(OUT)
39 inslist.src: inslist.pl ../x86/insns.dat
40 $(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
42 .PHONY: html
43 html: $(HTMLAUX)
44 mkdir -p html
45 for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
46 $(MAKE) html/nasmdoc0.html
48 RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
50 html/nasmdoc0.html: $(SRCS) rdsrc.pl
51 $(RM_F) html/*.html
52 $(RDSRC) -ohtml html nasmdoc.src
54 nasmdoc.dip: $(SRCS) rdsrc.pl
55 $(RDSRC) dip nasmdoc.src
57 nasmdoc.txt: $(SRCS) rdsrc.pl
58 $(RDSRC) txt nasmdoc.src
60 version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
61 $(PERL) $(top_srcdir)/version.pl docsrc \
62 < $(top_srcdir)/version > version.src
64 nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
65 pswidth.ph nasmlogo.eps psfonts.ph head.ps
66 $(PERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
67 -headps $(srcdir)/head.ps nasmdoc.dip \
68 > nasmdoc.ps
70 nasmdoc.pdf: nasmdoc.ps pspdf.pl
71 $(PERL) $(srcdir)/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)$(docdir)/html
85 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
86 $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)