diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-12-13 23:39:18 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-12-13 23:50:06 +0000 |
commit | 403e7e2051ee3bd3e16a616cfca63b036481282b (patch) | |
tree | bd9d5c2ed3623990158727ffe76c49ffad92966c /bin/bbackupquery/makedocumentation.pl.in | |
parent | e77de564aaacaed07075eaac1974d35d09dd2bce (diff) |
Move reusable code out of bin directories.
Allows tests to depend on lib/bbackupd instead of bin/bbackupd, which was
always a hack, and really doesn't work with CMake.
Diffstat (limited to 'bin/bbackupquery/makedocumentation.pl.in')
-rwxr-xr-x | bin/bbackupquery/makedocumentation.pl.in | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/bin/bbackupquery/makedocumentation.pl.in b/bin/bbackupquery/makedocumentation.pl.in deleted file mode 100755 index 530c4ff6..00000000 --- a/bin/bbackupquery/makedocumentation.pl.in +++ /dev/null @@ -1,75 +0,0 @@ -#!@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(<DOC>) -{ - if(m/\A>\s+(\w+)/) - { - $section = $1; - m/\A>\s+(.+)\Z/; - $help{$section} = $1."\n"; - push @in_order,$section; - } - elsif(m/\A</) - { - $section = ''; - } - elsif($section ne '') - { - $help{$section} .= $_; - } -} - -close DOC; - -open OUT,">autogen_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" - -const char *help_commands[] = -{ -__E - -for(@in_order) -{ - print OUT qq:\t"$_",\n:; -} - -print OUT <<__E; - 0 -}; - -const 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; |