Files
harbour-core/harbour/config/os2/install.cf
Viktor Szakats 2be78e8125 2009-07-11 18:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
    + Added OS/2 cross-build examples for both Windows and Linux 
      hosts (Thanks Przemek for the Linux one).
    + Added information that DOS and OS/2 builds can be created 
      on other host OSes.

  * config/os2/global.cf
  * config/os2/install.cf
    + Added support for non-bash non-OS/2 shell for
      Windows NT cross compilation.
    ! Fixed syntax error in one of the OS/2 specific rules.
2009-07-11 16:50:59 +00:00

58 lines
1.1 KiB
CFEngine3

#
# $Id$
#
ifeq ($(INSTALL_OBJS),) # Empty install list
INSTALL_RULE = @echo Done
else
ifeq ($(SHLVL),) # non-bash
ifeq ($(OS2_SHELL),) # non-OS/2
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_RULE = \
-$(COMSPEC) /c for %%f in ($(INSTALL_LIST)) do copy "%%f" "$(subst /,\,$(INSTALL_DIR))"
else # OS/2
# We have to use script to overcome the max command size limit
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define inst_file
$(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR))
endef
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file))
endif
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); \
true; \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi
endif
endif # Empty install list