* config/instsh.cf
* config/dirsh.cf
* config/globsh.cf
% Grouped non-bash (batch) initializations to reduce redundancy.
* Changed 'md' command to 'mkdir' in OS/2 and DOS, just to be
in sync, mkdir is available in all shells.
+ Added links to good multiplatform batch docs.
* utils/hbmk2/hbmk2.prg
+ Added ability to start -gui targets on OS/2.
93 lines
1.9 KiB
CFEngine3
93 lines
1.9 KiB
CFEngine3
#
|
|
# $Id$
|
|
#
|
|
|
|
ifneq ($(HB_SHELL),bash)
|
|
|
|
INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR))
|
|
INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES))
|
|
|
|
endif
|
|
|
|
ifeq ($(INSTALL_FILES),) # Empty install list
|
|
|
|
INSTALL_RULE =\
|
|
@echo Done
|
|
|
|
else ifeq ($(INSTALL_DIR),) # Empty install dir
|
|
|
|
INSTALL_RULE =\
|
|
@echo Done
|
|
|
|
else
|
|
|
|
ifeq ($(HB_SHELL),bash)
|
|
|
|
INSTALL_RULE =\
|
|
$(MDP) $(INSTALL_DIR); \
|
|
if [ ! -d $(INSTALL_DIR) ]; \
|
|
then \
|
|
echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \
|
|
false; \
|
|
else \
|
|
for i in $(INSTALL_FILES); \
|
|
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
|
|
|
|
else ifeq ($(HB_SHELL),nt)
|
|
|
|
INSTALL_RULE =\
|
|
-$(CMDPREF)if not exist "$(INSTALL_DIR_OS)" $(MD) "$(INSTALL_DIR_OS)" &\
|
|
for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)"
|
|
|
|
else ifeq ($(HB_SHELL),os2)
|
|
|
|
define inst_file_all
|
|
if not exist $(INSTALL_DIR_OS) $(MD) $(INSTALL_DIR_OS)
|
|
$(foreach file, $(INSTALL_FILES_OS), $(inst_file))
|
|
|
|
endef
|
|
|
|
# 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
|
|
$(CMDPREF)$(CP) $(file) $(INSTALL_DIR_OS)
|
|
|
|
endef
|
|
|
|
INSTALL_RULE =\
|
|
$(inst_file_all)
|
|
|
|
else ifeq ($(HB_SHELL),dos)
|
|
|
|
define inst_file_all
|
|
if not exist $(INSTALL_DIR_OS)\nul $(MD) $(INSTALL_DIR_OS)
|
|
$(foreach file, $(INSTALL_FILES_OS), $(inst_file))
|
|
|
|
endef
|
|
|
|
# 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
|
|
$(CMDPREF)xcopy /Y /I $(file) $(INSTALL_DIR_OS)
|
|
|
|
endef
|
|
|
|
INSTALL_RULE =\
|
|
$(inst_file_all)
|
|
|
|
endif
|
|
|
|
endif # Empty install list/dir
|