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

# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# 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 = :
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CONVERT = @CONVERT@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
GIMP_CFLAGS = @GIMP_CFLAGS@
GIMP_DATADIR = @GIMP_DATADIR@
GIMP_HELP_BUILD_FALSE = @GIMP_HELP_BUILD_FALSE@
GIMP_HELP_BUILD_TRUE = @GIMP_HELP_BUILD_TRUE@
GIMP_LIBS = @GIMP_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
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@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
STYLEBASE = @STYLEBASE@
USE_CONVERT_FALSE = @USE_CONVERT_FALSE@
USE_CONVERT_TRUE = @USE_CONVERT_TRUE@
VERSION = @VERSION@
XMLLINT = @XMLLINT@
XSLTFLAGS = @XSLTFLAGS@
XSLTPROC = @XSLTPROC@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@

STAMP_DIR = stamps

IMAGE_DIRS = \
	dialogs		\
	dialogs/examples\
	filters		\
	filters/examples\
	glossary	\
	tool-options	\
	toolbox		\
	callouts	\
	preferences	\
	using           \
	menus


IMAGE_FILES = \
	$(wildcard $(top_srcdir)/images/*.png)	\
	$(wildcard $(top_srcdir)/images/*/*.png)\
	$(wildcard $(top_srcdir)/images/*/*/*.png)


