595
643
po: $(_DOC_POFILES)
597
645
$(_DOC_POFILES): $(_DOC_C_DOCS)
598
if ! test -d $(dir $@); then mkdir $(dir $@); fi
646
@if ! test -d $(dir $@); then \
647
echo "mkdir $(dir $@)"; \
650
@if test ! -f $@ -a -f $(srcdir)/$@; then \
651
echo "cp $(srcdir)/$@ $@"; \
652
cp "$(srcdir)/$@" "$@"; \
655
list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
656
if test -f $$doc; then \
657
docs="$$docs ../$$doc"; \
659
docs="$$docs ../$(srcdir)/$$doc"; \
599
662
if ! test -f $@; then \
663
echo "(cd $(dir $@) && \
664
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
665
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
600
666
(cd $(dir $@) && \
601
$(_xml2po) -e $(_DOC_C_DOCS_NOENT:%=../%) > $(notdir $@)); \
667
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
668
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
670
echo "(cd $(dir $@) && \
671
$(_xml2po) -e -u $(notdir $@) $$docs)"; \
603
672
(cd $(dir $@) && \
604
$(_xml2po) -e -u $(basename $(notdir $@)) $(_DOC_C_DOCS_NOENT:%=../%)); \
673
$(_xml2po) -e -u $(notdir $@) $$docs); \
607
676
# FIXME: fix the dependancy
608
677
# FIXME: hook xml2po up
609
678
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
610
679
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
680
if ! test -d $(dir $@); then mkdir $(dir $@); fi
681
case "$(srcdir)" in /*) sd="$(srcdir)";; *) sd="../$(srcdir)";; esac; \
682
if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$$sd/"; fi; \
611
683
(cd $(dir $@) && \
612
$(_xml2po) -p $(patsubst %/$(notdir $@),%,$@).po ../C/$(notdir $@) > $(notdir $@))
685
"$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
686
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
687
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
690
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
691
$(_xml2po) -e -o $@ $^
614
693
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
615
694
xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".html" $(_db2html) $(patsubst %.html,%.xml,$@)
617
################################################################################
620
697
$(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
621
698
$(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
622
699
$(_DOC_HTML_ALL) $(_DOC_POFILES)
624
.PHONY: clean-rngdoc clean-xsldoc clean-omf clean-dsk clean-lc
626
clean-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
627
clean-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
628
clean-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
629
clean-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
630
clean-lc: ; rm -f $(_DOC_LC_DOCS)
633
$(_clean_rngdoc) $(_clean_xsldoc) \
634
$(_clean_omf) $(_clean_dsk) \
637
$(_clean_rngdoc) $(_clean_xsldoc) \
638
$(_clean_omf) $(_clean_dsk) \
641
$(_clean_rngdoc) $(_clean_xsldoc) \
642
$(_clean_omf) $(_clean_dsk) \
645
$(_clean_rngdoc) $(_clean_xsldoc) \
646
$(_clean_omf) $(_clean_dsk) \
649
.PHONY: dist-doc dist-fig dist-omf dist-dsk
701
.PHONY: clean-doc-rngdoc clean-doc-xsldoc clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
703
clean-doc-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
704
clean-doc-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
705
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
706
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
708
rm -f $(_DOC_LC_DOCS)
709
@list='$(_DOC_POFILES)'; for po in $$list; do \
710
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
715
@for lc in C $(DOC_LINGUAS); do \
716
if test -f "$$lc/.xml2po.mo"; then \
717
echo "rm -f $$lc/.xml2po.mo"; \
718
rm -f "$$lc/.xml2po.mo"; \
722
@for lc in C $(DOC_LINGUAS); do \
723
for dir in `find $$lc -depth -type d`; do \
724
if ! test $$dir -ef $(srcdir)/$$dir; then \
725
echo "rmdir $$dir"; \
732
$(_clean_rngdoc) $(_clean_xsldoc) \
733
$(_clean_omf) $(_clean_dsk) \
734
$(_clean_lc) $(_clean_dir)
736
$(_clean_rngdoc) $(_clean_xsldoc) \
737
$(_clean_omf) $(_clean_dsk) \
738
$(_clean_lc) $(_clean_dir)
740
$(_clean_rngdoc) $(_clean_xsldoc) \
741
$(_clean_omf) $(_clean_dsk) \
742
$(_clean_lc) $(_clean_dir)
743
maintainer-clean-local: \
744
$(_clean_rngdoc) $(_clean_xsldoc) \
745
$(_clean_omf) $(_clean_dsk) \
746
$(_clean_lc) $(_clean_dir)
748
.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
651
$(if $(DOC_MODULE),dist-doc) \
652
$(if $(DOC_FIGURES),dist-fig) \
653
$(if $(_DOC_OMF_IN),dist-omf) \
654
$(if $(_DOC_DSK_IN),dist-dsk)
750
$(if $(DOC_MODULE),dist-doc-docs) \
751
$(if $(_DOC_C_FIGURES),dist-doc-figs) \
752
$(if $(_DOC_OMF_IN),dist-doc-omf)
753
# $(if $(_DOC_DSK_IN),dist-doc-dsk)
656
dist-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
755
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
657
756
@for lc in C $(DOC_LINGUAS); do \
658
757
echo " $(mkinstalldirs) $(distdir)/$$lc"; \
659
758
$(mkinstalldirs) "$(distdir)/$$lc"; \
661
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES); do \
760
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
761
for doc in $$list; do \
662
762
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
663
763
echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
664
764
$(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
667
dist-fig: $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)
668
@for lc in C $(DOC_LINGUAS); do \
669
echo " $(mkinstalldirs) $(distdir)/$$lc/figures"; \
670
$(mkinstalldirs) "$(distdir)/$$lc/figures"; \
672
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
767
dist-doc-figs: $(_DOC_SRC_FIGURES)
768
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
769
for fig in $$list; do \
673
770
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
674
if test -f "$$dd$$fig"; then \
771
if test -f "$$d$$fig"; then \
772
figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
773
if ! test -d "$(distdir)/$$figdir"; then \
774
echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
775
$(mkinstalldirs) "$(distdir)/$$figdir"; \
675
777
echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
676
778
$(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
681
783
@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
682
784
echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
683
785
$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
686
788
@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
687
789
echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
688
790
$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
690
.PHONY: check-doc check-omf
792
.PHONY: check-doc-docs check-doc-omf
692
$(if $(DOC_MODULE),check-doc) \
693
$(if $(_DOC_OMF_IN),check-omf)
794
$(if $(DOC_MODULE),check-doc-docs) \
795
$(if $(_DOC_OMF_IN),check-doc-omf)
695
check-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
797
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
696
798
@for lc in C $(DOC_LINGUAS); do \
697
if test -f "$$lc"; then d=; else d="$(srcdir)/"; fi; \
698
echo " (cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml)"; \
699
(cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml); \
804
xmlpath="$$lc:$(srcdir)/$$lc"; \
806
echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
807
xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
702
check-omf: $(_DOC_OMF_ALL)
703
@for omf in $(_DOC_OMF_ALL); do \
810
check-doc-omf: $(_DOC_OMF_ALL)
811
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
704
812
echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
705
813
xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
708
.PHONY: install-doc install-html install-fig install-omf install-dsk
816
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
709
817
install-data-local: \
710
$(if $(DOC_MODULE),install-doc) \
711
$(if $(_DOC_HTML_ALL),install-html) \
712
$(if $(DOC_FIGURES),install-fig) \
713
$(if $(_DOC_OMF_IN),install-omf)
714
# $(if $(_DOC_DSK_IN),install-dsk)
818
$(if $(DOC_MODULE),install-doc-docs) \
819
$(if $(_DOC_HTML_ALL),install-doc-html) \
820
$(if $(_DOC_C_FIGURES),install-doc-figs) \
821
$(if $(_DOC_OMF_IN),install-doc-omf)
822
# $(if $(_DOC_DSK_IN),install-doc-dsk)
717
825
@for lc in C $(DOC_LINGUAS); do \
718
826
echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
719
827
$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
721
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
829
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
722
830
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
723
831
echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
724
832
$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
728
@for lc in C $(DOC_LINGUAS); do \
729
echo " $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
730
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
732
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
733
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
734
if test -f "$$dd$$fig"; then \
735
echo "$(INSTALL_DATA) $$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
736
$(INSTALL_DATA) "$$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
836
@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
837
for lc in C $(DOC_LINGUAS); do \
838
if test -f "$$lc/$$fig"; then \
839
figfile="$$lc/$$fig"; \
840
elif test -f "$(srcdir)/$$lc/$$fig"; then \
841
figfile="$(srcdir)/$$lc/$$fig"; \
842
elif test -f "C/$$fig"; then \
845
figfile="$(srcdir)/C/$$fig"; \
847
figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
848
figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
849
if ! test -d "$$figdir"; then \
850
echo "$(mkinstalldirs) $$figdir"; \
851
$(mkinstalldirs) "$$figdir"; \
853
figbase=`echo $$fig | sed -e 's/^.*\///'`; \
854
echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
855
$(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
741
860
echo install-html
744
863
$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
745
@for omf in $(_DOC_OMF_ALL); do \
864
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
746
865
echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
747
866
$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
749
-scrollkeeper-update -p "$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"
868
@if test "x$(_ENABLE_SK)" = "xtrue"; then \
869
echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
870
scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
754
.PHONY: uninstall-doc uninstall-html uninstall-omf uninstall-dsk
876
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
755
877
uninstall-local: \
756
$(if $(DOC_MODULE),uninstall-doc) \
757
$(if $(_DOC_HTML_ALL),uninstall-html) \
758
$(if $(DOC_FIGURES),uninstall-fig) \
759
$(if $(_DOC_OMF_IN),uninstall-omf)
760
# $(if $(_DOC_DSK_IN),uninstall-dsk)
878
$(if $(DOC_MODULE),uninstall-doc-docs) \
879
$(if $(_DOC_HTML_ALL),uninstall-doc-html) \
880
$(if $(DOC_FIGURES),uninstall-doc-figs) \
881
$(if $(_DOC_OMF_IN),uninstall-doc-omf)
882
# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
763
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
885
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
764
886
echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
765
887
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
769
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
891
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
770
892
echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
771
893
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
775
@for omf in $(_DOC_OMF_ALL); do \
776
echo " scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
777
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
897
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
898
if test "x$(_ENABLE_SK)" == "xtrue"; then \
899
echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
900
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
778
902
echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
779
903
rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \