source: osc_snovis/trunk/obuild/sh/build @ 272

Last change on this file since 272 was 272, checked in by barrand, 17 years ago
  • Property svn:executable set to *
File size: 3.9 KB
Line 
1#!/bin/sh -f
2
3#
4# File produced by the obuild tool version 1.0
5# for the package osc_snovis with version v1r0.
6#
7
8#////////////////////////////////////////////////
9# Usage :
10#   UNIX> cd some_path/pack/version/obuild
11# ( UNIX> chmod a+x sh/build )
12#   UNIX> sh/build
13#
14#////////////////////////////////////////////////
15
16obuild_verbose=no
17obuild_set_x=no
18
19obuild_args=""
20while test $# -ge 1 ; do
21  case $1 in
22    -h) 
23        echo "Usage :"
24        echo "  UNIX> sh/build [Options]"
25        echo "Options :"
26        echo "  -v : verbose."
27        echo "  -x : execute with set -x."
28        echo "  -* : passed to packages build script."
29        echo ""
30        exit ;;
31    -v) obuild_verbose=yes;obuild_args="${obuild_args} $1" ;;
32    -x) obuild_set_x=yes;obuild_args="${obuild_args} $1" ;;
33     *) obuild_args="${obuild_args} $1" ;;
34  esac
35  shift
36done
37
38if [ ${obuild_set_x} = yes ] ; then
39  set -x
40fi
41
42if [  "${OBUILD_PLATFORM}" = "" ] ; then
43  obuild_platform=`uname`
44else
45  obuild_platform=${OBUILD_PLATFORM}
46fi
47
48if [ "${obuild_platform}" = "" ] ; then
49  echo "obuild_platform variable not defined."
50  exit
51fi
52
53if [  "${OBUILD_DIR_BIN}" = "" ] ; then
54  obuild_dir_bin=${obuild_platform}_obuild
55else
56  obuild_dir_bin=${OBUILD_DIR_BIN}
57fi
58
59if [ "${obuild_dir_bin}" = "" ] ; then
60  echo "obuild_dir_bin variable not defined."
61  exit
62fi
63
64obuild_pwd=`pwd`
65obuild_osc_snovis_path=`dirname "${obuild_pwd}"`
66unset obuild_pwd
67
68# Create the bin directory :
69/bin/mkdir -p "${obuild_osc_snovis_path}/${obuild_dir_bin}"
70
71obuild_pwd_osc_snovis_0=`pwd`
72
73if [ ! -e "${obuild_osc_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
74  if [ ! -e "${obuild_osc_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
75    echo "Program source obuild_find.cpp not found."
76    exit
77  fi
78  if [ "${obuild_cxx_command}" = "" ] ; then
79    if [  "${OBUILD_CXX}" != "" ] ; then
80      obuild_find_compiler=${OBUILD_CXX}
81    else
82      obuild_find_compiler=c++
83    fi
84  else
85    obuild_find_compiler=${obuild_cxx_command}
86  fi
87  ${obuild_find_compiler} -o "${obuild_osc_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_osc_snovis_path}/obuild/cpp/obuild_find.cpp"
88  unset obuild_find_compiler
89  if [ ! -e "${obuild_osc_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
90    echo "Program obuild_find not found."
91    exit
92  fi
93fi
94obuild_find_exe="${obuild_osc_snovis_path}/${obuild_dir_bin}/obuild_find"
95if [ "${obuild_find_exe}" = "" ] ; then
96  echo "Variable obuild_find_exe not defined."
97  exit
98fi
99obuild_bhep_path=`"${obuild_find_exe}" bhep 'v1r4p2'`
100if [ "${obuild_bhep_path}" = "" ] ; then
101  echo "Can't find bhep package."
102  exit
103fi
104
105cd "${obuild_bhep_path}/obuild"
106if [ ${obuild_verbose} = yes ] ; then set -x;fi
107echo "build bhep/v1r4p2 ..."
108./sh/build  ${obuild_args}
109obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
110if [ ${obuild_verbose} = yes ] ; then set +x;fi
111if [ "${obuild_find_exe}" = "" ] ; then
112  echo "Variable obuild_find_exe not defined."
113  exit
114fi
115obuild_snova_path=`"${obuild_find_exe}" snova 'v2r0p0'`
116if [ "${obuild_snova_path}" = "" ] ; then
117  echo "Can't find snova package."
118  exit
119fi
120
121cd "${obuild_snova_path}/obuild"
122if [ ${obuild_verbose} = yes ] ; then set -x;fi
123echo "build snova/v2r0p0 ..."
124./sh/build  ${obuild_args}
125obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
126if [ ${obuild_verbose} = yes ] ; then set +x;fi
127if [ "${obuild_find_exe}" = "" ] ; then
128  echo "Variable obuild_find_exe not defined."
129  exit
130fi
131obuild_snovis_path=`"${obuild_find_exe}" snovis 'v1r1'`
132if [ "${obuild_snovis_path}" = "" ] ; then
133  echo "Can't find snovis package."
134  exit
135fi
136
137cd "${obuild_snovis_path}/obuild"
138if [ ${obuild_verbose} = yes ] ; then set -x;fi
139echo "build snovis/v1r1 ..."
140./sh/build  ${obuild_args}
141obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
142if [ ${obuild_verbose} = yes ] ; then set +x;fi
143
144cd "${obuild_pwd_osc_snovis_0}"
145unset obuild_pwd_osc_snovis_0
Note: See TracBrowser for help on using the repository browser.