Source

xslt-process / doc / Makefile

Full commit
MAKEINFO ?= makeinfo

TEXI = xslt-process.texi

INFO = $(TEXI:.texi=.info)
DVI = $(TEXI:.texi=.dvi)
HTML = $(TEXI:.texi=.html)
HTML_FILES = $(PACKAGE)*.html
HTML_DEP = $(PACKAGE).html

.SUFFIXES: .texi .info .dvi .ps .pdf .html

ifeq ('$(MAKECMDGOALS)','html')
  include ../../../XEmacs.rules
endif

.texi.info:
	$(MAKEINFO) $<
	info --output=../README --subnodes --file $@
	sed -e '/^File:.*/d' -e '/[ 	]*,Top[ 	]*/d' <../README >../README.tmp
	info --file=$@ --node=Installation --node='Setting up PSGML with XSLT-process' --output ../INSTALL
	mv ../README.tmp ../README

.texi.dvi:
ifneq ($(TEXI2DVI),)
ifneq ($(DVIPS),)
	$(TEXI2DVI) $<
	$(TEXI2DVI) $<
	$(DVIPS) -o xslt-process.ps $@
endif
endif
ifneq ($(TEXI2PDF),)
	$(TEXI2PDF) $<
endif
	-

compile:: info dvi

info: $(INFO)
dvi: $(DVI)

homepage: html
	sed -e 's/<BODY[^>]*>/<BODY>/g' \
	  -e 's^</BODY>^<p><a HREF=../index.html><img src=../../images/back.gif border=0%> Other (X)Emacs hacks</a><br><a href=../../index.html><img src=../../images/home.gif border=0%> Home</a></body>^g' -e 's/xslt-process.html/index.html/g' <$(HTML_DEP) >$(HTML).tmp
	mv $(HTML).tmp index.html

clean::
	rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr $(HTML_FILES)

distclean:: clean
	rm -f *.dvi *.html *.pdf *.ps *.info