#!/bin/sh
# --------------------------------------------------------------------------
# Copyright 1992-1994 by Forschungszentrum Informatik (FZI)
# All rights reserved.
#
# You can use and distribute this software under the terms of the license
# you should have received along with this software; either version 1.1 of
# the license, or (at your option) any later version.
# For a copy of the license or for additional information about this software,
# write to Xcc Software, Durlacher Allee 53, D-76131 Karlsruhe, Germany;
# Email: obst@xcc-ka.de.
# --------------------------------------------------------------------------
# obst-sil - 5/10/93 - Dietmar Theobald
#
# OBST schema implementation editor which is used to maintain the association of
# object files/libraries with <schema>.
# (or <view_schema> in case of a view schema)

self='obst-sil'
linker='sil'

if [ -z "$OBSTCONTAINER" -a -z "$SOSCONTAINER" ] ; then
  echo >&2 "*** $self: environment variable OBSTCONTAINER not defined"
  exit 1
fi

if [ "$2" = '-view' ] ; then
   linker='vsil'
fi

[ -n "$OBSTdir" ] || { OBSTdir="`cd \`dirname $0\`;pwd`/"; export OBSTdir; }

use_absolute_paths=
#use_absolute_paths=+

if [ "$use_absolute_paths" ]; then
   wd=`pwd`

   for arg
   do
      case "$arg" in
	 [!/]*.a | [!/]*.o) arg="$wd/$arg" ;;
      esac
      args="$args $arg"
   done
else
   args="$*"
fi

${OBSTdir}$linker $args || exit 1
