Revision 42b3daa0 tools/progdoc

View differences:

tools/progdoc
3 3
$srcdir = $ARGV[0];
4 4

  
5 5
open(OUT, ">prog.sgml") || die "Cannot create output file";
6
include("prog-head.sgml");
6
include("doc/prog-head.sgml");
7 7
process("");
8
include("prog-foot.sgml");
8
include("doc/prog-foot.sgml");
9 9
close OUT;
10 10
exit 0;
11 11

  
12 12
sub include {
13 13
  my $f = shift @_;
14
  open(IN, "$srcdir/doc/$f") || die "Unable to find $f";
14
  open(IN, "$srcdir/$f") || die "Unable to find $f";
15 15
  while (<IN>) {
16 16
    print OUT;
17 17
  }
......
41 41
      close DOC;
42 42
    } elsif ($cmd eq "D") {
43 43
      print "    $arg\n";
44
      include($arg);
44
      include("$dir/$arg");
45 45
    } else { die "Unknown command: $cmd"; }
46 46
  }
47 47
}

Also available in: Unified diff