diff options
author | Christian Persch <chpe@src.gnome.org> | 2021-02-21 20:05:43 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2021-02-21 20:05:43 +0100 |
commit | 075d0b37049244429b7d709dc8c21f67023bc048 (patch) | |
tree | 36d337ab3984502b6d84917c76b697b23d57ccf1 /doc | |
parent | 94966f638af6999103f89cd8e31b71701cca495b (diff) | |
download | vte-075d0b37049244429b7d709dc8c21f67023bc048.tar.gz |
all: Initial port for gtk4
Add meson changes to build a gtk4 variant of libvte, plus
a gtk4 variant of the test application.
Make the minimal code changes required to successfully build
and run on gtk4.
No event handlers yet, and no public API to replace the gtk3
specific APIs. That will come later.
This should be good enough to get non-terminal users of libvte
started on porting to gtk4.
https://gitlab.gnome.org/GNOME/vte/-/issues/12
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/Makefile.docs | 518 | ||||
-rw-r--r-- | doc/reference/gtk3/meson.build | 55 | ||||
-rw-r--r-- | doc/reference/gtk4/meson.build | 55 | ||||
-rw-r--r-- | doc/reference/meson.build | 94 | ||||
-rw-r--r-- | doc/reference/version.xml.in | 1 | ||||
-rw-r--r-- | doc/reference/vte-docs.xml | 16 | ||||
-rw-r--r-- | doc/reference/vte-overrides.txt.in (renamed from doc/reference/vte-overrides.txt) | 0 | ||||
-rw-r--r-- | doc/reference/vte-sections.txt.in (renamed from doc/reference/vte-sections.txt) | 12 | ||||
-rw-r--r-- | doc/reference/vte.types.in (renamed from doc/reference/vte.types) | 0 |
9 files changed, 659 insertions, 92 deletions
diff --git a/doc/reference/Makefile.docs b/doc/reference/Makefile.docs new file mode 100644 index 00000000..7193bd16 --- /dev/null +++ b/doc/reference/Makefile.docs @@ -0,0 +1,518 @@ +# -*- mode: makefile -*- +# +# Copyright © 2020, 2021 Christian Persch +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +NULL = +V ?= 0 + +abs_srcdir ?= $(srcdir) +abs_builddir ?= $(builddir) +top_srcdir ?= $(abs_top_srcdir) +top_builddir ?= $(abs_top_builddir) + +datadir ?= /usr/share + +CPP = cpp +CPPFLAGS = + +GREP ?= grep +GREPFLAGS = + +LN_S = ln -s + +PACKAGE ?= vte +PACKAGE_BUGREPORT ?= https://gitlab.gnome.org/GNOME/vte/issues/ +PACKAGE_NAME ?= vte +PACKAGE_STRING ?= vte +PACKAGE_TARNAME ?= vte +PACKAGE_URL ?= https://gitlab.gnome.org/GNOME/vte/ +PACKAGE_VERSION ?= $(VERSION) + +DOC_MODULE = vte-gtk$(VTE_GTK) + +DOC_MODULE_VERSION = $(VTE_API_VERSION) + +DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml + +DOC_SOURCE_DIR = \ + $(top_srcdir)/src \ + $(top_srcdir)/src/vte \ + $(top_builddir)/src \ + $(top_builddir)/src/vte \ + $(NULL) + +SCANGOBJ_OPTIONS = + +SCAN_OPTIONS = \ + --deprecated-guards="VTE_DISABLE_DEPRECATED" \ + --ignore-decorators='_VTE_GNUC_NONNULL()|_VTE_PUBLIC|_VTE_DEPRECATED|_VTE_CXX_NOEXCEPT' \ + $(NULL) + +MKDB_OPTIONS = \ + --source-suffixes=c,cc,h,hh \ + --xml-mode \ + --output-format=xml \ + --name-space=vte \ + $(NULL) + +MKTMPL_OPTIONS = + +MKHTML_OPTIONS = \ + --path="$(abs_builddir)" \ + $(NULL) + +MKPDF_OPTIONS = \ + --path="$(abs_builddir)" \ + $(NULL) + +FIXXREF_OPTIONS = \ + --extra-dir=$(CAIRO_PREFIX)/share/gtk-doc/html/cairo \ + --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \ + --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \ + --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gio \ + --extra-dir=$(PANGO_PREFIX)/share/gtk-doc/html/pango \ + $(NULL) + +ifeq ($(VTE_GTK),3) +FIXXREF_OPTIONS += \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/gdk3 \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/gtk3 \ + $(NULL) +endif + +ifeq ($(VTE_GTK),4) +FIXXREF_OPTIONS += \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/graphene \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/gdk4 \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/gsk4 \ + --extra-dir=$(GTK_PREFIX)/share/gtk-doc/html/gtk4 \ + $(NULL) +endif + +HFILE_GLOB = \ + $(top_builddir)/src/vte/*.h \ + $(top_srcdir)/src/vte/*.h \ + $(NULL) + +CFILE_GLOB = \ + $(top_builddir)/src/*.c \ + $(top_srcdir)/src/*.c \ + $(top_srcdir)/src/*.cc \ + $(NULL) + +EXTRA_HFILES = + +IGNORE_HFILES = \ + buffer.h \ + caps.hh \ + cell.hh \ + config.h \ + debug.h \ + keymap.h \ + marshal.h \ + modes.hh \ + modes-ecma.hh \ + modes-private.hh \ + parser.hh \ + parser-arg.hh \ + parser-c01.hh \ + parser-charset.hh \ + parser-charset-tables.hh \ + parser-cmd.hh \ + parser-csi.hh \ + parser-dcs.hh \ + parser-esc.hh \ + parser-glue.hh \ + parser-osc.hh \ + parser-reply.hh \ + parser-string.hh \ + ring.hh \ + tabstops.hh \ + vteconv.h \ + vtedraw.h \ + vteinternal.hh \ + vterowdata.hh \ + vtestream-base.h \ + vtestream-file.h \ + vtestream.h \ + vtetypebuiltins.h \ + vteunistr.h \ + $(NULL) + +HTML_IMAGES = + +content_files = + +expand_content_files = + +GTKDOC_CFLAGS = \ + -DVTE_COMPILATION \ + $(shell pkg-config --cflags --libs glib-2.0 gobject-2.0) \ + $(NULL) + +VTE_LIB_PATH = $(shell dirname $(VTE_LIB)) + +ifeq ($(VTE_GTK),3) +VTE_LIB_NAME = vte-$(VTE_API_VERSION) +endif +ifeq ($(VTE_GTK),4) +VTE_LIB_NAME = vte-$(VTE_API_VERSION)-gtk4 +endif + +GTKDOC_LIBS = \ + -L$(VTE_LIB_PATH) -l$(VTE_LIB_NAME) \ + $(shell pkg-config --libs --libs glib-2.0 gobject-2.0) \ + $(NULL) + +# Rules for building gtk3/4 versions of the gtk-doc inputs + +AM_V_at = $(AM_V_at_$(V)) +AM_V_at_0 = @ +AM_V_at_1 = + +AM_V_GEN = $(AM_V_GEN_$(V)) +AM_V_GEN_0 = @echo " GEN " $@; +AM_V_GEN_1 = + +vte-gtk$(VTE_GTK)-sections.txt: $(srcdir)/../vte-sections.txt.in + $(AM_V_GEN)$(CPP) -E $(CPPFLAGS) -DVTE_GTK=$(VTE_GTK) $< | $(GREP) $(GREPFLAGS) -Ev '^\s*#|^$$' > $@ + +vte-gtk$(VTE_GTK)-overrides.txt: $(srcdir)/../vte-overrides.txt.in + $(AM_V_GEN)$(CPP) -E $(CPPFLAGS) -DVTE_GTK=$(VTE_GTK) $< | $(GREP) $(GREPFLAGS) -Ev '^\s*#|^$$' > $@ || true + +vte-gtk$(VTE_GTK).types: $(srcdir)/../vte.types.in + $(AM_V_GEN)$(CPP) -E -fpreprocessed $(CPPFLAGS) -DVTE_GTK=$(VTE_GTK) $< | $(GREP) $(GREPFLAGS) -Ev '^\s*#|^$$' > $@ + +$(DOC_MAIN_SGML_FILE): $(srcdir)/../vte-docs.xml + $(AM_V_GEN)cp -f $< $@ + +# The following is copied from gtk-doc, and adapted to work with +# plain make instead of requiring automake. +# +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +#################################### +# Everything below here is generic # +#################################### + +CC ?= cc +CFLAGS ?= + +INSTALL = install -c +INSTALL_DATA = $(INSTALL) -m 644 + +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(CPPFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(CFLAGS) $(LDFLAGS) +GTKDOC_RUN = + +GTKDOC_CHECK_PATH = gtkdoc-check +GTKDOC_REBASE = gtkdoc-rebase + +MKDIR_P ?= mkdir -p + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +HTML_DIR = $(datadir)/gtk-doc/html + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +SETUP_FILES = \ + $(content_files) \ + $(expand_content_files) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +SETUP_FILES_GENERATED = \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt \ + $(DOC_MODULE).types \ + $(DOC_MAIN_SGML_FILE) + +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + sgml.stamp html.stamp pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).actions \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +gtkdoc-check.test: + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test + +HTML_BUILD_STAMP=html-build.stamp +#PDF_BUILD_STAMP=pdf-build.stamp +PDF_BUILD_STAMP= + +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +all-local: all-gtk-doc + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +#### setup #### + +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; +GTK_DOC_V_SETUP_1= + +setup-build.stamp: $(SETUP_FILES_GENERATED) + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || $(MKDIR_P) "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ + fi + $(AM_V_at)touch setup-build.stamp + +#### scan #### + +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; +GTK_DOC_V_SCAN_1= + +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; +GTK_DOC_V_INTROSPECT_1= + +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" LD_LIBRARY_PATH="$(VTE_LIB_PATH)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + else \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + $(AM_V_at)touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp + @true + +#### xml #### + +GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_0=@echo " DOC Building XML"; +GTK_DOC_V_XML_1= + +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(DOC_MAIN_SGML_FILE) + $(GTK_DOC_V_XML)_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + $(AM_V_at)touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +xml/gtkdocentities.ent: + $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ + echo "<!ENTITY package \"$(PACKAGE)\">"; \ + echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \ + echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \ + echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \ + echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \ + echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \ + echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \ + ) > $@ + + +#### html #### + +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; +GTK_DOC_V_HTML_1= + +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; +GTK_DOC_V_XREF_1= + +GTKDOC_MKHTML = gtkdoc-mkhtml + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ + $(GTKDOC_MKHTML) 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ + $(GTKDOC_MKHTML) 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$$?" = "0"; then \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ + fi; \ + cd html && $(GTKDOC_MKHTML) $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + test -f $$file && cp $$file $(abs_builddir)/html; \ + done; + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp + +#### pdf #### + +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; +GTK_DOC_V_PDF_1= + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + $(AM_V_at)touch pdf-build.stamp + +############## + +clean-local: + @rm -f *~ *.bak + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ + rm -f $(DOC_MODULE)-sections.txt; \ + fi + +distclean-local: + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ + fi + +maintainer-clean-local: + @rm -rf xml html + +install-data-local: + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(MKDIR_P) $${installdir} ; \ + for i in $$installfiles; do \ + echo ' $(INSTALL_DATA) '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +dist-check-gtkdoc: docs + +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local + @$(MKDIR_P) $(distdir)/html + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs + +meson.stamp: docs + @touch meson.stamp diff --git a/doc/reference/gtk3/meson.build b/doc/reference/gtk3/meson.build new file mode 100644 index 00000000..f03b2580 --- /dev/null +++ b/doc/reference/gtk3/meson.build @@ -0,0 +1,55 @@ +# Copyright © 2020, 2021 Christian Persch +# +# 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 3 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, see <https://www.gnu.org/licenses/>. + +make_args_gtk3 = [ + '-f', meson.current_source_dir() / '..' / 'Makefile.docs', + '--directory', meson.current_build_dir(), + 'srcdir=' + meson.current_source_dir(), + 'builddir=' + meson.current_build_dir(), + 'abs_top_srcdir=' + meson.source_root(), + 'abs_top_builddir=' + meson.build_root(), + 'datadir=' + vte_prefix / vte_datadir, + 'CAIRO_PREFIX=' + cairo_dep.get_pkgconfig_variable('prefix'), + 'GLIB_PREFIX=' + glib_dep.get_pkgconfig_variable('prefix'), + 'GTK_PREFIX=' + gtk3_dep.get_pkgconfig_variable('prefix'), + 'PANGO_PREFIX=' + pango_dep.get_pkgconfig_variable('prefix'), + 'CC=' + ' '.join(cc.cmd_array()), + 'VERSION=' + meson.project_version(), + 'VTE_API_VERSION=' + vte_api_version, + 'VTE_GTK=3', + 'VTE_LIB=' + libvte_gtk3.full_path(), +] + +stamp = custom_target( + 'meson.stamp', + build_by_default: true, + capture: false, + command: [make] + make_args_gtk3 + [ + 'meson.stamp', + ], + depends: [ + libvte_gtk3, + ], + install: false, + output: 'meson.stamp', +) + +meson.add_install_script( + make, + make_args_gtk3, + 'install-data-local', +) + +# Unfortunately, there's no way to hook up the 'clean-local' target diff --git a/doc/reference/gtk4/meson.build b/doc/reference/gtk4/meson.build new file mode 100644 index 00000000..7f42e86f --- /dev/null +++ b/doc/reference/gtk4/meson.build @@ -0,0 +1,55 @@ +# Copyright © 2020, 2021 Christian Persch +# +# 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 3 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, see <https://www.gnu.org/licenses/>. + +make_args_gtk4 = [ + '-f', meson.current_source_dir() / '..' / 'Makefile.docs', + '--directory', meson.current_build_dir(), + 'srcdir=' + meson.current_source_dir(), + 'builddir=' + meson.current_build_dir(), + 'abs_top_srcdir=' + meson.source_root(), + 'abs_top_builddir=' + meson.build_root(), + 'datadir=' + vte_prefix / vte_datadir, + 'CAIRO_PREFIX=' + cairo_dep.get_pkgconfig_variable('prefix'), + 'GLIB_PREFIX=' + glib_dep.get_pkgconfig_variable('prefix'), + 'GTK_PREFIX=' + gtk4_dep.get_pkgconfig_variable('prefix'), + 'PANGO_PREFIX=' + pango_dep.get_pkgconfig_variable('prefix'), + 'CC=' + ' '.join(cc.cmd_array()), + 'VERSION=' + meson.project_version(), + 'VTE_API_VERSION=' + vte_api_version, + 'VTE_GTK=4', + 'VTE_LIB=' + libvte_gtk4.full_path(), +] + +stamp = custom_target( + 'meson.stamp', + build_by_default: true, + capture: false, + command: [make] + make_args_gtk4 + [ + 'meson.stamp', + ], + depends: [ + libvte_gtk4, + ], + install: false, + output: 'meson.stamp', +) + +meson.add_install_script( + make, + make_args_gtk4, + 'install-data-local', +) + +# Unfortunately, there's no way to hook up the 'clean-local' target diff --git a/doc/reference/meson.build b/doc/reference/meson.build index b47bc7ed..793bed5d 100644 --- a/doc/reference/meson.build +++ b/doc/reference/meson.build @@ -1,4 +1,4 @@ -# Copyright © 2018, 2019 Iñigo Martínez +# Copyright © 2021 Christian Persch # # 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 @@ -13,96 +13,18 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <https://www.gnu.org/licenses/>. -# Meson insufficiency! Would be so much easier to just make this -# (vte_gtk3_sources - vte_gtk3_public_headers).filter('.h'), but -# but there is no array subtraction or filtering. Or just allow listing the -# headers that we DO want to get scanned. -# So instead just list all the headers here again... :-( +# It turned out to be impossible to build gtk3 and gtk4 versions of the +# docs from the same source using meson's gnome.gtkdoc(). Instead, build +# using make with a gtk-doc.make-derived Makefile. -private_headers = [ - 'buffer.h', - 'caps.hh', - 'cell.hh', - 'config.h', - 'debug.h', - 'keymap.h', - 'marshal.h', - 'modes.hh', - 'modes-ecma.hh', - 'modes-private.hh', - 'parser.hh', - 'parser-arg.hh', - 'parser-c01.hh', - 'parser-charset.hh', - 'parser-charset-tables.hh', - 'parser-cmd.hh', - 'parser-csi.hh', - 'parser-dcs.hh', - 'parser-esc.hh', - 'parser-glue.hh', - 'parser-osc.hh', - 'parser-reply.hh', - 'parser-string.hh', - 'ring.hh', - 'tabstops.hh', - 'vteconv.h', - 'vtedraw.h', - 'vteinternal.hh', - 'vterowdata.hh', - 'vtestream-base.h', - 'vtestream-file.h', - 'vtestream.h', - 'vtetypebuiltins.h', - 'vteunistr.h', -] +make = find_program('gmake', 'make') -scan_args = [ - '--deprecated-guards="VTE_DISABLE_DEPRECATED"', - '--ignore-decorators=_VTE_GNUC_NONNULL\s*\([^)]*\)|_VTE_CXX_NOEXCEPT', -] - -glib_prefix = glib_dep.get_pkgconfig_variable('prefix') - -version_conf = configuration_data() -version_conf.set('VERSION', vte_version) - -content_files = configure_file( - input: 'version.xml.in', - output: '@BASENAME@', - configuration: version_conf -) +cairo_dep = dependency('cairo') if get_option('gtk3') - gtk3_prefix = gtk3_dep.get_pkgconfig_variable('prefix') - - fixxref_args = [ - '--html-dir=' + (vte_prefix / gnome.gtkdoc_html_dir(vte_gtk3_api_name)), - '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')), - '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('gio')), - '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gdk')), - '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gdk-pixbuf')), - '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gtk')), - ] - - gnome.gtkdoc( - 'vte', - main_xml: 'vte-docs.xml', - module_version: vte_api_version, - src_dir: [src_inc, vte_inc], - ignore_headers: private_headers, - include_directories: top_inc, - dependencies: libvte_gtk3_dep, - c_args: '-DVTE_COMPILATION', - namespace: 'vte', - scan_args: scan_args, - mkdb_args: '--source-suffixes=h,hh,c,cc', - fixxref_args: fixxref_args, - gobject_typesfile: 'vte.types', - content_files: content_files, - install: true, - ) + subdir('gtk3') endif if get_option('gtk4') - assert(false, 'not yet supported') + subdir('gtk4') endif diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in deleted file mode 100644 index d78bda93..00000000 --- a/doc/reference/version.xml.in +++ /dev/null @@ -1 +0,0 @@ -@VERSION@ diff --git a/doc/reference/vte-docs.xml b/doc/reference/vte-docs.xml index e3cd5180..0479d58c 100644 --- a/doc/reference/vte-docs.xml +++ b/doc/reference/vte-docs.xml @@ -1,7 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ -<!ENTITY version SYSTEM "version.xml"> + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +[ + <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent"> + %gtkdocentities; ]> <book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> <!-- @@ -24,9 +26,9 @@ <bookinfo> <title>VTE Reference Manual</title> <releaseinfo> - Documentation for VTE version &version;. + Documentation for VTE version &package_version;. The latest version of this documentation can be found on-line at the - <ulink role="online-location" url="http://library.gnome.org/devel/vte/">GNOME Library</ulink>. + <ulink role="online-location" url="https://library.gnome.org/devel/vte/">GNOME Library</ulink>. </releaseinfo> <copyright> @@ -133,8 +135,12 @@ <title>Index of new symbols in 0.64</title> <xi:include href="xml/api-index-0.64.xml"><xi:fallback /></xi:include> </index> + <index id="api-index-0-66" role="0.66"> + <title>Index of new symbols in 0.66</title> + <xi:include href="xml/api-index-0.66.xml"><xi:fallback /></xi:include> + </index> - <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> + <xi:include href="xml/annotation-glossary.xml"></xi:include> <appendix id="licence"> <title>Licence</title> diff --git a/doc/reference/vte-overrides.txt b/doc/reference/vte-overrides.txt.in index e69de29b..e69de29b 100644 --- a/doc/reference/vte-overrides.txt +++ b/doc/reference/vte-overrides.txt.in diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt.in index c69181da..84afe8c3 100644 --- a/doc/reference/vte-sections.txt +++ b/doc/reference/vte-sections.txt.in @@ -71,12 +71,16 @@ vte_terminal_reset vte_terminal_get_text vte_terminal_get_text_range vte_terminal_get_cursor_position +#if VTE_GTK == 3 vte_terminal_hyperlink_check_event +#endif vte_terminal_match_add_regex vte_terminal_match_remove vte_terminal_match_remove_all vte_terminal_match_check +#if VTE_GTK == 3 vte_terminal_match_check_event +#endif vte_terminal_match_set_cursor_name vte_terminal_set_cjk_ambiguous_width vte_terminal_get_cjk_ambiguous_width @@ -93,8 +97,10 @@ vte_terminal_search_get_regex vte_terminal_search_get_wrap_around vte_terminal_search_set_regex vte_terminal_search_set_wrap_around +#if VTE_GTK == 3 vte_terminal_event_check_regex_array vte_terminal_event_check_regex_simple +#endif /* VTE_GTK */ <SUBSECTION> VteFeatureFlags @@ -113,9 +119,11 @@ vte_terminal_set_pty vte_terminal_pty_new_sync vte_terminal_watch_child +#if VTE_GTK == 3 <SUBSECTION> vte_terminal_set_clear_background vte_terminal_get_color_background_for_draw +#endif /* VTE_GTK == 3 */ <SUBSECTION Standard> VTE_TYPE_CURSOR_BLINK_MODE @@ -150,14 +158,18 @@ vte_terminal_get_current_file_uri <SUBSECTION Deprecated> vte_terminal_copy_clipboard vte_terminal_match_set_cursor +#if VTE_GTK == 3 vte_terminal_match_set_cursor_type vte_terminal_match_add_gregex vte_terminal_search_get_gregex vte_terminal_search_set_gregex vte_terminal_event_check_gregex_simple +#endif /* VTE_GTK == 3 */ vte_terminal_spawn_sync +#if VTE_GTK == 3 vte_terminal_get_geometry_hints vte_terminal_set_geometry_hints_for_window +#endif /* VTE_GTK == 3 */ vte_terminal_get_icon_title vte_terminal_set_encoding vte_terminal_get_encoding diff --git a/doc/reference/vte.types b/doc/reference/vte.types.in index d7db2a09..d7db2a09 100644 --- a/doc/reference/vte.types +++ b/doc/reference/vte.types.in |