Files
harbour-core/harbour/config/dos/install.cf
Przemyslaw Czerpak 9fea280094 2009-01-27 17:03 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/dos/dir.cf
  * harbour/config/dos/install.cf
    ! fixed for GNU make ports which prefer COMSPEC before SHELL
2009-01-27 15:59:50 +00:00

48 lines
1002 B
CFEngine3

#
# $Id$
#
ifeq ($(INSTALL_OBJS),) # Empty install list
INSTALL_RULE = @echo Done
else
ifeq ($(SHLVL),) # COMMAND.COM
# 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
$(CP) $(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); \
else \
echo "! Cannot install $$i, not found" 1>&2; \
fi \
done \
fi'
endif
endif