#!/bin/sh

# build_report: helper script for use with make_dyn_select.
#
# First argument is the name of the log file.  Remaining arguments
# are the files to build in the current directory.

if [ $# -lt 1 ]; then
  echo "Usage: $0  logfile  prog1 prog2 ..." >&2
  exit 1
fi

log="$1"
shift
# exe_list is all remaining args

echo -n "   " `pwd`...
last_exe=`latest_time "$@"`

(make $exe_list 2>&1 | grep -v 'make\[') >> $log

if [ `latest_time "$@"` -gt $last_exe ]; then
    echo "(built)"
else
    echo "(up to date)"
fi

