diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-01-03 12:15:21 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-03-25 12:28:50 +0100 |
commit | bd73f1ba11c387c919ad06d44badfd7065d1e35f (patch) | |
tree | 0f80303ac04d57a60988e07c8de50ddb34484215 /valadoc/treebuilder.vala | |
parent | 66c23e839b63c81ce5da1c0212b22e2c4c6b8c81 (diff) | |
download | vala-bd73f1ba11c387c919ad06d44badfd7065d1e35f.tar.gz |
vala: Move setting of target profile and standard packages into CodeContext
Diffstat (limited to 'valadoc/treebuilder.vala')
-rw-r--r-- | valadoc/treebuilder.vala | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala index 433938af2..662a8583e 100644 --- a/valadoc/treebuilder.vala +++ b/valadoc/treebuilder.vala @@ -489,35 +489,18 @@ public class Valadoc.TreeBuilder : Vala.CodeVisitor { context.directory = context.basedir; } + context.set_target_profile (settings.profile, true); - // add default packages: - if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) { - context.profile = Vala.Profile.GOBJECT; - context.add_define ("GOBJECT"); + if (settings.target_glib != null) { + context.set_target_glib_version (settings.target_glib); } - if (settings.defines != null) { foreach (string define in settings.defines) { context.add_define (define); } } - if (context.profile == Vala.Profile.GOBJECT) { - if (settings.target_glib != null) { - context.set_target_glib_version (settings.target_glib); - } - - // default packages - if (!this.add_package (context, "glib-2.0")) { // - Vala.Report.error (null, "glib-2.0 not found in specified Vala API directories"); - } - - if (!this.add_package (context, "gobject-2.0")) { // - Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories"); - } - } - // add user defined files: add_depencies (context, settings.packages); if (reporter.errors > 0) { |