* harbour/config/dos/dir.cf
* harbour/config/dos/install.cf
! fixed for GNU make ports which prefer COMSPEC before SHELL
48 lines
1002 B
CFEngine3
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
|