diff --git a/.travis.yml b/.travis.yml index a7285aeca..82c4ecbe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ compiler: - clang - gcc install: - - sudo apt-get install pkg-config ragel # for autogen.sh - - sudo apt-get install libfreetype6-dev # for font functions - - sudo apt-get install libglib2.0-dev # for font functions / tests / utils - - sudo apt-get install libcairo2-dev # for utils - - sudo apt-get install libicu-dev # for extra unicode functions + - sudo apt-get install pkg-config ragel gtk-doc-tools # for autogen.sh + - sudo apt-get install libfreetype6-dev # for font functions + - sudo apt-get install libglib2.0-dev # for font functions / tests / utils + - sudo apt-get install libcairo2-dev # for utils + - sudo apt-get install libicu-dev # for extra unicode functions script: ./autogen.sh && make && make check notifications: irc: "irc.freenode.org#harfbuzz" diff --git a/Makefile.am b/Makefile.am index dd1460c10..43a1aaa31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ NULL = ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src util test +SUBDIRS = src util test docs EXTRA_DIST = \ autogen.sh \ @@ -46,6 +46,11 @@ $(srcdir)/ChangeLog: # Release engineering # +DISTCHECK_CONFIGURE_FLAGS = \ + --enable-gtk-doc \ + --disable-doc-cross-references \ + $(NULL) + # TODO: Copy infrastructure from cairo TAR_OPTIONS = --owner=0 --group=0 diff --git a/autogen.sh b/autogen.sh index 833a6219c..42e69d063 100755 --- a/autogen.sh +++ b/autogen.sh @@ -19,6 +19,13 @@ which pkg-config || { exit 1 } +echo -n "checking for gtkdocize... " +which gtkdocize || { + echo "*** No gtkdocize found, please install it ***" + exit 1 +} +gtkdocize || exit 1 + echo -n "checking for autoreconf... " which autoreconf || { echo "*** No autoreconf found, please install it ***" diff --git a/configure.ac b/configure.ac index 015ab9e4b..4fc1e6fa5 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age AC_SUBST(HB_LIBTOOL_VERSION_INFO) dnl GOBJECT_INTROSPECTION_CHECK([0.9.0]) -dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) +GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) # Functions and headers AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty) @@ -379,6 +379,8 @@ util/Makefile test/Makefile test/api/Makefile test/shaping/Makefile +docs/Makefile +docs/reference/Makefile ]) AC_OUTPUT @@ -406,4 +408,7 @@ Test / platform shapers (not normally needed): ICU Layout Engine: ${have_icu_le} Old HarfBuzz: ${have_hb_old} Uniscribe: ${have_uniscribe} + +Documentation: + Referece docs: ${enable_gtk_doc} ]) diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 000000000..f3ddc22dd --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = reference diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am new file mode 100644 index 000000000..1e1b5e7c4 --- /dev/null +++ b/docs/reference/Makefile.am @@ -0,0 +1,109 @@ +## Process this file with automake to produce Makefile.in + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE=harfbuzz + +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=$(HB_VERSION_MAJOR) + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml + +# Directories containing the source code. +# gtk-doc will search all .c and .h files beneath these paths +# for inline comments documenting functions and macros. +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk +DOC_SOURCE_DIR=$(top_srcdir)/src + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS= + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS=--rebuild-types + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS=--xml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS= + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS= + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS= + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB=$(top_srcdir)/src/hb.h $(top_srcdir)/src/hb-*.h +CFILE_GLOB=$(top_srcdir)/src/hb-*.cc + +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES=$(top_builddir)/src/hb-version.h + +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code +IGNORE_HFILES=`cd $(top_srcdir)/src; find . -path './hb-*/*.h' | sed 's@^.*/@@'` + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES= + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files= \ + version.xml \ + $(NULL) + +version.xml: $(top_srcdir)/configure.ac + echo $(HB_VERSION_MAJOR).$(HB_VERSION_MINOR).$(HB_VERSION_MICRO) > $@ + +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files= + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS= +GTKDOC_LIBS= + +# This includes the standard gtk-doc make rules, copied by gtkdocize. +include $(top_srcdir)/gtk-doc.make + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST += + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +if ENABLE_GTK_DOC +TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) +#TESTS = $(GTKDOC_CHECK) +endif + +-include $(top_srcdir)/git.mk diff --git a/docs/reference/harfbuzz-docs.xml b/docs/reference/harfbuzz-docs.xml new file mode 100644 index 000000000..e3d4e0a10 --- /dev/null +++ b/docs/reference/harfbuzz-docs.xml @@ -0,0 +1,61 @@ + + + +]> + + + HarfBuzz Reference Manual + + for HarfBuzz &version;. + + + + + + [Insert title here] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Object Hierarchy + + + + API Index + + + + Index of deprecated API + + + + + diff --git a/docs/reference/harfbuzz-overrides.txt b/docs/reference/harfbuzz-overrides.txt new file mode 100644 index 000000000..e69de29bb diff --git a/docs/reference/harfbuzz-sections.txt b/docs/reference/harfbuzz-sections.txt new file mode 100644 index 000000000..3ba4b0cef --- /dev/null +++ b/docs/reference/harfbuzz-sections.txt @@ -0,0 +1,431 @@ +
+hb + +HB_H_IN +
+ +
+hb-blob +hb_blob_create +hb_blob_create_sub_blob +hb_blob_destroy +hb_blob_get_data +hb_blob_get_data_writable +hb_blob_get_empty +hb_blob_get_length +hb_blob_get_user_data +hb_blob_is_immutable +hb_blob_make_immutable +hb_blob_reference +hb_blob_set_user_data +hb_blob_t +hb_memory_mode_t +
+ +
+hb-buffer +HB_SEGMENT_PROPERTIES_DEFAULT +hb_buffer_add +hb_buffer_add_utf16 +hb_buffer_add_utf32 +hb_buffer_add_utf8 +hb_buffer_allocation_successful +hb_buffer_clear_contents +hb_buffer_content_type_t +hb_buffer_create +hb_buffer_deserialize_glyphs +hb_buffer_destroy +hb_buffer_flags_t +hb_buffer_get_content_type +hb_buffer_get_direction +hb_buffer_get_empty +hb_buffer_get_flags +hb_buffer_get_glyph_infos +hb_buffer_get_glyph_positions +hb_buffer_get_language +hb_buffer_get_length +hb_buffer_get_script +hb_buffer_get_segment_properties +hb_buffer_get_unicode_funcs +hb_buffer_get_user_data +hb_buffer_guess_segment_properties +hb_buffer_normalize_glyphs +hb_buffer_pre_allocate +hb_buffer_reference +hb_buffer_reset +hb_buffer_reverse +hb_buffer_reverse_clusters +hb_buffer_serialize_flags_t +hb_buffer_serialize_format_from_string +hb_buffer_serialize_format_t +hb_buffer_serialize_format_to_string +hb_buffer_serialize_glyphs +hb_buffer_serialize_list_formats +hb_buffer_set_content_type +hb_buffer_set_direction +hb_buffer_set_flags +hb_buffer_set_language +hb_buffer_set_length +hb_buffer_set_script +hb_buffer_set_segment_properties +hb_buffer_set_unicode_funcs +hb_buffer_set_user_data +hb_buffer_t +hb_glyph_info_t +hb_glyph_position_t +hb_segment_properties_equal +hb_segment_properties_hash +hb_segment_properties_t +
+ +
+hb-common +HB_DIRECTION_REVERSE +HB_LANGUAGE_INVALID +HB_TAG +HB_TAG_NONE +HB_UNTAG +hb_bool_t +hb_codepoint_t +hb_destroy_func_t +hb_direction_from_string +hb_direction_t +hb_direction_to_string +hb_language_from_string +hb_language_get_default +hb_language_t +hb_language_to_string +hb_mask_t +hb_position_t +hb_script_from_iso15924_tag +hb_script_from_string +hb_script_get_horizontal_direction +hb_script_t +hb_script_to_iso15924_tag +hb_tag_from_string +hb_tag_t +hb_tag_to_string +hb_user_data_key_t +hb_var_int_t +HB_DIRECTION_IS_BACKWARD +HB_DIRECTION_IS_FORWARD +HB_DIRECTION_IS_HORIZONTAL +HB_DIRECTION_IS_VALID +HB_DIRECTION_IS_VERTICAL + +HB_BEGIN_DECLS +HB_END_DECLS +int16_t +int32_t +int64_t +int8_t +uint16_t +uint32_t +uint64_t +uint8_t +
+ +
+hb-coretext +hb_coretext_face_get_cg_font +hb_coretext_font_get_ct_font +
+ +
+hb-font +hb_face_create +hb_face_create_for_tables +hb_face_destroy +hb_face_get_empty +hb_face_get_glyph_count +hb_face_get_index +hb_face_get_upem +hb_face_get_user_data +hb_face_is_immutable +hb_face_make_immutable +hb_face_reference +hb_face_reference_blob +hb_face_reference_table +hb_face_set_glyph_count +hb_face_set_index +hb_face_set_upem +hb_face_set_user_data +hb_face_t +hb_font_add_glyph_origin_for_direction +hb_font_create +hb_font_create_sub_font +hb_font_destroy +hb_font_funcs_create +hb_font_funcs_destroy +hb_font_funcs_get_empty +hb_font_funcs_get_user_data +hb_font_funcs_is_immutable +hb_font_funcs_make_immutable +hb_font_funcs_reference +hb_font_funcs_set_glyph_contour_point_func +hb_font_funcs_set_glyph_extents_func +hb_font_funcs_set_glyph_from_name_func +hb_font_funcs_set_glyph_func +hb_font_funcs_set_glyph_h_advance_func +hb_font_funcs_set_glyph_h_kerning_func +hb_font_funcs_set_glyph_h_origin_func +hb_font_funcs_set_glyph_name_func +hb_font_funcs_set_glyph_v_advance_func +hb_font_funcs_set_glyph_v_kerning_func +hb_font_funcs_set_glyph_v_origin_func +hb_font_funcs_set_user_data +hb_font_funcs_t +hb_font_get_empty +hb_font_get_face +hb_font_get_glyph +hb_font_get_glyph_advance_for_direction +hb_font_get_glyph_advance_func_t +hb_font_get_glyph_contour_point +hb_font_get_glyph_contour_point_for_origin +hb_font_get_glyph_contour_point_func_t +hb_font_get_glyph_extents +hb_font_get_glyph_extents_for_origin +hb_font_get_glyph_extents_func_t +hb_font_get_glyph_from_name +hb_font_get_glyph_from_name_func_t +hb_font_get_glyph_func_t +hb_font_get_glyph_h_advance +hb_font_get_glyph_h_advance_func_t +hb_font_get_glyph_h_kerning +hb_font_get_glyph_h_kerning_func_t +hb_font_get_glyph_h_origin +hb_font_get_glyph_h_origin_func_t +hb_font_get_glyph_kerning_for_direction +hb_font_get_glyph_kerning_func_t +hb_font_get_glyph_name +hb_font_get_glyph_name_func_t +hb_font_get_glyph_origin_for_direction +hb_font_get_glyph_origin_func_t +hb_font_get_glyph_v_advance +hb_font_get_glyph_v_advance_func_t +hb_font_get_glyph_v_kerning +hb_font_get_glyph_v_kerning_func_t +hb_font_get_glyph_v_origin +hb_font_get_glyph_v_origin_func_t +hb_font_get_parent +hb_font_get_ppem +hb_font_get_scale +hb_font_get_user_data +hb_font_glyph_from_string +hb_font_glyph_to_string +hb_font_is_immutable +hb_font_make_immutable +hb_font_reference +hb_font_set_funcs +hb_font_set_funcs_data +hb_font_set_ppem +hb_font_set_scale +hb_font_set_user_data +hb_font_subtract_glyph_origin_for_direction +hb_font_t +hb_reference_table_func_t +
+ +
+hb-ft +hb_ft_face_create +hb_ft_face_create_cached +hb_ft_font_create +hb_ft_font_get_face +hb_ft_font_set_funcs +
+ +
+hb-glib +hb_glib_get_unicode_funcs +hb_glib_script_from_script +hb_glib_script_to_script +
+ +
+hb-gobject + +
+ +
+hb-graphite2 +HB_GRAPHITE2_TAG_SILF +hb_graphite2_face_get_gr_face +hb_graphite2_font_get_gr_font +
+ +
+hb-icu +hb_icu_get_unicode_funcs +hb_icu_script_from_script +hb_icu_script_to_script +
+ +
+hb-ot +hb_ot_shape_glyphs_closure + +HB_OT_H_IN +
+ +
+hb-ot-layout +HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX +HB_OT_LAYOUT_NO_FEATURE_INDEX +HB_OT_LAYOUT_NO_SCRIPT_INDEX +HB_OT_TAG_GDEF +HB_OT_TAG_GPOS +HB_OT_TAG_GSUB +Xhb_ot_layout_lookup_enumerate_sequences +Xhb_ot_layout_lookup_position +Xhb_ot_layout_lookup_substitute +hb_ot_layout_collect_lookups +hb_ot_layout_feature_get_lookups +hb_ot_layout_get_attach_points +hb_ot_layout_get_glyph_class +hb_ot_layout_get_glyphs_in_class +hb_ot_layout_get_ligature_carets +hb_ot_layout_get_size_params +hb_ot_layout_glyph_class_t +hb_ot_layout_glyph_sequence_func_t +hb_ot_layout_has_glyph_classes +hb_ot_layout_has_positioning +hb_ot_layout_has_substitution +hb_ot_layout_language_find_feature +hb_ot_layout_language_get_feature_indexes +hb_ot_layout_language_get_feature_tags +hb_ot_layout_language_get_required_feature_index +hb_ot_layout_lookup_collect_glyphs +hb_ot_layout_lookup_substitute_closure +hb_ot_layout_lookup_would_substitute +hb_ot_layout_script_find_language +hb_ot_layout_script_get_language_tags +hb_ot_layout_table_choose_script +hb_ot_layout_table_find_script +hb_ot_layout_table_get_feature_tags +hb_ot_layout_table_get_script_tags +hb_ot_shape_plan_collect_lookups +
+ +
+hb-ot-tag +HB_OT_TAG_DEFAULT_LANGUAGE +HB_OT_TAG_DEFAULT_SCRIPT +hb_ot_tag_from_language +hb_ot_tag_to_language +hb_ot_tag_to_script +hb_ot_tags_from_script +
+ +
+hb-set +hb_set_add +hb_set_add_range +hb_set_allocation_successful +hb_set_clear +hb_set_create +hb_set_del +hb_set_del_range +hb_set_destroy +hb_set_get_empty +hb_set_get_max +hb_set_get_min +hb_set_get_population +hb_set_get_user_data +hb_set_has +hb_set_intersect +hb_set_invert +hb_set_is_empty +hb_set_is_equal +hb_set_next +hb_set_next_range +hb_set_reference +hb_set_set +hb_set_set_user_data +hb_set_subtract +hb_set_symmetric_difference +hb_set_t +hb_set_union +
+ +
+hb-shape +hb_feature_from_string +hb_feature_t +hb_feature_to_string +hb_shape +hb_shape_full +hb_shape_list_shapers +
+ +
+hb-shape-plan +hb_shape_plan_create +hb_shape_plan_create_cached +hb_shape_plan_destroy +hb_shape_plan_execute +hb_shape_plan_get_empty +hb_shape_plan_get_shaper +hb_shape_plan_get_user_data +hb_shape_plan_reference +hb_shape_plan_set_user_data +hb_shape_plan_t +
+ +
+hb-unicode +HB_UNICODE_MAX_DECOMPOSITION_LEN +hb_unicode_combining_class +hb_unicode_combining_class_func_t +hb_unicode_combining_class_t +hb_unicode_compose +hb_unicode_compose_func_t +hb_unicode_decompose +hb_unicode_decompose_compatibility +hb_unicode_decompose_func_t +hb_unicode_eastasian_width +hb_unicode_funcs_create +hb_unicode_funcs_destroy +hb_unicode_funcs_get_default +hb_unicode_funcs_get_empty +hb_unicode_funcs_get_parent +hb_unicode_funcs_get_user_data +hb_unicode_funcs_is_immutable +hb_unicode_funcs_make_immutable +hb_unicode_funcs_reference +hb_unicode_funcs_set_combining_class_func +hb_unicode_funcs_set_compose_func +hb_unicode_funcs_set_decompose_compatibility_func +hb_unicode_funcs_set_decompose_func +hb_unicode_funcs_set_eastasian_width_func +hb_unicode_funcs_set_general_category_func +hb_unicode_funcs_set_mirroring_func +hb_unicode_funcs_set_script_func +hb_unicode_funcs_set_user_data +hb_unicode_funcs_t +hb_unicode_general_category +hb_unicode_general_category_func_t +hb_unicode_general_category_t +hb_unicode_mirroring +hb_unicode_mirroring_func_t +hb_unicode_script +hb_unicode_script_func_t +
+ +
+hb-uniscribe +hb_uniscribe_font_get_hfont +hb_uniscribe_font_get_logfontw +
+ +
+hb-version +HB_VERSION_CHECK +HB_VERSION_MAJOR +HB_VERSION_MICRO +HB_VERSION_MINOR +HB_VERSION_STRING +hb_version +hb_version_check +hb_version_string +
diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 000000000..ac30c4c40 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,302 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + +# 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) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +SETUP_FILES = \ + $(content_files) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + tmpl.stamp sgml.stamp html.stamp pdf.stamp + +SCANOBJ_FILES = \ + $(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 + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +if GTK_DOC_BUILD_HTML +HTML_BUILD_STAMP=html-build.stamp +else +HTML_BUILD_STAMP= +endif +if GTK_DOC_BUILD_PDF +PDF_BUILD_STAMP=pdf-build.stamp +else +PDF_BUILD_STAMP= +endif + +all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +else +all-local: +endif + +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_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; + +setup-build.stamp: + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ + test -d $(abs_srcdir)/tmpl && \ + { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ + chmod -R u+w $(abs_builddir)/tmpl; } \ + fi + $(AM_V_at)touch setup-build.stamp + +#### scan #### + +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; + +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; + +scan-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)" \ + 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) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) +GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; + +tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + if test -w $(abs_srcdir) ; then \ + cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ + fi \ + fi + $(AM_V_at)touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +#### xml #### + +GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0=@echo " DOC Building XML"; + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _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 + +#### html #### + +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; + +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(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 \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + 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_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(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 + @rm -rf .libs + +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) $(expand_content_files) $(DOC_MODULE).types; \ + rm -rf tmpl; \ + 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; \ + $(mkinstalldirs) $${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} + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: docs +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + @mkdir $(distdir)/tmpl + @mkdir $(distdir)/html + @-cp ./tmpl/*.sgml $(distdir)/tmpl + @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 diff --git a/src/Makefile.am b/src/Makefile.am index 73804a1f5..e646d4cb6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -293,7 +293,7 @@ EXTRA_DIST += \ hb-ot-shape-complex-myanmar-machine.rl \ hb-ot-shape-complex-sea-machine.rl \ $(NULL) -%.hh: %.rl +.rl.hh: $(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \ mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false ) diff --git a/src/hb-gobject.h b/src/hb-gobject.h index 4f23fdd38..3076460fa 100644 --- a/src/hb-gobject.h +++ b/src/hb-gobject.h @@ -33,7 +33,7 @@ HB_BEGIN_DECLS - +#ifndef __GTK_DOC_IGNORE__ /* Objects */ #define HB_GOBJECT_TYPE_BLOB hb_gobject_blob_get_type () @@ -60,6 +60,7 @@ hb_gobject_font_funcs_get_type (void); GType hb_gobject_unicode_funcs_get_type (void); +#endif /* __GTK_DOC_IGNORE__ */ /* Enums */