diff options
author | mattdangerw <mattdangerw@gmail.com> | 2013-05-07 18:02:40 -0700 |
---|---|---|
committer | mattdangerw <mattdangerw@gmail.com> | 2013-05-07 18:02:40 -0700 |
commit | 55be2cb2bd90e55832af798c05e699c99fc3d38f (patch) | |
tree | 86648ede30c6f7662d6f2602967c384b0cfca5f4 | |
parent | 9405254d99d849d4ca9856e032244d1de22071f6 (diff) | |
parent | 7c5f7963dae6a6e9f9b1dec70b235fc78d465d77 (diff) |
Merge pull request #71 from endlessm/issues/18
Build Javascript API documentation
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile.am | 30 | ||||
-rw-r--r-- | configure.ac | 19 |
3 files changed, 50 insertions, 2 deletions
@@ -87,6 +87,9 @@ stamp* /gtk-doc.make /m4/gtk-doc.m4 +# Autogenerated gir-doc +/docs/reference/endless-js + # Packages *.egg *.egg-info diff --git a/Makefile.am b/Makefile.am index b9c1b1f..a9f56f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,9 +21,9 @@ EXTRA_DIST = @EOS_SDK_API_NAME@.pc.in DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ AM_CFLAGS = @STRICT_CFLAGS@ -# Make sure to run Gtk-doc tests and build the introspection files when doing +# Make sure to run Gtk-doc tests and build the documentation when doing # 'make distcheck' -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-gir-doc # Generated files that 'make clean' should erase CLEANFILES = @@ -80,6 +80,32 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) endif +# # # GOBJECT INTROSPECTION DOCUMENTATION # # # + +if ENABLE_GIR_DOC + +docs/reference/endless-js/index.page: $(INTROSPECTION_GIRS) + $(MKDIR_P) $(@D) + g-ir-doc-tool -o $(@D) -l gjs $< + +docs/reference/endless-js/html/index.html: docs/reference/endless-js/index.page + $(MKDIR_P) $(@D) + yelp-build html -o $(@D) $(<D) + +all-local: docs/reference/endless-js/html/index.html + +EXTRA_DIST += \ + docs/reference/endless-js/html/*.html \ + docs/reference/endless-js/html/*.css \ + docs/reference/endless-js/html/*.js + +CLEANFILES += \ + docs/reference/endless-js/*.page \ + docs/reference/endless-js/html/*.html \ + docs/reference/endless-js/html/*.css \ + docs/reference/endless-js/html/*.js +endif + # # # TESTS # # # include $(top_srcdir)/test/Makefile.am diff --git a/configure.ac b/configure.ac index 301b78f..2841fa8 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,8 @@ AS_ALL_LINGUAS # Required build tools # -------------------- +# Make sure we can create directory hierarchies +AC_PROG_MKDIR_P # C compiler AC_PROG_CC # Make sure the C compiler supports per-target CFLAGS @@ -107,6 +109,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1]) GTK_DOC_CHECK([1.18], [--flavour no-tmpl]) # GObject Introspection GOBJECT_INTROSPECTION_REQUIRE([1.30]) +# Various tools +AC_PATH_PROG([GIRDOCTOOL], [g-ir-doc-tool], [notfound]) +AC_ARG_VAR([GIRDOCTOOL], [Path to g-ir-doc-tool]) +AC_PATH_PROG([YELPBUILD], [yelp-build], [notfound]) +AC_ARG_VAR([YELPBUILD], [Path to yelp-build]) AC_CACHE_SAVE @@ -153,6 +160,18 @@ dnl Strip leading spaces STRICT_CFLAGS=${STRICT_CFLAGS#* } AC_SUBST(STRICT_CFLAGS) +# --enable-gir-doc: Build GIR documentation for Javascript. Done automatically +# during 'make distcheck'. +AC_ARG_ENABLE([gir-doc], + [AS_HELP_STRING([--enable-gir-doc], + [Build GIR documentation for Javascript @<:@default=no@:>@])]) +AS_IF([test "x$enable_gir_doc" = "xyes"], [ + AS_IF([test "x$GIRDOCTOOL" = "xnotfound"], + [AC_MSG_ERROR([g-ir-doc-tool must be installed for --enable-gir-doc])]) + AS_IF([test "x$YELPBUILD" = "xnotfound"], + [AC_MSG_ERROR([yelp-build must be installed for --enable-gir-doc])])]) +AM_CONDITIONAL([ENABLE_GIR_DOC], [test "x$enable_gir_doc" = "xyes"]) + # Required libraries # ------------------ PKG_CHECK_MODULES([EOS_SDK], [ |