#
# $Id$
#

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
