# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

# gnome-doc-utils.make - make magic for building documentation
# Copyright (C) 2004-2005 Shaun McCance <shaunm@gnome.org>
#
# 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 2 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, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

################################################################################
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
	$(top_srcdir)/docs/Makefile_web.am_fragment \
	$(top_srcdir)/scripts/gnome-doc-utils.make TODO
subdir = docs/tutorial
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/macros.m4 \
	$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
	html-recursive info-recursive install-data-recursive \
	install-dvi-recursive install-exec-recursive \
	install-html-recursive install-info-recursive \
	install-pdf-recursive install-ps-recursive install-recursive \
	installcheck-recursive installdirs-recursive pdf-recursive \
	ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
DLLTOOL = @DLLTOOL@
DOCS_SUBDIR = @DOCS_SUBDIR@
DOC_USER_FORMATS = @DOC_USER_FORMATS@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXAMPLE_SUBDIR = @EXAMPLE_SUBDIR@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMDOCS_CFLAGS = @GTKMMDOCS_CFLAGS@
GTKMMDOCS_LIBS = @GTKMMDOCS_LIBS@
HELP_DIR = @HELP_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGTKMM_SO_VERSION = @LIBGTKMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMF_DIR = @OMF_DIR@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
web_host = gtkmm.org
web_path_gtkmm = /home/murrayc/gtkmm.org/docs/gtkmm-2.4/
#web_path_gtkmm = /home/groups/g/gt/gtkmm/htdocs/docs/gtkmm-2.4/
web_path_docs = $(web_path_gtkmm)docs/

#--delete and --delete-after are causing
# "
# Invalid file index: 1768710413 (count=0) [receiver]
# rsync error: protocol incompatibility (code 2) at sender.c(156)
# "
# with sourceforge recently (May 2005). murrayc.
#
#rsync_args = -vz --rsh ssh --delete --delete-after
rsync_args = -vz --rsh ssh
gtkmm_docdir = $(datadir)/doc/gtkmm-2.4/docs
gtkmm_tut_path = $(web_path_docs)tutorial
SUBDIRS = icons
DOCBOOK_PHPWEBNOTES_TRANSFORM = docbook_phpwebnotes.xsl
EXTRA_DIST = README insert_example_code.pl C/gtkmm-tut.xml C/gtkmm-tut-with-examples.xml html style.css $(DOCBOOK_PHPWEBNOTES_TRANSFORM)
XMLLINT = xmllint
XSLTPROC = xsltproc
DB2PDF = docbook2pdf
_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header)
_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS))
_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),		\
	$(filter $(LINGUAS),$(DOC_LINGUAS)),					\
	$(DOC_LINGUAS))

_DOC_ABS_SRCDIR = @abs_srcdir@
@ENABLE_SK_TRUE@_ENABLE_SK = true

################################################################################
db2omf_args = \
	--stringparam db2omf.basename $(DOC_MODULE)				\
	--stringparam db2omf.format $(3)					\
	--stringparam db2omf.dtd						\
	$(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 		\
		| sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/')			\
	--stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2)))	\
	--stringparam db2omf.omf_dir "$(OMF_DIR)"				\
	--stringparam db2omf.help_dir "$(HELP_DIR)"				\
	--stringparam db2omf.omf_in "$(_DOC_OMF_IN)"				\
	$(if $(_ENABLE_SK),							\
	  --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)")		\
	$(_db2omf) $(2)

_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in))
_DOC_OMF_DB = $(if $(_DOC_OMF_IN),						\
	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf))

_DOC_OMF_HTML = $(if $(_DOC_OMF_IN),						\
	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf))


# FIXME
_DOC_OMF_ALL = \
	$(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB))		\
	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML))


################################################################################
_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
_DOC_C_DOCS = \
	$(_DOC_C_ENTITIES)	$(_DOC_C_INCLUDES)			\
	$(_DOC_C_MODULE)

_DOC_C_DOCS_NOENT = \
	$(_DOC_C_MODULE)	$(_DOC_C_INCLUDES)

_DOC_C_FIGURES = $(if $(DOC_FIGURES),					\
	$(foreach fig,$(DOC_FIGURES),C/$(fig)),				\
	$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png)))


# FIXME: probably have to shell escape to determine the file names
_DOC_C_HTML = $(foreach f,						\
	$(shell xsltproc --xinclude 					\
	  --stringparam db.chunk.basename "$(DOC_MODULE)"		\
	  $(_chunks) "C/$(DOC_MODULE).xml"),				\
	C/$(f).xhtml)


