#
# ================================================================================
#                               Edition 1.1
#                      of the Texinfo-manuals for the
#                      (R)evision (C)ontrol (S)ystem
#                               Version 5.7
#
#                  (c) 1982, 1988, 1989 Walter F. Tichy.
#           (c) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
#        (c) 1996, 1997 Karl Heinz Marbaise (doing converting job)
# ================================================================================
#
# Discription:
#    makefile to create the dvi, GNU-Info and so on.
#
# Authors:
#    Walter Tichy,
#    Paul Eggert,
#    Karl Heinz Marbaise (doing converting job)
#
# e-mail:
#    Internet: KHMarbaise@p69.ks.fido.de
#    Fido-net: 2:2452/117.69
#
# Bugs, question:
#    to above e-mail adress.
#
# License:
#    The "Texinfo Edition of the RCS V5.7 manuals" are 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, or (at
#    your option) any later version.
#
#    The "Texinfo Edition of the RCS V5.7 manuals" are distributed
#    in the hope that they 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 the "Texinfo Edition of the RCS V5.7 manuals"; see the
#    file COPYING. If not, write to the:
#    Free Software Foundation,
#    59 Temple Place - Suite 330,
#    Boston, MA 02111-1307, USA.
#
#    See \rcstxi.110\COPYING for details.
#
# ================================================================================
#
#
# $Id: MAKEFILE 1.5 1997/03/30 22:53:13 KHM Exp $
#
EDITION=ED1.1
# Texinfo extension on unix that should be changed
# to .texi or .texinfo
TEXI=.tex
#
# Use rm
RM=rm.exe
#
# Unix/linux: mkdir
MKDIR=md
# Unix/linux: rmdir
RMDIR=rd
#
# Unix: cp
CP=xcopy.exe
#
# under Unix/linux set to 'mv'
MV=move
#
.SUFFIXES:
.SUFFIXES: $(TEXI)
#
vpath %$(TEXI) .
#
DOCU = vc$(TEXI) about$(TEXI) ci$(TEXI) co$(TEXI) ident$(TEXI) merge$(TEXI) \
       rcs$(TEXI) rcs_doc$(TEXI) rcsclean$(TEXI) rcsdiff$(TEXI) rcsfile$(TEXI) \
       rcsintro$(TEXI) rcsmerge$(TEXI) rcssynop$(TEXI) rlog$(TEXI)
#
#
.PHONY: default clean cleantex dvi ipf html info edition
default:
	@echo Possible targets are:
	@echo	 make clean	     clean directory from unused files.
	@echo	 make info	     create GNUs info file rcs.inf
	@echo	 make dvi	     create a printable manual out of
	@echo			     texinfo sources(rcs.dvi)
	@echo			     (TeX or emTeX required).
	@echo	 make ipf	     create via converter an IPF and
	@echo			     call IPFC to make a OS/2 inf file.
	@echo	 make html           create via converter an HTML output
	@echo	 make edition	     create the whole edition also
	@echo			     create info-ZIP file.

clean:
	-$(RM) *.htm
	-$(RM) *.ipf
	-$(RM) *.inf
	-$(RM) *.txi
	-$(RM) *.dvi
	-$(RM) dviscr.dlg
	-$(RM) dvipm.dlg
	-$(RM) *.aux
	-$(RM) *.cp
	-$(RM) *.cps
	-$(RM) *.fn
	-$(RM) *.fns
	-$(RM) *.ky
	-$(RM) *.kys
	-$(RM) *.log
	-$(RM) *.pg
	-$(RM) *.pgs
	-$(RM) *.toc
	-$(RM) *.tp
	-$(RM) *.tps
	-$(RM) *.vr
	-$(RM) *.vrs
	-$(RM) *.idx
	-$(RM) *.ilg
	-$(RM) *.ind
	-$(RM) -r os2
#
cleantex:
	-$(RM) dviscr.dlg
	-$(RM) dvipm.dlg
	-$(RM) *.aux
	-$(RM) *.cp
	-$(RM) *.cps
	-$(RM) *.fn
	-$(RM) *.fns
	-$(RM) *.ky
	-$(RM) *.kys
	-$(RM) *.log
	-$(RM) *.pg
	-$(RM) *.pgs
	-$(RM) *.toc
	-$(RM) *.tp
	-$(RM) *.tps
	-$(RM) *.vr
	-$(RM) *.vrs
	-$(RM) *.idx
	-$(RM) *.ilg
	-$(RM) *.ind
#
# This targets creates a printable manual
# out of the texinfo files.
dvi: $(DOCU)
	call mktex vc
	$(MV) vc.dvi rcs.dvi

# @value's.
# The converted IPF file is put into
# another directory, cause if you
# compile it with IPFC you get a
# inf file, but this has nothing to
# to with GNU's inf.
ipf: $(DOCU)
	$(MKDIR) os2
	texi2ipf vc.tex vc.ipf
	IPFC /INF vc.ipf
	$(MV) vc.inf os2\rcs.inf
###	$(RM) *.txi
###	$(RM) os2/*.ipf
html: $(DOCU)
	texihtml vc.tex vc.htm
	$(MV) vc.htm rcs.htm
#
info: $(DOCU)
	makeinfo --no-split vc.tex

edition: clean dvi ipf html info


