0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/doc/Makefile.in
H. Peter Anvin 467828c431 Even more path hacks for the rpm build
- append /html if htmldir = docdir

- Run autogen.sh with --cleanenv

- Actually use PDFZ and not just Z in doc/Makefile.in.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 17:31:58 -07:00

173 lines
3.7 KiB
Makefile

# -*- makefile -*-
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 1996-20xx The NASM Authors - All Rights Reserved
#
# UNIX Makefile for NASM documentation
#
@SET_MAKE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
objdir = @builddir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
datarootdir = @datarootdir@
datadir = @datadir@
mydatadir = $(datadir)/$(PACKAGE_TARNAME)
docdir = @docdir@
htmldir = @htmldir@
pdfdir = @pdfdir@
psdir = @psdir@
emacsdir = $(datarootdir)/emacs/site-lisp
jsondir = $(mydatadir)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
PERL = perl
RUNPERL = $(PERL) -I$(top_srcdir)/perllib -I$(srcdir)
PDFOPT = @PDFOPT@
MKDIR_P = @MKDIR_P@
RM_F = rm -f
RM_RF = rm -rf
CP_F = cp -f
CP_UF = cp -uf
# Optional tools
XZ = @XZ@
# Optional targets
XZFILES = @XZFILES@
# Auxiliary files referenced by the HTML files
HTMLAUX = nasmdoc.css local.css nasmlogw.png
# Generated input files
GENSRC = insns.src version.src pptok.src perlbreq.src
# Top-level input file
SRCS = nasmdoc.src
# All input files (except auto-dependencies)
ALLSRCS = $(SRCS) $(GENSRC)
OUT = html nasmdoc.txt nasmdoc.pdf $(XZFILES)
XZOUT = nasmdoc.pdf.xz
# Use "make install PDFZ=.xz" to install pdf.xz
PDF =
# Don't delete intermediate files
.SECONDARY:
# Delete files on error
.DELETE_ON_ERROR:
.SUFFIXES:
.SUFFIXES: .pfa .ph
.PHONY: all xzfiles html clean spotless install
all: $(OUT)
xzfiles: $(XZOUT)
insns.src: inslist.pl ../x86/insns.xda
$(RUNPERL) $^ $@
# A representative HTML file
htmltarget=html/nasm00.html
html: $(HTMLAUX)
$(MKDIR_P) html
for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
$(MAKE) $(htmltarget)
RDSRC = $(RUNPERL) $(srcdir)/rdsrc.pl -I$(srcdir) -M$(@F).dep
$(htmltarget): $(ALLSRCS) rdsrc.pl
$(RM_F) html/*.html
$(RDSRC) -ohtml html $<
nasmdoc.dip: $(ALLSRCS) rdsrc.pl
$(RDSRC) dip $<
nasmdoc.txt: $(ALLSRCS) rdsrc.pl
$(RDSRC) txt $<
version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
$(RUNPERL) $(top_srcdir)/version.pl docsrc \
< $(top_srcdir)/version > version.src
nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
pswidth.ph nasmlogo.eps psfonts.ph head.ps
$(RUNPERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
-headps $(srcdir)/head.ps \
-fontpath fontpath \
-fontmap Fontmap \
nasmdoc.dip > nasmdoc.ps
fontpath: nasmdoc.ps
@: Generated by side effect
Fontmap: nasmdoc.ps
@: Generated by side effect
nasmdoc.pdf: nasmdoc.ps pspdf.pl fontpath
$(RUNPERL) $(srcdir)/pspdf.pl \
$(PDFOPT) $< $@ fontpath
nasmdoc-raw.pdf: nasmdoc.ps pspdf.pl fontpath
$(RUNPERL) $(srcdir)/pspdf.pl -nocompress \
$(PDFOPT) $< $@ fontpath
nasmdoc.pdf.xz: nasmdoc-raw.pdf
$(RM_F) $@
$(XZ) -9e < $< > $@
clean:
-$(RM_F) *.rtf *.hpj *.texi *.gid *.ipf *.dip *.dep
-$(RM_F) *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
-$(RM_F) $(GENSRC) fontpath Fontmap
-$(RM_F) nasmdoc*.ps nasmdoc-raw.pdf
spotless: clean
-$(RM_RF) html info
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.pdf.xz *.dvi
install_html: html
html='$(htmldir)' ; \
if [ x"$$html" = x'$(docdir)' ]; then \
html="$$html/html" ; \
fi ; \
$(MKDIR_P) $(DESTDIR)"$$html" ; \
$(INSTALL_DATA) html/* $(DESTDIR)"$$html"
install_pdf: nasmdoc.pdf$(PDFZ)
$(MKDIR_P) $(DESTDIR)$(pdfdir)
$(INSTALL_DATA) nasmdoc.pdf$(PDFZ) $(DESTDIR)$(pdfdir)
install: install_html install_pdf
#
# Dummy rules that changes make behavior
# (at end to avoid confusing non-GNU makes)
#
.SECONDARY:
.DELETE_ON_ERROR:
# Generated dependencies
-include *.dep