###############################################################################
_DOC_POFILES = $(if $(DOC_MODULE),						\
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po))

_DOC_LC_MODULES = $(if $(DOC_MODULE),						\
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml))

_DOC_LC_INCLUDES = \
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES),	\
		$(lc)/$(notdir $(inc)) ))


# FIXME: probably have to shell escape to determine the file names
_DOC_LC_HTML = \
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML),		\
		$(lc)/$(notdir $(doc)) ))

_DOC_LC_DOCS = \
	$(_DOC_LC_MODULES)	$(_DOC_LC_INCLUDES)				\
	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))

_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS),				\
	$(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) )

_DOC_SRC_FIGURES = \
	$(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS),	\
		$(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) ))

_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot)

################################################################################
_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \
	$(_DOC_C_HTML) $(_DOC_LC_HTML))

_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
_clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc)
_clean_dir = $(if $(DOC_MODULE),clean-doc-dir)
DOC_MODULE = gtkmm-tut-with-examples
DOC_ENTITIES = 
DOC_INCLUDES = 
DOC_FIGURES = \
	figures/alignment.png figures/aspectframe.png \
	figures/box_packing1.png figures/box_packing2.png figures/box_packing3.png \
	figures/buttonbox.png figures/buttons.png figures/checkbutton.png \
	figures/clipboard_simple.png figures/clipboard_ideal.png \
	figures/combo.png figures/combobox_complex.png figures/combobox_text.png figures/comboboxentry_complex.png figures/comboboxentry_text.png figures/custom_container.png \
	figures/dialogs_about.png figures/dialogs_colorselectiondialog.png figures/dialogs_filechooser.png figures/dialogs_fontselectiondialog.png \
	figures/dialogs_messagedialog.png figures/dialogs_simple.png \
	figures/drag_and_drop.png figures/drawingarea_arcs.png figures/drawingarea_curve.png figures/drawingarea_lines.png figures/drawingarea_text.png \
	figures/entry.png figures/eventbox.png figures/expander.png figures/filechooserbutton.png figures/frame.png \
	figures/helloworld.png figures/helloworld2.png figures/idle.png figures/label.png \
	figures/main_menu.png figures/menu_popup.png \
	figures/menus_menubar.png figures/menus_menu.png figures/menus_and_toolbars.png \
	figures/notebook.png \
	figures/paned.png printing.png figures/progressbar.png figures/radiobuttons.png \
	figures/range_widgets.png figures/recentchooserdialog.png \
	figures/scrolledwindow.png figures/socket.png socket-fail.png figures/spinbutton.png \
	figures/table.png toolbar.png figures/textview.png \
	figures/treeview_list.png figures/treeview_tree.png figures/treeview_editablecells.png figures/treeview_combo_renderer.png \
        figures/treeview_draganddrop.png figures/treeview_popup.png \
        figures/devcpp_project_options.png figures/cairo_clock.png figures/cairo_joins.png  \
        figures/update_ui.png \
        figures/msvc_add_existing_property_sheet.png figures/msvc_new_project_menu.png figures/msvc_properties_subsystem_windows.png \
        figures/msvc_application_settings.png figures/msvc_project_created.png msvc_property_files.png \
        figures/msvc_corrected_main.png figures/msvc_project_properties.png figures/msvc_property_manager.png \
        figures/msvc_corrected_stdafx.png figures/msvc_properties_maincrtstartup.png figures/msvc_property_manager_with_gtkmm_properties.png \
        figures/msvc_main_program.png figures/msvc_properties_noinherit.png \
        figures/msvc_new_project_dialog.png figures/msvc_properties_remove_warning_4250.png

DOC_LINGUAS = de
tutorialdir = $(gtkmm_docdir)/tutorial/html
all: all-recursive

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docs/Makefile_web.am_fragment $(top_srcdir)/scripts/gnome-doc-utils.make $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  docs/tutorial/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  docs/tutorial/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
#     (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

$(RECURSIVE_CLEAN_TARGETS):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	dot_seen=no; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	rev=''; for subdir in $$list; do \
	  if test "$$subdir" = "."; then :; else \
	    rev="$$subdir $$rev"; \
	  fi; \
	done; \
	rev="$$rev ."; \
	target=`echo $@ | sed s/-recursive//`; \
	for subdir in $$rev; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done && test -z "$$fail"
