Commit 2b742fce authored by Rico Tzschichholz's avatar Rico Tzschichholz

Merge valadoc 0.36.0

Consider valadoc a part of vala's toolchain and therefore let it live in
the main repository.

With this merge there is no need to maintain multiple driver sources since
only one is required from now on.

There is no dependency on gee-0.8 and vala's internal gee copy has made to
be sufficient.

The libvaladoc library will be suffixed with vala's version suffix too.
Besides this renaming the rest of the valadoc file layout is kept the same.

https://bugzilla.gnome.org/show_bug.cgi?id=782782
parents 7609126b 93d9fe64
......@@ -8,6 +8,7 @@ Makefile
*.stamp
*.gir
.deps
.dirstamp
.libs
libvala-*.vapi
......
......@@ -13,6 +13,8 @@ SUBDIRS = \
doc \
gobject-introspection \
vapigen \
libvaladoc \
valadoc \
$(NULL)
if ENABLE_UNVERSIONED
......
......@@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip])
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip subdir-objects])
AM_MAINTAINER_MODE([enable])
API_VERSION=0.38
......@@ -86,6 +86,7 @@ AC_SUBST(COVERAGE_CFLAGS)
AC_SUBST(COVERAGE_LIBS)
GLIB_REQUIRED=2.40.0
LIBGVC_REQUIRED=2.16
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
......@@ -97,6 +98,36 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
AC_MSG_CHECKING([for CGRAPH])
cgraph_tmp_LIBADD="$LIBADD"
cgraph_tmp_CFLAGS="$CFLAGS"
LIBADD="$LIBADD $LIBGVC_LIBS"
CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([
#include <gvc.h>
int main(void) {
#ifdef WITH_CGRAPH
return 0;
#else
return -1;
#endif
}
])], [
AC_MSG_RESULT([yes])
VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
have_cgraph=yes
], [
AC_MSG_RESULT([no])
have_cgraph=no
]
)
LIBADD="$cgraph_tmp_LIBADD"
CFLAGS="$cgraph_tmp_CFLAGS"
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
AC_PATH_PROG([XSLTPROC], [xsltproc], :)
AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
......@@ -124,6 +155,17 @@ AC_CONFIG_FILES([Makefile
vapigen/vapigen.pc
vapigen/Makefile
vapigen/vala-gen-introspect/Makefile
vapigen/vala-gen-introspect/vala-gen-introspect])
vapigen/vala-gen-introspect/vala-gen-introspect
libvaladoc/valadoc.pc
libvaladoc/valadoc.deps
libvaladoc/Makefile
valadoc/Makefile
valadoc/doclets/Makefile
valadoc/doclets/html/Makefile
valadoc/doclets/devhelp/Makefile
valadoc/doclets/gtkdoc/Makefile
valadoc/icons/Makefile
valadoc/tests/Makefile
])
AC_OUTPUT
......@@ -6,18 +6,20 @@ SUBDIRS = \
dist_man_MANS = \
valac.1 \
valadoc.1 \
vala-gen-introspect.1 \
vapigen.1 \
$(NULL)
EXTRA_DIST = \
valac.h2m \
valadoc.h2m \
vala-gen-introspect.h2m \
vapigen.h2m \
$(NULL)
if HAVE_HELP2MAN
manpages: valac.1 vala-gen-introspect.1 vapigen.1
manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
@rm $^
$(MAKE) $(AM_MAKEFLAGS) $^
......@@ -26,6 +28,11 @@ valac.1:
--include $(srcdir)/valac.h2m \
--libtool --no-info \
--output=$@
valadoc.1:
$(HELP2MAN) $(top_builddir)/valadoc/valadoc \
--include $(srcdir)/valadoc.h2m \
--libtool --no-info \
--output=$@
vala-gen-introspect.1:
$(HELP2MAN) $(top_builddir)/gobject-introspection/gen-introspect \
--include $(srcdir)/vala-gen-introspect.h2m \
......@@ -42,6 +49,7 @@ endif
if ENABLE_UNVERSIONED
install-data-hook:
cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
endif
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
.TH VALADOC "1" "March 2017" "valadoc 0.36.0" "User Commands"
.SH NAME
valadoc \- Vala Documentation Tool
.SH SYNOPSIS
.B valadoc
[\fIOPTION\fR]... \fIFILE\fR...
.SH DESCRIPTION
Valadoc is a documentation generator for generating API documentation
from Vala source code based on libvala.
.SS "Usage:"
.IP
valadoc [OPTION?] FILE... \- Vala Documentation Tool
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help options
.SS "Application Options:"
.TP
\fB\-o\fR, \fB\-\-directory\fR=\fI\,DIRECTORY\/\fR
Output directory
.TP
\fB\-b\fR, \fB\-\-basedir\fR=\fI\,DIRECTORY\/\fR
Base source directory
.TP
\fB\-D\fR, \fB\-\-define\fR=\fI\,SYMBOL\/\fR...
Define SYMBOL
.TP
\fB\-\-profile\fR=\fI\,PROFILE\/\fR
Use the given profile instead of the default
.TP
\fB\-\-enable\-experimental\fR
Enable experimental features
.TP
\fB\-\-enable\-experimental\-non\-null\fR
Enable experimental enhancements for non\-null types
.TP
\fB\-\-metadatadir\fR=\fI\,DIRECTORY\/\fR...
Look for GIR .metadata files in DIRECTORY
.TP
\fB\-\-girdir\fR=\fI\,DIRECTORY\/\fR...
Look for .gir files in DIRECTORY
.TP
\fB\-\-vapidir\fR=\fI\,DIRECTORY\/\fR...
Look for package bindings in DIRECTORY
.TP
\fB\-\-pkg\fR=\fI\,PACKAGE\/\fR...
Include binding for PACKAGE
.TP
\fB\-\-driver\fR
Name of an driver or path to a custom driver
.TP
\fB\-\-importdir\fR=\fI\,DIRECTORY\/\fR...
Look for external documentation in DIRECTORY
.TP
\fB\-\-import\fR=\fI\,PACKAGE\/\fR...
Include binding for PACKAGE
.TP
\fB\-\-alternative\-resource\-dir\fR=\fI\,DIRECTORY\/\fR...
Alternative resource directories
.TP
\fB\-\-wiki\fR=\fI\,DIRECTORY\/\fR
Wiki directory
.TP
\fB\-\-deps\fR
Adds packages to the documentation
.TP
\fB\-\-doclet\fR=\fI\,PLUGIN\/\fR
Name of an included doclet or path to custom doclet
.TP
\fB\-X\fR, \fB\-\-doclet\-arg\fR=\fI\,ARG\/\fR
Pass arguments to the doclet
.TP
\fB\-\-no\-protected\fR
Removes protected elements from documentation
.TP
\fB\-\-internal\fR
Adds internal elements to documentation
.TP
\fB\-\-private\fR
Adds private elements to documentation
.TP
\fB\-\-use\-svg\-images\fR
Generate SVG image charts instead of PNG
.TP
\fB\-\-package\-name\fR=\fI\,NAME\/\fR
package name
.TP
\fB\-\-package\-version\fR=\fI\,VERSION\/\fR
package version
.TP
\fB\-\-gir\fR=\fI\,NAME\-VERSION\/\fR.gir
GObject\-Introspection repository file name
.TP
\fB\-\-version\fR
Display version number
.TP
\fB\-\-force\fR
force
.TP
\fB\-\-verbose\fR
Show all warnings
.TP
\fB\-\-no\-color\fR
Disable colored output
.TP
\fB\-\-target\-glib\fR=\fI\,MAJOR\/\fR.MINOR
Target version of glib for code generation
.SH BUGS
https://bugzilla.gnome.org/page.cgi?id=browse.html&product=valadoc
.SH "HOMEPAGE OR CONTACT"
https://wiki.gnome.org/Projects/Valadoc
.SH AUTHORS
Florian Brosch
[NAME]
valadoc \- Vala Documentation Tool
[SYNOPSIS]
.B valadoc
[\fIOPTION\fR]... \fIFILE\fR...
[DESCRIPTION]
Valadoc is a documentation generator for generating API documentation
from Vala source code based on libvala.
[BUGS]
https://bugzilla.gnome.org/page.cgi?id=browse.html&product=valadoc
[HOMEPAGE or CONTACT]
https://wiki.gnome.org/Projects/Valadoc
[AUTHORS]
Florian Brosch
valadoc*.deps
valadoc*.vapi
include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
$(LIBGVC_CFLAGS) \
$(GLIB_CFLAGS) \
$(GMODULE_CFLAGS) \
-I$(top_srcdir)/gee \
$(NULL)
AM_VALAFLAGS = \
$(NULL)
BUILT_SOURCES = \
libvaladoc.vala.stamp \
valadoc.h \
$(NULL)
lib_LTLIBRARIES = libvaladoc@PACKAGE_SUFFIX@.la
libvaladoc_la_VALASOURCES = \
doclet.vala \
errorreporter.vala \
filehelper.vala \
moduleloader.vala \
settings.vala \
markupwriter.vala \
gtkdocmarkupwriter.vala \
devhelp-markupwriter.vala \
ctyperesolver.vala \
markupsourcelocation.vala \
markuptokentype.vala \
markupreader.vala \
gtkdocrenderer.vala \
documentation/commentscanner.vala \
documentation/documentation.vala \
documentation/documentationparser.vala \
documentation/wiki.vala \
documentation/wikiscanner.vala \
documentation/gtkdoccommentparser.vala \
documentation/gtkdoccommentscanner.vala \
documentation/gtkdocmarkdownparser.vala \
documentation/gtkdocmarkdownscanner.vala \
documentation/importerhelper.vala \
documentation/girmetadata.vala \
importer/documentationimporter.vala \
importer/valadocdocumentationimporter.vala \
importer/valadocdocumentationimporterscanner.vala \
importer/girdocumentationimporter.vala \
importer/internalidregistrar.vala \
api/symbolaccessibility.vala \
api/sourcecomment.vala \
api/girsourcecomment.vala \
api/attributeargument.vala \
api/attribute.vala \
api/array.vala \
api/callable.vala \
api/childsymbolregistrar.vala \
api/class.vala \
api/constant.vala \
api/delegate.vala \
api/enum.vala \
api/enumvalue.vala \
api/errorcode.vala \
api/errordomain.vala \
api/field.vala \
api/formalparameter.vala \
api/formalparametertype.vala \
api/interface.vala \
api/item.vala \
api/member.vala \
api/method.vala \
api/methodbindingtype.vala \
api/namespace.vala \
api/node.vala \
api/nodetype.vala \
api/ownership.vala \
api/package.vala \
api/pointer.vala \
api/property.vala \
api/propertyaccessor.vala \
api/propertyaccessortype.vala \
api/propertybindingtype.vala \
api/signal.vala \
api/signaturebuilder.vala \
api/sourcefile.vala \
api/struct.vala \
api/symbol.vala \
api/tree.vala \
api/typeparameter.vala \
api/typereference.vala \
api/typesymbol.vala \
api/browsable.vala \
api/visitor.vala \
api/driver.vala \
content/block.vala \
content/blockcontent.vala \
content/comment.vala \
content/contentfactory.vala \
content/contentelement.vala \
content/contentrenderer.vala \
content/contentvisitor.vala \
content/embedded.vala \
content/headline.vala \
content/inline.vala \
content/inlinetaglet.vala \
content/inlinecontent.vala \
content/wikilink.vala \
content/link.vala \
content/list.vala \
content/listitem.vala \
content/page.vala \
content/paragraph.vala \
content/warning.vala \
content/note.vala \
content/resourcelocator.vala \
content/run.vala \
content/sourcecode.vala \
content/styleattributes.vala \
content/symbollink.vala \
content/table.vala \
content/tablecell.vala \
content/tablerow.vala \
content/taglet.vala \
content/text.vala \
charts/chart.vala \
charts/chartfactory.vala \
charts/hierarchychart.vala \
charts/simplechartfactory.vala \
parser/manyrule.vala \
parser/oneofrule.vala \
parser/optionalrule.vala \
parser/parser.vala \
parser/parsercallback.vala \
parser/rule.vala \
parser/scanner.vala \
parser/sequencerule.vala \
parser/sourcelocation.vala \
parser/stubrule.vala \
parser/token.vala \
parser/tokentype.vala \
taglets/tagletdeprecated.vala \
taglets/tagletinheritdoc.vala \
taglets/tagletinit.vala \
taglets/tagletlink.vala \
taglets/tagletparam.vala \
taglets/tagletreturn.vala \
taglets/tagletsee.vala \
taglets/tagletsince.vala \
taglets/tagletthrows.vala \
highlighter/scanner.vala \
highlighter/codescanner.vala \
highlighter/xmlscanner.vala \
highlighter/codetoken.vala \
highlighter/highlighter.vala \
html/basicdoclet.vala \
html/htmlchartfactory.vala \
html/linkhelper.vala \
html/cssclassresolver.vala \
html/htmlmarkupwriter.vala \
html/htmlrenderer.vala \
$(NULL)
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
libvaladoc.vala.stamp \
$(libvaladoc_la_VALASOURCES:.vala=.c) \
$(NULL)
valadoc@PACKAGE_SUFFIX@.vapi valadoc.h: libvaladoc.vala.stamp
libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
$(VALA_V)$(VALAC) \
$(VALAFLAGS) \
--basedir $(srcdir) \
--directory $(builddir) \
-C \
-H valadoc.h \
--library valadoc \
--vapi valadoc@PACKAGE_SUFFIX@.vapi \
--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
--vapidir $(top_srcdir)/valadoc/vapi --pkg libgvc \
--vapidir $(top_srcdir)/gee --pkg gee \
--pkg config \
$(filter %.vala %.c,$^)
touch $@
libvaladoc@PACKAGE_SUFFIX@_la_LDFLAGS = \
-no-undefined \
$(NULL)
libvaladoc@PACKAGE_SUFFIX@_la_LIBADD = \
$(LIBGVC_LIBS) \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
$(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
$(NULL)
libvaladocincludedir = $(includedir)/valadoc@PACKAGE_SUFFIX@
libvaladocinclude_HEADERS = \
valadoc.h \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
cp $< $@
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
cp $< $@
EXTRA_DIST = \
$(libvaladoc_la_VALASOURCES) \
libvaladoc.vala.stamp \
valadoc.deps.in \
valadoc.pc.in \
$(NULL)
CLEANFILES = \
valadoc@PACKAGE_SUFFIX@.deps \
valadoc@PACKAGE_SUFFIX@.pc \
$(NULL)
MAINTAINERCLEANFILES = \
valadoc.deps \
valadoc.pc \
valadoc.vapi \
valadoc.h \
$(libvaladoc_la_VALASOURCES:.vala=.c) \
$(NULL)
/* array.vala
*
* Copyright (C) 2011 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Florian Brosch <flo.brosch@gmail.com>
*/
using Valadoc.Content;
/**
* Represents an array declaration.
*/
public class Valadoc.Api.Array : Item {
/**
* The element type.
*/
public Item data_type {
set;
get;
}
public Array (Item parent, void* data) {
base (data);
this.parent = parent;
}
private inline bool element_is_owned () {
TypeReference reference = data_type as TypeReference;
if (reference == null) {
return true;
}
return !reference.is_unowned && !reference.is_weak;
}
/**
* {@inheritDoc}
*/
protected override Inline build_signature () {
SignatureBuilder builder = new SignatureBuilder ();
if (element_is_owned ()) {
builder.append_content (data_type.signature);
} else {
builder.append ("(", false);
builder.append_content (data_type.signature, false);
builder.append (")", false);
}
builder.append ("[]", false);
return builder.get ();
}
}
/* attribute.vala
*
* Copyright (C) 2011 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Florian Brosch <flo.brosch@gmail.com>
*/
using Valadoc.Content;
public class Valadoc.Api.Attribute : Item {
private Vala.ArrayList<AttributeArgument> args = new Vala.ArrayList<AttributeArgument> ();
private SourceFile file;
public string name {
private set;
get;
}
public Attribute (Node parent, SourceFile file, string name, void* data) {
base (data);
this.parent = parent;
this.name = name;
this.file = file;
}
public AttributeArgument? get_argument (string name) {
if (args != null) {
foreach (AttributeArgument arg in args) {
if (arg.name == name) {
return arg;
}
}
}
return null;
}
public AttributeArgument add_boolean (string name, bool value, void* data = null) {
AttributeArgument arg = new AttributeArgument.boolean (this, file, name, value, data);
args.add (arg);
return arg;
}
public AttributeArgument add_integer (string name, int value, void* data = null) {
AttributeArgument arg = new AttributeArgument.integer (this, file, name, value, data);
args.add (arg);
return arg;
}
public AttributeArgument add_double (string name, double value, void* data = null) {
AttributeArgument arg = new AttributeArgument.double (this, file, name, value, data);
args.add (arg);
return arg;
}
public AttributeArgument add_string (string name, string value, void* data = null) {
AttributeArgument arg = new AttributeArgument.string (this, file, name, value, data);
args.add (arg);
return arg;
}
public SourceFile get_source_file () {
return file;
}
protected override Inline build_signature () {
SignatureBuilder builder = new SignatureBuilder ();
builder.append_attribute ("[");
builder.append_type_name (name);
if (args.size > 0) {