3 # $Id: mkanswers,v 1.3 2002-11-20 22:50:45 mike Exp $
9 print STDERR "Usage: $0 <trusted-CQL-compiler>\n";
12 my $compiler = $ARGV[0];
14 while (<sections/*>) {
18 print "answering section $_ - ", read_file("$sdir/name"), "\n";
20 while (<$sdir/*.cql>) {
22 s@sections/([0-9]+/.*)\.cql@$1@;
23 my $query = read_file($qfile);
25 $afile =~ s/\.cql$/.xcql/;
26 print " wrote $_ - $query\n";
27 my $fh = new IO::File("| $compiler > $afile")
28 or die "can't run compiler '$compiler': $!";
37 my $fh = new IO::File("<$name")
38 or die "can't read '$name': $!";
39 my $contents = join('', <$fh>);