summaryrefslogtreecommitdiff
path: root/makeMan.in
diff options
context:
space:
mode:
authorDidier Raboud <didier@raboud.com>2010-05-23 00:04:42 +0200
committerDidier Raboud <didier@raboud.com>2010-05-23 00:04:42 +0200
commit5c357f2c54c02fe6c8f9e6095fcdce547206ed51 (patch)
treea3a70e88e2f9b88394956a4a3d5aef815b3fc900 /makeMan.in
parentd2c0cf34bcd17f14f0e77b1df81bc993da8254e8 (diff)
Imported Upstream version 3.0.2-20060530upstream/3.0.2-20060530
Diffstat (limited to 'makeMan.in')
-rwxr-xr-xmakeMan.in49
1 files changed, 0 insertions, 49 deletions
diff --git a/makeMan.in b/makeMan.in
deleted file mode 100755
index 310b8e0..0000000
--- a/makeMan.in
+++ /dev/null
@@ -1,49 +0,0 @@
-#!@PERL@ -w
-#
-# Generates manpages from manpage.in files by substituting @...@ tags.
-#
-
-use Getopt::Std;
-
-my (%opt,@files);
-getopts( 'v', \%opt);
-my $VERBOSE = defined $opt{v} ? $opt{v} : 0;
-
-if (@ARGV)
-{
- @files = @ARGV;
-}
-else
-{
- opendir CWD, "." or die "Ooops! Can't read current dir!";
- @files = readdir CWD;
- closedir CWD;
-}
-
-my $append;
-FILE:
-foreach my $file (@files)
-{
- print STDERR "Checking file `$file' ... " if $VERBOSE;
- $append = "discard\n";
- next unless -f $file and $file =~ /^(.*\.[1-9])\.in$/;
- my ($man) = $1;
- $man =~ s,.*/,,;
- next unless ((`file $file` =~ m/\b[ntg]roff\b/) or
- (`file $file` =~ m/\[nt\]roff/));
- print STDERR "MATCHED\n" if $VERBOSE;
- $append = '';
- open IN, "<$file" or (warn "Can't read input file $file!" and next FILE);
- unlink $man;
- open OUT, ">$man" or (warn "Can't write output file $man!" and next FILE);
- while (<IN>)
- {
- s/@@([^@]*)@@/eval $1/ge;
- print OUT;
- }
- close IN;
-}
-continue
-{
- print STDERR $append if $VERBOSE;
-}