mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-21 09:19:31 +08:00
9dee352dee
Macroize the texi2ipf and ipfc commands (used for OS/2).
102 lines
2.2 KiB
Makefile
102 lines
2.2 KiB
Makefile
#
|
|
# 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@
|
|
datarootdir = @datarootdir@
|
|
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
PERL = perl
|
|
MAKEINFO = makeinfo
|
|
TEXI2DVI = texi2dvi
|
|
TEXI2IPF = texi2ipf
|
|
IPFC = ipfc
|
|
|
|
ACRODIST = @ACRODIST@ # Acrobat Distiller
|
|
PSTOPDF = @PSTOPDF@ # BSD/MacOS X utility
|
|
PS2PDF = @PS2PDF@ # Part of GhostScript
|
|
|
|
SRCS = nasmdoc.src
|
|
OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
|
|
|
|
# exports
|
|
export srcdir
|
|
export PERL
|
|
|
|
all: $(OUT)
|
|
|
|
os2: nasm.inf
|
|
|
|
inslist.src: inslist.pl ../insns.dat
|
|
$(PERL) $(srcdir)/inslist.pl
|
|
|
|
.PHONY: html
|
|
html: html/nasmdoc0.html
|
|
|
|
html/nasmdoc0.html: nasmdoc.src rdsrc.pl inslist.src
|
|
mkdir -p html
|
|
$(PERL) $(srcdir)/rdsrc.pl html < $<
|
|
mv -f *.html html
|
|
|
|
nasmdoc.dip: nasmdoc.src rdsrc.pl inslist.src
|
|
$(PERL) $(srcdir)/rdsrc.pl dip < $<
|
|
|
|
nasmdoc.texi: nasmdoc.src rdsrc.pl inslist.src
|
|
$(PERL) $(srcdir)/rdsrc.pl texi < $<
|
|
|
|
nasmdoc.txt: nasmdoc.src rdsrc.pl inslist.src
|
|
$(PERL) $(srcdir)/rdsrc.pl txt < $<
|
|
|
|
nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \
|
|
genps.pl psfonts.ph pswidth.ph head.ps
|
|
$(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps
|
|
|
|
nasmdoc.pdf: nasmdoc.ps
|
|
$(ACRODIST) -n -q --nosecurity -o $@ $< || \
|
|
$(PS2PDF) $< $@ || \
|
|
$(PSTOPDF) $< -o $@
|
|
|
|
.PHONY: info
|
|
info: info/nasm.info
|
|
|
|
info/nasm.info: nasmdoc.texi
|
|
mkdir -p info
|
|
$(MAKEINFO) $<
|
|
mv -f *.info *.info-* info
|
|
|
|
# DVI output from texinfo (optional)
|
|
nasmdoc.dvi: nasmdoc.texi
|
|
$(TEXI2DVI) nasmdoc.texi
|
|
|
|
# Rules for building an OS/2 book
|
|
nasmdoc.ipf: nasmdoc.texi
|
|
$(TEXI2IPF) $< >$@
|
|
|
|
nasm.inf: nasmdoc.ipf
|
|
$(IPFC) -i -s $< $@
|
|
|
|
clean:
|
|
-rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip
|
|
-rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
|
|
|
|
spotless: clean
|
|
-rm -rf html info
|
|
-rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi
|
|
-rm -f nasmdoc*.ps inslist.src
|
|
|
|
install: all
|
|
$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
|
|
mkdir -p $(INSTALLROOT)$(docdir)/html
|
|
$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
|
|
$(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
|