# Makefile.in for Jade's Texinfo manual
# Copyright (C) 1998 John Harper <john@dcs.warwick.ac.uk>
# $Id$
#
# This file is part of Jade.
#
# 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

top_srcdir=@top_srcdir@
srcdir=@srcdir@

SRCS = librep.texi lang.texi repl.texi news.texi interface.texi

all : librep.info ../NEWS

../NEWS : news.texi
	$(MAKEINFO) $(MAKEINFOFLAGS) --no-validate --no-headers $< -o ../NEWS

librep.info : $(SRCS)
	$(MAKEINFO) $(MAKEINFOFLAGS) -I $(srcdir) $< -o librep.info

librep.html : $(SRCS)
	$(MAKEINFO) $(MAKEINFOFLAGS) --split --html -I $(srcdir) $< -o librep.html

librep.dvi : $(SRCS)
	$(TEXI2DVI) -I $(srcdir) $<

librep.ps : librep.dvi
	$(DVIPS) -f <librep.dvi >librep.ps

librep.pdf : $(SRCS)
	$(TEXI2PDF) -I $(srcdir) $<

install : librep.info installdirs
	for f in librep.info*; do \
	  $(INSTALL_DATA) $$f $(DESTDIR)$(infodir); \
	done
	-install-info --info-dir=$(DESTDIR)$(infodir) librep.info
	for f in rep*.1; do \
		gzip -9 < $$f > $$f.gz; \
		$(INSTALL_DATA) $$f.gz $(DESTDIR)$(prefix)/share/man/man1/; \
	done

installdirs : $(top_srcdir)/mkinstalldirs
	$(SHELL) $< $(DESTDIR)$(infodir)
	$(SHELL) $< $(DESTDIR)$(prefix)/share/man/man1/

uninstall :
	rm -f $(DESTDIR)$(infodir)/librep.info*
	-install-info --remove --info-dir=$(DESTDIR)$(infodir) librep.info
	rm -f $(DESTDIR)$(prefix)/share/man/man1/rep*

clean :
	rm -f *~ librep.info* librep.?? librep.??? rep*.1.gz

distclean : clean
	rm -f Makefile

realclean : distclean

check :
