source: snovis/trunk/obuild/sh/check_foreigns @ 134

Last change on this file since 134 was 134, checked in by barrand, 16 years ago
  • Property svn:executable set to *
File size: 4.2 KB
Line 
1#!/bin/sh -f
2
3#
4# File produced by the obuild tool version 1.0
5# for the package snovis with version v1r1.
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
18if [  "${OBUILD_PLATFORM}" = "" ] ; then
19  obuild_platform=`uname`
20else
21  obuild_platform=${OBUILD_PLATFORM}
22fi
23
24if [ "${obuild_platform}" = "" ] ; then
25  echo "obuild_platform variable not defined."
26  exit
27fi
28
29if [  "${OBUILD_DIR_BIN}" = "" ] ; then
30  obuild_dir_bin=${obuild_platform}_obuild
31else
32  obuild_dir_bin=${OBUILD_DIR_BIN}
33fi
34
35if [ "${obuild_dir_bin}" = "" ] ; then
36  echo "obuild_dir_bin variable not defined."
37  exit
38fi
39
40obuild_pwd=`pwd`
41obuild_snovis_path=`dirname "${obuild_pwd}"`
42unset obuild_pwd
43
44# Create the bin directory :
45/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
46
47obuild_check_what=$1
48if [ "${obuild_check_what}" = "" ] ; then
49  echo "check_foreigns : no argument given"
50  exit 1
51fi
52
53if [ ! -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
73fi
74obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
75if [ "${obuild_platform_exe}" = "" ] ; then
76  echo "Variable obuild_platform_exe not defined."
77  exit
78fi
79obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
80if [ ${obuild_platform_result} = yes ] ; then
81snova_platform="Darwin"
82fi
83unset obuild_platform_result
84if [ "${obuild_platform_exe}" = "" ] ; then
85  echo "Variable obuild_platform_exe not defined."
86  exit
87fi
88obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
89if [ ${obuild_platform_result} = yes ] ; then
90bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
91fi
92unset obuild_platform_result
93if [ "${obuild_platform_exe}" = "" ] ; then
94  echo "Variable obuild_platform_exe not defined."
95  exit
96fi
97obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
98if [ ${obuild_platform_result} = yes ] ; then
99snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
100fi
101unset obuild_platform_result
102if [ "${obuild_platform_exe}" = "" ] ; then
103  echo "Variable obuild_platform_exe not defined."
104  exit
105fi
106obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
107if [ ${obuild_platform_result} = yes ] ; then
108CLHEP_home="/usr/local/CLHEP/2.0.3.1"
109fi
110unset obuild_platform_result
111if [ "${obuild_platform_exe}" = "" ] ; then
112  echo "Variable obuild_platform_exe not defined."
113  exit
114fi
115obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
116if [ ${obuild_platform_result} = yes ] ; then
117Geant4_home="/usr/local/geant4/8.2"
118fi
119unset obuild_platform_result
120if [ "${obuild_platform_exe}" = "" ] ; then
121  echo "Variable obuild_platform_exe not defined."
122  exit
123fi
124obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
125if [ ${obuild_platform_result} = yes ] ; then
126if [ "${obuild_check_what}" = "CLHEP" ] ; then
127  if [ ! -d "${CLHEP_home}" ] ; then
128    echo "WARNING : CLHEP not found under ${CLHEP_home}"
129    exit 1
130  fi
131fi
132fi
133unset obuild_platform_result
134if [ "${obuild_platform_exe}" = "" ] ; then
135  echo "Variable obuild_platform_exe not defined."
136  exit
137fi
138obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
139if [ ${obuild_platform_result} = yes ] ; then
140if [ "${obuild_check_what}" = "Geant4" ] ; then
141  if [ ! -d "${Geant4_home}" ] ; then
142    echo "WARNING : Geant4 not found under ${Geant4_home}"
143    exit 1
144  fi
145fi
146fi
147unset obuild_platform_result
148
Note: See TracBrowser for help on using the repository browser.