2002-05-01 04:58:18 +08:00
|
|
|
#
|
|
|
|
# UNIX Makefile for NASM documentation
|
|
|
|
#
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
mandir = @mandir@
|
|
|
|
docdir = $(prefix)/doc/nasm
|
|
|
|
infodir = @infodir@
|
2007-10-19 14:33:06 +08:00
|
|
|
datarootdir = @datarootdir@
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
|
|
|
|
PERL = perl
|
|
|
|
MAKEINFO = makeinfo
|
2002-05-04 22:16:20 +08:00
|
|
|
TEXI2DVI = texi2dvi
|
2008-06-20 02:39:23 +08:00
|
|
|
TEXI2IPF = texi2ipf
|
|
|
|
IPFC = ipfc
|
|
|
|
|
|
|
|
ACRODIST = @ACRODIST@ # Acrobat Distiller
|
|
|
|
PSTOPDF = @PSTOPDF@ # BSD/MacOS X utility
|
|
|
|
PS2PDF = @PS2PDF@ # Part of GhostScript
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
SRCS = nasmdoc.src inslist.src changes.src
|
2008-06-17 12:19:34 +08:00
|
|
|
OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2006-02-04 08:23:30 +08:00
|
|
|
# exports
|
|
|
|
export srcdir
|
|
|
|
export PERL
|
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
all: $(OUT)
|
|
|
|
|
2002-05-01 05:00:33 +08:00
|
|
|
os2: nasm.inf
|
|
|
|
|
2008-01-21 13:50:02 +08:00
|
|
|
inslist.src: inslist.pl ../insns.dat
|
|
|
|
$(PERL) $(srcdir)/inslist.pl
|
|
|
|
|
2008-06-12 09:38:15 +08:00
|
|
|
.PHONY: html
|
|
|
|
html: html/nasmdoc0.html
|
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
html/nasmdoc0.html: $(SRCS) rdsrc.pl
|
2002-05-01 04:58:18 +08:00
|
|
|
mkdir -p html
|
2008-06-12 09:38:15 +08:00
|
|
|
$(PERL) $(srcdir)/rdsrc.pl html < $<
|
2002-05-01 04:58:18 +08:00
|
|
|
mv -f *.html html
|
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
nasmdoc.dip: $(SRCS) rdsrc.pl
|
2008-06-12 09:38:15 +08:00
|
|
|
$(PERL) $(srcdir)/rdsrc.pl dip < $<
|
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
nasmdoc.texi: $(SRCS) rdsrc.pl
|
2008-06-12 09:38:15 +08:00
|
|
|
$(PERL) $(srcdir)/rdsrc.pl texi < $<
|
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
nasmdoc.txt: $(SRCS) rdsrc.pl
|
2008-06-12 09:38:15 +08:00
|
|
|
$(PERL) $(srcdir)/rdsrc.pl txt < $<
|
2002-05-04 22:16:20 +08:00
|
|
|
|
2006-02-04 08:23:30 +08:00
|
|
|
nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \
|
2002-05-19 04:36:25 +08:00
|
|
|
genps.pl psfonts.ph pswidth.ph head.ps
|
2002-05-19 06:17:28 +08:00
|
|
|
$(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps
|
2002-05-15 05:21:24 +08:00
|
|
|
|
2002-05-17 02:15:31 +08:00
|
|
|
nasmdoc.pdf: nasmdoc.ps
|
2008-06-20 02:39:23 +08:00
|
|
|
$(ACRODIST) -n -q --nosecurity -o $@ $< || \
|
|
|
|
$(PS2PDF) $< $@ || \
|
|
|
|
$(PSTOPDF) $< -o $@
|
2002-05-15 05:21:24 +08:00
|
|
|
|
2008-06-12 09:38:15 +08:00
|
|
|
.PHONY: info
|
|
|
|
info: info/nasm.info
|
2002-05-04 22:16:20 +08:00
|
|
|
|
|
|
|
info/nasm.info: nasmdoc.texi
|
2002-05-01 04:58:18 +08:00
|
|
|
mkdir -p info
|
|
|
|
$(MAKEINFO) $<
|
|
|
|
mv -f *.info *.info-* info
|
|
|
|
|
2002-05-04 22:16:20 +08:00
|
|
|
# DVI output from texinfo (optional)
|
|
|
|
nasmdoc.dvi: nasmdoc.texi
|
|
|
|
$(TEXI2DVI) nasmdoc.texi
|
|
|
|
|
2002-05-01 05:00:33 +08:00
|
|
|
# Rules for building an OS/2 book
|
2002-05-04 22:16:20 +08:00
|
|
|
nasmdoc.ipf: nasmdoc.texi
|
2008-06-20 02:47:13 +08:00
|
|
|
$(TEXI2IPF) $< >$@
|
2002-05-01 05:00:33 +08:00
|
|
|
|
|
|
|
nasm.inf: nasmdoc.ipf
|
2008-06-20 02:47:13 +08:00
|
|
|
$(IPFC) -i -s $< $@
|
2002-05-01 05:00:33 +08:00
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
clean:
|
2002-05-14 14:05:06 +08:00
|
|
|
-rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
|
2002-05-04 22:16:20 +08:00
|
|
|
-rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
spotless: clean
|
2002-05-15 05:21:24 +08:00
|
|
|
-rm -rf html info
|
2008-01-21 13:50:02 +08:00
|
|
|
-rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi
|
|
|
|
-rm -f nasmdoc*.ps inslist.src
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
install: all
|
|
|
|
$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
|
|
|
|
mkdir -p $(INSTALLROOT)$(docdir)/html
|
|
|
|
$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
|
2002-05-04 22:16:20 +08:00
|
|
|
$(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
|