mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 04:01:22 +02:00
64 lines
1.1 KiB
Perl
64 lines
1.1 KiB
Perl
|
#!/usr/bin/perl
|
||
|
#
|
||
|
# Generate the targets-meson.sgml file from targets-meson.txt
|
||
|
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
|
||
|
|
||
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
my $targets_meson_file = $ARGV[0];
|
||
|
open my $targets_meson, '<', $targets_meson_file or die;
|
||
|
|
||
|
print
|
||
|
"<!-- autogenerated from doc/src/sgml/targets-meson.txt, do not edit -->\n";
|
||
|
|
||
|
# Find the start of each group of targets
|
||
|
while (<$targets_meson>)
|
||
|
{
|
||
|
next if /^#/;
|
||
|
|
||
|
if (/^(.*) Targets:$/)
|
||
|
{
|
||
|
my $targets = $1;
|
||
|
my $targets_id = lc $targets;
|
||
|
|
||
|
print qq(
|
||
|
<sect3 id="targets-meson-$targets_id">
|
||
|
<title>$targets Targets</title>
|
||
|
|
||
|
<variablelist>
|
||
|
);
|
||
|
|
||
|
# Each target in the group
|
||
|
while (<$targets_meson>)
|
||
|
{
|
||
|
next if /^#/;
|
||
|
last if !/^\s+([^ ]+)\s+(.+)/;
|
||
|
|
||
|
my $target = $1;
|
||
|
my $desc = $2;
|
||
|
my $target_id = $1;
|
||
|
|
||
|
$target_id =~ s/\//-/g;
|
||
|
|
||
|
print qq(
|
||
|
<varlistentry id="meson-target-${target_id}">
|
||
|
<term><option>${target}</option></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
${desc}
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
print qq(
|
||
|
</variablelist>
|
||
|
</sect3>
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
close $targets_meson;
|