#! /bin/bash # # war -- wrapper for the archiver # # Executed by ATLAS build as: # full_path/war ARCHIVER ARFLAGS LIBNAME.a OBJS.lo TOPDIR=$(echo $0 | sed 's/\(.*\)\/.*/\1/') PWD=$(pwd) ARCHIVER=$1 LIBRARY=$(echo $3 | sed 's/.*\/\(.*\)/\1/') OBJ_DIR=${TOPDIR}/gentoo/$LIBRARY if [ ! -x $OBJ_DIR ]; then mkdir -p ${OBJ_DIR}/.libs; fi $ARCHIVER $@ shift 3 for obj in $@ ; do lobj=$(echo $obj | sed 's/\.o/\.lo/') ln -sf ${PWD}/$obj ${OBJ_DIR}/$obj ln -sf ${PWD}/$lobj ${OBJ_DIR}/$lobj ln -sf ${PWD}/.libs/$obj ${OBJ_DIR}/.libs/$obj done