mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
87 lines
1.8 KiB
Makefile
87 lines
1.8 KiB
Makefile
# $Id$
|
|
#
|
|
# 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@
|
|
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
PERL = perl
|
|
MAKEINFO = makeinfo
|
|
TEXI2DVI = texi2dvi
|
|
PS2PDF = ps2pdf -dOptimize=true # Part of GhostScript
|
|
|
|
SRCS = nasmdoc.src
|
|
OUT = nasm.info nasmdoc.ps nasmdoc.pdf
|
|
|
|
all: $(OUT)
|
|
|
|
os2: nasm.inf
|
|
|
|
# Consider html, txt and ps output a side effect
|
|
nasmdoc.dip: nasmdoc.src rdsrc.pl
|
|
mkdir -p html
|
|
$(PERL) $(srcdir)/rdsrc.pl < $<
|
|
mv -f *.html html
|
|
|
|
nasmdoc.ps: nasmdoc.dip
|
|
: Generated by side effect
|
|
|
|
nasmdoc.texi: nasmdoc.dip
|
|
: Generated by side effect
|
|
|
|
new: nasmdocx.ps nasmdocx.pdf
|
|
|
|
nasmdocx.ps: nasmdoc.dip nasmlogo.eps genps.pl psfonts.ph pswidth.ph head.ps
|
|
$(PERL) $(srcdir)/genps.pl nasmdoc.dip > nasmdocx.ps
|
|
|
|
nasmdocx.pdf: nasmdocx.ps
|
|
$(PS2PDF) nasmdocx.ps nasmdocx.pdf
|
|
|
|
nasm.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
|
|
|
|
# PDF output
|
|
nasmdoc.pdf: nasmdoc.ps
|
|
$(PS2PDF) nasmdoc.ps nasmdoc.pdf
|
|
|
|
# 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 *.txt *.inf *.pdf *.dvi
|
|
-rm -f nasmdoc.ps nasmdocx.ps
|
|
|
|
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)
|