XML_FILES = \
	$(wildcard $(top_srcdir)/src/*.xml)	\
	$(wildcard $(top_srcdir)/src/*/*.xml)	\
	$(wildcard $(top_srcdir)/src/*/*/*.xml)	\
	$(wildcard $(top_srcdir)/src/*/*/*/*.xml)


DTD_FILES = \
	$(top_srcdir)/src/linkset.dtd


CSS_DIRS = \
	$(top_srcdir)/stylesheets


CSS_FILES = \
        $(top_srcdir)/stylesheets/gimp-help-plain.css	\
        $(top_srcdir)/stylesheets/gimp-help-screen.css	\
	$(top_srcdir)/stylesheets/zh_CN/gimp-help-custom.css


MAKEINDEX = $(top_srcdir)/stylesheets/makeindex.xsl

HELP_STAMPS = \
	$(STAMP_DIR)/css.stamp		\
	$(STAMP_DIR)/latex.stamp	\
	$(STAMP_DIR)/pdf.stamp		\
	$(STAMP_DIR)/html.stamp		\
	$(STAMP_DIR)/images.stamp	\
	$(STAMP_DIR)/index.stamp	\
	$(STAMP_DIR)/mkdirs.stamp	\
	$(STAMP_DIR)/profile.stamp	\
	$(STAMP_DIR)/validate.stamp


FORMATS = html pdf

EXTRA_DIST = \
	HACKING				\
	INSTALL				\
	TERMINOLOGY			\
	stylesheets/plainhtml.xsl.in	\
	$(MAKEINDEX)			\
	$(IMAGE_FILES)			\
	$(DTD_FILES)			\
	$(XML_FILES)			\
	$(CSS_FILES)


@GIMP_HELP_BUILD_TRUE@CLEANFILES = $(HELP_STAMPS)

MAINTAINERCLEANFILES = $(HELP_STAMPS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = stylesheets/plainhtml.xsl
DIST_SOURCES =
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
	COPYING ChangeLog INSTALL Makefile.am NEWS TODO aclocal.m4 \
	configure configure.in install-sh missing mkinstalldirs
all: all-am

.SUFFIXES:

am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno
$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  Makefile
Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)

$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	$(SHELL) ./config.status --recheck
$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
	cd $(srcdir) && $(AUTOCONF)

$(ACLOCAL_M4):  configure.in 
	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
stylesheets/plainhtml.xsl: $(top_builddir)/config.status $(top_srcdir)/stylesheets/plainhtml.xsl.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
uninstall-info-am:
tags: TAGS
TAGS:

ctags: CTAGS
CTAGS:

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)

top_distdir = .
distdir = $(PACKAGE)-$(VERSION)

am__remove_distdir = \
  { test ! -d $(distdir) \
    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
         && rm -fr $(distdir); }; }

GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print

distdir: $(DISTFILES)
	$(am__remove_distdir)
	mkdir $(distdir)
	$(mkinstalldirs) $(distdir)/$(top_srcdir)/images $(distdir)/$(top_srcdir)/images/* $(distdir)/$(top_srcdir)/images/*/* $(distdir)/$(top_srcdir)/src $(distdir)/$(top_srcdir)/src/* $(distdir)/$(top_srcdir)/src/*/* $(distdir)/$(top_srcdir)/src/*/*/* $(distdir)/$(top_srcdir)/stylesheets $(distdir)/$(top_srcdir)/stylesheets/zh_CN $(distdir)/stylesheets
	@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"; \
	    $(mkinstalldirs) "$(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
	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
	|| chmod -R a+r $(distdir)
dist-gzip: distdir
	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
	$(am__remove_distdir)

dist dist-all: distdir
	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
	$(am__remove_distdir)

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	$(am__remove_distdir)
	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
	chmod -R a-w $(distdir); chmod a+w $(distdir)
	mkdir $(distdir)/_build
	mkdir $(distdir)/_inst
	chmod a-w $(distdir)
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && cd $(distdir)/_build \
	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
	        distuninstallcheck \
	  && chmod -R a-w "$$dc_install_base" \
	  && ({ \
	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
	  && rm -rf "$$dc_destdir" \
	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
	  && rm -f $(distdir).tar.gz \
	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
	$(am__remove_distdir)
	@echo "$(distdir).tar.gz is ready for distribution" | \
	  sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
	@cd $(distuninstallcheck_dir) \
	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
	   || { echo "ERROR: files left after uninstall:" ; \
	        if test -n "$(DESTDIR)"; then \
	          echo "  (check DESTDIR support)"; \
	        fi ; \
	        $(distuninstallcheck_listfiles) ; \
	        exit 1; } >&2
distcleancheck: distclean
	@if test '$(srcdir)' = . ; then \
	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
	  exit 1 ; \
	fi
	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
	  || { echo "ERROR: files left in build directory after distclean:" ; \
	       $(distcleancheck_listfiles) ; \
	       exit 1; } >&2
check-am: all-am
check: check-am
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:
	$(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:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

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."
	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am

clean-am: clean-generic mostlyclean-am

distclean: distclean-am
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

info: info-am

info-am:

install-data-am: install-data-local

install-exec-am:

install-info: install-info-am

install-man:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -rf $(top_srcdir)/autom4te.cache
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic \
	maintainer-clean-local

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-info-am

.PHONY: all all-am all-local check check-am clean clean-generic dist \
	dist-all dist-gzip distcheck distclean distclean-generic \
	distcleancheck distdir distuninstallcheck dvi dvi-am info \
	info-am install install-am install-data install-data-am \
	install-data-local 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 pdf pdf-am ps ps-am uninstall uninstall-am \
	uninstall-info-am


$(STAMP_DIR)/clean.stamp: Makefile
	@echo '*** Creating fresh stamps directory ***'
	@rm -rf $(STAMP_DIR); $(mkinstalldirs) $(STAMP_DIR)
	@echo '*** Removing the built help files ***'
	rm -rf html
	rm -rf pdf 
	rm -rf xml
	@echo '*** Removing temporary files ***'
	@rm -rf `find . -name "*~"`
	@rm -rf `find . -name "*.orig"`
	@rm -rf `find . -name "*.bak"`
	@rm -rf `find . -name "*.rej"`

	@touch $@

$(STAMP_DIR)/mkdirs.stamp: $(patsubst %,$(STAMP_DIR)/mkdirs.%.stamp,$(ALL_LINGUAS)) 
	@echo '*** Creating directories ***'
	@touch $@

$(patsubst %,$(STAMP_DIR)/mkdirs.%.stamp,$(ALL_LINGUAS)) : $(STAMP_DIR)/mkdirs.%.stamp :
	@$(mkinstalldirs) $(STAMP_DIR)
	@for format in $(FORMATS); do \
	  $(mkinstalldirs) $$format/$*; \
	done;

	@touch $@

mkdirs: $(STAMP_DIR)/mkdirs.stamp

$(STAMP_DIR)/css.stamp : $(patsubst %,$(STAMP_DIR)/css.%.stamp,$(ALL_LINGUAS))
	@echo '*** Copying stylesheets ***'
	@touch $@

$(patsubst %,$(STAMP_DIR)/css.%.stamp,$(ALL_LINGUAS)) : $(STAMP_DIR)/css.%.stamp : $(STAMP_DIR)/mkdirs.%.stamp $(CSS_FILES)
	@cp $(CSS_FILES) $(srcdir)/html/$*; \
	if test $* = "zh_CN"; then \
	  cp $(CSS_DIRS)/$*/gimp-help-custom.css $(srcdir)/html/$*; \
	fi

	@touch $@

css: $(STAMP_DIR)/css.stamp

$(STAMP_DIR)/images.stamp : $(patsubst %,$(STAMP_DIR)/images.%.stamp,$(ALL_LINGUAS))
	@echo '*** Copying images ***'
	@touch $@

$(patsubst %,$(STAMP_DIR)/images.%.stamp,$(ALL_LINGUAS)) : $(STAMP_DIR)/images.%.stamp : $(STAMP_DIR)/mkdirs.%.stamp $(IMAGE_FILES)
	@for format in $(FORMATS); do \
	  $(mkinstalldirs) $$format/images; \
	  cp $(top_srcdir)/images/*.png $$format/images; \
	  for dir in $(IMAGE_DIRS); do \
	    if test -d $(top_srcdir)/images/$$dir; then \
	      $(mkinstalldirs) $$format/images/$$dir; \
	      cp $(top_srcdir)/images/$$dir/*.png $$format/images/$$dir && \
	      if test -d $(top_srcdir)/images/$$dir/$*; then \
		$(mkinstalldirs) $$format/images/$$dir/$* && \
		cp $(top_srcdir)/images/$$dir/$*/*.png $$format/images/$$dir/$*; \
	      fi \
	    fi \
	  done; \
	done

	@touch $@

images: $(STAMP_DIR)/images.stamp

$(STAMP_DIR)/convert.stamp: $(STAMP_DIR)/images.stamp
	@echo '*** Converting Images to 8bit depth ***'
	cd $(top_srcdir)/html/images/; \
	for i in `find ./ -name '*.png' -type f`; do \
	  echo "Converting" $$i && \
	  $(CONVERT) $$i $$i; \
	done

	@touch $@

convert: $(STAMP_DIR)/convert.stamp

$(STAMP_DIR)/profile.stamp: $(patsubst %,$(STAMP_DIR)/profile.%.stamp,$(ALL_LINGUAS))
	@echo '*** Profiling XML files ***'
	@touch $@

$(patsubst %,$(STAMP_DIR)/profile.%.stamp,$(ALL_LINGUAS)): $(STAMP_DIR)/profile.%.stamp : $(STAMP_DIR)/mkdirs.%.stamp $(XML_FILES)
	@cd $(top_srcdir) && \
	$(mkinstalldirs) xml && cd xml && \
	echo '-- Profiling XML for '$*;\
	$(XSLTPROC) $(XSLTFLAGS) --xinclude \
	   --stringparam profile.lang $* \
	   ../stylesheets/profile.xsl \
	   ../src/gimp.xml | \
	   sed -e "s/xmlns[:a-z]*\=\"[^\"]*\" //" | \
	   sed -e "s/lang=[\"'][A-Za-z_;]*[\"']/lang=\"$*\"/" >$*.xml

	@touch $@

profile: $(STAMP_DIR)/profile.stamp 

$(STAMP_DIR)/latex.stamp: $(STAMP_DIR)/profile.stamp
	@echo '*** Building LaTeX files ***'
	@for lang in $(ALL_LINGUAS); do \
	  echo '-- Building LaTeX for '$$lang; \
	  if test $$lang = "zh_CN"; then \
	    stylesheet=$$lang/plainprint.xsl; \stylesheet=plainprint.xsl; \
	  else \
	    stylesheet=plainprint.xsl; \
	  fi; \
	  (cd $(top_srcdir)/pdf/$$lang && \
	    $(XSLTPROC) $(XSLTFLAGS) --noout -o $$lang.tex --xinclude \
		--stringparam l10n.gentext.default.language $$lang \
		--stringparam profile.lang $$lang \
		../../stylesheets/$$stylesheet ../../xml/$$lang.xml); \
	done

	@touch $@

latex: $(STAMP_DIR)/latex.stamp

$(STAMP_DIR)/pdf.stamp: $(STAMP_DIR)/latex.stamp 
	@echo '*** Building PDF files ***'
	@cd $(top_srcdir)/pdf;
	@for lang in $(ALL_LINGUAS); do \
	  echo '-- Building PDF for '$$lang; \
	  (cd $(top_srcdir)/pdf/$$lang && \
	    pdflatex  $$lang.tex; \
	    makeindex $$lang.idx && \
	    pdflatex $$lang.tex); \
	done

	@touch $@

pdf: $(STAMP_DIR)/pdf.stamp

$(STAMP_DIR)/html.stamp: $(patsubst %,$(STAMP_DIR)/html.%.stamp,$(ALL_LINGUAS))
	@echo '*** Building HTML ***'
	@touch $@

$(patsubst %,$(STAMP_DIR)/html.%.stamp,$(ALL_LINGUAS)): $(STAMP_DIR)/html.%.stamp : $(STAMP_DIR)/profile.%.stamp $(STAMP_DIR)/css.%.stamp $(STAMP_DIR)/images.%.stamp $(STAMP_DIR)/convert.stamp
	echo '-- Building HTML for '$*;\
	(cd $(top_srcdir)/html/$* && \
	  $(XSLTPROC) $(XSLTFLAGS) --xinclude \
	     --stringparam l10n.gentext.default.language $* \
	     --stringparam profile.lang $* \
	     ../../stylesheets/plainhtml.xsl ../../xml/$*.xml);

	@touch $@

html: $(STAMP_DIR)/html.stamp 

$(STAMP_DIR)/index.stamp: $(patsubst %,$(STAMP_DIR)/index.%.stamp,$(ALL_LINGUAS))
	@echo '*** Generating index files ***';
	@touch $@

$(patsubst %,$(STAMP_DIR)/index.%.stamp,$(ALL_LINGUAS)): $(STAMP_DIR)/index.%.stamp : $(STAMP_DIR)/html.%.stamp
	echo '-- Generating index for '$*; \
	  $(XSLTPROC) $(XSLTFLAGS) \
	     $(MAKEINDEX) \
	       html/$*/gimp-xrefs.xml > html/$*/gimp-help.xml;

	@touch $@

index: $(STAMP_DIR)/index.stamp 

$(STAMP_DIR)/validate.stamp: $(patsubst %,$(STAMP_DIR)/validate.%.stamp,$(ALL_LINGUAS))
	@if test "x$(XMLLINT)" != "x"; then \
	  echo '*** Validating profiled XML ***'; \
	  echo 'Log files of the validation process have been generated in the xml directory.'; \
	  echo 'Please correct any errors before writing new content.'; \
	else \
	  echo '*** xmllint is missing, skipping the validation step ***'; \
	fi

	@touch $@

$(patsubst %,$(STAMP_DIR)/validate.%.stamp,$(ALL_LINGUAS)): $(STAMP_DIR)/validate.%.stamp : $(STAMP_DIR)/profile.%.stamp
	@echo -n '-- Validating XML for '$*; \
	$(XMLLINT) --noout --valid xml/$*.xml >/dev/null 2>xml/$*-validity-errors.log; \
	echo -n '	number of errors: '; \
	grep "validity error" xml/$*-validity-errors.log | wc -l

	@touch $@

validate: $(STAMP_DIR)/validate.stamp

lint: $(STAMP_DIR)/profile.stamp
	@if test "x$(XMLLINT)" != "x"; then \
	  echo '*** Checking XML for well-formed-ness ***'; \
	  for xml in $(XML_FILES); do \
	    $(XMLLINT) --noout $$xml || exit; \
	  done \
	fi

@GIMP_HELP_BUILD_TRUE@dist-check-build:

@GIMP_HELP_BUILD_TRUE@all-local: mkdirs validate images css html index

@GIMP_HELP_BUILD_TRUE@clean: $(STAMP_DIR)/clean.stamp

@GIMP_HELP_BUILD_FALSE@dist-check-build:
@GIMP_HELP_BUILD_FALSE@	@echo "*** --enable-build must be specified in order to make dist"
@GIMP_HELP_BUILD_FALSE@	@false

@GIMP_HELP_BUILD_FALSE@all-local: mkdirs images css

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(GIMP_DATADIR)/help
	-cp -r html/* $(DESTDIR)$(GIMP_DATADIR)/help

maintainer-clean-local:
	rm -rf html

dist-hook:
	$(mkinstalldirs) $(distdir)/html
	for lang in $(ALL_LINGUAS); do \
	  cp -r html/$$lang $(distdir)/html; \
	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:
