#!/usr/local/bin/perl

$tool = $ENV{"DTOOL"} ;
if ( $tool eq "" ) {
    die "not configured for using ct-tools\n" ;
}

require "$tool/include/ctutils.pl" ;
require "$tool/include/ctvspec.pl" ;
require "$tool/include/ctquery.pl" ;
require "$tool/include/ctproj.pl" ;
require "$tool/include/ctcm.pl" ;

$projname = &CTProj ;
$projname =~ tr/A-Z/a-z/ ;
$flav = &CTQueryProj( $projname ) ;
$spec = &CTResolveSpec( $projname, $flav ) ;

$line = join( " ", @ARGV ) ;

if ( ! &CTCMMake( $line, $projname, $spec ) ) {
    print STDERR "Could not make '$line'\n" ;
}
