test/jprt.config
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7089790_full Sdiff test

test/jprt.config

Print this page
rev 2695 : shared changes


  58 # File must exist
  59 fileMustExist() # dir name
  60 {
  61   if [ ! -f "$1" ] ; then
  62     error "File for $2 does not exist: $1"
  63   fi
  64 }
  65 #############################################################################
  66 
  67 # Should be set by JPRT as the 3 basic inputs
  68 slashjava="${ALT_SLASH_JAVA}"
  69 if [ "${slashjava}" = "" ] ; then
  70   slashjava=/java
  71 fi
  72 
  73 # Check input
  74 dirMustExist "${slashjava}"  ALT_SLASH_JAVA
  75 
  76 # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
  77 osname=`uname -s`
  78 if [ "${osname}" = SunOS ] ; then
  79    
  80     # SOLARIS: Sparc or X86
  81     osarch=`uname -p`
  82     if [ "${osarch}" = sparc ] ; then
  83         solaris_arch=sparc
  84     else
  85         solaris_arch=i386
  86     fi
  87 
  88     # Add basic solaris system paths
  89     path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
  90 
  91     # Find GNU make
  92     make=/usr/sfw/bin/gmake
  93     if [ ! -f ${make} ] ; then
  94         make=/opt/sfw/bin/gmake
  95         if [ ! -f ${make} ] ; then
  96             make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
  97         fi 
  98     fi
  99     fileMustExist "${make}" make
 100 
 101     # File creation mask
 102     umask 002

 103 
 104 elif [ "${osname}" = Linux ] ; then
 105    
 106     # Add basic paths
 107     path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 108 
 109     # Find GNU make
 110     make=/usr/bin/make
 111     fileMustExist "${make}" make
 112 
 113     umask 002

 114 
 115 else


 116 



















 117     # Windows: Differs on CYGWIN vs. MKS.
 118    
 119     # We need to determine if we are running a CYGWIN shell or an MKS shell
 120     #    (if uname isn't available, then it will be unix_toolset=unknown)
 121     unix_toolset=unknown
 122     if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
 123         # We kind of assume ROOTDIR is where MKS is and it's ok
 124         unix_toolset=MKS
 125         mkshome=`dosname -s "${ROOTDIR}"`
 126         # Most unix utilities are in the mksnt directory of ROOTDIR
 127         unixcommand_path="${mkshome}/mksnt"
 128         path4sdk="${unixcommand_path}"
 129         devtools_path="${slashjava}/devtools/win32/bin"
 130         path4sdk="${devtools_path};${path4sdk}"
 131         # Find GNU make
 132         make="${devtools_path}/gnumake.exe"
 133         fileMustExist "${make}" make
 134     elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
 135         # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
 136         unix_toolset=CYGWIN
 137         # Most unix utilities are in the /usr/bin
 138         unixcommand_path="/usr/bin"
 139         path4sdk="${unixcommand_path}"
 140         # Find GNU make
 141         make="${unixcommand_path}/make.exe"
 142         fileMustExist "${make}" make
 143     else
 144       echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
 145     fi
 146 
 147     
 148     # For windows, it's hard to know where the system is, so we just add this
 149     #    to PATH.
 150     slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
 151     path4sdk="${slash_path};${PATH}"
 152     
 153     # Convert path4sdk to cygwin style
 154     if [ "${unix_toolset}" = CYGWIN ] ; then
 155         path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
 156     fi


 157 
 158 fi
 159 
 160 # Export PATH setting
 161 PATH="${path4sdk}"
 162 export PATH
 163 


  58 # File must exist
  59 fileMustExist() # dir name
  60 {
  61   if [ ! -f "$1" ] ; then
  62     error "File for $2 does not exist: $1"
  63   fi
  64 }
  65 #############################################################################
  66 
  67 # Should be set by JPRT as the 3 basic inputs
  68 slashjava="${ALT_SLASH_JAVA}"
  69 if [ "${slashjava}" = "" ] ; then
  70   slashjava=/java
  71 fi
  72 
  73 # Check input
  74 dirMustExist "${slashjava}"  ALT_SLASH_JAVA
  75 
  76 # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
  77 osname=`uname -s`
  78 case "${osname}" in
  79   SunOS )
  80     # SOLARIS: Sparc or X86
  81     osarch=`uname -p`
  82     if [ "${osarch}" = sparc ] ; then
  83         solaris_arch=sparc
  84     else
  85         solaris_arch=i386
  86     fi
  87 
  88     # Add basic solaris system paths
  89     path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
  90 
  91     # Find GNU make
  92     make=/usr/sfw/bin/gmake
  93     if [ ! -f ${make} ] ; then
  94         make=/opt/sfw/bin/gmake
  95         if [ ! -f ${make} ] ; then
  96             make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
  97         fi 
  98     fi
  99     fileMustExist "${make}" make
 100 
 101     # File creation mask
 102     umask 002
 103     ;;
 104 
 105   Linux | Darwin )

 106     # Add basic paths
 107     path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 108 
 109     # Find GNU make
 110     make=/usr/bin/make
 111     fileMustExist "${make}" make
 112 
 113     umask 002
 114     ;;
 115 
 116   FreeBSD | OpenBSD )
 117     # Add basic paths
 118     path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 119 
 120     # Find GNU make
 121     make=/usr/local/bin/gmake
 122     fileMustExist "${make}" make
 123 
 124     umask 002
 125     ;;
 126 
 127   NetBSD )
 128     # Add basic paths
 129     path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 130 
 131     # Find GNU make
 132     make=/usr/pkg/bin/gmake
 133     fileMustExist "${make}" make
 134 
 135     umask 002
 136     ;;
 137 
 138   * )
 139     # Windows: Differs on CYGWIN vs. MKS.
 140    
 141     # We need to determine if we are running a CYGWIN shell or an MKS shell
 142     #    (if uname isn't available, then it will be unix_toolset=unknown)
 143     unix_toolset=unknown
 144     if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
 145         # We kind of assume ROOTDIR is where MKS is and it's ok
 146         unix_toolset=MKS
 147         mkshome=`dosname -s "${ROOTDIR}"`
 148         # Most unix utilities are in the mksnt directory of ROOTDIR
 149         unixcommand_path="${mkshome}/mksnt"
 150         path4sdk="${unixcommand_path}"
 151         devtools_path="${slashjava}/devtools/win32/bin"
 152         path4sdk="${devtools_path};${path4sdk}"
 153         # Find GNU make
 154         make="${devtools_path}/gnumake.exe"
 155         fileMustExist "${make}" make
 156     elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
 157         # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
 158         unix_toolset=CYGWIN
 159         # Most unix utilities are in the /usr/bin
 160         unixcommand_path="/usr/bin"
 161         path4sdk="${unixcommand_path}"
 162         # Find GNU make
 163         make="${unixcommand_path}/make.exe"
 164         fileMustExist "${make}" make
 165     else
 166       echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
 167     fi
 168 
 169     
 170     # For windows, it's hard to know where the system is, so we just add this
 171     #    to PATH.
 172     slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
 173     path4sdk="${slash_path};${PATH}"
 174     
 175     # Convert path4sdk to cygwin style
 176     if [ "${unix_toolset}" = CYGWIN ] ; then
 177         path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
 178     fi
 179     ;;
 180 esac
 181 


 182 # Export PATH setting
 183 PATH="${path4sdk}"
 184 export PATH
 185 
test/jprt.config
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File