#
# $Id: install.cf 9312 2008-09-05 00:08:34Z vszakats $
#

ifeq ($(SHLVL),) # An OS/2 command shell

define inst_file
ECHO $(CP) $(file) $(INSTALL_OS2_DIR) >> _nstall.cmd

endef

INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_OS2_DIR = $(subst /,\,$(INSTALL_DIR))
INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file)) \
	$(COMSPEC) /c _nstall.cmd & $(RM) _nstall.cmd

else  # bash

INSTALL_RULE =\
	@if [ ! -d $(INSTALL_DIR) ]; \
	then \
	  echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
	else \
	  for i in $(INSTALL_OBJS); \
	  do \
	    if [ -r $$i ]; \
	    then \
	      echo "! Installing $$i on $(INSTALL_DIR)"; \
	      $(CP) $$i $(INSTALL_DIR); \
	    else \
	      echo "! Can't install $$i, not found" 1>&2; \
	    fi \
	  done \
	fi

endif
