# Caja-Actions
# A Caja extension which offers configurable context menu actions.
#
# Copyright (C) 2005 The GNOME Foundation
# Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
# Copyright (C) 2009-2012 Pierre Wieser and others (see AUTHORS)
# Copyright (C) 2012-2017 Wolfgang Ulbrich and others (see AUTHORS)
#
# Caja-Actions is free software; you can redistribute it and/or
# modify it under the terms of the GNU General  Public  License  as
# published by the Free Software Foundation; either  version  2  of
# the License, or (at your option) any later version.
#
# Caja-Actions 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 Caja-Actions; see the file  COPYING.  If  not,  see
# <http://www.gnu.org/licenses/>.
#
# Authors:
#   Frederic Ruaudel <grumz@grumz.net>
#   Rodrigo Moya <rodrigo@mate-db.org>
#   Pierre Wieser <pwieser@trychlos.org>
#   ... and many others (see AUTHORS)

#
# Caja-Actions Reference Manual
#

# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

DOC_MODULE = caja-actions

DOC_MODULE_VERSION = 3

DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml

# from the public API documentation point of view
# we have to ignore all headers in src/core, and all corresponding source
# that is, only consider in src/core .c sources whose header is in src/api
core_headers = $(patsubst $(top_srcdir)/src/core/%,%,$(shell \ls -1 $(top_srcdir)/src/core/*.h))

#written_xmls_regexp = $(shell echo "$(DOC_MAIN_SGML_FILE) $(content_files)" | $(SED) 's/[[:space:]]\+/|/g')
#written_xmls_regexp = $(shell echo "$(DOC_MAIN_SGML_FILE) $(auto_created_files)" | $(SED) 's/[[:space:]]\+/|/g')
#written_xmls = $(shell \ls -1 *.xml | $(EGREP) -v "$(written_xmls_regexp)")

# content_files must include auto created ones because content_files is
# a prerequisite of html-build-stamp and pdf-build-stamp targets;
# we so are sure that these will be actually generated (version.xml, version_dir.xml)
# as a consequence, auto created files are automatically included in the tarball
content_files = \
	$(patsubst $(abs_srcdir)/%,%,$(shell \ls -1 $(abs_srcdir)/*.xml)) \
	$(auto_created_files)

if !ENABLE_DEPRECATED
ignore_headers = na-mateconf-monitor.h
endif

# Extra options to supply to gtkdoc-scan
#	--ignore-headers="config.h devkit-disks-daemon-glue.h"
#	--rebuild-sections
SCAN_OPTIONS = \
	--rebuild-types								\
	--deprecated-guards=NA_ENABLE_DEPRECATED	\
	$(NULL)

# The directory containing the source code. Relative to $(srcdir)
# Starting with gtk-doc 1.15 (which is required by configure.ac),
# multiple source dirs are directly handled by gtk-doc.make
DOC_SOURCE_DIR = \
	$(top_srcdir)/src/api 						\
	$(top_srcdir)/src/core						\
	$(NULL)

# Headers to ignore
IGNORE_HFILES = \
	$(core_headers)								\
	$(ignore_headers)							\
	$(NULL)

# CFLAGS and LDFLAGS for compiling scan program.
# Only needed if $(DOC_MODULE).types is non-empty.
AM_CPPFLAGS += \
	-I $(top_srcdir)/src						\
	$(CAJA_ACTIONS_CFLAGS)					\
	$(NULL)

core_libdir = $(top_builddir)/src/core/.libs

AM_LDFLAGS += \
	$(CAJA_ACTIONS_LIBS)					\
	-L$(core_libdir) -lna-core					\
	$(NULL)

# Need this to be able to set ourselves GTKDOC_RUN
# This is extracted from gtk-doc.make
if GTK_DOC_USE_LIBTOOL
override GTKDOC_RUN = \
	$(gtkdoc_run_prefix) $(LIBTOOL) --mode=execute
else
override GTKDOC_RUN = \
	$(gtkdoc_run_prefix) sh -c
endif

gtkdoc_run_prefix = \
	LD_LIBRARY_PATH=$(core_libdir)				\
	$(NULL)

# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = \
	--sgml-mode 								\
	--output-format=xml							\
	$(NULL)

# Extra options to supply to gtkdoc-mktmpl
MKTMPL_OPTIONS = \
	$(NULL)

# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
# nb: unable to subst/strip/sed a $(null) terminating character!
#     so keep it out of there
auto_created_files = \
	$(xml_files)								\
	version_dir.xml

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

# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS = \
	$(NULL)

xml_in_files = \
	version.xml.in								\
	$(NULL)

xml_files = $(xml_in_files:.xml.in=.xml)

install-data-local: install-data-local-hook

install-data-local-hook:

.PHONY: \
	install-data-local-hook
