#===============================================================
#  doc directory Makefile
#
#  Copyright (C) 1995  Bruce E. Wampler
#
#  This file is part of the V C++ GUI Framework.
#
#  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.
#===============================================================

CONFIG=../Config.mk
include $(CONFIG)

#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

.PHONY: default all checkspelling latex html htmlonly clean cleanall tarhtml

default: all

all: checkspelling latex html

clean:
	-rm -f $(CLEANEXTS) *.aux *.log *.toc *.ind *.idx *.ilg
	(cd figs; -rm -f $(CLEANEXTS))
	(cd html; -rm -f $(CLEANEXTS))

cleanall: clean
	-rm -f vrefman.dvi vrefman.ps

#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

latex:
	latex vrefman.tex
	latex vrefman.tex
	makeindex vrefman
	latex vrefman.tex
	dvips -t letter -o vrefman.ps vrefman.dvi

html:
	#
	# latex em all twice first
	-rm *.htm
	latex wvrefch1.tex
	latex wvrefch1.tex
	latex wvrefch2.tex
	latex wvrefch2.tex
	latex wvrefch3.tex
	latex wvrefch3.tex
	latex wvrefch4.tex
	latex wvrefch4.tex
	latex wvrefch5.tex
	latex wvrefch5.tex
	latex wvrefch6.tex
	latex wvrefch6.tex
	latex wvrefch7.tex
	latex wvrefch7.tex
	latex wvrefch8.tex
	latex wvrefch8.tex
	latex wvrefch9.tex
	latex wvrefch9.tex
	latex wvreftut.tex
	latex wvreftut.tex
	latex wcxxsty.tex
	latex wcxxsty.tex
	latex wvquickr.tex
	latex wvquickr.tex
	latex wvtools.tex
	latex wvtools.tex
	latex wrelease.tex
	latex wrelease.tex
	latex wvclassh.tex
	latex wvclassh.tex
	-lth wvrefch1 "V Reference Manual - What is V?"
	-lth wvrefch2 "V Reference Manual - The V View of the World"
	-lth wvrefch3 "V Reference Manual - A V Tutorial"
	-lth wvrefch4 "V Reference Manual - The Application"
	-lth wvrefch5 "V Reference Manual - Command Windows"
	-lth wvrefch6 "V Reference Manual - Dialogs"
	-lth wvrefch7 "V Reference Manual - Drawing"
	-lth wvrefch8 "V Reference Manual - Standard V Values"
	-lth wvrefch9 "V Reference Manual - Utilities"
	-lth wvreftut "V Reference Manual - Tutorial C++ Source"
	-lth wcxxsty "V Reference Manual - C++ Coding Style Guidelines"
	-lth wvquickr "V Reference Manual - Quick Reference"
	-lth wvtools "V Reference Manual - V Programming Tools"
	-lth wrelease "V Reference Manual - Release Notes"
	-lth wvclassh "V Reference Manual - V Class Hierarchy"
	-cp wvrefman.html wvrefman.htm
	chmod 644 *.htm

htmlonly:
	-lth wvrefch1 "V Reference Manual - What is V?"
	-lth wvrefch2 "V Reference Manual - The V View of the World"
	-lth wvrefch3 "V Reference Manual - A V Tutorial"
	-lth wvrefch4 "V Reference Manual - The Application"
	-lth wvrefch5 "V Reference Manual - Command Windows"
	-lth wvrefch6 "V Reference Manual - Dialogs"
	-lth wvrefch7 "V Reference Manual - Drawing"
	-lth wvrefch8 "V Reference Manual - Standard V Values"
	-lth wvrefch9 "V Reference Manual - Utilities"
	-lth wvreftut "V Reference Manual - Tutorial C++ Source"
	-lth wcxxsty "V Reference Manual - C++ Coding Style Guidelines"
	-lth wvquickr "V Reference Manual - Quick Reference"
	-lth wvtools "V Reference Manual - V Programming Tools"
	-lth wrelease "V Reference Manual - Release Notes"
	-lth wvclassh "V Reference Manual - V Class Hierarchy"
	-cp wvrefman.html wvrefman.htm
	chmod 644 *.htm

tarhtml:
	-rm wvrefman.tgz
	tar cvfz wvrefman.tgz *.htm fig/*.gif

checkspelling:
	ispell -t cxxstyle.tex
	ispell -t vrefch1.tex
	ispell -t vrefch2.tex
	ispell -t vrefch3.tex
	ispell -t vrefch4.tex
	ispell -t vrefch5.tex
	ispell -t vrefch6.tex
	ispell -t vrefch7.tex
	ispell -t vrefch8.tex
	ispell -t vrefch9.tex
	ispell -t vrefman.tex
	ispell -t release.tex 