tags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
	done
ctags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
	done

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	mkid -fID $$unique
tags: TAGS

TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
	  include_option=--etags-include; \
	  empty_fix=.; \
	else \
	  include_option=--include; \
	  empty_fix=; \
	fi; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test ! -f $$subdir/TAGS || \
	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
	  fi; \
	done; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	    $$tags $$unique; \
	fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	test -z "$(CTAGS_ARGS)$$tags$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$tags $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && cd $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test -d "$(distdir)/$$subdir" \
	    || $(MKDIR_P) "$(distdir)/$$subdir" \
	    || exit 1; \
	    distdir=`$(am__cd) $(distdir) && pwd`; \
	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
	    (cd $$subdir && \
	      $(MAKE) $(AM_MAKEFLAGS) \
	        top_distdir="$$top_distdir" \
	        distdir="$$distdir/$$subdir" \
		am__remove_distdir=: \
		am__skip_length_check=: \
	        distdir) \
	      || exit 1; \
	  fi; \
	done
	$(MAKE) $(AM_MAKEFLAGS) \
	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
	  dist-hook
check-am: all-am
check: check-recursive
all-am: Makefile all-local
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-recursive
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic clean-libtool clean-local mostlyclean-am

distclean: distclean-recursive
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-local \
	distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

info: info-recursive

info-am:

install-data-am: install-data-local

install-dvi: install-dvi-recursive

install-exec-am:

install-html: install-html-recursive

install-info: install-info-recursive

install-man:

install-pdf: install-pdf-recursive

install-ps: install-ps-recursive

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic \
	maintainer-clean-local

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic mostlyclean-libtool \
	mostlyclean-local

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am: uninstall-local

.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
	install-strip

.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
	all all-am all-local check check-am clean clean-generic \
	clean-libtool clean-local ctags ctags-recursive dist-hook \
	distclean distclean-generic distclean-libtool distclean-local \
	distclean-tags distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am \
	install-data-local install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic maintainer-clean-local mostlyclean \
	mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
	uninstall-local


DOCBOOK_STYLESHEET ?= http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl

# Create a DocBook source file that doesn't have the examples' comments blocks:
C/gtkmm-tut-with-examples.xml: C/gtkmm-tut.xml insert_example_code.pl
	$(PERL_PATH) $(srcdir)/insert_example_code.pl $(top_srcdir)/examples/book $< >$@

DOC_H_FILE ?=

DOC_H_DOCS ?=

