open OUT, ">", $ARGV[0] or die "error opening $out";

package util;

sub tryopen( $ )
{
    my ( $name ) = @_;
    print DEP "dep $name\n";
    open( my $fh, $name );
    print STDERR "opening $name\n";
    return $fh;
}

sub open( $ )
{
    my ( $name ) = @_;
    my $fh = tryopen( $name );
    die "error opening @_" unless $fh;
    return $fh;
}

our $out = shift @ARGV;
open DEP, ">&=3";
print DEP "dep doc/mk.util.pm\n";

1;
