- clean-local 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-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 mostlyclean-local pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-local
-
-
-DOC_H_FILE ?=
-
-DOC_H_DOCS ?=
-
-$(DOC_H_FILE): $(DOC_H_DOCS);
- @rm -f $@.tmp; touch $@.tmp;
- echo 'const gchar* documentation_credits[] = {' >> $@.tmp
- list='$(DOC_H_DOCS)'; for doc in $$list; do \
- xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
- if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
- xsltproc --path "$$xmlpath" $(_credits) $$doc; \
- done | sort | uniq \
- | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \
- | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp
- echo ' NULL' >> $@.tmp
- echo '};' >> $@.tmp
- echo >> $@.tmp
- list='$(DOC_H_DOCS)'; for doc in $$list; do \
- xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
- if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
- docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
- | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
- echo $$xmlpath; \
- ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
- for id in $$ids; do \
- echo '#define HELP_'`echo $$docid`'_'`echo $$id \
- | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
- done; \
- echo >> $@.tmp; \
- done;
- cp $@.tmp $@ && rm -f $@.tmp
-
-dist-check-gdu:
-@HAVE_GNOME_DOC_UTILS_FALSE@ @echo "*** GNOME Doc Utils must be installed in order to make dist"
-@HAVE_GNOME_DOC_UTILS_FALSE@ @false
-
-.PHONY: dist-doc-header
-dist-doc-header: $(DOC_H_FILE)
- @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
- echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
- $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
-
-doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)
-
-.PHONY: clean-doc-header
-clean-local: $(_clean_doc_header)
-distclean-local: $(_clean_doc_header)
-mostlyclean-local: $(_clean_doc_header)
-maintainer-clean-local: $(_clean_doc_header)
-clean-doc-header:
- rm -f $(DOC_H_FILE)
-
-all: $(DOC_H_FILE)
-
-################################################################################
-
-DOC_MODULE ?=
-
-DOC_ID ?=
-
-DOC_PAGES ?=
-
-DOC_ENTITIES ?=
-
-DOC_INCLUDES ?=
-
-DOC_FIGURES ?=
-
-DOC_FORMATS ?= docbook
-
-DOC_LINGUAS ?=
-
-################################################################################
-
-_xml2po ?= `which xml2po`
-
-_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
-_chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
-@ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
-@ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
-@ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml
-
-$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
-$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
- @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \
- echo "The file '$(_skcontentslist)' does not exist." >&2; \
- echo "Please check your ScrollKeeper installation." >&2; \
- exit 1; }
- xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
-
-$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
-$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
-@ENABLE_SK_TRUE@ @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \
-@ENABLE_SK_TRUE@ echo "The file '$(_skcontentslist)' does not exist" >&2; \
-@ENABLE_SK_TRUE@ echo "Please check your ScrollKeeper installation." >&2; \
-@ENABLE_SK_TRUE@ exit 1; }
- xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
-
-.PHONY: omf
-omf: $(_DOC_OMF_ALL)
-
-.PHONY: po
-po: $(_DOC_POFILES)
-
-$(_DOC_POFILES):
- @if ! test -d $(dir $@); then \
- echo "mkdir $(dir $@)"; \
- mkdir "$(dir $@)"; \
- fi
- @if test ! -f $@ -a -f $(srcdir)/$@; then \
- echo "cp $(srcdir)/$@ $@"; \
- cp "$(srcdir)/$@" "$@"; \
- fi;
- @docs=; \
- list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
- docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
- done; \
- if ! test -f $@; then \
- echo "(cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
- cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
- (cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
- cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
- else \
- echo "(cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
- (cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
- fi
-
-# FIXME: fix the dependancy
-# FIXME: hook xml2po up
-$(_DOC_LC_DOCS) : $(_DOC_POFILES)
-$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
- if ! test -d $(dir $@); then mkdir $(dir $@); fi
- if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
- po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \
- if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \
- (cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \
- "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
- cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
-.PHONY: pot
-pot: $(_DOC_POT)
-$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
- $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^
-
-$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
- xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
-
-################################################################################
-
-all: \
- $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
- $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
- $(_DOC_HTML_ALL) $(_DOC_POFILES)
-
-################################################################################
-
-.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
-
-clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
-clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
-clean-doc-lc:
- rm -f $(_DOC_LC_DOCS)
- @list='$(_DOC_POFILES)'; for po in $$list; do \
- if ! test "$$po" -ef "$(srcdir)/$$po"; then \
- echo "rm -f $$po"; \
- rm -f "$$po"; \
- fi; \
- done
- @for lc in C $(_DOC_REAL_LINGUAS); do \
- if test -f "$$lc/.xml2po.mo"; then \
- echo "rm -f $$lc/.xml2po.mo"; \
- rm -f "$$lc/.xml2po.mo"; \
- fi; \
- done
-clean-doc-dir: clean-doc-lc
- @for lc in C $(_DOC_REAL_LINGUAS); do \
- for dir in `find $$lc -depth -type d`; do \
- if ! test $$dir -ef $(srcdir)/$$dir; then \
- echo "rmdir $$dir"; \
- rmdir "$$dir"; \
- fi; \
- done; \
- done
-
-clean-local: \
- $(_clean_omf) $(_clean_dsk) \
- $(_clean_lc) $(_clean_dir)
-distclean-local: \
- $(_clean_omf) $(_clean_dsk) \
- $(_clean_lc) $(_clean_dir)
-mostlyclean-local: \
- $(_clean_omf) $(_clean_dsk) \
- $(_clean_lc) $(_clean_dir)
-maintainer-clean-local: \
- $(_clean_omf) $(_clean_dsk) \
- $(_clean_lc) $(_clean_dir)
-
-################################################################################
-
-.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
-doc-dist-hook: \
- $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \
- $(if $(_DOC_C_FIGURES),dist-doc-figs) \
- $(if $(_DOC_OMF_IN),dist-doc-omf)
-# $(if $(_DOC_DSK_IN),dist-doc-dsk)
-
-dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
- @for lc in C $(_DOC_REAL_LINGUAS); do \
- echo " $(mkinstalldirs) $(distdir)/$$lc"; \
- $(mkinstalldirs) "$(distdir)/$$lc"; \
- done
- @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
- for doc in $$list; do \
- if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
- docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
- if ! test -d "$(distdir)/$$docdir"; then \
- echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
- $(mkinstalldirs) "$(distdir)/$$docdir"; \
- fi; \
- echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
- $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
- done
-
-dist-doc-figs: $(_DOC_SRC_FIGURES)
- @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
- for fig in $$list; do \
- if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$fig"; then \
- figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
- if ! test -d "$(distdir)/$$figdir"; then \
- echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
- $(mkinstalldirs) "$(distdir)/$$figdir"; \
- fi; \
- echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
- $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
- fi; \
- done;
-
-dist-doc-omf:
- @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
- echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
- $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
-
-dist-doc-dsk:
- @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
- echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
- $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
-
-################################################################################
-
-.PHONY: check-doc-docs check-doc-omf
-check: \
- $(if $(DOC_MODULE),check-doc-docs) \
- $(if $(DOC_ID),check-doc-pages) \
- $(if $(_DOC_OMF_IN),check-doc-omf)
-
-check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
- @for lc in C $(_DOC_REAL_LINGUAS); do \
- if test -f "$$lc"; \
- then d=; \
- xmlpath="$$lc"; \
- else \
- d="$(srcdir)/"; \
- xmlpath="$$lc:$(srcdir)/$$lc"; \
- fi; \
- echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
- xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
- done
-
-check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES)
- for lc in C $(_DOC_REAL_LINGUAS); do \
- if test -f "$$lc"; \
- then d=; \
- xmlpath="$$lc"; \
- else \
- d="$(srcdir)/"; \
- xmlpath="$$lc:$(srcdir)/$$lc"; \
- fi; \
- for page in $(DOC_PAGES); do \
- echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \
- xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \
- done; \
- done
-
-check-doc-omf: $(_DOC_OMF_ALL)
- @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
- echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
- xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
- done
-
-################################################################################
-
-.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
-
-install-data-local: \
- $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \
- $(if $(_DOC_HTML_ALL),install-doc-html) \
- $(if $(_DOC_C_FIGURES),install-doc-figs) \
- $(if $(_DOC_OMF_IN),install-doc-omf)
-# $(if $(_DOC_DSK_IN),install-doc-dsk)
-
-install-doc-docs:
- @for lc in C $(_DOC_REAL_LINGUAS); do \
- echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
- $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \
- done
- @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
- if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
- docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
- docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
- if ! test -d "$$docdir"; then \
- echo "$(mkinstalldirs) $$docdir"; \
- $(mkinstalldirs) "$$docdir"; \
- fi; \
- echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
- $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
- done
-
-install-doc-figs:
- @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
- for lc in C $(_DOC_REAL_LINGUAS); do \
- figsymlink=false; \
- if test -f "$$lc/$$fig"; then \
- figfile="$$lc/$$fig"; \
- elif test -f "$(srcdir)/$$lc/$$fig"; then \
- figfile="$(srcdir)/$$lc/$$fig"; \
- else \
- figsymlink=true; \
- fi; \
- figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
- figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
- if ! test -d "$$figdir"; then \
- echo "$(mkinstalldirs) $$figdir"; \
- $(mkinstalldirs) "$$figdir"; \
- fi; \
- figbase=`echo $$fig | sed -e 's/^.*\///'`; \
- if $$figsymlink; then \
- echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
- ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
- else \
- echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
- $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
- fi; \
- done; \
- done
-
-install-doc-html:
- echo install-html
-
-install-doc-omf:
- $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)
- @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
- echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
- $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \
- done
- @if test "x$(_ENABLE_SK)" = "xtrue"; then \
- echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
- scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
- fi;
-
-install-doc-dsk:
- echo install-dsk
-
-################################################################################
-
-.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
-uninstall-local: \
- $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \
- $(if $(_DOC_HTML_ALL),uninstall-doc-html) \
- $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \
- $(if $(_DOC_OMF_IN),uninstall-doc-omf)
-# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
-
-uninstall-doc-docs:
- @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
- echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
- rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
- done
-
-uninstall-doc-figs:
- @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
- echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
- rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
- done;
-
-uninstall-doc-omf:
- @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
- if test "x$(_ENABLE_SK)" = "xtrue"; then \
- echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
- scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
- fi; \
- echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
- rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
- done
-
-dist-hook: doc-dist-hook