3 # $Id: mkanswers,v 1.5 2002-11-21 09:57:28 mike Exp $
8 $ENV{CLASSPATH} .= ":../../lib/cql-java.jar";
11 print STDERR "Usage: $0 <trusted-CQL-compiler>\n";
14 my $compiler = $ARGV[0];
16 while (<sections/*>) {
19 next if /^CVS$/ || /^10$/; # I _can't_ get CVS to stop extracting "10"
20 print "answering section $_ - ", read_file("$sdir/name"), "\n";
22 while (<$sdir/*.cql>) {
24 s@sections/([0-9]+/.*)\.cql@$1@;
25 my $query = read_file($qfile);
27 $afile =~ s/\.cql$/.xcql/;
28 print " wrote $_ - $query\n";
29 my $fh = new IO::File("| $compiler > $afile")
30 or die "can't run compiler '$compiler': $!";
39 my $fh = new IO::File("<$name")
40 or die "can't read '$name': $!";
41 my $contents = join('', <$fh>);