2002-05-01 04:58:18 +08:00
|
|
|
#
|
|
|
|
# UNIX Makefile for NASM documentation
|
|
|
|
#
|
|
|
|
|
2020-05-27 05:13:31 +08:00
|
|
|
@SET_MAKE@
|
|
|
|
|
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@
|
2017-07-02 11:13:56 +08:00
|
|
|
docdir = @docdir@
|
|
|
|
htmldir = @htmldir@
|
2002-05-01 04:58:18 +08:00
|
|
|
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
|
|
|
|
2020-05-27 05:13:31 +08:00
|
|
|
MKDIR_P = @MKDIR_P@
|
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
|
2020-05-27 05:13:31 +08:00
|
|
|
CP_UF = cp -uf
|
|
|
|
|
|
|
|
# Optional tools
|
|
|
|
XZ = @XZ@
|
|
|
|
|
|
|
|
# Optional targets
|
|
|
|
XZFILES = @XZFILES@
|
2017-04-17 14:52:23 +08:00
|
|
|
|
|
|
|
# Auxiliary files referenced by the HTML files
|
|
|
|
HTMLAUX = nasmdoc.css local.css nasmlogw.png
|
2017-04-07 11:20:04 +08:00
|
|
|
|
2018-12-14 13:53:31 +08:00
|
|
|
SRCS = nasmdoc.src inslist.src changes.src warnings.src version.src
|
2020-05-27 05:13:31 +08:00
|
|
|
OUT = html nasmdoc.txt nasmdoc.pdf $(XZFILES)
|
|
|
|
XZOUT = nasmdoc.pdf.xz
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2017-11-07 14:37:37 +08:00
|
|
|
.SUFFIXES:
|
2017-04-10 21:35:29 +08:00
|
|
|
.SUFFIXES: .pfa .ph
|
|
|
|
|
2020-05-27 05:13:31 +08:00
|
|
|
.PHONY: all xzfiles html clean spotless install
|
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
all: $(OUT)
|
|
|
|
|
2020-05-27 05:13:31 +08:00
|
|
|
xzfiles: $(XZOUT)
|
|
|
|
|
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
|
|
|
|
2017-04-17 14:52:23 +08:00
|
|
|
html: $(HTMLAUX)
|
2020-05-27 05:13:31 +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
|
2017-04-17 16:38:41 +08:00
|
|
|
$(PERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
|
2019-10-05 04:09:30 +08:00
|
|
|
-headps $(srcdir)/head.ps \
|
|
|
|
-fontpath fontpath \
|
|
|
|
-fontmap Fontmap \
|
|
|
|
nasmdoc.dip > nasmdoc.ps
|
2002-05-15 05:21:24 +08:00
|
|
|
|
2019-08-07 14:07:44 +08:00
|
|
|
fontpath: nasmdoc.ps
|
|
|
|
@: Generated by side effect
|
|
|
|
|
2019-10-05 04:09:30 +08:00
|
|
|
Fontmap: nasmdoc.ps
|
|
|
|
@: Generated by side effect
|
|
|
|
|
2019-08-07 14:07:44 +08:00
|
|
|
nasmdoc.pdf: nasmdoc.ps pspdf.pl fontpath
|
2020-05-27 05:13:31 +08:00
|
|
|
$(PERL) $(srcdir)/pspdf.pl \
|
|
|
|
$(PDFOPT) $< $@ fontpath
|
|
|
|
|
|
|
|
nasmdoc-raw.pdf: nasmdoc.ps pspdf.pl fontpath
|
|
|
|
$(PERL) $(srcdir)/pspdf.pl -nocompress \
|
|
|
|
$(PDFOPT) $< $@ fontpath
|
|
|
|
|
|
|
|
nasmdoc.pdf.xz: nasmdoc-raw.pdf
|
|
|
|
$(RM_F) $@
|
|
|
|
$(XZ) -9e < $< > $@
|
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
|
2019-10-05 04:09:30 +08:00
|
|
|
-$(RM_F) inslist.src version.src fontpath Fontmap
|
2020-05-27 05:13:31 +08:00
|
|
|
-$(RM_F) nasmdoc*.ps nasmdoc-raw.pdf
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
spotless: clean
|
2017-04-07 11:20:04 +08:00
|
|
|
-$(RM_RF) html info
|
2020-05-27 05:13:31 +08:00
|
|
|
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.pdf.xz *.dvi
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
install: all
|
2020-05-27 05:13:31 +08:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(htmldir)
|
2017-07-02 11:13:56 +08:00
|
|
|
$(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
|
2020-05-27 05:13:31 +08:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(docdir)
|
2017-07-02 11:13:56 +08:00
|
|
|
$(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(DESTDIR)$(docdir)
|
2020-05-27 05:13:31 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dummy rules that changes make behavior
|
|
|
|
# (at end to avoid confusing non-GNU makes)
|
|
|
|
#
|
|
|
|
.SECONDARY:
|
|
|
|
|
|
|
|
.DELETE_ON_ERROR:
|