Kaydet (Commit) 658821d2 authored tarafından Thomas Martitz's avatar Thomas Martitz

api: add script to generate {geany,geany-scintilla}-gtkdoc.h

The script reads the doxygen xml output and generates two headers (optionally
a single header) that contains all of the plugin API in gtk-doc format.

Two headers because it's preferrable to group Scintilla related stuff
into its own namespace. This is a lot easier if g-ir-scanner can
work with a separate header file. If we change minds later on the script is
prepared to generate only one header.
üst bfa09464
......@@ -123,6 +123,7 @@ AC_SUBST([pkgdatadir])
# Documentation tools
GEANY_CHECK_DOCUTILS
GEANY_CHECK_DOXYGEN
GEANY_CHECK_PYTHON
# libgeany
GEANY_LIB_INIT
......
......@@ -845,7 +845,8 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
EXCLUDE = @top_srcdir@/doc/geany-gtkdoc.h \
@top_srcdir@/doc/geany-scintilla-gtkdoc.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
......
......@@ -104,19 +104,39 @@ doxygen_sources = \
# for xml output
Doxyfile-gi: Doxyfile
$(AM_V_GEN)$(SED) \
-e 's,addtogir=@internal,addtogir=,' \
-e 's,^\(GENERATE_HTML.*\)YES,\1NO,' \
-e 's,^\(GENERATE_XML.*\)NO,\1YES,' \
-e 's,^\(WARN_IF_UNDOCUMENTED.*\)YES,\1NO,' \
-e 's,^\(SORT_MEMBER_DOCS.*\)YES,\1NO,' \
-e 's,^\(SORT_BRIEF_DOCS.*\)YES,\1NO,' \
$< > $@ || { $(RM) $@ && exit 1; }
Doxyfile.stamp: Doxyfile Doxyfile-gi $(doxygen_sources)
$(AM_V_GEN)$(DOXYGEN) Doxyfile-gi && $(DOXYGEN) Doxyfile && echo "" > $@
all-local: Doxyfile.stamp
ALL_TARGETS = Doxyfile.stamp
if WITH_PYTHON
geany-scintilla-gtkdoc.h: geany-gtkdoc.h
geany-gtkdoc.h: Doxyfile.stamp $(top_srcdir)/scripts/gen-api-gtkdoc.py
$(AM_V_GEN)$(top_srcdir)/scripts/gen-api-gtkdoc.py xml -d $(builddir) \
-o geany-gtkdoc.h --sci-output geany-scintilla-gtkdoc.h
ALL_TARGETS += geany-gtkdoc.h geany-scintilla-gtkdoc.h
geany_includedir = $(includedir)/geany/gtkdoc
geany_include_HEADERS = geany-gtkdoc.h geany-scintilla-gtkdoc.h
endif
all-local: $(ALL_TARGETS)
clean-local: clean-api-docs-local
clean-api-docs-local:
-rm -rf reference/ xml/ Doxyfile.stamp doxygen_*
-rm -rf reference/ xml/ doxygen_* $(ALL_TARGETS)
endif
......
......@@ -70,3 +70,16 @@ AC_DEFUN([GEANY_CHECK_DOCUTILS_PDF],
AM_CONDITIONAL([WITH_RST2PDF], [test "x$geany_enable_pdf_docs" != "xno"])
GEANY_STATUS_ADD([Build PDF documentation], [$geany_enable_pdf_docs])
])
dnl
dnl GEANY_CHECK_PYTHON
dnl For gtkdoc header generation
dnl
AC_DEFUN([GEANY_CHECK_PYTHON],
[
AM_PATH_PYTHON([2.7], [], [])
AM_CONDITIONAL([WITH_PYTHON], [test -n "$PYTHON"])
AM_COND_IF([WITH_PYTHON],
[GEANY_STATUS_ADD([Using Python version], [$PYTHON_VERSION])])
])
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment