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

# Copyright (C) 1994-2021 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@

# -*- mode: makefile -*-
#
# gtk-doc.make - make rules for gtk-doc
# Copyright (C) 2003 James Henstridge
#               2004-2007 Damon Chaplin
#               2007-2017 Stefan Sauer
#
# 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 3 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, see <http://www.gnu.org/licenses/>.

####################################
# Everything below here is generic #
####################################
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@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@
subdir = doc/reference
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/gpg_uid $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = version.xml
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.xml.in \
	$(top_srcdir)/gtk-doc.make
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = ja.po
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_FILE_NAME = @CONFIG_FILE_NAME@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CUSTOM_CONFIG_FILE_NAME = @CUSTOM_CONFIG_FILE_NAME@
CUTTER_SOURCE_PATH = @CUTTER_SOURCE_PATH@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GLIB_REQUIRED = @GLIB_REQUIRED@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GOBJECT_QUERY = @GOBJECT_QUERY@
GPG_UID = @GPG_UID@
GREP = @GREP@
GROONGA_SOURCE_PATH = @GROONGA_SOURCE_PATH@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LAUNCHPAD_UPLOADER_PGP_KEY = @LAUNCHPAD_UPLOADER_PGP_KEY@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEV_CFLAGS = @LIBEV_CFLAGS@
LIBEV_INCLUDES = @LIBEV_INCLUDES@
LIBEV_LIBS = @LIBEV_LIBS@
LIBMILTER_LT_AGE = @LIBMILTER_LT_AGE@
LIBMILTER_LT_CURRENT = @LIBMILTER_LT_CURRENT@
LIBMILTER_LT_REVISION = @LIBMILTER_LT_REVISION@
LIBMILTER_LT_VERSION_INFO = @LIBMILTER_LT_VERSION_INFO@
LIBOBJS = @LIBOBJS@
LIBRUBY_CFLAGS = @LIBRUBY_CFLAGS@
LIBRUBY_LIBS = @LIBRUBY_LIBS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_EXPORT_OPTIONS = @LIBTOOL_EXPORT_OPTIONS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@
LT_REVISION = @LT_REVISION@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
LT_VERSION_INFO = @LT_VERSION_INFO@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MILTER_CLIENT_LIBS = @MILTER_CLIENT_LIBS@
MILTER_CORE_LIBS = @MILTER_CORE_LIBS@
MILTER_MANAGER_CFLAGS = @MILTER_MANAGER_CFLAGS@
MILTER_MANAGER_DEFAULT_CONNECTION_SPEC = @MILTER_MANAGER_DEFAULT_CONNECTION_SPEC@
MILTER_MANAGER_DEFAULT_CONNECTION_SPEC_C_STRING = @MILTER_MANAGER_DEFAULT_CONNECTION_SPEC_C_STRING@
MILTER_MANAGER_DEFAULT_EFFECTIVE_GROUP = @MILTER_MANAGER_DEFAULT_EFFECTIVE_GROUP@
MILTER_MANAGER_DEFAULT_EFFECTIVE_GROUP_C_STRING = @MILTER_MANAGER_DEFAULT_EFFECTIVE_GROUP_C_STRING@
MILTER_MANAGER_DEFAULT_EFFECTIVE_USER = @MILTER_MANAGER_DEFAULT_EFFECTIVE_USER@
MILTER_MANAGER_DEFAULT_EFFECTIVE_USER_C_STRING = @MILTER_MANAGER_DEFAULT_EFFECTIVE_USER_C_STRING@
MILTER_MANAGER_DEFAULT_PID_FILE = @MILTER_MANAGER_DEFAULT_PID_FILE@
MILTER_MANAGER_DEFAULT_PID_FILE_C_STRING = @MILTER_MANAGER_DEFAULT_PID_FILE_C_STRING@
MILTER_MANAGER_DEFAULT_SOCKET_GROUP = @MILTER_MANAGER_DEFAULT_SOCKET_GROUP@
MILTER_MANAGER_DEFAULT_SOCKET_GROUP_C_STRING = @MILTER_MANAGER_DEFAULT_SOCKET_GROUP_C_STRING@
MILTER_MANAGER_LIBS = @MILTER_MANAGER_LIBS@
MILTER_MANAGER_PACKAGE_OPTIONS = @MILTER_MANAGER_PACKAGE_OPTIONS@
MILTER_MANAGER_PACKAGE_OPTIONS_C_STRING = @MILTER_MANAGER_PACKAGE_OPTIONS_C_STRING@
MILTER_MANAGER_PACKAGE_PLATFORM = @MILTER_MANAGER_PACKAGE_PLATFORM@
MILTER_MANAGER_PACKAGE_PLATFORM_C_STRING = @MILTER_MANAGER_PACKAGE_PLATFORM_C_STRING@
MILTER_MANAGER_VERSION = @MILTER_MANAGER_VERSION@
MILTER_MANAGER_VERSION_MAJOR = @MILTER_MANAGER_VERSION_MAJOR@
MILTER_MANAGER_VERSION_MICRO = @MILTER_MANAGER_VERSION_MICRO@
MILTER_MANAGER_VERSION_MINOR = @MILTER_MANAGER_VERSION_MINOR@
MILTER_RUBY_CFLAGS = @MILTER_RUBY_CFLAGS@
MILTER_RUBY_LIBS = @MILTER_RUBY_LIBS@
MILTER_SERVER_LIBS = @MILTER_SERVER_LIBS@
MILTER_TOOLKIT_CFLAGS = @MILTER_TOOLKIT_CFLAGS@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NETWORK_LIBS = @NETWORK_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
ORIGINAL_CFLAGS = @ORIGINAL_CFLAGS@
OSDN_HTDOCS = @OSDN_HTDOCS@
OSDN_HTDOCS_PATH = @OSDN_HTDOCS_PATH@
OSDN_PROJECT_ID = @OSDN_PROJECT_ID@
OSDN_PROJECT_NAME = @OSDN_PROJECT_NAME@
OSDN_USER = @OSDN_USER@
OSDN_USER_OPTION = @OSDN_USER_OPTION@
OSDN_WEB_HOST = @OSDN_WEB_HOST@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_TITLE = @PACKAGE_TITLE@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
RD2 = @RD2@
RUBY = @RUBY@
RUBY_GLIB2_CFLAGS = @RUBY_GLIB2_CFLAGS@
RUBY_VENDOR_ARCH_DIR = @RUBY_VENDOR_ARCH_DIR@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
binding_extdir = @binding_extdir@
binding_libdir = @binding_libdir@
bindingdir = @bindingdir@
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@
expanded_binding_extdir = @expanded_binding_extdir@
expanded_binding_libdir = @expanded_binding_libdir@
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@
intltool__v_merge_options_ = @intltool__v_merge_options_@
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
module_configurationdir = @module_configurationdir@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgsysconfdir = @pkgsysconfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
ruby_libdir = @ruby_libdir@
ruby_milterdir = @ruby_milterdir@
ruby_vendor_lib_dir = @ruby_vendor_lib_dir@
runstatedir = @runstatedir@
sample_rubydir = @sample_rubydir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
tool_libdir = @tool_libdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
MAINTAINERCLEANFILES = Makefile.in $(generated_xml_files) \
	$(generated_image_files) milter-manager-sections.txt \
	milter-manager.types

