source: snovis/trunk/obuild/sh/build @ 267

Last change on this file since 267 was 267, checked in by barrand, 17 years ago
  • Property svn:executable set to *
File size: 4.9 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/build )
12#   UNIX> sh/build
13#
14#////////////////////////////////////////////////
15
16#obuild_args="$*"
17
18obuild_verbose=no
19obuild_debug=no
20obuild_set_x=no
21obuild_erase_dir_bin=no
22obuild_do_mains=yes
23obuild_group=main
24
25obuild_args=""
26while test $# -ge 1 ; do
27  case $1 in
28    -h) 
29        echo "Usage :"
30        echo "  UNIX> sh/build [Options] [Target]"
31        echo "Options :"
32        echo "  -v : verbose."
33        echo "  -g : build in debug mode."
34        echo "  -i : install setup scripts."
35        echo "  -bci : broadacst install setup scripts."
36        echo "  -e : erase binary directory."
37        echo "  -x : execute with set -x."
38        echo "  -l : link only, do not (re)compile."
39        echo "  -k : do not erase result of compilations (.o, .obj)."
40        echo "  -nm : build the not-main components."
41        echo "  -group group : build the given group of components."
42        echo "Target :"
43        echo "  If no option is specify and a ending"
44        echo " string is given ; this string is given"
45        echo " to a find command of the form :"
46        echo '    find ./sh -name "*target*" -exec {} \;'
47        echo " in order to execute selected scripts under"
48        echo " the sh directory."
49        echo "Examples :"
50        echo "  UNIX> sh/build app"
51        echo "  UNIX> sh/build -v _lib"
52        echo "  UNIX> sh/build -v -g dll_"
53        echo ""
54        exit ;;
55    -v) obuild_verbose=yes;obuild_args="${obuild_args} $1" ;;
56    -g) obuild_debug=yes;obuild_args="${obuild_args} $1" ;;
57    -i) ./sh/install; exit ;;
58    -bci) if [ ! -e ./sh/broadcast_install ] ; then 
59            echo "Nothing to do for this package." 
60            exit
61          fi
62          ./sh/broadcast_install ${obuild_args}
63          exit ;;
64    -x) obuild_set_x=yes;obuild_args="${obuild_args} $1" ;;
65    -l) obuild_args="${obuild_args} $1" ;;
66    -k) obuild_args="${obuild_args} $1" ;;
67    -e) obuild_erase_dir_bin=yes ;;
68    -nm) obuild_do_mains=no ;;
69    -group) shift
70        if [ $# != 0 ] ; then
71          obuild_group=$1 
72        else         
73          echo "give a group name after the -group option."
74          exit 
75        fi ;;
76    -*) echo "unknwon option : $1" ; exit ;;
77     *) if [ $# = 1 ] ; then
78          find ./sh -name "*$1*" -exec {} ${obuild_args} \;
79        else         
80          echo "unknwon option : $1"
81        fi
82        exit ;;
83  esac
84  shift
85done
86
87if [ ${obuild_set_x} = yes ] ; then
88  set -x
89fi
90
91if [ ${obuild_erase_dir_bin} = "yes" ] ; then
92  if [  "${OBUILD_PLATFORM}" = "" ] ; then
93    obuild_platform=`uname`
94  else
95    obuild_platform=${OBUILD_PLATFORM}
96  fi
97  if [ "${obuild_platform}" = "" ] ; then
98    echo "obuild_platform variable not defined."
99    exit
100  fi
101  if [  "${OBUILD_DIR_BIN}" = "" ] ; then
102    obuild_dir_bin=${obuild_platform}_obuild
103  else
104    obuild_dir_bin=${OBUILD_DIR_BIN}
105  fi
106  if [ "${obuild_dir_bin}" = "" ] ; then
107    echo "obuild_dir_bin variable not defined."
108    exit
109  fi
110  obuild_pwd=`pwd`
111  obuild_snovis_path=`dirname "${obuild_pwd}"`
112  unset obuild_pwd
113  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}"
114  exit 
115fi
116
117if [ "${obuild_group}" = main ] ; then
118if [ "${obuild_do_mains}" = yes ] ; then
119  if [ -e ./sh/build_lib_G4LabCore ] ; then
120    ./sh/build_lib_G4LabCore ${obuild_args}
121    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
122  fi
123fi
124fi
125if [ "${obuild_group}" = main ] ; then
126if [ "${obuild_do_mains}" = yes ] ; then
127  if [ -e ./sh/build_lib_G4LabUIOnX ] ; then
128    ./sh/build_lib_G4LabUIOnX ${obuild_args}
129    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
130  fi
131fi
132fi
133
134if [ "${obuild_group}" = main ] ; then
135if [ "${obuild_do_mains}" = yes ] ; then
136  if [ -e ./sh/build_dll_G4Lab ] ; then
137    ./sh/build_dll_G4Lab ${obuild_args}
138    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
139  fi
140fi
141fi
142if [ "${obuild_group}" = main ] ; then
143if [ "${obuild_do_mains}" = yes ] ; then
144  if [ -e ./sh/build_dll_snovis ] ; then
145    ./sh/build_dll_snovis ${obuild_args}
146    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
147  fi
148fi
149fi
150
151if [ "${obuild_group}" = main ] ; then
152if [ "${obuild_do_mains}" = yes ] ; then
153  if [ -e ./sh/build_app_prog_snovis ] ; then
154    ./sh/build_app_prog_snovis ${obuild_args}
155    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
156  fi
157fi
158fi
159
160if [ "${obuild_group}" = main ] ; then
161if [ "${obuild_do_mains}" = yes ] ; then
162  if [ -e ./sh/build_darwin_app_prog_snovis ] ; then
163    ./sh/build_darwin_app_prog_snovis ${obuild_args}
164    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
165  fi
166fi
167fi
168
169if [ -e ./sh/install ] ; then
170  ./sh/install
171fi
172
Note: See TracBrowser for help on using the repository browser.