On Thu, 24 Sep 2009, Szak�ts Viktor wrote:

Hi,

> To be in sync with GNU Make to solve the same problem IMO easiest
> would be to use os2cp in postinst too. (if there isn't any native
> way to silence copy operation in OS/2 shell).

In general using copy with the same source and destination file
is bad idea and it may cause file corruption or data lost.
If possible we should add protection against such situations.
We should add such protection globally in instsh.mk.
Now we have code like:

   ifeq ($(INSTALL_DIR),) # Empty install dir
      INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Can't install, install dir isn't 
set$(ECHOQUOTE)
   else
      [...] # installation
   endif

It should be enough top change it to sth like:

   ifeq ($(INSTALL_DIR),) # Empty install dir
      INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Can't install, install dir isn't 
set$(ECHOQUOTE)
   else
      ifeq ($(realpath $(INSTALL_DIR)),$(realpath .))
         INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Skip installation to the same 
directory$(ECHOQUOTE)
      else
         [...] # installation
      endif
   endif

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to