[91] | 1 | #!/bin/sh -f |
---|
| 2 | |
---|
| 3 | # |
---|
| 4 | # File produced by the obuild tool version 1.0 |
---|
[101] | 5 | # for the package snovis with version v1r1. |
---|
[91] | 6 | # |
---|
| 7 | |
---|
| 8 | #//////////////////////////////////////////////// |
---|
| 9 | # Usage : |
---|
| 10 | # UNIX> cd some_path/pack/version/obuild |
---|
| 11 | # ( UNIX> chmod a+x sh/check_foreigns ) |
---|
| 12 | # UNIX> sh/check_foreigns |
---|
| 13 | # |
---|
| 14 | #//////////////////////////////////////////////// |
---|
| 15 | |
---|
| 16 | # Binary directory is needed to create the obuild_plaform program. |
---|
| 17 | |
---|
| 18 | if [ "${OBUILD_PLATFORM}" = "" ] ; then |
---|
| 19 | obuild_platform=`uname` |
---|
| 20 | else |
---|
| 21 | obuild_platform=${OBUILD_PLATFORM} |
---|
| 22 | fi |
---|
| 23 | |
---|
| 24 | if [ "${obuild_platform}" = "" ] ; then |
---|
| 25 | echo "obuild_platform variable not defined." |
---|
| 26 | exit |
---|
| 27 | fi |
---|
| 28 | |
---|
| 29 | if [ "${OBUILD_DIR_BIN}" = "" ] ; then |
---|
[276] | 30 | obuild_dir_bin=bin_obuild |
---|
[91] | 31 | else |
---|
| 32 | obuild_dir_bin=${OBUILD_DIR_BIN} |
---|
| 33 | fi |
---|
| 34 | |
---|
| 35 | if [ "${obuild_dir_bin}" = "" ] ; then |
---|
| 36 | echo "obuild_dir_bin variable not defined." |
---|
| 37 | exit |
---|
| 38 | fi |
---|
| 39 | |
---|
| 40 | obuild_pwd=`pwd` |
---|
| 41 | obuild_snovis_path=`dirname "${obuild_pwd}"` |
---|
| 42 | unset obuild_pwd |
---|
| 43 | |
---|
| 44 | # Create the bin directory : |
---|
| 45 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
| 46 | |
---|
| 47 | obuild_check_what=$1 |
---|
| 48 | if [ "${obuild_check_what}" = "" ] ; then |
---|
| 49 | echo "check_foreigns : no argument given" |
---|
| 50 | exit 1 |
---|
| 51 | fi |
---|
| 52 | |
---|
| 53 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then |
---|
| 54 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then |
---|
| 55 | echo "Program source obuild_platform.cpp not found." |
---|
| 56 | exit |
---|
| 57 | fi |
---|
| 58 | if [ "${obuild_cxx_command}" = "" ] ; then |
---|
| 59 | if [ "${OBUILD_CXX}" != "" ] ; then |
---|
| 60 | obuild_platform_compiler=${OBUILD_CXX} |
---|
| 61 | else |
---|
| 62 | obuild_platform_compiler=c++ |
---|
| 63 | fi |
---|
| 64 | else |
---|
| 65 | obuild_platform_compiler=${obuild_cxx_command} |
---|
| 66 | fi |
---|
| 67 | ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" |
---|
| 68 | unset obuild_platform_compiler |
---|
| 69 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then |
---|
| 70 | echo "Program obuild_platform not found." |
---|
| 71 | exit |
---|
| 72 | fi |
---|
| 73 | fi |
---|
| 74 | obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" |
---|
| 75 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 76 | echo "Variable obuild_platform_exe not defined." |
---|
| 77 | exit |
---|
| 78 | fi |
---|
[134] | 79 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
[91] | 80 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 81 | CLHEP_home="/usr/local/CLHEP/2.0.3.1" |
---|
| 82 | fi |
---|
| 83 | unset obuild_platform_result |
---|
| 84 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 85 | echo "Variable obuild_platform_exe not defined." |
---|
| 86 | exit |
---|
| 87 | fi |
---|
| 88 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 89 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 90 | Geant4_home="/usr/local/geant4/8.2" |
---|
| 91 | fi |
---|
| 92 | unset obuild_platform_result |
---|
| 93 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 94 | echo "Variable obuild_platform_exe not defined." |
---|
| 95 | exit |
---|
| 96 | fi |
---|
| 97 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 98 | if [ ${obuild_platform_result} = yes ] ; then |
---|
[244] | 99 | HDF5_home="/usr/local/HDF5/1.6.5" |
---|
| 100 | fi |
---|
| 101 | unset obuild_platform_result |
---|
| 102 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 103 | echo "Variable obuild_platform_exe not defined." |
---|
| 104 | exit |
---|
| 105 | fi |
---|
| 106 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 107 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 108 | OSC_home="/usr/local/OpenScientist/v16r0" |
---|
| 109 | fi |
---|
| 110 | unset obuild_platform_result |
---|
| 111 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 112 | echo "Variable obuild_platform_exe not defined." |
---|
| 113 | exit |
---|
| 114 | fi |
---|
| 115 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 116 | if [ ${obuild_platform_result} = yes ] ; then |
---|
[91] | 117 | if [ "${obuild_check_what}" = "CLHEP" ] ; then |
---|
| 118 | if [ ! -d "${CLHEP_home}" ] ; then |
---|
| 119 | echo "WARNING : CLHEP not found under ${CLHEP_home}" |
---|
| 120 | exit 1 |
---|
| 121 | fi |
---|
| 122 | fi |
---|
| 123 | fi |
---|
| 124 | unset obuild_platform_result |
---|
| 125 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 126 | echo "Variable obuild_platform_exe not defined." |
---|
| 127 | exit |
---|
| 128 | fi |
---|
| 129 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 130 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 131 | if [ "${obuild_check_what}" = "Geant4" ] ; then |
---|
| 132 | if [ ! -d "${Geant4_home}" ] ; then |
---|
| 133 | echo "WARNING : Geant4 not found under ${Geant4_home}" |
---|
| 134 | exit 1 |
---|
| 135 | fi |
---|
| 136 | fi |
---|
| 137 | fi |
---|
| 138 | unset obuild_platform_result |
---|
[244] | 139 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 140 | echo "Variable obuild_platform_exe not defined." |
---|
| 141 | exit |
---|
| 142 | fi |
---|
| 143 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 144 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 145 | if [ "${obuild_check_what}" = "HDF5" ] ; then |
---|
| 146 | if [ ! -d "${HDF5_home}" ] ; then |
---|
| 147 | echo "WARNING : HDF5 not found under ${HDF5_home}" |
---|
| 148 | exit 1 |
---|
| 149 | fi |
---|
| 150 | fi |
---|
| 151 | fi |
---|
| 152 | unset obuild_platform_result |
---|
| 153 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
| 154 | echo "Variable obuild_platform_exe not defined." |
---|
| 155 | exit |
---|
| 156 | fi |
---|
| 157 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
| 158 | if [ ${obuild_platform_result} = yes ] ; then |
---|
| 159 | if [ "${obuild_check_what}" = "OpenScientist" ] ; then |
---|
| 160 | if [ ! -d "${OSC_home}" ] ; then |
---|
| 161 | echo "WARNING : OpenScientist not found under ${OSC_home}" |
---|
| 162 | exit 1 |
---|
| 163 | fi |
---|
| 164 | fi |
---|
| 165 | fi |
---|
| 166 | unset obuild_platform_result |
---|
[91] | 167 | |
---|