#!/bin/csh -f
#
# domake-one:  domake in one config directory
#
# this needs to be run from the 'run' directory
#
set usage='domake-one dirname'
#
# Part of
#              The STARFISH Parallel file-system simulator
#        (Simulation Tool for Advanced Research in File Systems)
# 
#                               David Kotz
#                           Dartmouth College
#                              Version 3.0
#                              October 1996
#                          dfk@cs.dartmouth.edu

if ($#argv != 1) then
    echo "$usage"
    exit 1
endif

# where the compilation takes place
set compile=build

set dir=$1
rm -f $dir/proteus $dir/proteus.gz

# copy only the param files that differ
foreach pf ($dir/*.param)
    cmp -s $pf $compile/$pf:t || cp $pf $compile/$pf:t && echo copied $pf:t
end

domake $compile && mv $compile/proteus $dir/
exit $status
