3 # UNIX Makefile for NASM documentation
9 exec_prefix = @exec_prefix@
12 docdir = $(prefix)/doc/nasm
16 INSTALL_PROGRAM = @INSTALL_PROGRAM@
17 INSTALL_DATA = @INSTALL_DATA@
22 PS2PDF = ps2pdf -dOptimize=true # Part of GhostScript
25 OUT = nasm.info nasmdoc.ps nasmdoc.pdf
31 # Consider html, txt and ps output a side effect
32 nasmdoc.dip: nasmdoc.src rdsrc.pl
34 $(PERL) $(srcdir)/rdsrc.pl < $<
37 nasmdoc.texi: nasmdoc.dip
38 : Generated by side effect
40 nasmdoc.ps: nasmdoc.dip nasmlogo.eps ../version \
41 genps.pl psfonts.ph pswidth.ph head.ps
42 $(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \
43 nasmdoc.dip > nasmdoc.ps
45 nasmdoc.pdf: nasmdoc.ps
46 $(PS2PDF) nasmdoc.ps nasmdoc.pdf
48 nasm.info: info/nasm.info
50 info/nasm.info: nasmdoc.texi
53 mv -f *.info *.info-* info
55 # DVI output from texinfo (optional)
56 nasmdoc.dvi: nasmdoc.texi
57 $(TEXI2DVI) nasmdoc.texi
59 # Rules for building an OS/2 book
60 nasmdoc.ipf: nasmdoc.texi
67 -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
68 -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
72 -rm -f *.hlp *.txt *.inf *.pdf *.dvi
76 $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
77 mkdir -p $(INSTALLROOT)$(docdir)/html
78 $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
79 $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)