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

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004  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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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 = :
host_triplet = @host@
subdir = docs/api
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVENIENCE_LTDL_FALSE = @CONVENIENCE_LTDL_FALSE@
CONVENIENCE_LTDL_TRUE = @CONVENIENCE_LTDL_TRUE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
GNUTLS_LIBS = @GNUTLS_LIBS@
GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LTDL_FALSE = @INSTALL_LTDL_FALSE@
INSTALL_LTDL_TRUE = @INSTALL_LTDL_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML262_CFLAGS = @LIBXML262_CFLAGS@
LIBXML262_LIBS = @LIBXML262_LIBS@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_CONFIG = @LIBXML_CONFIG@
LIBXML_LIBS = @LIBXML_LIBS@
LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
LIBXSLT_LIBS = @LIBXSLT_LIBS@
LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MV = @MV@
NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
NSS_CFLAGS = @NSS_CFLAGS@
NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
NSS_LIBS = @NSS_LIBS@
NSS_MIN_VERSION = @NSS_MIN_VERSION@
OBJEXT = @OBJEXT@
OPENSSL097_CFLAGS = @OPENSSL097_CFLAGS@
OPENSSL097_LIBS = @OPENSSL097_LIBS@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
OPENSSL_LIBS = @OPENSSL_LIBS@
OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
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@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_ENABLED = @PKG_CONFIG_ENABLED@
RANLIB = @RANLIB@
RM = @RM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
XMLSEC_DEFINES = @XMLSEC_DEFINES@
XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
XMLSEC_LIBS = @XMLSEC_LIBS@
XMLSEC_NO_AES = @XMLSEC_NO_AES@
XMLSEC_NO_AES_FALSE = @XMLSEC_NO_AES_FALSE@
XMLSEC_NO_AES_TRUE = @XMLSEC_NO_AES_TRUE@
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING_FALSE = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING_FALSE@
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING_TRUE = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING_TRUE@
XMLSEC_NO_DES = @XMLSEC_NO_DES@
XMLSEC_NO_DES_FALSE = @XMLSEC_NO_DES_FALSE@
XMLSEC_NO_DES_TRUE = @XMLSEC_NO_DES_TRUE@
XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
XMLSEC_NO_DSA_FALSE = @XMLSEC_NO_DSA_FALSE@
XMLSEC_NO_DSA_TRUE = @XMLSEC_NO_DSA_TRUE@
XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
XMLSEC_NO_GNUTLS_FALSE = @XMLSEC_NO_GNUTLS_FALSE@
XMLSEC_NO_GNUTLS_TRUE = @XMLSEC_NO_GNUTLS_TRUE@
XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
XMLSEC_NO_HMAC_FALSE = @XMLSEC_NO_HMAC_FALSE@
XMLSEC_NO_HMAC_TRUE = @XMLSEC_NO_HMAC_TRUE@
XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
XMLSEC_NO_NSS_FALSE = @XMLSEC_NO_NSS_FALSE@
XMLSEC_NO_NSS_TRUE = @XMLSEC_NO_NSS_TRUE@
XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
XMLSEC_NO_OPENSSL_FALSE = @XMLSEC_NO_OPENSSL_FALSE@
XMLSEC_NO_OPENSSL_TRUE = @XMLSEC_NO_OPENSSL_TRUE@
XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
XMLSEC_NO_RIPEMD160_FALSE = @XMLSEC_NO_RIPEMD160_FALSE@
XMLSEC_NO_RIPEMD160_TRUE = @XMLSEC_NO_RIPEMD160_TRUE@
XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
XMLSEC_NO_RSA_FALSE = @XMLSEC_NO_RSA_FALSE@
XMLSEC_NO_RSA_TRUE = @XMLSEC_NO_RSA_TRUE@
XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
XMLSEC_NO_SHA1_FALSE = @XMLSEC_NO_SHA1_FALSE@
XMLSEC_NO_SHA1_TRUE = @XMLSEC_NO_SHA1_TRUE@
XMLSEC_NO_X509 = @XMLSEC_NO_X509@
XMLSEC_NO_X509_FALSE = @XMLSEC_NO_X509_FALSE@
XMLSEC_NO_X509_TRUE = @XMLSEC_NO_X509_TRUE@
XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
XMLSEC_NO_XKMS_FALSE = @XMLSEC_NO_XKMS_FALSE@
XMLSEC_NO_XKMS_TRUE = @XMLSEC_NO_XKMS_TRUE@
XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
XMLSEC_NO_XMLDSIG_FALSE = @XMLSEC_NO_XMLDSIG_FALSE@
XMLSEC_NO_XMLDSIG_TRUE = @XMLSEC_NO_XMLDSIG_TRUE@
XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
XMLSEC_NO_XMLENC_FALSE = @XMLSEC_NO_XMLENC_FALSE@
XMLSEC_NO_XMLENC_TRUE = @XMLSEC_NO_XMLENC_TRUE@
XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
XMLSEC_VERSION = @XMLSEC_VERSION@
XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
NULL = 
TOP = ../..
MODULE = xmlsec
SOURCE_DIR = $(TOP)/src
INCLUDE_DIR = $(TOP)/include
SGML_CATALOG_FILES = /usr/share/sgml/docbook/sgml-dtd-3.0-1.0-8/catalog:/usr/share/sgml/openjade-1.3.1/catalog:/usr/share/sgml/docbook/dsssl-stylesheets/catalog
EXTRA_DIST = \
	chapters \
	images \
	$(NULL)