# The name of the module.
DOC_MODULE = milter-manager

# The top-level SGML file.
DOC_MAIN_SGML_FILE = milter-manager-docs.sgml

# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = \
	--deprecated-guards="MILTER_DISABLE_DEPRECATED"		\
	--rebuild-sections


# The directory containing the source code.
DOC_SOURCE_DIR = \
	$(top_srcdir)/milter			\
	$(top_srcdir)/libmilter


# Used for dependencies
HFILE_GLOB = \
	$(top_srcdir)/milter/*.h		\
	$(top_srcdir)/milter/*/*.h		\
	$(top_srcdir)/libmilter/*.h

CFILE_GLOB = \
	$(top_srcdir)/milter/*/*.c		\
	$(top_srcdir)/libmilter/*.c


# Headers to ignore
IGNORE_HFILES = \
	milter-marshalers.h

AM_CPPFLAGS = \
	-I$(top_srcdir)/libmilter		\
	-I$(top_srcdir)				\
	-I$(top_builddir)			\
	$(GLIB_CFLAGS)

GTKDOC_LIBS = \
	$(top_builddir)/milter/core/libmilter-core.la		\
	$(top_builddir)/milter/client/libmilter-client.la	\
	$(top_builddir)/milter/server/libmilter-server.la	\
	$(top_builddir)/milter/manager/libmilter-manager.la	\
	$(top_builddir)/libmilter/libmilter.la			\
	$(GLIB_LIBS)


# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --sgml-mode --output-format=xml
generated_image_files = \
	mta-and-milter-manager-and-child-milter.png	\
	mta-and-milter-manager-and-child-milter-ja.png	\
	sendmail-and-milter.png				\
	sendmail-and-milter-ja.png			\
	sendmail-and-postfix-and-milter.png		\
	sendmail-and-postfix-and-milter-ja.png		\
	milter-manager-log-analyzer-graphs.png


# Images to copy into HTML directory
HTML_IMAGES = $(generated_image_files)

# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
	version.xml				\
	readme.xml				\
	introduction.xml			\
	configuration.xml			\
	performance.xml				\
	install.xml				\
	install-to-debian.xml			\
	install-to-ubuntu.xml			\
	install-to-centos5.xml			\
	install-to-centos6.xml			\
	install-to-centos7.xml			\
	install-to-centos.xml			\
	install-to-freebsd.xml			\
	install-to-others.xml			\
	install-options-to-debian.xml		\
	install-options-to-ubuntu.xml		\
	install-options-to-centos.xml		\
	install-options-to-freebsd.xml		\
	upgrade-on-debian.xml			\
	upgrade-on-ubuntu.xml			\
	upgrade-on-centos.xml			\
	upgrade-on-freebsd.xml			\
	upgrade-options-on-debian.xml		\
	upgrade-options-on-ubuntu.xml		\
	upgrade-options-on-centos.xml		\
	upgrade-options-on-freebsd.xml		\
	milter-manager.xml			\
	milter-test-server.xml			\
	milter-test-client.xml			\
	milter-performance-check.xml		\
	milter-report-statistics.xml		\
	milter-manager-log-analyzer.xml		\
	reverse-dictionary.xml			\
	users.xml				\
	ruby-milter-tutorial.xml		\
	ruby-milter-reference.xml		\
	ruby-milter-configuration.xml		\
	available-milters.xml			\
	log-list.xml				\
	maintenance-policy.xml


# Extra options to supply to gtkdoc-fixxref
FIXXREF_OPTIONS = 
@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = 
@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute

# 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)		\
	$(expand_content_files)		\
	$(DOC_MAIN_SGML_FILE)		\
	$(DOC_MODULE)-sections.txt	\
	$(DOC_MODULE)-overrides.txt


# Other files to distribute
EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) html-build.stamp \
	version.xml.in $(generated_xml_files) head.html head-ja.html \
	header.html header-ja.html footer.html footer-ja.html ja.po
DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \
	html-build.stamp pdf-build.stamp \
	sgml.stamp html.stamp pdf.stamp

SCANOBJ_FILES = \
	$(DOC_MODULE).actions	 \
	$(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) gtkdoc-check.test
@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = 

# include common portion ...
@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp \
@GTK_DOC_BUILD_HTML_TRUE@	html-ja-build.stamp
@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = 
@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp

#### setup ####
GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_@AM_V@)
GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_@AM_DEFAULT_V@)
GTK_DOC_V_SETUP_0 = @echo "  DOC   Preparing build";

#### scan ####
GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_@AM_V@)
GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_@AM_DEFAULT_V@)
GTK_DOC_V_SCAN_0 = @echo "  DOC   Scanning header files";
GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_@AM_V@)
GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@)
GTK_DOC_V_INTROSPECT_0 = @echo "  DOC   Introspecting gobjects";

#### xml ####
GTK_DOC_V_XML = $(GTK_DOC_V_XML_@AM_V@)
GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_@AM_DEFAULT_V@)
GTK_DOC_V_XML_0 = @echo "  DOC   Building XML";

#### html ####
GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_@AM_V@)
GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_@AM_DEFAULT_V@)
GTK_DOC_V_HTML_0 = @echo "  DOC   Building HTML";
GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_@AM_V@)
GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_@AM_DEFAULT_V@)
GTK_DOC_V_XREF_0 = @echo "  DOC   Fixing cross-references";

#### pdf ####
GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@)
GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@)
GTK_DOC_V_PDF_0 = @echo "  DOC   Building PDF";
# TODO Enable build Japanese PDF?
# if GTK_DOC_BUILD_PDF
# PDF_BUILD_STAMP += pdf-ja-build.stamp
# endif
generated_xml_files = \
	readme.xml				\
	readme.xml.ja				\
	introduction.xml			\
	introduction.xml.ja			\
	configuration.xml			\
	configuration.xml.ja			\
	performance.xml				\
	performance.xml.ja			\
	install.xml				\
	install.xml.ja				\
	install-to-debian.xml			\
	install-to-debian.xml.ja		\
	install-to-ubuntu.xml			\
	install-to-ubuntu.xml.ja		\
	install-to-centos5.xml			\
	install-to-centos5.xml.ja		\
	install-to-centos6.xml			\
	install-to-centos6.xml.ja		\
	install-to-centos7.xml			\
	install-to-centos7.xml.ja		\
	install-to-centos.xml			\
	install-to-centos.xml.ja		\
	install-to-freebsd.xml			\
	install-to-freebsd.xml.ja		\
	install-to-others.xml			\
	install-to-others.xml.ja		\
	install-options-to-debian.xml		\
	install-options-to-debian.xml.ja	\
	install-options-to-ubuntu.xml		\
	install-options-to-ubuntu.xml.ja	\
	install-options-to-centos.xml		\
	install-options-to-centos.xml.ja	\
	install-options-to-freebsd.xml		\
	install-options-to-freebsd.xml.ja	\
	upgrade-on-debian.xml			\
	upgrade-on-debian.xml.ja		\
	upgrade-on-ubuntu.xml			\
	upgrade-on-ubuntu.xml.ja		\
	upgrade-on-centos.xml			\
	upgrade-on-centos.xml.ja		\
	upgrade-on-freebsd.xml			\
	upgrade-on-freebsd.xml.ja		\
	upgrade-options-on-debian.xml		\
	upgrade-options-on-debian.xml.ja	\
	upgrade-options-on-ubuntu.xml		\
	upgrade-options-on-ubuntu.xml.ja	\
	upgrade-options-on-centos.xml		\
	upgrade-options-on-centos.xml.ja	\
	upgrade-options-on-freebsd.xml		\
	upgrade-options-on-freebsd.xml.ja	\
	milter-manager.xml			\
	milter-manager.xml.ja			\
	milter-test-server.xml			\
	milter-test-server.xml.ja		\
	milter-test-client.xml			\
	milter-test-client.xml.ja		\
	milter-performance-check.xml		\
	milter-performance-check.xml.ja		\
	milter-report-statistics.xml		\
	milter-report-statistics.xml.ja		\
	milter-manager-log-analyzer.xml		\
	milter-manager-log-analyzer.xml.ja	\
	reverse-dictionary.xml			\
	reverse-dictionary.xml.ja		\
	users.xml				\
	users.xml.ja				\
	ruby-milter-tutorial.xml		\
	ruby-milter-tutorial.xml.ja		\
	ruby-milter-reference.xml		\
	ruby-milter-reference.xml.ja		\
	ruby-milter-configuration.xml		\
	ruby-milter-configuration.xml.ja	\
	available-milters.xml			\
	available-milters.xml.ja		\
	log-list.xml				\
	log-list.xml.ja				\
	maintenance-policy.xml			\
	maintenance-policy.xml.ja

EXPAND_RD2_SNIPPET = $(CUTTER_SOURCE_PATH)/misc/expand-rd2-snippet.rb
RD2LIB_DIR = $(CUTTER_SOURCE_PATH)/misc
RD2REFENTRY_LIB_FILE = rd2refentry-lib.rb
RD2REFENTRY_LIB = $(RD2LIB_DIR)/$(RD2REFENTRY_LIB_FILE)
RD2DOCBOOK = $(RUBY) -Eutf-8:utf-8 -I $(RD2LIB_DIR) $(RD2) -r $(RD2REFENTRY_LIB_FILE) --name=MILTER-MANAGER
RD2DOCBOOK_JA = $(RD2DOCBOOK) --po=$(srcdir)/ja.po
SVG2PNG = inkscape --export-dpi=60 --export-background=white --export-filename
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/reference/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign doc/reference/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__maybe_remake_depfiles)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
	esac;
$(top_srcdir)/gtk-doc.make $(am__empty):

$(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
$(am__aclocal_m4_deps):
version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:

distdir: $(BUILT_SOURCES)
	$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir-am: $(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 "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
	$(MAKE) $(AM_MAKEFLAGS) \
	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
	  dist-hook
check-am: all-am
check: check-am
@ENABLE_GTK_DOC_FALSE@all-local:
all-am: Makefile all-local
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

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

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am

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

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-local

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am: install-data-local
	@$(NORMAL_INSTALL)
	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

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

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-local

.MAKE: install-am install-data-am install-strip

.PHONY: all all-am all-local check check-am clean clean-generic \
	clean-libtool clean-local cscopelist-am ctags-am dist-hook \
	distclean distclean-generic distclean-libtool distclean-local \
	distdir dvi dvi-am html html-am info info-am install \
	install-am install-data install-data-am install-data-hook \
	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 maintainer-clean \
	maintainer-clean-generic maintainer-clean-local mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am uninstall-local

.PRECIOUS: Makefile


gtkdoc-check.test: Makefile
	$(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
		echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
		chmod +x $@

all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
.PHONY: all-gtk-doc

@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc

docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)

$(REPORT_FILES): sgml-build.stamp

setup-build.stamp:
	-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
	  files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
	  if test "x$$files" != "x" ; then \
	    for file in $$files ; do \
	      destdir=`dirname $(abs_builddir)/$$file`; \
	      test -d "$$destdir" || mkdir -p "$$destdir"; \
	      test -f $(abs_srcdir)/$$file && \
	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
	    done; \
	  fi; \
	fi
	$(AM_V_at)touch setup-build.stamp

scan-build.stamp: setup-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

sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent
	$(GTK_DOC_V_XML)_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

$(DOC_MAIN_SGML_FILE): sgml-build.stamp
	@true

xml/gtkdocentities.ent: Makefile
	$(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \
		echo "<!ENTITY package \"$(PACKAGE)\">"; \
		echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \
		echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \
		echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \
		echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \
		echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \
		echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \
	) > $@

html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_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 \
	  test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
	  test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \
	  test -f $$file && cp $$file $(abs_builddir)/html; \
	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-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_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
	@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
	  rm -f $(DOC_MODULE).types; \
	fi
	@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
	  rm -f $(DOC_MODULE)-sections.txt; \
	fi

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) $(DOC_MODULE).types; \
	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
#
@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs
@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc:
@HAVE_GTK_DOC_FALSE@	@echo "*** gtk-doc is needed to run 'make dist'.         ***"
@HAVE_GTK_DOC_FALSE@	@echo "*** gtk-doc was not found when 'configure' ran.   ***"
@HAVE_GTK_DOC_FALSE@	@echo "*** please install gtk-doc and rerun 'configure'. ***"
@HAVE_GTK_DOC_FALSE@	@false

dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
	@mkdir $(distdir)/html
	@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

$(DOC_MODULE).pot: sgml-build.stamp
	xml2po -k -o $(DOC_MODULE).pot				\
	  $(srcdir)/$(DOC_MAIN_SGML_FILE) $(srcdir)/xml/*.xml

update-po: Makefile sgml.stamp
	$(MAKE) $(DOC_MODULE).pot
	for catalog in $(CATALOGS); do		\
	  xml2po -k -u $$catalog		\
	    $(srcdir)/$(DOC_MAIN_SGML_FILE)	\
	    $(srcdir)/xml/*.xml;		\
	done

html-ja-build.stamp: sgml.stamp $(CATALOGS) $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
	for catalog in $(CATALOGS); do					\
	  lang=`echo $$catalog | sed 's/.po$$//'`;			\
	  echo "$$lang:";						\
	  rm -rf $$lang;						\
	  mkdir -p $$lang/html;						\
	  mkdir -p $$lang/xml;						\
	  po2xml $(DOC_MAIN_SGML_FILE) $(srcdir)/$$catalog >		\
	    $$lang/$(DOC_MAIN_SGML_FILE);				\
	  for xml in $(builddir)/xml/*.xml; do				\
	    po2xml $$xml $(srcdir)/$$catalog >				\
	      $$lang/xml/`basename $$xml`;				\
	  done;								\
	  for file in $(content_files); do				\
	    if test -f $$file; then					\
	      if test -f $$file.$$lang; then				\
	        cp $$file.$$lang $$lang/$$file;				\
	      else							\
	        cp $$file $$lang;					\
	      fi;							\
	    else							\
	      if test -f $(srcdir)/$$file.$$lang; then			\
	        cp $(srcdir)/$$file.$$lang $$lang/$$file;		\
	      else							\
	        cp $(srcdir)/$$file $$lang;				\
	      fi;							\
	    fi;								\
	  done;								\
	  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 $$lang/html &&						\
	     gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS)		\
	     $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE));			\
	  if test "x$(HTML_IMAGES)" != "x"; then			\
	    for image in $(HTML_IMAGES); do				\
	      if test -r "$(srcdir)/$$image"; then			\
		cp $(srcdir)/$$image $$lang/html/;			\
	      else							\
		cp $(builddir)/$$image $$lang/html/;			\
	      fi							\
	    done;							\
	  fi;								\
	  echo 'gtk-doc: Fixing cross-references';			\
	  gtkdoc-fixxref --module=$(DOC_MODULE)				\
	    --module-dir=$$lang/html					\
	    --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS);			\
	  touch html-$$lang-build.stamp;				\
	done

### RD -> XML
readme.xml: $(top_srcdir)/README $(RD2REFENTRY_LIB) readme.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/README > readme.xml

readme.xml.ja: $(top_srcdir)/README.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/README.ja > readme.xml.ja

introduction.xml: $(top_srcdir)/doc/introduction.rd $(RD2REFENTRY_LIB) introduction.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/introduction.rd > introduction.xml

introduction.xml.ja: $(top_srcdir)/doc/introduction.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/introduction.rd.ja > introduction.xml.ja

configuration.xml: $(top_srcdir)/doc/configuration.rd $(RD2REFENTRY_LIB) configuration.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/configuration.rd > configuration.xml

configuration.xml.ja: $(top_srcdir)/doc/configuration.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/configuration.rd.ja > configuration.xml.ja

performance.xml: $(top_srcdir)/doc/performance.rd $(RD2REFENTRY_LIB) performance.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/performance.rd > performance.xml

performance.xml.ja: $(top_srcdir)/doc/performance.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/performance.rd.ja > performance.xml.ja

install.xml: $(top_srcdir)/doc/install.rd $(RD2REFENTRY_LIB) install.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install.rd > install.xml

install.xml.ja: $(top_srcdir)/doc/install.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install.rd.ja > install.xml.ja

install-to-debian.xml: $(top_srcdir)/doc/install-to-debian.rd $(RD2REFENTRY_LIB) install-to-debian.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-debian.rd > install-to-debian.xml

install-to-debian.xml.ja: $(top_srcdir)/doc/install-to-debian.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-debian.rd.ja > install-to-debian.xml.ja

install-to-ubuntu.xml: $(top_srcdir)/doc/install-to-ubuntu.rd $(RD2REFENTRY_LIB) install-to-ubuntu.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-ubuntu.rd > install-to-ubuntu.xml

install-to-ubuntu.xml.ja: $(top_srcdir)/doc/install-to-ubuntu.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-ubuntu.rd.ja > install-to-ubuntu.xml.ja

install-to-centos5.xml: $(top_srcdir)/doc/install-to-centos5.rd $(RD2REFENTRY_LIB) install-to-centos5.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-centos5.rd > install-to-centos5.xml

install-to-centos5.xml.ja: $(top_srcdir)/doc/install-to-centos5.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-centos5.rd.ja > install-to-centos5.xml.ja

install-to-centos6.xml: $(top_srcdir)/doc/install-to-centos6.rd $(RD2REFENTRY_LIB) install-to-centos6.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-centos6.rd > install-to-centos6.xml

install-to-centos6.xml.ja: $(top_srcdir)/doc/install-to-centos6.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-centos6.rd.ja > install-to-centos6.xml.ja

install-to-centos7.xml: $(top_srcdir)/doc/install-to-centos7.rd $(RD2REFENTRY_LIB) install-to-centos7.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-centos7.rd > install-to-centos7.xml

install-to-centos7.xml.ja: $(top_srcdir)/doc/install-to-centos7.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-centos7.rd.ja > install-to-centos7.xml.ja

install-to-centos.xml: $(top_srcdir)/doc/install-to-centos.rd $(RD2REFENTRY_LIB) install-to-centos.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-centos.rd > install-to-centos.xml

install-to-centos.xml.ja: $(top_srcdir)/doc/install-to-centos.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-centos.rd.ja > install-to-centos.xml.ja

install-to-freebsd.xml: $(top_srcdir)/doc/install-to-freebsd.rd $(RD2REFENTRY_LIB) install-to-freebsd.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-freebsd.rd > install-to-freebsd.xml

install-to-freebsd.xml.ja: $(top_srcdir)/doc/install-to-freebsd.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-freebsd.rd.ja > install-to-freebsd.xml.ja

install-to-others.xml: $(top_srcdir)/doc/install-to-others.rd $(RD2REFENTRY_LIB) install-to-others.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-to-others.rd > install-to-others.xml

install-to-others.xml.ja: $(top_srcdir)/doc/install-to-others.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-to-others.rd.ja > install-to-others.xml.ja

install-options-to-ubuntu.xml: $(top_srcdir)/doc/install-options-to-ubuntu.rd $(RD2REFENTRY_LIB) install-options-to-ubuntu.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-options-to-ubuntu.rd > install-options-to-ubuntu.xml

install-options-to-ubuntu.xml.ja: $(top_srcdir)/doc/install-options-to-ubuntu.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-options-to-ubuntu.rd.ja > install-options-to-ubuntu.xml.ja

install-options-to-debian.xml: $(top_srcdir)/doc/install-options-to-debian.rd $(RD2REFENTRY_LIB) install-options-to-debian.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-options-to-debian.rd > install-options-to-debian.xml

install-options-to-debian.xml.ja: $(top_srcdir)/doc/install-options-to-debian.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-options-to-debian.rd.ja > install-options-to-debian.xml.ja

install-options-to-centos.xml: $(top_srcdir)/doc/install-options-to-centos.rd $(RD2REFENTRY_LIB) install-options-to-centos.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-options-to-centos.rd > install-options-to-centos.xml

install-options-to-centos.xml.ja: $(top_srcdir)/doc/install-options-to-centos.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-options-to-centos.rd.ja > install-options-to-centos.xml.ja

install-options-to-freebsd.xml: $(top_srcdir)/doc/install-options-to-freebsd.rd $(RD2REFENTRY_LIB) install-options-to-freebsd.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/install-options-to-freebsd.rd > install-options-to-freebsd.xml

install-options-to-freebsd.xml.ja: $(top_srcdir)/doc/install-options-to-freebsd.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/install-options-to-freebsd.rd.ja > install-options-to-freebsd.xml.ja

upgrade-on-debian.xml: $(top_srcdir)/doc/upgrade-on-debian.rd $(RD2REFENTRY_LIB) upgrade-on-debian.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-on-debian.rd > upgrade-on-debian.xml

upgrade-on-debian.xml.ja: $(top_srcdir)/doc/upgrade-on-debian.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-on-debian.rd.ja > upgrade-on-debian.xml.ja

upgrade-on-ubuntu.xml: $(top_srcdir)/doc/upgrade-on-ubuntu.rd $(RD2REFENTRY_LIB) upgrade-on-ubuntu.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-on-ubuntu.rd > upgrade-on-ubuntu.xml

upgrade-on-ubuntu.xml.ja: $(top_srcdir)/doc/upgrade-on-ubuntu.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-on-ubuntu.rd.ja > upgrade-on-ubuntu.xml.ja

upgrade-on-centos.xml: $(top_srcdir)/doc/upgrade-on-centos.rd $(RD2REFENTRY_LIB) upgrade-on-centos.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-on-centos.rd > upgrade-on-centos.xml

upgrade-on-centos.xml.ja: $(top_srcdir)/doc/upgrade-on-centos.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-on-centos.rd.ja > upgrade-on-centos.xml.ja

upgrade-on-freebsd.xml: $(top_srcdir)/doc/upgrade-on-freebsd.rd $(RD2REFENTRY_LIB) upgrade-on-freebsd.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-on-freebsd.rd > upgrade-on-freebsd.xml

upgrade-on-freebsd.xml.ja: $(top_srcdir)/doc/upgrade-on-freebsd.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-on-freebsd.rd.ja > upgrade-on-freebsd.xml.ja

upgrade-options-on-debian.xml: $(top_srcdir)/doc/upgrade-options-on-debian.rd $(RD2REFENTRY_LIB) upgrade-options-on-debian.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-options-on-debian.rd > upgrade-options-on-debian.xml

upgrade-options-on-debian.xml.ja: $(top_srcdir)/doc/upgrade-options-on-debian.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-options-on-debian.rd.ja > upgrade-options-on-debian.xml.ja

upgrade-options-on-ubuntu.xml: $(top_srcdir)/doc/upgrade-options-on-ubuntu.rd $(RD2REFENTRY_LIB) upgrade-options-on-ubuntu.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-options-on-ubuntu.rd > upgrade-options-on-ubuntu.xml

upgrade-options-on-ubuntu.xml.ja: $(top_srcdir)/doc/upgrade-options-on-ubuntu.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-options-on-ubuntu.rd.ja > upgrade-options-on-ubuntu.xml.ja

upgrade-options-on-centos.xml: $(top_srcdir)/doc/upgrade-options-on-centos.rd $(RD2REFENTRY_LIB) upgrade-options-on-centos.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-options-on-centos.rd > upgrade-options-on-centos.xml

upgrade-options-on-centos.xml.ja: $(top_srcdir)/doc/upgrade-options-on-centos.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-options-on-centos.rd.ja > upgrade-options-on-centos.xml.ja

upgrade-options-on-freebsd.xml: $(top_srcdir)/doc/upgrade-options-on-freebsd.rd $(RD2REFENTRY_LIB) upgrade-options-on-freebsd.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/upgrade-options-on-freebsd.rd > upgrade-options-on-freebsd.xml

upgrade-options-on-freebsd.xml.ja: $(top_srcdir)/doc/upgrade-options-on-freebsd.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/upgrade-options-on-freebsd.rd.ja > upgrade-options-on-freebsd.xml.ja

milter-manager.xml: $(top_srcdir)/doc/milter-manager.rd $(RD2REFENTRY_LIB) milter-manager.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-manager.rd > milter-manager.xml

milter-manager.xml.ja: $(top_srcdir)/doc/milter-manager.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-manager.rd.ja > milter-manager.xml.ja

milter-test-server.xml: $(top_srcdir)/doc/milter-test-server.rd $(RD2REFENTRY_LIB) milter-test-server.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-test-server.rd > milter-test-server.xml

milter-test-server.xml.ja: $(top_srcdir)/doc/milter-test-server.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-test-server.rd.ja > milter-test-server.xml.ja

milter-test-client.xml: $(top_srcdir)/doc/milter-test-client.rd $(RD2REFENTRY_LIB) milter-test-client.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-test-client.rd > milter-test-client.xml

milter-test-client.xml.ja: $(top_srcdir)/doc/milter-test-client.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-test-client.rd.ja > milter-test-client.xml.ja

milter-performance-check.xml: $(top_srcdir)/doc/milter-performance-check.rd $(RD2REFENTRY_LIB) milter-performance-check.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-performance-check.rd > milter-performance-check.xml

milter-performance-check.xml.ja: $(top_srcdir)/doc/milter-performance-check.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-performance-check.rd.ja > milter-performance-check.xml.ja

milter-report-statistics.xml: $(top_srcdir)/doc/milter-report-statistics.rd $(RD2REFENTRY_LIB) milter-report-statistics.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-report-statistics.rd > milter-report-statistics.xml

milter-report-statistics.xml.ja: $(top_srcdir)/doc/milter-report-statistics.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-report-statistics.rd.ja > milter-report-statistics.xml.ja

milter-manager-log-analyzer.xml: $(top_srcdir)/doc/milter-manager-log-analyzer.rd $(RD2REFENTRY_LIB) milter-manager-log-analyzer.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/milter-manager-log-analyzer.rd > milter-manager-log-analyzer.xml

milter-manager-log-analyzer.xml.ja: $(top_srcdir)/doc/milter-manager-log-analyzer.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/milter-manager-log-analyzer.rd.ja > milter-manager-log-analyzer.xml.ja

reverse-dictionary.xml: $(top_srcdir)/doc/reverse-dictionary.rd $(RD2REFENTRY_LIB) reverse-dictionary.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/reverse-dictionary.rd > reverse-dictionary.xml

reverse-dictionary.xml.ja: $(top_srcdir)/doc/reverse-dictionary.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/reverse-dictionary.rd.ja > reverse-dictionary.xml.ja

users.xml: $(top_srcdir)/doc/users.rd $(RD2REFENTRY_LIB) users.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/users.rd > users.xml

users.xml.ja: $(top_srcdir)/doc/users.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/users.rd.ja > users.xml.ja

ruby-milter-tutorial.xml: $(top_srcdir)/doc/ruby-milter-tutorial.rd $(RD2REFENTRY_LIB) ruby-milter-tutorial.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/ruby-milter-tutorial.rd > ruby-milter-tutorial.xml

ruby-milter-tutorial.xml.ja: $(top_srcdir)/doc/ruby-milter-tutorial.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/ruby-milter-tutorial.rd.ja > ruby-milter-tutorial.xml.ja

ruby-milter-reference.xml: $(top_srcdir)/doc/ruby-milter-reference.rd $(RD2REFENTRY_LIB) ruby-milter-reference.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/ruby-milter-reference.rd > ruby-milter-reference.xml

ruby-milter-reference.xml.ja: $(top_srcdir)/doc/ruby-milter-reference.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/ruby-milter-reference.rd.ja > ruby-milter-reference.xml.ja

ruby-milter-configuration.xml: $(top_srcdir)/doc/ruby-milter-configuration.rd $(RD2REFENTRY_LIB) ruby-milter-configuration.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/ruby-milter-configuration.rd > ruby-milter-configuration.xml

ruby-milter-configuration.xml.ja: $(top_srcdir)/doc/ruby-milter-configuration.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/ruby-milter-configuration.rd.ja > ruby-milter-configuration.xml.ja

available-milters.xml: $(top_srcdir)/doc/available-milters.rd $(RD2REFENTRY_LIB) available-milters.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/available-milters.rd > available-milters.xml

available-milters.xml.ja: $(top_srcdir)/doc/available-milters.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/available-milters.rd.ja > available-milters.xml.ja

log-list.xml: $(top_srcdir)/doc/log-list.rd $(RD2REFENTRY_LIB) log-list.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/log-list.rd > log-list.xml

log-list.xml.ja: $(top_srcdir)/doc/log-list.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/log-list.rd.ja > log-list.xml.ja

maintenance-policy.xml: $(top_srcdir)/doc/maintenance-policy.rd $(RD2REFENTRY_LIB) maintenance-policy.xml.ja
	$(RD2DOCBOOK) $(top_srcdir)/doc/maintenance-policy.rd > maintenance-policy.xml

maintenance-policy.xml.ja: $(top_srcdir)/doc/maintenance-policy.rd.ja $(RD2REFENTRY_LIB) ja.po
	$(RD2DOCBOOK_JA) $(top_srcdir)/doc/maintenance-policy.rd.ja > maintenance-policy.xml.ja

### SVG -> PNG
mta-and-milter-manager-and-child-milter.png: $(top_srcdir)/doc/mta-and-milter-manager-and-child-milter.svg
	$(SVG2PNG) $@ $<

mta-and-milter-manager-and-child-milter-ja.png: $(top_srcdir)/doc/mta-and-milter-manager-and-child-milter-ja.svg
	$(SVG2PNG) $@ $<

sendmail-and-milter.png: $(top_srcdir)/doc/sendmail-and-milter.svg
	$(SVG2PNG) $@ $<

sendmail-and-milter-ja.png: $(top_srcdir)/doc/sendmail-and-milter-ja.svg
	$(SVG2PNG) $@ $<

sendmail-and-postfix-and-milter.png: $(top_srcdir)/doc/sendmail-and-postfix-and-milter.svg
	$(SVG2PNG) $@ $<

sendmail-and-postfix-and-milter-ja.png: $(top_srcdir)/doc/sendmail-and-postfix-and-milter-ja.svg
	$(SVG2PNG) $@ $<

milter-manager-log-analyzer-graphs.png: $(top_srcdir)/doc/milter-manager-log-analyzer-graphs.svg
	$(SVG2PNG) $@ $<

upload: docs
	rm -rf tmp/
	mkdir -p tmp/
	cp -rp html/ tmp/reference
	for catalog in $(CATALOGS); do					\
	  lang=`echo $$catalog | sed 's/.po$$//'`;			\
	  cp -rp $$lang/html/ tmp/reference/$$lang/;			\
	done
	chmod -R g+w tmp/reference
	ruby $(CUTTER_SOURCE_PATH)/misc/prepare-gtk-doc-html-for-publishing.rb	\
	  --template-directory=$(srcdir) --title "$(PACKAGE_TITLE)"	\
	  tmp/reference/*.html
	ruby $(CUTTER_SOURCE_PATH)/misc/prepare-gtk-doc-html-for-publishing.rb	\
	  --template-directory=$(srcdir) --title "$(PACKAGE_TITLE)"	\
	  --language=ja tmp/reference/ja/*.html
	rsync -avz --delete tmp/reference/		\
	  $(OSDN_HTDOCS)/reference/

dist-hook-local:
	mkdir -p $(distdir)/tmpl $(distdir)/xml
	-cp tmpl/*.sgml $(distdir)/tmpl
	-cp xml/*.xml $(distdir)/xml
	for catalog in $(CATALOGS); do					\
	  lang=`echo $$catalog | sed 's/.po$$//'`;			\
	  mkdir -p $(distdir)/$$lang/html;				\
	  mkdir -p $(distdir)/$$lang/xml;				\
	  cp $$lang/html/* $(distdir)/$$lang/html;			\
	  cp $$lang/xml/* $(distdir)/$$lang/xml;			\
	  cp $$lang/$(DOC_MAIN_SGML_FILE) $(distdir)/$$lang/;		\
	  cp $$lang/*.xml $(distdir)/$$lang/;				\
	  cp $$lang/html.stamp $(distdir)/$$lang/;			\
	  cp html-$$lang-build.stamp $(distdir)/;			\
	done
	cp $(DOC_MODULE).types $(distdir)/
	cp $(DOC_MODULE)-sections.txt $(distdir)/
	cd $(distdir) && rm -f $(DISTCLEANFILES)
	-$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
	rm -f $(distdir)/version.xml

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) $(DOC_MODULE).types; \
	fi
	for catalog in $(CATALOGS); do					\
	  lang=`echo $$catalog | sed 's/.po$$//'`;			\
	  rm -rf $$lang html-$$lang-build.stamp;			\
	done

install-data-hook:
	for catalog in $(CATALOGS); do					\
	  if test x"$$catalog" = "x"; then				\
	    dir="html";							\
	    target_dir="";						\
	  else								\
	    lang=`echo $$catalog | sed 's/.po$$//'`;			\
	    dir="$$lang/html";						\
	    target_dir="/$$lang";					\
	  fi;								\
	  installfiles=`echo $$dir/*`;					\
	  if test "$$installfiles" = "$$dir/*"; then			\
	    echo '-- Nothing to install';				\
	  else								\
	    $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)$$target_dir;	\
	    for i in $$installfiles; do					\
	      echo "-- Installing $$i";					\
	      $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR)$$target_dir;	\
	    done;							\
	    echo "-- Installing $$dir/index.sgml";			\
	    $(INSTALL_DATA) $$dir/index.sgml				\
	      $(DESTDIR)$(TARGET_DIR)$$target_dir || :;			\
	    if test "$(DESTDIR)" = ""; then				\
	      $(GTKDOC_REBASE) --relative				\
	 	--html-dir=$(DESTDIR)$(TARGET_DIR)$$target_dir;		\
	    else							\
	      $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR)		\
	 	--html-dir=$(DESTDIR)$(TARGET_DIR)$$target_dir;		\
	    fi;								\
	  fi;								\
	done

# 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:
