summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Thomas <astavale@yahoo.co.uk>2021-05-08 12:43:43 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-05-19 08:54:28 +0200
commit4fdc2d589d0731d3878570826850249c1f5bad19 (patch)
tree676d4d9085ecc311fa747ea1703ef276f289715e
parent1713239a43ee4828465d5f2d448956b22cf557b6 (diff)
downloadvala-4fdc2d589d0731d3878570826850249c1f5bad19.tar.gz
doc: Update man page to include more information on profiles
-rw-r--r--README.md5
-rw-r--r--compiler/valacompiler.vala10
-rw-r--r--doc/valac.112
-rw-r--r--doc/valac.h2m12
-rw-r--r--doc/valadoc.12
-rw-r--r--valadoc/valadoc.vala2
6 files changed, 35 insertions, 8 deletions
diff --git a/README.md b/README.md
index fe0108802..45a16fd08 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,11 @@ Install the following packages:
* automake
* libtool
+These additional packages are needed to generate the documentation:
+
+ * help2man when updating the man pages
+ * xsltproc
+ * weasyprint for PDF generation
### Step Two:
Decide where the Vala compiler is to be found.
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index 4cf66f3c5..163146931 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -153,7 +153,7 @@ class Vala.Compiler {
{ "pkg-config", 0, 0, OptionArg.STRING, ref pkg_config_command, "Use COMMAND as pkg-config command", "COMMAND" },
{ "dump-tree", 0, 0, OptionArg.FILENAME, ref dump_tree, "Write code tree to FILE", "FILE" },
{ "save-temps", 0, 0, OptionArg.NONE, ref save_temps, "Keep temporary files", null },
- { "profile", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_parse_profile, "Use the given profile instead of the default, options are 'gobject' or 'posix'", "PROFILE" },
+ { "profile", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_parse_profile, "Minimum runtime dependency: 'gobject' (default) or 'posix' (minimal libc)", "PROFILE" },
{ "quiet", 'q', 0, OptionArg.NONE, ref quiet_mode, "Do not print messages to the console", null },
{ "verbose", 'v', 0, OptionArg.NONE, ref verbose_mode, "Print additional messages to the console", null },
{ "no-color", 0, 0, OptionArg.NONE, ref disable_colored_output, "Disable colored output, alias for --color=never", null },
@@ -521,7 +521,7 @@ class Vala.Compiler {
if (context.report.get_errors () > 0 || (fatal_warnings && context.report.get_warnings () > 0)) {
return quit ();
}
-
+
if (!ccode_only) {
var ccompiler = new CCodeCompiler ();
if (cc_command == null && Environment.get_variable ("CC") != null) {
@@ -636,7 +636,7 @@ class Vala.Compiler {
stdout.printf ("Run '%s --help' to see a full list of available command line options.\n", args[0]);
return 1;
}
-
+
if (version) {
stdout.printf ("Vala %s\n", Vala.BUILD_VERSION);
return 0;
@@ -644,12 +644,12 @@ class Vala.Compiler {
stdout.printf ("%s\n", Vala.API_VERSION);
return 0;
}
-
+
if (sources == null && fast_vapis == null) {
stderr.printf ("No source file specified.\n");
return 1;
}
-
+
var compiler = new Compiler ();
return compiler.run ();
}
diff --git a/doc/valac.1 b/doc/valac.1
index 2c6ffb225..c78dcfb5c 100644
--- a/doc/valac.1
+++ b/doc/valac.1
@@ -172,7 +172,17 @@ Write code tree to FILE
Keep temporary files
.TP
\fB\-\-profile\fR=\fI\,PROFILE\/\fR
-Use the given profile instead of the default, options are 'gobject' or 'posix'
+Minimum runtime dependency: 'gobject' (default) or 'posix' (minimal libc)
+.RS
+\fIgobject\fR enables GLib's GType runtime type system. The runtime environment
+will usually require libgobject and its small number of dependencies.
+\fIposix\fR removes the dependency on GLib and disables the runtime type
+system. The profile either generates alternative code or errors at compile time
+if a Vala language feature is used that requires the runtime type system. This
+is useful for writing code, for example, that targets microcontrollers or
+for extremely small system utilities or container images. The runtime
+environment will usually require a small subset of the ISO C standard library.
+.RE
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Do not print messages to the console
diff --git a/doc/valac.h2m b/doc/valac.h2m
index 70740811d..97995fa5d 100644
--- a/doc/valac.h2m
+++ b/doc/valac.h2m
@@ -23,6 +23,18 @@ or \fB--no-color\fR are declared then \fB--color\fR=\fIauto\fR is used where
output is colored when stderr is a terminal.
.RE
+/Minimum runtime dependency/
+.RS
+\fIgobject\fR enables GLib's GType runtime type system. The runtime environment
+will usually require libgobject and its small number of dependencies.
+\fIposix\fR removes the dependency on GLib and disables the runtime type
+system. The profile either generates alternative code or errors at compile time
+if a Vala language feature is used that requires the runtime type system. This
+is useful for writing code, for example, that targets microcontrollers or
+for extremely small system utilities or container images. The runtime
+environment will usually require a small subset of the ISO C standard library.
+.RE
+
/Enable support for ABI stability/
.RS
This changes the current behaviour to output public members of classes and
diff --git a/doc/valadoc.1 b/doc/valadoc.1
index f540870a3..8ccf130a0 100644
--- a/doc/valadoc.1
+++ b/doc/valadoc.1
@@ -27,7 +27,7 @@ Base source directory
Define SYMBOL
.TP
\fB\-\-profile\fR=\fI\,PROFILE\/\fR
-Use the given profile instead of the default, options are 'gobject' or 'posix'
+Minimum runtime dependency: 'gobject' (default) or 'posix' (minimal libc)
.TP
\fB\-\-enable\-experimental\fR
Enable experimental features
diff --git a/valadoc/valadoc.vala b/valadoc/valadoc.vala
index 6ed4a6792..b1113b728 100644
--- a/valadoc/valadoc.vala
+++ b/valadoc/valadoc.vala
@@ -79,7 +79,7 @@ public class ValaDoc : Object {
{ "basedir", 'b', 0, OptionArg.FILENAME, ref basedir, "Base source directory", "DIRECTORY" },
{ "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, "Define SYMBOL", "SYMBOL..." },
- { "profile", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_parse_profile, "Use the given profile instead of the default, options are 'gobject' or 'posix'", "PROFILE" },
+ { "profile", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_parse_profile, "Minimum runtime dependency: 'gobject' (default) or 'posix' (minimal libc)", "PROFILE" },
{ "enable-experimental", 0, 0, OptionArg.NONE, ref experimental, "Enable experimental features", null },
{ "enable-experimental-non-null", 0, 0, OptionArg.NONE, ref experimental_non_null, "Enable experimental enhancements for non-null types", null },