From 7292390de5903b96e1f9798fbd8ae8a4ec65b85c Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Sat, 4 Mar 2006 01:38:13 +0000 Subject: This is part 2 of a patch from James O'Gorman. This just renames all of the files that configure now substitutes - no changes to any of the files. --- bin/bbackupquery/makedocumentation.pl.in | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 bin/bbackupquery/makedocumentation.pl.in (limited to 'bin/bbackupquery/makedocumentation.pl.in') diff --git a/bin/bbackupquery/makedocumentation.pl.in b/bin/bbackupquery/makedocumentation.pl.in new file mode 100755 index 00000000..72e45a67 --- /dev/null +++ b/bin/bbackupquery/makedocumentation.pl.in @@ -0,0 +1,75 @@ +#!@PERL@ +use strict; + +print "Creating built-in documentation for bbackupquery...\n"; + +open DOC,"documentation.txt" or die "Can't open documentation.txt file"; +my $section; +my %help; +my @in_order; + +while() +{ + if(m/\A>\s+(\w+)/) + { + $section = $1; + m/\A>\s+(.+)\Z/; + $help{$section} = $1."\n"; + push @in_order,$section; + } + elsif(m/\Aautogen_Documentation.cpp" or die "Can't open output file for writing"; + +print OUT <<__E; +// +// Automatically generated file, do not edit. +// + +#include "Box.h" + +#include "MemLeakFindOn.h" + +char *help_commands[] = +{ +__E + +for(@in_order) +{ + print OUT qq:\t"$_",\n:; +} + +print OUT <<__E; + 0 +}; + +char *help_text[] = +{ +__E + +for(@in_order) +{ + my $t = $help{$_}; + $t =~ s/\t/ /g; + $t =~ s/\n/\\n/g; + $t =~ s/"/\\"/g; + print OUT qq:\t"$t",\n:; +} + +print OUT <<__E; + 0 +}; + +__E + +close OUT; -- cgit v1.2.3