cp on sparc-solaris (SunOS) does not support -u option
[fw/sdcc] / device / lib / Makefile.in
index 7465987af74954e91da964358f95063818195a9f..81449e3ba65161287d9a3f083197ab725b30b7c6 100644 (file)
@@ -12,6 +12,12 @@ CPP          = @CPP@
 INSTALL                = @INSTALL@
 CP              = @CP@
 
+ifeq ($(shell uname -s),SunOS)
+CP_U   = $(CP)
+else
+CP_U   = $(CP) -p
+endif
+
 PRJDIR         = ../..
 INCDIR         = $(PRJDIR)/device/include
 ifndef PORTINCDIR
@@ -273,8 +279,8 @@ clean_intermediate-pic16:
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       cp -r -u $(BUILDDIR)/* $(sdcc_libdir)
-       cp -r -u ds390 ds400 gbz80 z80 hc08 *.c $(sdcc_libdir)/src
+       $(CP_U) -r $(BUILDDIR)/* $(sdcc_libdir)
+       $(CP_U) -r ds390 ds400 gbz80 z80 hc08 *.c $(sdcc_libdir)/src
        rm -r `find $(sdcc_libdir)/src -name '*.rel' -or -name '*.dump*' -or -name '*.sym' -or -name '*.o' -or -name '*.lst' -or -name '*.asm' -or -name 'CVS'`
 
 # Deleting all the installed files