Files
harbour-core/harbour/config/dos/install.cf
Viktor Szakats 20b2d4bb3b 2009-07-11 17:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/dos/dir.cf
  * config/dos/install.cf
  * config/win/dir.cf
  * config/os2/install.cf
  * config/wce/dir.cf
    * More sync.
2009-07-11 16:00:59 +00:00

49 lines
1.0 KiB
CFEngine3

#
# $Id$
#
ifeq ($(INSTALL_OBJS),) # Empty install list
INSTALL_RULE = @echo Done
else
ifeq ($(SHLVL),) # non-bash
# We have to use script to overcome the DOS limit of max 128 characters
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define inst_file
$(COMSPEC) /Cxcopy /Y /I $(file) $(subst /,\,$(INSTALL_DIR))
endef
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file))
else # bash
INSTALL_DIRSH = $(subst \,/,$(INSTALL_DIR))
INSTALL_OBJSH = $(subst \,/,$(INSTALL_OBJS))
INSTALL_RULE =\
@sh -c 'if [ ! -d $(INSTALL_DIRSH) ]; \
then \
echo "! Cannot install, path not found: $(INSTALL_DIRSH)" 1>&2; \
else \
for i in $(INSTALL_OBJSH); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIRSH)"; \
$(CP) $$i $(INSTALL_DIRSH); \
true; \
else \
echo "! Cannot install $$i, not found" 1>&2; \
fi \
done \
fi'
endif
endif # Empty install list