ecere/gui/Window: Fixed lock-up closing code editor while Finding in Files on Unix
[sdk] / crossplatform.mk
index 769ac63..80f7bd3 100644 (file)
@@ -215,9 +215,11 @@ hs_crossloop = $(call hs_unsafe_crossloop,$(call fp_no_parent_dir,$(1)),$(2))
 
 # PATH SEPARATOR STRING TOOLS
 ifdef WINDOWS_HOST
-ifndef MSYSCON
-   WIN_PS_TOOLS := defined
-endif
+   ifneq ($(TERM),cygwin)
+      ifndef MSYSCON
+         WIN_PS_TOOLS := defined
+      endif
+   endif
 endif
 slash_path = $(subst $(backslash),$(slash),$(1))
 ifdef WIN_PS_TOOLS
@@ -269,11 +271,15 @@ _CPP = $(if $(findstring $(space),$(CPP)),"$(CPP)",$(CPP))
 
 _SYSROOT = $(if $(SYSROOT),$(space)--sysroot=$(SYSROOT),)
 
+_MAKE = $(call fp_opt_quotes,$(MAKE))
+
 # SHELL COMMANDS
 ifdef WINDOWS_HOST
-ifndef MSYSCON
-   WIN_SHELL_COMMANDS := defined
-endif
+   ifneq ($(TERM),cygwin)
+      ifndef MSYSCON
+         WIN_SHELL_COMMANDS := defined
+      endif
+   endif
 endif
 ifneq ($(V),1)
    SILENT_IS_ON := defined
@@ -281,6 +287,7 @@ endif
 ifeq ($(D),1)
    DEBUG_IS_ON := defined
 endif
+addtolistfile = $(if $(1),@$(call echo,$(1)) >> $(2),)
 ifdef WIN_SHELL_COMMANDS
    cd = @cd
    nullerror = 2>NUL
@@ -298,8 +305,8 @@ else
    nullerror = 2>/dev/null
    echo = $(if $(1),echo "$(1)")
    touch = $(if $(1),touch $(1))
-   cp = $(if $(1),cp$(if $(SILENT_IS_ON),, -v) $(1) $(2))
-   cpr = $(if $(1),cp -prf$(if $(SILENT_IS_ON),,v) $(1) $(2))
+   cp = $(if $(1),cp -df$(if $(SILENT_IS_ON),,v) $(1) $(2))
+   cpr = $(if $(1),cp -dfr$(if $(SILENT_IS_ON),,v) $(1) $(2))
    rm = $(if $(1),-rm -f$(if $(SILENT_IS_ON),,v) $(1))
    rmr = $(if $(1),-rm -fr$(if $(SILENT_IS_ON),,v) $(1))
    mkdir = $(if $(1),-mkdir -p$(if $(SILENT_IS_ON),,v) $(1))