| 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 |
|
|---|
| 16 | obuild_verbose=no
|
|---|
| 17 | obuild_set_x=no
|
|---|
| 18 |
|
|---|
| 19 | obuild_args=""
|
|---|
| 20 | while 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
|
|---|
| 36 | done
|
|---|
| 37 |
|
|---|
| 38 | if [ ${obuild_set_x} = yes ] ; then
|
|---|
| 39 | set -x
|
|---|
| 40 | fi
|
|---|
| 41 |
|
|---|
| 42 | if [ "${OBUILD_PLATFORM}" = "" ] ; then
|
|---|
| 43 | obuild_platform=`uname`
|
|---|
| 44 | else
|
|---|
| 45 | obuild_platform=${OBUILD_PLATFORM}
|
|---|
| 46 | fi
|
|---|
| 47 |
|
|---|
| 48 | if [ "${obuild_platform}" = "" ] ; then
|
|---|
| 49 | echo "obuild_platform variable not defined."
|
|---|
| 50 | exit
|
|---|
| 51 | fi
|
|---|
| 52 |
|
|---|
| 53 | if [ "${OBUILD_DIR_BIN}" = "" ] ; then
|
|---|
| 54 | obuild_dir_bin=bin_obuild
|
|---|
| 55 | else
|
|---|
| 56 | obuild_dir_bin=${OBUILD_DIR_BIN}
|
|---|
| 57 | fi
|
|---|
| 58 |
|
|---|
| 59 | if [ "${obuild_dir_bin}" = "" ] ; then
|
|---|
| 60 | echo "obuild_dir_bin variable not defined."
|
|---|
| 61 | exit
|
|---|
| 62 | fi
|
|---|
| 63 |
|
|---|
| 64 | obuild_pwd=`pwd`
|
|---|
| 65 | obuild_osc_snovis_path=`dirname "${obuild_pwd}"`
|
|---|
| 66 | unset obuild_pwd
|
|---|
| 67 |
|
|---|
| 68 | # Create the bin directory :
|
|---|
| 69 | /bin/mkdir -p "${obuild_osc_snovis_path}/${obuild_dir_bin}"
|
|---|
| 70 |
|
|---|
| 71 | obuild_pwd_osc_snovis_0=`pwd`
|
|---|
| 72 |
|
|---|
| 73 | if [ ! -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
|
|---|
| 93 | fi
|
|---|
| 94 | obuild_find_exe="${obuild_osc_snovis_path}/${obuild_dir_bin}/obuild_find"
|
|---|
| 95 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 96 | echo "Variable obuild_find_exe not defined."
|
|---|
| 97 | exit
|
|---|
| 98 | fi
|
|---|
| 99 | obuild_bhep_path=`"${obuild_find_exe}" bhep 'v1r4p2'`
|
|---|
| 100 | if [ "${obuild_bhep_path}" = "" ] ; then
|
|---|
| 101 | echo "Can't find bhep package."
|
|---|
| 102 | exit
|
|---|
| 103 | fi
|
|---|
| 104 |
|
|---|
| 105 | cd "${obuild_bhep_path}/obuild"
|
|---|
| 106 | if [ ${obuild_verbose} = yes ] ; then set -x;fi
|
|---|
| 107 | echo "build bhep/v1r4p2 ..."
|
|---|
| 108 | ./sh/build ${obuild_args}
|
|---|
| 109 | obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
|
|---|
| 110 | if [ ${obuild_verbose} = yes ] ; then set +x;fi
|
|---|
| 111 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 112 | echo "Variable obuild_find_exe not defined."
|
|---|
| 113 | exit
|
|---|
| 114 | fi
|
|---|
| 115 | obuild_snova_path=`"${obuild_find_exe}" snova 'v2r0p0'`
|
|---|
| 116 | if [ "${obuild_snova_path}" = "" ] ; then
|
|---|
| 117 | echo "Can't find snova package."
|
|---|
| 118 | exit
|
|---|
| 119 | fi
|
|---|
| 120 |
|
|---|
| 121 | cd "${obuild_snova_path}/obuild"
|
|---|
| 122 | if [ ${obuild_verbose} = yes ] ; then set -x;fi
|
|---|
| 123 | echo "build snova/v2r0p0 ..."
|
|---|
| 124 | ./sh/build ${obuild_args}
|
|---|
| 125 | obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
|
|---|
| 126 | if [ ${obuild_verbose} = yes ] ; then set +x;fi
|
|---|
| 127 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 128 | echo "Variable obuild_find_exe not defined."
|
|---|
| 129 | exit
|
|---|
| 130 | fi
|
|---|
| 131 | obuild_snovis_path=`"${obuild_find_exe}" snovis 'v1r1'`
|
|---|
| 132 | if [ "${obuild_snovis_path}" = "" ] ; then
|
|---|
| 133 | echo "Can't find snovis package."
|
|---|
| 134 | exit
|
|---|
| 135 | fi
|
|---|
| 136 |
|
|---|
| 137 | cd "${obuild_snovis_path}/obuild"
|
|---|
| 138 | if [ ${obuild_verbose} = yes ] ; then set -x;fi
|
|---|
| 139 | echo "build snovis/v1r1 ..."
|
|---|
| 140 | ./sh/build ${obuild_args}
|
|---|
| 141 | obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
|
|---|
| 142 | if [ ${obuild_verbose} = yes ] ; then set +x;fi
|
|---|
| 143 |
|
|---|
| 144 | cd "${obuild_pwd_osc_snovis_0}"
|
|---|
| 145 | unset obuild_pwd_osc_snovis_0
|
|---|