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