[geany/geany] c3c67c: doc: Generate geany-sciwrappers-gtkdoc.h along geany-gtkdoc.h
Thomas Martitz
git-noreply at xxxxx
Wed Mar 9 22:42:09 UTC 2016
Branch: refs/heads/master
Author: Thomas Martitz <kugel at rockbox.org>
Committer: Thomas Martitz <kugel at rockbox.org>
Date: Wed, 09 Mar 2016 22:42:09 UTC
Commit: c3c67c96d44009a3a1c5a9e1d70b778002d5f847
https://github.com/geany/geany/commit/c3c67c96d44009a3a1c5a9e1d70b778002d5f847
Log Message:
-----------
doc: Generate geany-sciwrappers-gtkdoc.h along geany-gtkdoc.h
geany-sciwrappers-gtkdoc.h contains all scintilla_object_* methods. It is
intended that they are going to be exposed through a separate .gir file,
therefore a separate header makes things easier.
This is useful when you want scintlla-related stuff in a separate .gir file or
oarse it specially otherwise.
gen-api-gtkdoc.py: Add switch to write out scintilla_object methods
Modified Paths:
--------------
.gitignore
doc/Doxyfile.in
doc/Makefile.am
scripts/gen-api-gtkdoc.py
Modified: .gitignore
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -112,6 +112,7 @@ Makefile.in
/doc/*.toc
/doc/reference
/doc/geany-gtkdoc.h
+/doc/geany-sciwrappers-gtkdoc.h
/doc/xml/
#-----------------------------------------------------------------------
Modified: doc/Doxyfile.in
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -850,7 +850,8 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = @top_srcdir@/doc/geany-gtkdoc.h
+EXCLUDE = @top_srcdir@/doc/geany-gtkdoc.h \
+ @top_srcdir@/doc/geany-sciwrappers-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
Modified: doc/Makefile.am
11 lines changed, 7 insertions(+), 4 deletions(-)
===================================================================
@@ -129,16 +129,19 @@ Doxyfile-gi.stamp: Doxyfile-gi Doxyfile.stamp $(doxygen_sources)
$(AM_V_GEN)$(DOXYGEN) Doxyfile-gi && echo "" > $@
geany-gtkdoc.h: Doxyfile-gi.stamp $(top_srcdir)/scripts/gen-api-gtkdoc.py
- $(AM_V_GEN)$(top_srcdir)/scripts/gen-api-gtkdoc.py xml -d $(builddir) -o $@
+ $(AM_V_GEN)$(top_srcdir)/scripts/gen-api-gtkdoc.py xml -d $(builddir) -o $@ \
+ --sci-output geany-sciwrappers-gtkdoc.h
+
+geany-sciwrappers-gtkdoc.h: geany-gtkdoc.h
geany_gtkdocincludedir = $(includedir)/geany/gtkdoc
-nodist_geany_gtkdocinclude_HEADERS = geany-gtkdoc.h
+nodist_geany_gtkdocinclude_HEADERS = geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
-ALL_LOCAL_TARGETS += geany-gtkdoc.h
+ALL_LOCAL_TARGETS += geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
CLEAN_LOCAL_TARGETS += clean-gtkdoc-header-local
clean-gtkdoc-header-local:
- -rm -rf xml/ Doxyfile-gi Doxyfile-gi.stamp geany-gtkdoc.h
+ -rm -rf xml/ Doxyfile-gi Doxyfile-gi.stamp geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
endif
Modified: scripts/gen-api-gtkdoc.py
24 lines changed, 24 insertions(+), 0 deletions(-)
===================================================================
@@ -341,6 +341,7 @@ def from_memberdef(xml):
def main(args):
xml_dir = None
outfile = None
+ scioutfile = None
parser = OptionParser(usage="usage: %prog [options] XML_DIR")
parser.add_option("--xmldir", metavar="DIRECTORY", help="Path to Doxygen-generated XML files",
@@ -349,6 +350,8 @@ def main(args):
action="store", dest="outdir", default=".")
parser.add_option("-o", "--output", metavar="FILE", help="Write output to FILE",
action="store", dest="outfile")
+ parser.add_option("--sci-output", metavar="FILE", help="Write output to FILE (only sciwrappers)",
+ action="store", dest="scioutfile")
opts, args = parser.parse_args(args[1:])
xml_dir = args[0]
@@ -397,11 +400,25 @@ def main(args):
else:
outfile = sys.stdout
+ if (opts.scioutfile):
+ try:
+ scioutfile = open(opts.scioutfile, "w+")
+ except OSError as err:
+ sys.stderr.write("failed to open \"%s\" for writing (%s)\n" % (opts.scioutfile, err.strerror))
+ return 1
+ else:
+ scioutfile = outfile
+
try:
outfile.write("/*\n * Automatically generated file - do not edit\n */\n\n")
outfile.write("#include \"gtkcompat.h\"\n")
outfile.write("#include \"Scintilla.h\"\n")
outfile.write("#include \"ScintillaWidget.h\"\n")
+ if (scioutfile != outfile):
+ scioutfile.write("/*\n * Automatically generated file - do not edit\n */\n\n")
+ scioutfile.write("#include \"gtkcompat.h\"\n")
+ scioutfile.write("#include \"Scintilla.h\"\n")
+ scioutfile.write("#include \"ScintillaWidget.h\"\n")
# write enums first, so typedefs to them are valid (as forward enum declaration
# is invalid). It's fine as an enum can't contain reference to other types.
@@ -423,6 +440,13 @@ def main(args):
outfile.write(e.to_gtkdoc())
outfile.write(e.definition)
outfile.write("\n\n")
+ if (e.name.startswith("sci_")):
+ if (scioutfile != outfile):
+ scioutfile.write("\n\n")
+ scioutfile.write(e.to_gtkdoc())
+ scioutfile.write(e.definition)
+ scioutfile.write("\n\n")
+
except BrokenPipeError:
# probably piped to head or tail
return 0
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list