#
# Enterprise Volume Manager System - User Interface Engine
#

include make.rules


all:
	 @for dir in ${subdirs}; do \
	  (cd $$dir && $(MAKE) all) \
	  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"

install:
	rm -f $(DESTDIR)$(PLUGINS_DIR)/lib*

	@for dir in ${subdirs} include man; do \
	  (cd $$dir && $(MAKE) install) \
	  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"

	@echo
	@echo "The EVMS User-Space Engine has been installed."
	@echo
	@echo "The Engine and dlist libraries are in: $(DESTDIR)$(EVMSLIB_DIR)"
	@echo "The Plug-Ins are in: $(DESTDIR)$(EVMSLIB_DIR)/evms"
	@echo "The binaries are in: $(DESTDIR)$(sbindir)"
	@echo
	@echo "Remember to add the Engine library directory (and NOT the"
	@echo "Plugin directory) to your /etc/ld.so.conf file, and run"
	@echo "ldconfig to update the dynamic linker run-time bindings."
	@echo
	@echo "Also remember to enable EVMS support in your Linux kernel,"
	@echo "or the Engine will not operate correctly."
	@echo
	@echo "You can get started using EVMS by running \"evmsgui\" or"
	@echo "\"evmsn\" or \"evms\"."
	@echo

uninstall:
	@for dir in ${subdirs} include man; do \
	  (cd $$dir && $(MAKE) uninstall) \
	  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(PLUGINS_DIR)
	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(EVMSLIB_DIR)

clean:
	/bin/rm -f *~ config.cache config.log config.status
	@for dir in ${subdirs}; do \
	  (cd $$dir && $(MAKE) clean) \
	  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"

distclean: clean
	@for dir in ${subdirs}; do \
	  (cd $$dir && $(MAKE) distclean) \
	  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
	/bin/rm -f config.status config.cache config.log make.rules

configure: aclocal.m4 configure.in
	autoconf

