604
652
po: $(_DOC_POFILES)
606
654
$(_DOC_POFILES): $(_DOC_C_DOCS)
607
if ! test -d $(dir $@); then mkdir $(dir $@); fi
655
@if ! test -d $(dir $@); then \
656
echo "mkdir $(dir $@)"; \
659
@if test ! -f $@ -a -f $(srcdir)/$@; then \
660
echo "cp $(srcdir)/$@ $@"; \
661
cp "$(srcdir)/$@" "$@"; \
664
list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
665
if test -f $$doc; then \
666
docs="$$docs ../$$doc"; \
668
docs="$$docs ../$(srcdir)/$$doc"; \
608
671
if ! test -f $@; then \
672
echo "(cd $(dir $@) && \
673
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
674
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
609
675
(cd $(dir $@) && \
610
$(_xml2po) -e $(_DOC_C_DOCS_NOENT:%=../%) > $(notdir $@)); \
676
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
677
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
679
echo "(cd $(dir $@) && \
680
$(_xml2po) -e -u $(notdir $@) $$docs)"; \
612
681
(cd $(dir $@) && \
613
$(_xml2po) -e -u $(basename $(notdir $@)) $(_DOC_C_DOCS_NOENT:%=../%)); \
682
$(_xml2po) -e -u $(notdir $@) $$docs); \
616
685
# FIXME: fix the dependancy
617
686
# FIXME: hook xml2po up
618
687
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
619
688
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
689
if ! test -d $(dir $@); then mkdir $(dir $@); fi
690
case "$(srcdir)" in /*) sd="$(srcdir)";; *) sd="../$(srcdir)";; esac; \
691
if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$$sd/"; fi; \
620
692
(cd $(dir $@) && \
621
$(_xml2po) -p $(patsubst %/$(notdir $@),%,$@).po ../C/$(notdir $@) > $(notdir $@))
694
"$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
695
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
696
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
699
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
700
$(_xml2po) -e -o $@ $^
623
702
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
624
703
xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".html" $(_db2html) $(patsubst %.html,%.xml,$@)
626
################################################################################
629
706
$(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
630
707
$(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
631
708
$(_DOC_HTML_ALL) $(_DOC_POFILES)
633
.PHONY: clean-rngdoc clean-xsldoc clean-omf clean-dsk clean-lc
635
clean-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
636
clean-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
637
clean-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
638
clean-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
639
clean-lc: ; rm -f $(_DOC_LC_DOCS)
642
$(_clean_rngdoc) $(_clean_xsldoc) \
643
$(_clean_omf) $(_clean_dsk) \
646
$(_clean_rngdoc) $(_clean_xsldoc) \
647
$(_clean_omf) $(_clean_dsk) \
650
$(_clean_rngdoc) $(_clean_xsldoc) \
651
$(_clean_omf) $(_clean_dsk) \
654
$(_clean_rngdoc) $(_clean_xsldoc) \
655
$(_clean_omf) $(_clean_dsk) \
658
.PHONY: dist-doc dist-fig dist-omf dist-dsk
710
.PHONY: clean-doc-rngdoc clean-doc-xsldoc clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
712
clean-doc-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
713
clean-doc-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
714
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
715
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
717
rm -f $(_DOC_LC_DOCS)
718
@list='$(_DOC_POFILES)'; for po in $$list; do \
719
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
724
@for lc in C $(DOC_LINGUAS); do \
725
if test -f "$$lc/.xml2po.mo"; then \
726
echo "rm -f $$lc/.xml2po.mo"; \
727
rm -f "$$lc/.xml2po.mo"; \
731
@for lc in C $(DOC_LINGUAS); do \
732
for dir in `find $$lc -depth -type d`; do \
733
if ! test $$dir -ef $(srcdir)/$$dir; then \
734
echo "rmdir $$dir"; \
741
$(_clean_rngdoc) $(_clean_xsldoc) \
742
$(_clean_omf) $(_clean_dsk) \
743
$(_clean_lc) $(_clean_dir)
745
$(_clean_rngdoc) $(_clean_xsldoc) \
746
$(_clean_omf) $(_clean_dsk) \
747
$(_clean_lc) $(_clean_dir)
749
$(_clean_rngdoc) $(_clean_xsldoc) \
750
$(_clean_omf) $(_clean_dsk) \
751
$(_clean_lc) $(_clean_dir)
752
maintainer-clean-local: \
753
$(_clean_rngdoc) $(_clean_xsldoc) \
754
$(_clean_omf) $(_clean_dsk) \
755
$(_clean_lc) $(_clean_dir)
757
.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
660
$(if $(DOC_MODULE),dist-doc) \
661
$(if $(DOC_FIGURES),dist-fig) \
662
$(if $(_DOC_OMF_IN),dist-omf) \
663
$(if $(_DOC_DSK_IN),dist-dsk)
759
$(if $(DOC_MODULE),dist-doc-docs) \
760
$(if $(_DOC_C_FIGURES),dist-doc-figs) \
761
$(if $(_DOC_OMF_IN),dist-doc-omf)
762
# $(if $(_DOC_DSK_IN),dist-doc-dsk)
665
dist-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
764
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
666
765
@for lc in C $(DOC_LINGUAS); do \
667
766
echo " $(mkinstalldirs) $(distdir)/$$lc"; \
668
767
$(mkinstalldirs) "$(distdir)/$$lc"; \
670
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES); do \
769
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
770
for doc in $$list; do \
671
771
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
672
772
echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
673
773
$(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
676
dist-fig: $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)
677
@for lc in C $(DOC_LINGUAS); do \
678
echo " $(mkinstalldirs) $(distdir)/$$lc/figures"; \
679
$(mkinstalldirs) "$(distdir)/$$lc/figures"; \
681
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
776
dist-doc-figs: $(_DOC_SRC_FIGURES)
777
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
778
for fig in $$list; do \
682
779
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
683
if test -f "$$dd$$fig"; then \
780
if test -f "$$d$$fig"; then \
781
figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
782
if ! test -d "$(distdir)/$$figdir"; then \
783
echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
784
$(mkinstalldirs) "$(distdir)/$$figdir"; \
684
786
echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
685
787
$(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
690
792
@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
691
793
echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
692
794
$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
695
797
@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
696
798
echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
697
799
$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
699
.PHONY: check-doc check-omf
801
.PHONY: check-doc-docs check-doc-omf
701
$(if $(DOC_MODULE),check-doc) \
702
$(if $(_DOC_OMF_IN),check-omf)
803
$(if $(DOC_MODULE),check-doc-docs) \
804
$(if $(_DOC_OMF_IN),check-doc-omf)
704
check-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
806
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
705
807
@for lc in C $(DOC_LINGUAS); do \
706
if test -f "$$lc"; then d=; else d="$(srcdir)/"; fi; \
707
echo " (cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml)"; \
708
(cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml); \
813
xmlpath="$$lc:$(srcdir)/$$lc"; \
815
echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
816
xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
711
check-omf: $(_DOC_OMF_ALL)
712
@for omf in $(_DOC_OMF_ALL); do \
819
check-doc-omf: $(_DOC_OMF_ALL)
820
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
713
821
echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
714
822
xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
717
.PHONY: install-doc install-html install-fig install-omf install-dsk
825
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
718
826
install-data-local: \
719
$(if $(DOC_MODULE),install-doc) \
720
$(if $(_DOC_HTML_ALL),install-html) \
721
$(if $(DOC_FIGURES),install-fig) \
722
$(if $(_DOC_OMF_IN),install-omf)
723
# $(if $(_DOC_DSK_IN),install-dsk)
827
$(if $(DOC_MODULE),install-doc-docs) \
828
$(if $(_DOC_HTML_ALL),install-doc-html) \
829
$(if $(_DOC_C_FIGURES),install-doc-figs) \
830
$(if $(_DOC_OMF_IN),install-doc-omf)
831
# $(if $(_DOC_DSK_IN),install-doc-dsk)
726
834
@for lc in C $(DOC_LINGUAS); do \
727
835
echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
728
836
$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
730
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
838
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
731
839
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
732
840
echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
733
841
$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
737
@for lc in C $(DOC_LINGUAS); do \
738
echo " $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
739
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
741
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
742
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
743
if test -f "$$dd$$fig"; then \
744
echo "$(INSTALL_DATA) $$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
745
$(INSTALL_DATA) "$$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
845
@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
846
for lc in C $(DOC_LINGUAS); do \
847
if test -f "$$lc/$$fig"; then \
848
figfile="$$lc/$$fig"; \
849
elif test -f "$(srcdir)/$$lc/$$fig"; then \
850
figfile="$(srcdir)/$$lc/$$fig"; \
851
elif test -f "C/$$fig"; then \
854
figfile="$(srcdir)/C/$$fig"; \
856
figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
857
figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
858
if ! test -d "$$figdir"; then \
859
echo "$(mkinstalldirs) $$figdir"; \
860
$(mkinstalldirs) "$$figdir"; \
862
figbase=`echo $$fig | sed -e 's/^.*\///'`; \
863
echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
864
$(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
750
869
echo install-html
753
872
$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
754
@for omf in $(_DOC_OMF_ALL); do \
873
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
755
874
echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
756
875
$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
758
-scrollkeeper-update -p "$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"
877
@if test "x$(_ENABLE_SK)" = "xtrue"; then \
878
echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
879
scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
763
.PHONY: uninstall-doc uninstall-html uninstall-omf uninstall-dsk
885
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
764
886
uninstall-local: \
765
$(if $(DOC_MODULE),uninstall-doc) \
766
$(if $(_DOC_HTML_ALL),uninstall-html) \
767
$(if $(DOC_FIGURES),uninstall-fig) \
768
$(if $(_DOC_OMF_IN),uninstall-omf)
769
# $(if $(_DOC_DSK_IN),uninstall-dsk)
887
$(if $(DOC_MODULE),uninstall-doc-docs) \
888
$(if $(_DOC_HTML_ALL),uninstall-doc-html) \
889
$(if $(DOC_FIGURES),uninstall-doc-figs) \
890
$(if $(_DOC_OMF_IN),uninstall-doc-omf)
891
# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
772
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
894
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
773
895
echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
774
896
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
778
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
900
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
779
901
echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
780
902
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
784
@for omf in $(_DOC_OMF_ALL); do \
785
echo " scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
786
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
906
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
907
if test "x$(_ENABLE_SK)" == "xtrue"; then \
908
echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
909
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
787
911
echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
788
912
rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \