#!/usr/bin/perl -w
-# $Id: mkanswers,v 1.2 2002-11-03 17:02:48 mike Exp $
+# $Id: mkanswers,v 1.5 2002-11-21 09:57:28 mike Exp $
use IO::File;
use strict;
+$ENV{CLASSPATH} .= ":../../lib/cql-java.jar";
+
if (@ARGV != 1) {
print STDERR "Usage: $0 <trusted-CQL-compiler>\n";
exit(1);
while (<sections/*>) {
my $sdir = $_;
s@sections/@@;
+ next if /^CVS$/ || /^10$/; # I _can't_ get CVS to stop extracting "10"
print "answering section $_ - ", read_file("$sdir/name"), "\n";
while (<$sdir/*.cql>) {
my $query = read_file($qfile);
my $afile = $qfile;
$afile =~ s/\.cql$/.xcql/;
- print " query $_ - $query\n";
+ print " wrote $_ - $query\n";
my $fh = new IO::File("| $compiler > $afile")
or die "can't run compiler '$compiler': $!";
print $fh $query;