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

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
VPATH = @srcdir@
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 = docs/api
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
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)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
GCRYPT_LIBS = @GCRYPT_LIBS@
GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
GNUTLS_LIBS = @GNUTLS_LIBS@
GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
GREP = @GREP@
HELP2MAN = @HELP2MAN@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
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@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
NSPR_PACKAGE = @NSPR_PACKAGE@
NSS_CFLAGS = @NSS_CFLAGS@
NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
NSS_LIBS = @NSS_LIBS@
NSS_MIN_VERSION = @NSS_MIN_VERSION@
NSS_PACKAGE = @NSS_PACKAGE@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
OPENSSL_LIBS = @OPENSSL_LIBS@
OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
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_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
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_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
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_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
XMLSEC_NO_DES = @XMLSEC_NO_DES@
XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
XMLSEC_NO_X509 = @XMLSEC_NO_X509@
XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
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@
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_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@
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@
lt_ECHO = @lt_ECHO@
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_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

#
#
#
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' -a ! -name "xkms*" -print )  \
	$(shell find $(INCLUDE_DIR) -name '*.h' -a ! -name "symbols.h" -a ! -name "xkms*" -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 ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \
	$(am__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
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

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

ctags: CTAGS
CTAGS:


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 "$(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
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:
	-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."
clean-am: clean-generic clean-libtool clean-local mostlyclean-am

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

dvi: dvi-am

dvi-am:

html-am:

info: info-am

info-am:

install-data-am:

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:

.MAKE: install-am install-strip

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


# do nothing for all
all:

docs: sgml html clean-sources

# need to cleanup "bad" chars
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-gcrypt \
		    --main-sgml-file=xmlsec-gcrypt.sgml \
		    --tmpl-dir=tmpl/gcrypt \
		    --output-dir=sgml/gcrypt \
		    --source-dir=$(DOC_SOURCE_DIR)/src/gcrypt \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/gcrypt
	-@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-gcrypt \
		    --output-dir=tmpl/gcrypt
	-@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 \
		    --rebuild-sections \
		    --source-dir=$(DOC_SOURCE_DIR)/src/base \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/base
	-@gtkdoc-scan --module=xmlsec-openssl \
		    --rebuild-sections \
		    --source-dir=$(DOC_SOURCE_DIR)/src/openssl \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/openssl
	-@gtkdoc-scan --module=xmlsec-gnutls \
		    --rebuild-sections \
		    --source-dir=$(DOC_SOURCE_DIR)/src/gnutls \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/gnutls
	-@gtkdoc-scan --module=xmlsec-gcrypt \
		    --rebuild-sections \
		    --source-dir=$(DOC_SOURCE_DIR)/src/gcrypt \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/gcrypt
	-@gtkdoc-scan --module=xmlsec-nss \
		    --rebuild-sections \
		    --source-dir=$(DOC_SOURCE_DIR)/src/nss \
		    --source-dir=$(DOC_SOURCE_DIR)/include/xmlsec/nss
	-@gtkdoc-scan --module=xmlsec-mscrypto \
		    --rebuild-sections \
		    --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:
