2002-05-01 04:58:18 +08:00
|
|
|
#
|
|
|
|
# UNIX Makefile for NASM documentation
|
|
|
|
#
|
|
|
|
|
2016-05-17 11:30:09 +08:00
|
|
|
top_srcdir = @top_srcdir@
|
2002-05-01 04:58:18 +08:00
|
|
|
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@
|
|
|
|
|
2016-05-17 11:30:09 +08:00
|
|
|
PERL = perl -I$(srcdir)
|
2008-06-20 02:39:23 +08:00
|
|
|
|
2017-04-11 07:10:28 +08:00
|
|
|
PDFOPT = @PDFOPT@
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2017-04-07 11:20:04 +08:00
|
|
|
RM_F = rm -f
|
|
|
|
RM_RF = rm -rf
|
2017-04-14 12:54:42 +08:00
|
|
|
CP_F = cp -f
|
2017-04-17 14:52:23 +08:00
|
|
|
CP_UF = cp -ufv
|
|
|
|
|
|
|
|
# Auxiliary files referenced by the HTML files
|
|
|
|
HTMLAUX = nasmdoc.css local.css nasmlogw.png
|
2017-04-07 11:20:04 +08:00
|
|
|
|
2017-04-14 16:50:13 +08:00
|
|
|
SRCS = nasmdoc.src inslist.src changes.src version.src
|
2017-04-14 12:54:42 +08:00
|
|
|
OUT = html nasmdoc.txt nasmdoc.pdf
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2017-04-10 21:35:29 +08:00
|
|
|
.SUFFIXES: .pfa .ph
|
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
all: $(OUT)
|
|
|
|
|
2016-07-07 02:01:12 +08:00
|
|
|
inslist.src: inslist.pl ../x86/insns.dat
|
|
|
|
$(PERL) $(srcdir)/inslist.pl $(srcdir)/../x86/insns.dat
|
2008-01-21 13:50:02 +08:00
|
|
|
|
2008-06-12 09:38:15 +08:00
|
|
|
.PHONY: html
|
2017-04-17 14:52:23 +08:00
|
|
|
html: $(HTMLAUX)
|
2017-04-14 16:50:13 +08:00
|
|
|
mkdir -p html
|
2017-04-17 14:52:23 +08:00
|
|
|
for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
|
|
|
|
$(MAKE) html/nasmdoc0.html
|
2008-06-12 09:38:15 +08:00
|
|
|
|
2016-05-17 11:30:09 +08:00
|
|
|
RDSRC = $(PERL) $(srcdir)/rdsrc.pl -I$(srcdir)/
|
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
html/nasmdoc0.html: $(SRCS) rdsrc.pl
|
2017-04-14 16:50:13 +08:00
|
|
|
$(RM_F) html/*.html
|
2017-04-07 11:33:39 +08:00
|
|
|
$(RDSRC) -ohtml html nasmdoc.src
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
nasmdoc.dip: $(SRCS) rdsrc.pl
|
2017-04-07 11:20:04 +08:00
|
|
|
$(RDSRC) dip nasmdoc.src
|
2008-06-12 09:38:15 +08:00
|
|
|
|
2008-07-14 14:45:57 +08:00
|
|
|
nasmdoc.txt: $(SRCS) rdsrc.pl
|
2017-04-07 11:20:04 +08:00
|
|
|
$(RDSRC) txt nasmdoc.src
|
2016-05-17 11:30:09 +08:00
|
|
|
|
|
|
|
version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
|
|
|
|
$(PERL) $(top_srcdir)/version.pl docsrc \
|
|
|
|
< $(top_srcdir)/version > version.src
|
2002-05-04 22:16:20 +08:00
|
|
|
|
2017-04-10 21:41:13 +08:00
|
|
|
nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
|
|
|
|
pswidth.ph nasmlogo.eps psfonts.ph head.ps
|
2016-05-17 11:30:09 +08:00
|
|
|
$(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
|
|
|
|
> nasmdoc.ps
|
2002-05-15 05:21:24 +08:00
|
|
|
|
2017-04-11 07:10:28 +08:00
|
|
|
nasmdoc.pdf: nasmdoc.ps pspdf.pl
|
2017-04-14 22:11:57 +08:00
|
|
|
$(PERL) $(srcdir)/pspdf.pl $(PDFOPT) nasmdoc.ps nasmdoc.pdf
|
2002-05-15 05:21:24 +08:00
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
clean:
|
2017-04-07 11:20:04 +08:00
|
|
|
-$(RM_F) *.rtf *.hpj *.texi *.gid *.ipf *.dip
|
|
|
|
-$(RM_F) *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
|
|
|
|
-$(RM_F) inslist.src version.src
|
2017-04-11 06:34:59 +08:00
|
|
|
-$(RM_F) nasmdoc*.ps
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
spotless: clean
|
2017-04-07 11:20:04 +08:00
|
|
|
-$(RM_RF) html info
|
|
|
|
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
install: all
|
|
|
|
mkdir -p $(INSTALLROOT)$(docdir)/html
|
|
|
|
$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
|
2017-04-11 06:34:59 +08:00
|
|
|
$(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
|