-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: Document build targets, add 'help' target
Currently important build targets are somewhat hard to discover. This commit documents important meson build targets in the sgml documentation. But it's awkward to have to lookup build targets in the docs when hacking, so this also adds a 'help' target, printing out the same information. To avoid having to duplicate information in two places, generate both docbook and interactive docs from a single source. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/20231108232121.ww542mt6lfo6f26f@awork3.anarazel.de
- Loading branch information
Showing
8 changed files
with
148 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/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; | ||
|
||
"<!-- 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright (c) 2023, PostgreSQL Global Development Group | ||
# | ||
# Description of important meson targets, used for the 'help' target and | ||
# installation.sgml (via generate-targets-meson.pl). Right now the parsers are | ||
# extremely simple. Both parsers ignore comments. The help target prints | ||
# everything else. For xml everything without a leading newline is a group, | ||
# remaining lines are target separated by whitespace from their description | ||
# | ||
Code Targets: | ||
all Build everything other than documentation | ||
backend Build backend and related modules | ||
bin Build frontend binaries | ||
contrib Build contrib modules | ||
pl Build procedual languages | ||
|
||
Developer Targets: | ||
reformat-dat-files Rewrite catalog data files into standard format | ||
expand-dat-files Expand all data files to include defaults | ||
update-unicode Update unicode data to new version | ||
|
||
Documentation Targets: | ||
html Build documentation in multi-page HTML format | ||
man Build documentation in man page format | ||
docs Build documentation in multi-page HTML and man page format | ||
doc/src/sgml/postgres-A4.pdf Build documentation in PDF format, with A4 pages | ||
doc/src/sgml/postgres-US.pdf Build documentation in PDF format, with US letter pages | ||
doc/src/sgml/postgres.html Build documentation in single-page HTML format | ||
alldocs Build documentation in all supported formats | ||
|
||
Installation Targets: | ||
install Install postgres, excluding documentation | ||
install-docs Install documentation in multi-page HTML and man page formats | ||
install-html Install documentation in multi-page HTML format | ||
install-man Install documentation in man page format | ||
install-quiet Like "install", but installed files are not displayed | ||
install-world Install postgres, including multi-page HTML and man page documentation | ||
uninstall Remove installed files | ||
|
||
Other Targets: | ||
clean Remove all build products | ||
test Run all enabled tests (including contrib) | ||
world Build everything, including documentation | ||
help List important targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters