PKG_CHECK_MODULES(LIBVALA_0_18_X, libvala-0.18 >= 0.17.4, have_libvala_0_18_x="yes", have_libvala_0_18_x="no")
AM_CONDITIONAL(HAVE_LIBVALA_0_18_X, test "$have_libvala_0_18_x" = "yes")
-PKG_CHECK_MODULES(LIBVALA_0_17__1_3, libvala-0.18 >= 0.17.1 libvala-0.18 <= 0.17.3, have_libvala_0_17__1_3="yes", have_libvala_0_17__1_3="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_17__1_3, test "$have_libvala_0_17__1_3" = "yes")
-
-PKG_CHECK_MODULES(LIBVALA_0_17_0, libvala-0.18 = 0.17.0, have_libvala_0_17_0="yes", have_libvala_0_17_0="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_17_0, test "$have_libvala_0_17_0" = "yes")
-
PKG_CHECK_MODULES(LIBVALA_0_16_X, libvala-0.16 >= 0.15.1, have_libvala_0_16_x="yes", have_libvala_0_16_x="no")
AM_CONDITIONAL(HAVE_LIBVALA_0_16_X, test "$have_libvala_0_16_x" = "yes")
-PKG_CHECK_MODULES(LIBVALA_0_15_0, libvala-0.16 = 0.15.0, have_libvala_0_15_0="yes", have_libvala_0_15_0="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_15_0, test "$have_libvala_0_15_0" = "yes")
-
AC_CONFIG_FILES([
Makefile
VERSIONED_VAPI_DIR=`pkg-config libvala-0.16 --variable vapidir`
-if HAVE_LIBVALA_0_15_0
-VALAFLAGS = -D VALA_0_15_0
-endif
-
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I $(top_builddir)/src/libvaladoc/ \
$(GLIB_CFLAGS) \
$(LIBGEE_CFLAGS) \
$(LIBGVC_CFLAGS) \
- $(LIBVALA_0_15_0_CFLAGS) \
$(LIBVALA_0_16_X_CFLAGS) \
-g \
-w \
libdriver_la_LIBADD = \
$(top_builddir)/src/libvaladoc/libvaladoc.la \
$(GLIB_LIBS) \
- $(LIBVALA_0_15_0_LIBS) \
$(LIBVALA_0_16_X_LIBS) \
$(LIBGEE_LIBS) \
$(LIBGVC_LIBS) \
private Api.Tree? tree;
public void write_gir (Settings settings, ErrorReporter reporter) {
-#if VALA_0_15_0
- var gir_writer = new Vala.GIRWriter ();
-#else
var gir_writer = new Drivers.GirWriter (resolver);
-#endif
// put .gir file in current directory unless -d has been explicitly specified
string gir_directory = ".";
gir_directory = settings.gir_directory;
}
- gir_writer.write_file ((Vala.CodeContext) tree.data,
+ gir_writer.write_file ((Vala.CodeContext) tree.data,
gir_directory,
settings.gir_namespace,
settings.gir_version,
using Valadoc.Api;
-#if ! VALA_0_15_0
-
/**
* Code visitor generating .gir file for the public interface.
*/
}
-#endif
-
&& ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
) {
Vala.SourceReference pos = c.source_reference;
-#if ! VALA_0_15_0
if (c is Vala.GirComment) {
comment = new GirSourceComment (c.content,
file,
pos.last_line,
pos.last_column);
}
-#else
- comment = new SourceComment (c.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
-#endif
break;
}
}
}
private SourceComment? create_comment (Vala.Comment? comment) {
-#if VALA_0_15_0
- if (comment != null) {
- Vala.SourceReference pos = comment.source_reference;
- SourceFile file = files.get (pos.file);
- return new SourceComment (comment.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
- }
-#else
if (comment != null) {
Vala.SourceReference pos = comment.source_reference;
SourceFile file = files.get (pos.file);
pos.last_column);
}
}
-#endif
return null;
}
VERSIONED_VAPI_DIR=`pkg-config libvala-0.18 --variable vapidir`
-if HAVE_LIBVALA_0_17_0
-VALAFLAGS = -D VALA_0_17_0
-endif
-
-if HAVE_LIBVALA_0_17__1_3
-VALAFLAGS = -D VALA_0_17__1_3
-endif
-
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I $(top_builddir)/src/libvaladoc/ \
$(LIBGEE_CFLAGS) \
$(LIBGVC_CFLAGS) \
$(LIBVALA_0_18_X_CFLAGS) \
- $(LIBVALA_0_17__1_3_CFLAGS) \
- $(LIBVALA_0_17_1_CFLAGS) \
- $(LIBVALA_0_17_0_CFLAGS) \
-g \
-w \
$(NULL)
$(top_builddir)/src/libvaladoc/libvaladoc.la \
$(GLIB_LIBS) \
$(LIBVALA_0_18_X_LIBS) \
- $(LIBVALA_0_17__1_3_LIBS) \
- $(LIBVALA_0_17_1_LIBS) \
- $(LIBVALA_0_17_0_LIBS) \
$(LIBGEE_LIBS) \
$(LIBGVC_LIBS) \
$(NULL)
signature.append_literal (lit.to_string (), false);
}
-#if VALA_0_17__1_3 || VALA_0_17_0
- /**
- * {@inheritDoc}
- */
- public override void visit_list_literal (Vala.ListLiteral lit) {
- signature.append_literal (lit.to_string (), false);
- }
-#endif
-
/**
* {@inheritDoc}
*/
) {
Vala.SourceReference pos = c.source_reference;
if (c is Vala.GirComment) {
-#if VALA_0_17_0
- comment = new GirSourceComment (c.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
-#else
comment = new GirSourceComment (c.content,
file,
pos.begin.line,
pos.begin.column,
pos.end.line,
pos.end.column);
-#endif
} else {
-#if VALA_0_17_0
- comment = new SourceComment (c.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
-#else
comment = new SourceComment (c.content,
file,
pos.begin.line,
pos.begin.column,
pos.end.line,
pos.end.column);
-#endif
}
break;
}
Vala.SourceReference pos = comment.source_reference;
SourceFile file = files.get (pos.file);
if (comment is Vala.GirComment) {
-#if VALA_0_17_0
- var tmp = new GirSourceComment (comment.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
-#else
var tmp = new GirSourceComment (comment.content,
file,
pos.begin.line,
pos.begin.column,
pos.end.line,
pos.end.column);
-#endif
if (((Vala.GirComment) comment).return_content != null) {
Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-#if VALA_0_17_0
- tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
- file,
- return_pos.first_line,
- return_pos.first_column,
- return_pos.last_line,
- return_pos.last_column);
-#else
tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
file,
return_pos.begin.line,
return_pos.begin.column,
return_pos.end.line,
return_pos.end.column);
-#endif
}
Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
while (it.next ()) {
Vala.Comment vala_param = it.get_value ();
Vala.SourceReference param_pos = vala_param.source_reference;
-#if VALA_0_17_0
- var param_comment = new SourceComment (vala_param.content,
- file,
- param_pos.first_line,
- param_pos.first_column,
- param_pos.last_line,
- param_pos.last_column);
-#else
var param_comment = new SourceComment (vala_param.content,
file,
param_pos.begin.line,
param_pos.begin.column,
param_pos.end.line,
param_pos.end.column);
-#endif
tmp.add_parameter_content (it.get_key (), param_comment);
}
return tmp;
} else {
-#if VALA_0_17_0
- return new SourceComment (comment.content,
- file,
- pos.first_line,
- pos.first_column,
- pos.last_line,
- pos.last_column);
-#else
return new SourceComment (comment.content,
file,
pos.begin.line,
pos.begin.column,
pos.end.line,
pos.end.column);
-#endif
}
}
var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
source_file.add_using_directive (ns_ref);
context.root.add_using_directive (ns_ref);
-#if VALA_0_17__1_3|| VALA_0_17_0
- } else if (context.profile == Vala.Profile.POSIX) {
- // import the Posix namespace by default (namespace of backend-specific standard library)
- var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "Posix", null));
- source_file.add_using_directive (ns_ref);
- context.root.add_using_directive (ns_ref);
-#endif
}
context.add_source_file (source_file);
if (!this.add_package (context, "gobject-2.0")) { //
Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
}
-#if VALA_0_17__1_3 || VALA_0_17_0
- } else if (context.profile == Vala.Profile.POSIX) {
- // default package
- if (!add_package (context, "posix")) {
- Vala.Report.error (null, "posix not found in specified Vala API directories");
- }
-#endif
}
// add user defined files:
NULL =
-if HAVE_LIBVALA_0_15_0
-DRIVER_0_16_X_DIR = 0.16.x
-endif
-
if HAVE_LIBVALA_0_16_X
DRIVER_0_16_X_DIR = 0.16.x
endif
-if HAVE_LIBVALA_0_17_0
-DRIVER_0_18_X_DIR = 0.18.x
-endif
-
-if HAVE_LIBVALA_0_17__1_3
-DRIVER_0_18_X_DIR = 0.18.x
-endif
-
if HAVE_LIBVALA_0_18_X
DRIVER_0_18_X_DIR = 0.18.x
endif