Revision 4fa89085 build_all.sh

View differences:

build_all.sh
17 17
fi
18 18

  
19 19
if [ -n "$ALL_DIR" ] ; then
20
  [ -e "$ALL_DIR" ] || { echo "Directory in \$ALL_DIR does not exist: $ALL_DIR"; exit; }  
20
  [ -e "$ALL_DIR" ] || { echo "Directory in \$ALL_DIR does not exist: $ALL_DIR"; exit 1; }  
21 21
  [ -z "$LIBEVENT_DIR" ] && LIBEVENT_DIR=$ALL_DIR/libevent
22 22
  [ -z "$LIBCONFUSE_DIR" ] && LIBCONFUSE_DIR=$ALL_DIR/libconfuse;
23 23
  [ -z "$LIBXML2_DIR" ] && LIBXML2_DIR=$ALL_DIR/libxml2;
......
96 96
THIRDPARTY_DIR="${BUILD_ROOT_DIR}/3RDPARTY-LIBS"
97 97
[ -z "$DOWNLOAD_CACHE" ] && { DOWNLOAD_CACHE="${THIRDPARTY_DIR}/_download_cache"; mkdir -p $DOWNLOAD_CACHE; }
98 98
[ "$DOWNLOAD_CACHE" == "<no>" ] || [ -d "$DOWNLOAD_CACHE" -a -w "$DOWNLOAD_CACHE" ] || \
99
     { echo "ERROR: Download cache $DOWNLOAD_CACHE is not a writable directory"; exit; }
99
     { echo "ERROR: Download cache $DOWNLOAD_CACHE is not a writable directory"; exit 1; }
100 100

  
101 101
QUICK=false
102 102
REMOVE_OBJECTS=false
......
157 157
   for FNAME in $FILENAMES ; do 
158 158
     echo $FNAME | grep -q '\.h$' && SPATH=$GCC_INCLUDEPATH
159 159
     echo $FNAME | grep -q '\.a$' && SPATH=$GCC_LIBPATH
160
     [ -z "$SPATH" ] && echo "Unknown file type to check: $FNAME (.a and .h supported)" && exit
160
     [ -z "$SPATH" ] && echo "Unknown file type to check: $FNAME (.a and .h supported)" && exit 1
161 161
     FOUND=
162 162
     for P in `tr ":" " " <<<$SPATH` ; do
163 163
       [ -n "$P" -a -e "$P/$FNAME" ] && FOUND=$P
......
175 175
		FILE=$2
176 176
		[ -z "$FILE" ] && FILE=`grep -o '[^/]*$' <<<"$URL"`
177 177
		if [ "$DOWNLOAD_CACHE" == "<no>" -o ! -e "$DOWNLOAD_CACHE/$FILE" ] ; then 
178
			$WGET_OR_CURL $WGET_OR_CURLOPT $URL || [ ! -e $FILE ] || { echo "ERROR: download of $URL failed"; exit; }
178
			$WGET_OR_CURL $WGET_OR_CURLOPT $URL || [ ! -e $FILE ] || { echo "ERROR: download of $URL failed"; exit 1; }
179 179
	[ "$DOWNLOAD_CACHE" == "<no>" ] || cp $FILE $DOWNLOAD_CACHE;
180 180
		else 
181 181
			cp $DOWNLOAD_CACHE/$FILE .
......
214 214
          INSTALL_COMPONENT=
215 215
       elif [ "$LIB_DIR" == '<system>' ] ; then
216 216
           echo "ERROR: $LIB_NAME specified as '<system>' but not found on search path"
217
           exit
217
           exit 1
218 218
       else
219 219
          echo "INFO: Library $LIB_NAME will be built locally"
220 220
       fi
......
222 222
    else 
223 223
      INSTALL_COMPONENT=
224 224
      grep -q '^<' <<<$LIB_DIR && \
225
	 { echo "ERROR: Invalid location for $LIB_NAME: $LIB_DIR" ; exit; }
225
	 { echo "ERROR: Invalid location for $LIB_NAME: $LIB_DIR" ; exit 1;  }
226 226
      [ -e "$LIB_DIR" ] || \
227
	 { echo "ERROR: Nonexistent location for $LIB_NAME: $LIB_DIR"; exit; }
227
	 { echo "ERROR: Nonexistent location for $LIB_NAME: $LIB_DIR"; exit 1; }
228 228
      LIB_HOME=$(readlink -f $LIB_DIR)
229 229
    fi
230 230
    if [ -n "$INSTALL_COMPONENT" ] ; then
......
242 242
       mkdir -p $LIB_HOME/_src; 
243 243
       pushd $LIB_HOME
244 244
       cd _src
245
       eval "$DOWNLOAD_CMD" || { echo "ERROR Downloading $LIB_NAME" ; exit; }
245
       eval "$DOWNLOAD_CMD" || { echo "ERROR Downloading $LIB_NAME" ; exit 1; }
246 246
       cd ..
247 247

  
248 248
       echo "Building $LIB_NAME"  
249 249
       cd _src/*/.
250
       eval "$BUILD_CMD" || { echo "ERROR BUilding $LIB_NAME" ; exit; }
250
       eval "$BUILD_CMD" || { echo "ERROR BUilding $LIB_NAME" ; exit 1; }
251 251
       popd
252 252
    fi      
253 253
    if [ -n "$LIB_HOME" ] ; then
......
259 259
          fi
260 260
       done
261 261
       [ -n "$MISSING" ] && \
262
          { echo "ERROR: $LIB_NAME not found in $LIB_HOME"; exit; } 
262
          { echo "ERROR: $LIB_NAME not found in $LIB_HOME"; exit 1; } 
263 263
       echo "INFO: $LIB_NAME is found in $LIB_HOME"
264 264
    fi
265 265
    eval "$LIB_DIR_VARNAME=$LIB_HOME"
......
286 286
prepare_lib libxml2 LIBXML2_DIR "libxml2/libxml/xmlversion.h libxml2/libxml/xmlIO.h libxml2/libxml/parser.h libxml2/libxml/tree.h libxml2.a" \
287 287
        "cache_or_wget ftp://xmlsoft.org/libxml2/libxml2-2.7.6.tar.gz; \
288 288
              tar xvzf libxml2-2.7.6.tar.gz" \
289
        "./configure --with-threads --prefix=\$LIB_HOME  ${HOSTARCH:+--host=$HOSTARCH};\
289
        "./configure --with-python=no --with-threads --prefix=\$LIB_HOME  ${HOSTARCH:+--host=$HOSTARCH};\
290 290
		    $MAKE; make install" 
291 291
fi
292 292
}
......
322 322
     sh conf.sh
323 323
     echo "//blah" > common/chunk.c
324 324
   fi
325
   for SUBDIR in dclog common monl rep ALTOclient ; do
325
   ALTO_NEEDED=`grep 1 <<<"$ALTO"`
326
   for SUBDIR in dclog common monl rep ${ALTO_NEEDED:+ALTOclient} ; do
326 327
       echo "Making `pwd`/$SUBDIR"
327
       $MAKE -C $SUBDIR
328
       $MAKE -C $SUBDIR || { echo "ERROR Building $SUBDIR"; exit 1; }
328 329
   done
329 330
   cd ml
330 331
      if [ ! -e Makefile -o -n "$REBUILD_BASELIBS" ] ; then
......
335 336
     sh conf.sh
336 337
	$MAKE clean
337 338
      fi
338
      $MAKE
339
      $MAKE || { echo "ERROR Building ml"; exit 1; }
339 340
   cd .. 
340 341

  
341 342
echo "=============== YOUR NAPA-BASELIBS ============"

Also available in: Unified diff