## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.

## 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, 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., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.

.texi.guide:
	$(MAKEGUIDE) -I$(srcdir) $< -o $@

.texinfo.guide:
	$(MAKEGUIDE) -I$(srcdir) $< -o $@

## Look in both . and srcdir because the guide pages might have been
## rebuilt in the build directory.  Can't cd to srcdir; that might
## break a possible install-sh reference.
install-guide: $(GUIDE_DEPS)
	$(mkinstalldirs) $(guidedir)
	for file in $(GUIDE_DEPS); do		\
## We use these strange circumlocutions because we want the "ifile" to
## be relative, for the install.
	  for ifile in `echo $$file*`; do \
	    $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \
	  done;					\
## We need the 'else' because in some broken versions of sh 'if' will
## return false if the test fails.  We use ':' because the GNU
## standards prohibit us from using 'true'.
## FIXME no one has install-info, so for now we just comment it out.
##	  if $(SHELL) -c 'install-guide --version' >/dev/null 2>&1; then \
##	    install-guide --dir-file=$(guidedir)/dir $$d/$$file; \
##	  else :; fi;				\
	done

uninstall-guide:
	for file in *.guide*; do	\
	  rm -f $(guidedir)/$$file; \
	done

install-ps: $(PS_S)
	$(mkinstalldirs) $(psdir)
	for file in $(PS_DEPS); do		\
	  for ifile in `echo $$file*`; do \
	    $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \
	  done;					\
	done

uninstall-ps:
	for file in *.ps*; do	\
	  rm -f $(psdir)/$$file; \
	done

install-dvi: $(DVIS)
	$(mkinstalldirs) $(dvidir)
	for file in $(DVIS); do		\
	  for ifile in `echo $$file*`; do \
	    $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \
	  done;					\
	done

uninstall-dvi:
	for file in *.dvi*; do	\
	  rm -f $(dvidir)/$$file; \
	done
