# Makefile for Jade's Texinfo manual
# Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>

# Jade 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, or (at your option)
# any later version.

# Jade 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 Jade; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

SRCS = jade.texi user.texi programmer.texi

MAKEINFO = makeinfo

# This should be the special version of makeinfo which supports AmigaGuide
# files if you want the .guide or .doc file
MAKEGUIDE = makeguide

#MAKEINFOFLAGS = --no-validate
MAKEINFOFLAGS = 

TEXI2DVI = texi2dvi
DVIPS = dvips

jade.info : $(SRCS)
	$(MAKEINFO) $(MAKEINFOFLAGS) jade.texi -o jade.info

jade.guide : $(SRCS)
	$(MAKEGUIDE) $(MAKEINFOFLAGS) --amiga jade.texi -o jade.guide

jade.doc : $(SRCS)
	$(MAKEGUIDE) $(MAKEINFOFLAGS) --amiga --no-headers jade.texi -o jade.doc

jade.dvi : $(SRCS)
	$(TEXI2DVI) jade.texi

jade.ps : jade.dvi
	$(DVIPS) jade.dvi

all : jade.info

man : jade.info jade.guide jade.doc jade.dvi jade.ps

install.info : jade.info $(infodir)
	for file in jade.info*; \
	do \
	  $(INSTALL_DATA) $$file $(infodir)/$$file; \
	done
	if [ ! -e $(infodir)/dir ]; \
	then \
	  cp dir $(infodir); \
	fi

$(infodir) :
	mkdir $(infodir)

uninstall.info :
	rm -f $(infodir)/jade.info*

clean realclean :
	rm -f *~ jade.info* jade.guide jade.doc jade.dvi jade.ps