#
# We need to pre-process original source files
# because gtkdoc does not understand some C features
#
DOC_SOURCE_DIR = ./code
DOC_SOURCE_FILES = \
	$(shell find $(SOURCE_DIR) -name '*.c' -print )  \
	 $(shell find $(INCLUDE_DIR) -name '*.h' -a ! -name "symbols.h" -print )

EXAMPLES_SOURCE_DIR = ../../examples
EXAMPLES_SOURCE_FILES = \
	$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.c' -print) \
	$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.xml' -print) 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(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/api/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  docs/api/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

distclean-libtool:
	-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:

ctags: CTAGS
CTAGS:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
	list='$(DISTFILES)'; for file in $$list; do \
	  case $$file in \
	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
	  esac; \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
	    dir="/$$dir"; \
	    $(mkdir_p) "$(distdir)$$dir"; \
	  else \
	    dir=''; \
	  fi; \
	  if test -d $$d/$$file; then \
	    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
	$(MAKE) $(AM_MAKEFLAGS) \
	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
	  dist-hook
check-am: all-am
check: check-am
all-am: Makefile
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:
	$(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:
	-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-am: clean-generic clean-libtool clean-local mostlyclean-am

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

dvi: dvi-am

dvi-am:

info: info-am

info-am:

install-data-am:

install-exec-am:

install-info: install-info-am

install-man:

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-info-am

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	clean-local distclean distclean-generic distclean-libtool \
	distdir dvi dvi-am html html-am info info-am install \
	install-am install-data install-data-am install-exec \
	install-exec-am install-info install-info-am install-man \
	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 uninstall uninstall-am \
	uninstall-info-am


# do nothing for all
all:

docs: sgml html clean-sources

html: sgml xmlsec.sgml xmlsec-index
	gtkdoc-mkhtml xmlsec xmlsec.sgml

#
# Prepeare sgml files from sources for each library. We are also
# doing some "magic" here by automatically adding links to XML DSig and 
# XML Enc specification, we also remove "Ptr" from the end of the link
# targets to make more references
#
sgml: templates
	-@gtkdoc-mkdb --module=xmlsec \
		    --main-sgml-file=xmlsec.sgml \
		    --source-dir=$(DOC_SOURCE_DIR)/src/base \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/base
	-@gtkdoc-mkdb --module=xmlsec-openssl \
		    --main-sgml-file=xmlsec-openssl.sgml \
		    --tmpl-dir=tmpl/openssl \
		    --output-dir=sgml/openssl \
		    --source-dir=$(DOC_SOURCE_DIR)/src/openssl \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/openssl
	-@gtkdoc-mkdb --module=xmlsec-gnutls \
		    --main-sgml-file=xmlsec-gnutls.sgml \
		    --tmpl-dir=tmpl/gnutls \
		    --output-dir=sgml/gnutls \
		    --source-dir=$(DOC_SOURCE_DIR)/src/gnutls \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/gnutls
	-@gtkdoc-mkdb --module=xmlsec-nss \
		    --main-sgml-file=xmlsec-nss.sgml \
		    --tmpl-dir=tmpl/nss \
		    --output-dir=sgml/nss \
		    --source-dir=$(DOC_SOURCE_DIR)/src/nss \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/nss
	-@gtkdoc-mkdb --module=xmlsec-mscrypto \
		    --main-sgml-file=xmlsec-mscrypto.sgml \
		    --tmpl-dir=tmpl/mscrypto \
		    --output-dir=sgml/mscrypto \
		    --source-dir=$(DOC_SOURCE_DIR)/src/mscrypto \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/mscrypto
	-@(for i in `find sgml -name "*.sgml" -print` ; do \
	    cat $$i | \
		sed 's!\(&lt;dsig:\)\([^/]*\)\(\/&gt;\)!<ulink URL=\"http://www.w3.org/TR/xmldsig-core/#sec-\2\">\1\2\3</ulink>!g' | \
		sed 's!\(&lt;enc:\)\([^/]*\)\(\/&gt;\)!<ulink URL=\"http://www.w3.org/TR/xmlenc-core/#sec-\2\">\1\2\3</ulink>!g' | \
		sed 's!linkend=\"\(.*\)Ptr\"!linkend=\"\1\"!g' > \
		$$i.tmp; \
		mv -f $$i.tmp $$i; \
	done);

templates: scan
	-@gtkdoc-mktmpl --module=xmlsec
	-@gtkdoc-mktmpl --module=xmlsec-openssl \
		    --output-dir=tmpl/openssl
	-@gtkdoc-mktmpl --module=xmlsec-gnutls \
		    --output-dir=tmpl/gnutls
	-@gtkdoc-mktmpl --module=xmlsec-nss \
		    --output-dir=tmpl/nss
	-@gtkdoc-mktmpl --module=xmlsec-mscrypto \
		    --output-dir=tmpl/mscrypto

scan: doc_sources example_sources
	-@gtkdoc-scan --module=xmlsec \
		    --source-dir=$(DOC_SOURCE_DIR)/src/base \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/base
	-@gtkdoc-scan --module=xmlsec-openssl \
		    --source-dir=$(DOC_SOURCE_DIR)/src/openssl \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/openssl
	-@gtkdoc-scan --module=xmlsec-gnutls \
		    --source-dir=$(DOC_SOURCE_DIR)/src/gnutls \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/gnutls
	-@gtkdoc-scan --module=xmlsec-nss \
		    --source-dir=$(DOC_SOURCE_DIR)/src/nss \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/nss
	-@gtkdoc-scan --module=xmlsec-mscrypto \
		    --source-dir=$(DOC_SOURCE_DIR)/src/mscrypto \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/mscrypto

#
# Prepare source files by coping them to "code" folder and 
# removing XMLSEC_EXPORT_* stuff that makes gtkdoc crazy
#
doc_sources: $(DOC_SOURCE_FILES)
	@(for i in $(DOC_SOURCE_FILES) ; do \
	    folder_name=`echo $$i | sed 's#$(TOP)/##' | sed 's#/[^/]*$$##'`; \
	    file_name=`echo $$i | sed 's#.*/##'`; \
	    test -d $(DOC_SOURCE_DIR)/$$folder_name || mkdir -p $(DOC_SOURCE_DIR)/$$folder_name; \
	    cat $$i | \
		sed 's/#if.*//' | \
		sed 's/#el.*//' | \
		sed 's/#end.*//' | \
		sed 's/XMLSEC_CRYPTO_EXPORT//' | \
		sed 's/XMLSEC_EXPORT_VAR//' | \
		sed 's/XMLSEC_EXPORT//' | \
		sed 's/XMLSEC_ERRORS_PRINTF_ATTRIBUTE//' > \
		$(DOC_SOURCE_DIR)/$$folder_name/$$file_name; \
	done);
	-@mkdir -p $(DOC_SOURCE_DIR)/src/base
	-@mv -f $(DOC_SOURCE_DIR)/src/*.c $(DOC_SOURCE_DIR)/src/base
	-@mkdir -p $(DOC_SOURCE_DIR)/include/xmlsec/base
	-@mv -f $(DOC_SOURCE_DIR)/include/xmlsec/*.h $(DOC_SOURCE_DIR)/include/xmlsec/base
	-@rm -f $(DOC_SOURCE_DIR)/include/xmlsec/*/symbols.h

#
# Create index for all functions. For macros and defines need to add -CAPS suffix
#
xmlsec-index: scan 
	@grep -h '<NAME>.*</NAME>' xmlsec-*decl.txt | \
		grep -v '<NAME>extern</NAME>' | \
		sort -u | \
		sed 's#_#-#g' | \
		sed 's#<NAME>\([^-]*\)-\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1-\2-CAPS\">\1-\2</link></para></listitem>#g' | \
		sed 's#<NAME>\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1\">\1</link></para></listitem>#g' > \
		xmlsec-index.sgml

#
# The following code converts C example file to sgml RefEntry files.
# We get file title from a string "XML Security Library example: ..."
# which is usually placed at the top of the file. Also all "unsafe" xml 
# characters (<, >, &) are escaped. 
#
example_sources:
	@mkdir -p examples
	@(for i in $(EXAMPLES_SOURCE_FILES) ; do \
	    file_name=`echo $$i | sed 's#.*/##' | sed 's#\..*$$##'`; \
	    file_ext=`echo $$i | sed 's#.*/##' | sed 's#.*\.##'`; \
	    echo Converting $$file_name.$$file_ext to $$file_name.sgml ...; \
	    file_title=`cat $$i | grep 'XML Security Library example: ' | sed 's#^.*: *##'`; \
	    echo "<sect2 id=\"xmlsec-example-$$file_name\" >" > \
		examples/$$file_name.sgml; \
	    echo "<title>$$file_name.$$file_ext</title><para><informalexample><programlisting>" >> \
		examples/$$file_name.sgml; \
	    cat $$i | \
		sed "s#&#\&amp;#g" | \
		sed "s#<#\&lt;#g" | \
		sed "s#>#\&gt;#g" >> \
		examples/$$file_name.sgml; \
	    echo "</programlisting></informalexample></para></sect2>" >> \
		examples/$$file_name.sgml; \
	done);

dist-hook:
	@cp -p $(srcdir)/*.html $(srcdir)/*.png $(srcdir)/*.sgml $(distdir)

clean: clean-sources
	-@rm -rf $(DOC_SOURCE_DIR)
	-@rm -rf sgml/*~ sgml/*.bak  
	-@rm -rf tmpl/*~ tmpl/*.bak  
	-@rm -rf *~ *.bak *.hierarchy *.signals *-unused.txt *.stamp

clean-sources:
	-@rm -rf code examples

clean-local:
	-@rm -rf *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean
	-@rm *.html *.txt
	-@rm -rf `find sgml -name "*.sgml" -print`
# 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:
