3 # (c)'11 H.Merijn Brand [ 26 Aug 2011 ]
5 # This script combines the output of mkglossary, with the suggested
6 # patches (see README), and sorts the list
11 my $Pcsh = "Porting/config.sh";
13 my @config = <> or die
14 "mkgloss uses $Pcsh.sh. You didn't run Configure (yet)\n".
15 "so I cannot make a temporary version of it to generate a reliable\n".
19 s{\bh.m.brand\@\w+\.nl\b}{hmbrand\@cpan.org};
20 s{\b\.xs4all.nl\b}{.cpan.org};
21 m/^# Variables propagated from previous config/ and $drop++;
25 open my $config, ">", $Pcsh or die "$Pcsh: $!\n";
26 print $config @config;
30 @ARGV = ("U/mkglossary |");
32 my @g = split m{(?<=\n\n)(?=\S)}, <>, -1;
34 print splice @g, 0, 2;
35 for (sort { lc $a cmp lc $b } @g) {
36 if (m/^make_set_make /) {
37 s/Configure -D option/Configure '-D' option/;
40 s/contains the -n flag/contains the '-n' flag/;
43 s/set sh with a -D$/set sh with a '-D'/m;
44 s{with -O -Dsh=/bin/whatever -Dstartsh=whatever}
45 {with '-O -Dsh=/bin/whatever -Dstartsh=whatever'};
48 s/cat or a grep -v for # comments/cat or a grep '-v' for # comments/;