#=======================================================================
# Copyright (c) 2000 Daniele Giacomini daniele @ pluto.linux.it
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=======================================================================

#-----------------------------------------------------------------------
# Program name.
#-----------------------------------------------------------------------
PROJECT=textchk

#-----------------------------------------------------------------------
# Do all compositions.
#-----------------------------------------------------------------------
all: \
ps \
txt \
info \
pdf  \
html

#-----------------------------------------------------------------------
# Delete stale files.
#-----------------------------------------------------------------------
clean:
	@echo "Cleaning stale files."			; \
	rm -f $(PROJECT).aux				; \
	rm -f $(PROJECT).cp				; \
	rm -f $(PROJECT).cps				; \
	rm -f $(PROJECT).fl				; \
	rm -f $(PROJECT).fn				; \
	rm -f $(PROJECT).ky				; \
	rm -f $(PROJECT).log				; \
	rm -f $(PROJECT).pg				; \
	rm -f $(PROJECT).toc				; \
	rm -f $(PROJECT).tp				; \
	rm -f $(PROJECT).vr				; \
	rm -f $(PROJECT).texinfo.bak			; \

#-----------------------------------------------------------------------
# Compose as PostScript.
#-----------------------------------------------------------------------
ps:
	@texi2dvi $(PROJECT).texinfo			; \
	dvips -o $(PROJECT).ps $(PROJECT).dvi

#-----------------------------------------------------------------------
# Compose as PDF.
#-----------------------------------------------------------------------
pdf:
	@texi2dvi --pdf $(PROJECT).texinfo			; \

#-----------------------------------------------------------------------
# Compose as Info.
#-----------------------------------------------------------------------
info:
	@makeinfo --force $(PROJECT).texinfo

#-----------------------------------------------------------------------
# Compose as text.
#-----------------------------------------------------------------------
txt:
	@makeinfo --no-header --force -o $(PROJECT).txt $(PROJECT).texinfo

#-----------------------------------------------------------------------
# Compose as HTML.
#-----------------------------------------------------------------------
html:
	@makeinfo --force --html $(PROJECT).texinfo

