Makefile.in   [plain text]


# $Id: Makefile.in,v 1.6 2007/03/29 01:33:11 echristo Exp $
#
# UNIX Makefile for NASM documentation
#

srcdir		= @srcdir@
VPATH		= @srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
mandir		= @mandir@
docdir		= $(prefix)/share/doc/nasm
infodir		= @infodir@
htmldir		= "/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/nasm/"

INSTALL		= $(srcdir)/../install-sh -c
INSTALL_PROGRAM	= ${INSTALL}
INSTALL_DATA	= ${INSTALL} -m 644

PERL		= perl
MAKEINFO	= makeinfo
TEXI2DVI        = texi2dvi
PS2PDF          = ps2pdf -dOptimize=true	# Part of GhostScript

SRCS		= nasmdoc.src
OUT		= nasm.info

# exports
export srcdir
export PERL

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.texi: nasmdoc.dip
	: Generated by side effect

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
	$(PS2PDF) nasmdoc.ps nasmdoc.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

# 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

install: all
	mkdir -p $(DESTDIR)$(INSTALLROOT)$(infodir)
	$(INSTALL_DATA) info/* $(DESTDIR)$(INSTALLROOT)$(infodir)
	mkdir -p $(DESTDIR)$(INSTALLROOT)$(docdir)/html
	$(INSTALL_DATA) html/* $(DESTDIR)$(INSTALLROOT)$(docdir)/html
	mkdir -p $(DESTDIR)$(INSTALLROOT)$(htmldir)
	$(INSTALL_DATA) html/* $(DESTDIR)$(INSTALLROOT)$(htmldir)
	$(INSTALL_DATA) nasmdoc.txt $(DESTDIR)$(INSTALLROOT)$(docdir)