@SET_MAKE@

# no csh please
SHELL = /bin/sh

# the version of this package
PACKAGE_VERSION = @PACKAGE_VERSION@

##############################################################################
# location of required programms
prefix = @prefix@
MKDIR = @MKDIR@
RM   = @RM@
LS   = @LS@
XARGS = @XARGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@

top_srcdir = @top_srcdir@
srcdir = @srcdir@
datadir= @datadir@
datarootdir= @datarootdir@
info_dir = @info_dir@

EMACS_PROG = @EMACS_PROG@
EMACS_FLAVOR = @EMACS_FLAVOR@

FLAGS = @FLAGS@

SYMLINKS = @SYMLINKS@
LINKPATH = @LINKPATH@

##############################################################################

all: info

version.texinfo:
	echo @set VERSION $(PACKAGE_VERSION) > $@

vm.info:: version.texinfo

vm-pcrisis.info:: version.texinfo

info: vm.info vm-pcrisis.info

Makefile: @srcdir@/Makefile.in
	cd @srcdir@/..; ./config.status

install: install-pkg

install-pkg: uninstall-pkg info
	@mkdir -p -m 0755 "$(DESTDIR)$(info_dir)";                     \
	if test "x$(SYMLINKS)" = "xno" ; then                          \
          for i in `${LS} *.info* ` ; do                               \
	    echo "Installing $$i in $(DESTDIR)$(info_dir)" ;           \
            $(INSTALL_DATA) $$i "$(DESTDIR)$(info_dir)" ;              \
          done ;                                                       \
        else                                                           \
          if test "x$(LINKPATH)" = "x" ; then                          \
            for i in `${LS} *.info* ` ; do                             \
              echo "Linking $$i in $(DESTDIR)$(info_dir)" ;            \
              $(LN_S) "`pwd`/$$i" "$(DESTDIR)$(info_dir)/$$i" ;        \
            done ;                                                     \
          else                                                         \
            for i in `${LS} *.info* ` ; do                             \
              echo "Linking $(LINKPATH)/texinfo/$$i in $(DESTDIR)$(info_dir)" ; \
              $(LN_S) "$(LINKPATH)/texinfo/$$i" "$(DESTDIR)$(info_dir)/$$i" ; \
            done ;                                                     \
          fi ;                                                         \
        fi
	@echo VM INFO files successfully installed\!

uninstall-pkg:
	-$(RM) "$(DESTDIR)$(info_dir)"/vm*.info*

##############################################################################
clean:
	-$(RM) -f version.texinfo *.info *.info-[0-9]

distclean: clean
	-$(RM) -f Makefile
