* bin/commit.hb
* config/detect.mk
* config/detfun.mk
* config/detplat.mk
* config/dir.mk
* config/dirsh.mk
* config/global.mk
* config/globsh.mk
* config/instsh.mk
* config/lang.hb
* config/lang2po.hb
* config/po2lang.hb
* config/postinst.hb
* contrib/hbexpat/tests/tohash.prg
* contrib/hbformat/utils/hbformat.ini
* contrib/hbmisc/hbedit.prg
* contrib/hbmxml/tests/testmxml.prg
* contrib/hbnetio/utils/hbnetio/_console.prg
* contrib/hbnetio/utils/hbnetio/_winsvc.prg
* contrib/hbnetio/utils/hbnetio/hbnetio.prg
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
* contrib/hbwin/tests/ole.prg
* contrib/hbwin/tests/oletst2.js
* contrib/hbwin/tests/oletst2.vbs
* contrib/hbxpp/doc/en/binnumx.txt
* contrib/hbxpp/doc/en/dbcmdx.txt
* contrib/xhb/htmutil.prg
* contrib/xhb/tfile.prg
* contrib/xhb/tframe.prg
* contrib/xhb/thtm.prg
* ChangeLog.txt
* debian/copyright
* doc/class_tp.txt
* doc/hdr_tpl.txt
* doc/xhb-diff.txt
* LICENSE.txt
* package/harbour-wce.spec.in
* package/harbour-win.spec.in
* package/harbour.spec
* package/mpkg_rpm_wce.sh
* package/mpkg_rpm_win.sh
* package/mpkg_rpm.sh
* package/mpkg_src.sh
* package/mpkg_ver.sh
* src/rtl/achoice.prg
* src/rtl/getsys53.prg
* src/rtl/tgetlist.prg
* src/rtl/tlabel.prg
* src/rtl/tmenusys.prg
* tests/hbdoc.prg
* tests/langmsg.prg
* tests/rto_get.prg
* tests/rto_tb.prg
+ doc/en/ati.txt
+ doc/en/dirdrive.txt
+ doc/en/hashfunc.txt
+ doc/en/hbtoken.txt
+ doc/en/left.txt
+ doc/en/proc.txt
+ doc/en/strtran.txt
+ doc/en/transfrm.txt
+ doc/en/typefile.txt
* doc/en/*
* more partial sync with 3.4 fork
113 lines
2.7 KiB
Makefile
113 lines
2.7 KiB
Makefile
INSTALL_RULE :=
|
|
|
|
INSTALL_FILES := $(strip $(INSTALL_FILES))
|
|
INSTALL_DIR := $(strip $(INSTALL_DIR))
|
|
|
|
ifneq ($(INSTALL_FILES),) # Empty install list
|
|
|
|
ifeq ($(INSTALL_DIR),) # Empty install dir
|
|
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Cannot install, install dir is not set$(ECHOQUOTE)
|
|
else
|
|
|
|
_SAME_DIR :=
|
|
# Check if $(abspath)/$(realpath) functions are supported
|
|
ifneq ($(abspath .),)
|
|
ifeq ($(realpath $(INSTALL_DIR)),$(realpath .))
|
|
_SAME_DIR := yes
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(_SAME_DIR),yes)
|
|
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Skip install, destination dir '$(INSTALL_DIR)' is the same as source$(ECHOQUOTE)
|
|
else
|
|
|
|
ifeq ($(HB_SHELL),sh)
|
|
INSTALL_DIR_OS := $(subst \,/,$(INSTALL_DIR))
|
|
else
|
|
ifeq ($(HB_SHELL),os2)
|
|
# $(CP) and $(MDP) require forward slashes
|
|
INSTALL_DIR_OS := $(subst \,/,$(INSTALL_DIR))
|
|
INSTALL_FILES_OS := $(subst \,/,$(INSTALL_FILES))
|
|
else
|
|
INSTALL_DIR_OS := $(subst /,\,$(INSTALL_DIR))
|
|
INSTALL_FILES_OS := $(subst /,\,$(INSTALL_FILES))
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),sh)
|
|
|
|
INSTALL_RULE := \
|
|
@$(MDP) $(INSTALL_DIR_OS); \
|
|
if [ ! -d "$(INSTALL_DIR_OS)" ]; \
|
|
then \
|
|
$(ECHO) "! Cannot install, path not found: '$(INSTALL_DIR_OS)'" 1>&2; \
|
|
$(FALSE); \
|
|
else \
|
|
for i in $(INSTALL_FILES); \
|
|
do \
|
|
if [ -r "$$i" ]; \
|
|
then \
|
|
$(ECHO) "! Installing $$i on $(INSTALL_DIR_OS)"; \
|
|
$(CP) $$i $(INSTALL_DIR_OS); \
|
|
true; \
|
|
else \
|
|
$(ECHO) "! Cannot install $$i, not found" 1>&2; \
|
|
fi \
|
|
done \
|
|
fi
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),nt)
|
|
|
|
define inst_file_all
|
|
-@if not exist "$(INSTALL_DIR_OS)" $(MDP) "$(INSTALL_DIR_OS)"
|
|
-@for %%f in ($(INSTALL_FILES_OS)) do $(CP) "%%f" "$(INSTALL_DIR_OS)"
|
|
endef
|
|
|
|
INSTALL_RULE := $(inst_file_all)
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),os2)
|
|
|
|
define inst_file_all
|
|
-@$(MDP) $(INSTALL_DIR_OS)
|
|
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
|
|
endef
|
|
|
|
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
|
# It causes that every command will be separated by LF
|
|
define inst_file
|
|
-@$(CP) $(file) $(INSTALL_DIR_OS)
|
|
|
|
endef
|
|
|
|
INSTALL_RULE := $(inst_file_all)
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),dos)
|
|
|
|
define inst_file_all
|
|
-@$(MDP) $(INSTALL_DIR_OS)
|
|
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
|
|
endef
|
|
|
|
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
|
# It causes that every command will be separated by LF
|
|
define inst_file
|
|
-@$(CP) $(file) $(INSTALL_DIR_OS)
|
|
|
|
endef
|
|
|
|
INSTALL_RULE := $(inst_file_all)
|
|
|
|
endif
|
|
|
|
endif # Source and destination directories are equal
|
|
|
|
endif # Empty install dir
|
|
|
|
endif # Empty install list
|