#!/bin/csh -f
#
# Copyright (C) 1992, Digital Equipment Corporation 
# All rights reserved.
# See the file COPYRIGHT for a full description.
#
# Last modified on Tue Oct 13 15:59:36 PDT 1992 by muller                     .


set dir = ()
set args = ()

while ($#argv > 0)
  switch ("$1")
    case -d:
      shift
      set dir = ("$1")
      shift
      breaksw
    default:
      set args = ($args:q "$1")
      shift
      breaksw
    endsw
  end

if ($#dir != 0) then
  cd $dir[1]
endif

set nonomatch

set done = 0
foreach d (BBB BBB.* *.BBB)
  if ( -d $d) then
    echo ============================= Building in $d
    set done = 1
    (cd $d; AAA/m3makeaux $args:q)
    if ($status != 0) exit $status
  endif
end

if ($done != 1) then
  exec AAA/m3makeaux $args:q
endif


