#! /usr/local/bin/perl

# This script checks the current directory for
#
#     (1) .java files with no corresponding .class file
# and (2) .class files with no corresponding .html file
#
# It prints out the names of any of the above that it finds.
#
# The idea is that we want to have a .html file for every class in our
# program, so we check for .html files corresponding to .class files.
# The first check (.java files with no corresponding .class file)
# signals .java files which haven't been compiled yet.

while (<*.java>) {
    s/\.java$//;
    $base = $_;
    if (! -f "$base.class") {
	printf("Missing class file: $base.class\n");
    }
}

while (<*.class>) {
    s/\.class$//;
    $class = $_;
    if (! -f "$class.html") {
	print("Missing doc file: $class.html\n");
    }
}