$(DOC_H_FILE): $(DOC_H_DOCS);
	@rm -f $@.tmp; touch $@.tmp;
	echo 'const gchar* documentation_credits[] = {' >> $@.tmp
	list='$(DOC_H_DOCS)'; for doc in $$list; do \
	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
	  xsltproc --path "$$xmlpath" $(_credits) $$doc; \
	done | sort | uniq \
	  | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \
	  | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp
	echo '	NULL' >> $@.tmp
	echo '};' >> $@.tmp
	echo >> $@.tmp
	list='$(DOC_H_DOCS)'; for doc in $$list; do \
	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
	  docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
	    | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
	  echo $$xmlpath; \
	  ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
	  for id in $$ids; do \
	    echo '#define HELP_'`echo $$docid`'_'`echo $$id \
	      | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
	  done; \
	  echo >> $@.tmp; \
	done;
	cp $@.tmp $@ && rm -f $@.tmp

dist-check-gdu:
@HAVE_GNOME_DOC_UTILS_FALSE@	@echo "*** GNOME Doc Utils must be installed in order to make dist"
@HAVE_GNOME_DOC_UTILS_FALSE@	@false

.PHONY: dist-doc-header
dist-doc-header: $(DOC_H_FILE)
	@if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
	echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
	$(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";

doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)

.PHONY: clean-doc-header
clean-local: $(_clean_doc_header)
distclean-local: $(_clean_doc_header)
mostlyclean-local: $(_clean_doc_header)
maintainer-clean-local: $(_clean_doc_header)
clean-doc-header:
	rm -f $(DOC_H_FILE)

all: $(DOC_H_FILE)

################################################################################

DOC_MODULE ?=

DOC_ENTITIES ?=

DOC_INCLUDES ?=

DOC_FIGURES ?=

DOC_FORMATS ?= docbook

DOC_LINGUAS ?=

################################################################################

_xml2po ?= `which xml2po`

_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
@ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
@ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
@ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml

$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
	  echo "The file '$(_skcontentslist)' does not exist." >&2;		\
	  echo "Please check your ScrollKeeper installation." >&2;		\
	  exit 1; }
	xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }

$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
@ENABLE_SK_TRUE@	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
@ENABLE_SK_TRUE@	  echo "The file '$(_skcontentslist)' does not exist" >&2;		\
@ENABLE_SK_TRUE@	  echo "Please check your ScrollKeeper installation." >&2;		\
@ENABLE_SK_TRUE@	  exit 1; }
	xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }

.PHONY: omf
omf: $(_DOC_OMF_ALL)

.PHONY: po
po: $(_DOC_POFILES)

$(_DOC_POFILES):
	@if ! test -d $(dir $@); then \
	  echo "mkdir $(dir $@)"; \
	  mkdir "$(dir $@)"; \
	fi
	@if test ! -f $@ -a -f $(srcdir)/$@; then \
	  echo "cp $(srcdir)/$@ $@"; \
	  cp "$(srcdir)/$@" "$@"; \
	fi;
	@docs=; \
	list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
	  docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
	done; \
	if ! test -f $@; then \
	  echo "(cd $(dir $@) && \
	    $(_xml2po) -e $$docs > $(notdir $@).tmp && \
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
	  (cd $(dir $@) && \
	    $(_xml2po) -e $$docs > $(notdir $@).tmp && \
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
	else \
	  echo "(cd $(dir $@) && \
	    $(_xml2po) -e -u $(notdir $@) $$docs)"; \
	  (cd $(dir $@) && \
	    $(_xml2po) -e -u $(notdir $@) $$docs); \
	fi

# FIXME: fix the dependancy
# FIXME: hook xml2po up
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
	if ! test -d $(dir $@); then mkdir $(dir $@); fi
	if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
	(cd $(dir $@) && \
	  $(_xml2po) -e -p \
	    "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
	    "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
.PHONY: pot
pot: $(_DOC_POT)
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
	$(_xml2po) -e -o $@ $^

$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
	xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)

################################################################################

all:							\
	$(_DOC_C_DOCS)		$(_DOC_LC_DOCS)		\
	$(_DOC_OMF_ALL)		$(_DOC_DSK_ALL)		\
	$(_DOC_HTML_ALL)	$(_DOC_POFILES)

.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir

clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
clean-doc-lc:
	rm -f $(_DOC_LC_DOCS)
	@list='$(_DOC_POFILES)'; for po in $$list; do \
	  if ! test "$$po" -ef "$(srcdir)/$$po"; then \
	    echo "rm -f $$po"; \
	    rm -f "$$po"; \
	  fi; \
	done
	@for lc in C $(_DOC_REAL_LINGUAS); do \
	  if test -f "$$lc/.xml2po.mo"; then \
	    echo "rm -f $$lc/.xml2po.mo"; \
	    rm -f "$$lc/.xml2po.mo"; \
	  fi; \
	done
clean-doc-dir:
	@for lc in C $(_DOC_REAL_LINGUAS); do \
	  for dir in `find $$lc -depth -type d`; do \
	    if ! test $$dir -ef $(srcdir)/$$dir; then \
	      echo "rmdir $$dir"; \
	      rmdir "$$dir"; \
	   fi; \
	  done; \
	done

clean-local:						\
	$(_clean_omf)		$(_clean_dsk)		\
	$(_clean_lc)		$(_clean_dir)
distclean-local:					\
	$(_clean_omf)		$(_clean_dsk)		\
	$(_clean_lc)		$(_clean_dir)
mostlyclean-local:					\
	$(_clean_omf)		$(_clean_dsk)		\
	$(_clean_lc)		$(_clean_dir)
maintainer-clean-local:					\
	$(_clean_omf)		$(_clean_dsk)		\
	$(_clean_lc)		$(_clean_dir)

.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
doc-dist-hook: 					\
	$(if $(DOC_MODULE),dist-doc-docs)	\
	$(if $(_DOC_C_FIGURES),dist-doc-figs)	\
	$(if $(_DOC_OMF_IN),dist-doc-omf)
#	$(if $(_DOC_DSK_IN),dist-doc-dsk)

dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
	@for lc in C $(_DOC_REAL_LINGUAS); do \
	  echo " $(mkinstalldirs) $(distdir)/$$lc"; \
	  $(mkinstalldirs) "$(distdir)/$$lc"; \
	done
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
	for doc in $$list; do \
	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
	    docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
	    if ! test -d "$(distdir)/$$docdir"; then \
	      echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
	      $(mkinstalldirs) "$(distdir)/$$docdir"; \
	    fi; \
	  echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
	  $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
	done

dist-doc-figs: $(_DOC_SRC_FIGURES)
	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
	for fig in $$list; do \
	  if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
	  if test -f "$$d$$fig"; then \
	    figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
	    if ! test -d "$(distdir)/$$figdir"; then \
	      echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
	      $(mkinstalldirs) "$(distdir)/$$figdir"; \
	    fi; \
	    echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
	    $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
	  fi; \
	done;

dist-doc-omf:
	@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
	echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
	$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"

dist-doc-dsk:
	@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
	echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
	$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"

.PHONY: check-doc-docs check-doc-omf
check:							\
	$(if $(DOC_MODULE),check-doc-docs)		\
	$(if $(_DOC_OMF_IN),check-doc-omf)

check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
	@for lc in C $(_DOC_REAL_LINGUAS); do \
	  if test -f "$$lc"; \
	    then d=; \
	    xmlpath="$$lc"; \
	  else \
	    d="$(srcdir)/"; \
	    xmlpath="$$lc:$(srcdir)/$$lc"; \
	  fi; \
	  echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
	  xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
	done

check-doc-omf: $(_DOC_OMF_ALL)
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
	  echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
	  xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
	done

.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
install-data-local:					\
	$(if $(DOC_MODULE),install-doc-docs)		\
	$(if $(_DOC_HTML_ALL),install-doc-html)		\
	$(if $(_DOC_C_FIGURES),install-doc-figs)	\
	$(if $(_DOC_OMF_IN),install-doc-omf)
#	$(if $(_DOC_DSK_IN),install-doc-dsk)

install-doc-docs:
	@for lc in C $(_DOC_REAL_LINGUAS); do \
	  echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
	  $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
	done
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
	  docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
	  docdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \
	  if ! test -d "$$docdir"; then \
	    echo "$(mkinstalldirs) $$docdir"; \
	    $(mkinstalldirs) "$$docdir"; \
	  fi; \
	  echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
	  $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
	done

install-doc-figs:
	@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
	  for lc in C $(_DOC_REAL_LINGUAS); do \
	    if test -f "$$lc/$$fig"; then \
	      figfile="$$lc/$$fig"; \
	    elif test -f "$(srcdir)/$$lc/$$fig"; then \
	      figfile="$(srcdir)/$$lc/$$fig"; \
	    elif test -f "C/$$fig"; then \
	      figfile="C/$$fig"; \
	    else \
	      figfile="$(srcdir)/C/$$fig"; \
	    fi; \
	    figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
	    figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
	    if ! test -d "$$figdir"; then \
	      echo "$(mkinstalldirs) $$figdir"; \
	      $(mkinstalldirs) "$$figdir"; \
	    fi; \
	    figbase=`echo $$fig | sed -e 's/^.*\///'`; \
	    echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
	    $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
	  done; \
	done

install-doc-html:
	echo install-html

install-doc-omf:
	$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
	  echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
	  $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
	done
	@if test "x$(_ENABLE_SK)" = "xtrue"; then \
	  echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
	  scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
	fi;

install-doc-dsk:
	echo install-dsk

.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
uninstall-local:					\
	$(if $(DOC_MODULE),uninstall-doc-docs)		\
	$(if $(_DOC_HTML_ALL),uninstall-doc-html)	\
	$(if $(_DOC_C_FIGURES),uninstall-doc-figs)	\
	$(if $(_DOC_OMF_IN),uninstall-doc-omf)
#	$(if $(_DOC_DSK_IN),uninstall-doc-dsk)

uninstall-doc-docs:
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
	  echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
	  rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
	done

uninstall-doc-figs:
	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
	  echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
	  rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
	done;

uninstall-doc-omf:
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
	  if test "x$(_ENABLE_SK)" = "xtrue"; then \
	    echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
	    scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
	  fi; \
	  echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
	  rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
	done

dist-hook: doc-dist-hook

# Create a html generation of the C locale's version of the DocBook, 
# using our custom stylesheet and graphics:
# Set the use.id.as.filename param so that we don't use the chapter / section
# number as the filename, otherwise the url will change every time anything is
# re-ordered or inserted in the documentation
html/index.html: C/gtkmm-tut-with-examples.xml Makefile.am
	rm -rf html
	$(mkinstalldirs) html
	cp $(srcdir)/style.css html/
	cp -r $(srcdir)/C/figures html/
	cp -r $(srcdir)/icons html/
	$(XSLTPROC) \
		--param toc.section.depth 1	\
		--stringparam html.stylesheet "style.css"	\
		--stringparam admon.graphics 1	\
		--stringparam admon.graphics.path "icons/"	\
		--stringparam admon.graphics.extension ".png"	\
		--stringparam chunker.output.indent yes	\
		--stringparam chunker.output.encoding UTF-8	\
		--stringparam navig.graphics yes	\
		--stringparam navig.graphics.extension ".png"	\
		--stringparam navig.graphics.path "icons/"	\
		--stringparam toc.list.type "ul"	\
		--stringparam use.id.as.filename "1" \
		-o html/ --xinclude --catalogs $(DOCBOOK_STYLESHEET)	\
		$<

validate_original: C/gtkmm-tut.xml
	$(XMLLINT) --xinclude --postvalid --noout $<

validate: C/gtkmm-tut-with-examples.xml
	$(XMLLINT) --xinclude --postvalid --noout $<

gtkmm-tut-html.tar.gz: html/index.html
	tar cf - C/figures html | gzip -c --best >$@

post-html: html/index.html html/style.css pdf
	rsync $(rsync_args) C/figures/*.png $$USER@$(web_host):$(gtkmm_tut_path)/figures/
	rsync $(rsync_args) icons/*.png $$USER@$(web_host):$(gtkmm_tut_path)/icons/
	rsync $(rsync_args) -r html/ $$USER@$(web_host):$(gtkmm_tut_path)/html/
	rsync $(rsync_args) *.css $$USER@$(web_host):$(gtkmm_tut_path)/html/
	rsync $(rsync_args) -r pdf/ $$USER@$(web_host):$(gtkmm_tut_path)/pdf/

# we need to produce a full examples with all of the XIncludes done so that it
# can processed for PDF
C/programming-with-gtkmm-pdf.xml: C/gtkmm-tut-with-examples.xml
	rm -rf html
	$(mkinstalldirs) html
	$(XMLLINT) --xinclude --postvalid $< -o $@

# We have to generate the pdf in a subdirectory (e.g. pdf/) because the tutorial
# specifies the path to the figures as '../figures' so if we build it in this
# directory, it won't find the images.
pdf/programming-with-gtkmm-pdf.pdf: C/programming-with-gtkmm-pdf.xml
	$(DB2PDF) --output pdf $<

pdf : pdf/programming-with-gtkmm-pdf.pdf

doc-clean:
	-rm -f C/gtkmm-tut-with-examples.xml gtkmm-tut-html.tar.gz C/programming-with-gtkmm-pdf.xml
	-rm -rf pdf

install-tutorial: html/index.html html/style.css
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(tutorialdir)
	@dir='$(<D)'; for p in $$dir/*.html ; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/$$f"; \
	  $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/$$f; \
	done
	$(mkinstalldirs) $(DESTDIR)$(tutorialdir)/icons
	@dir='$(<D)/icons'; for p in $$dir/*.png ; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/icons/$$f"; \
	  $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/icons/$$f; \
	done
	$(mkinstalldirs) $(DESTDIR)$(tutorialdir)/figures
	@dir='$(<D)/figures'; for p in $$dir/*.png ; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/figures/$$f"; \
	  $(INSTALL_DATA) $$p $(DESTDIR)$(tutorialdir)/figures/$$f; \
	done
	$(INSTALL_DATA) $(srcdir)/html/style.css $(DESTDIR)$(tutorialdir)

uninstall-tutorial: html/index.html html/style.css
	@$(NORMAL_UNINSTALL)
	@dir='$(<D)'; for p in $$dir/*.html ; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " rm -f $(DESTDIR)$(tutorialdir)/$$f"; \
	  rm -f $(DESTDIR)$(tutorialdir)/$$f; \
	done
	rm -f $(DESTDIR)$(tutorialdir)/style.css
	rm -rf $(DESTDIR)$(tutorialdir)/icons
	rm -rf $(DESTDIR)$(tutorialdir)/figures

all-local: html/index.html

install-data-local: install-tutorial

uninstall-local: uninstall-tutorial

maintainer-clean-local: doc-clean

.PHONY: post-html doc-clean install-tutorial uninstall-tutorial
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
