921
976
po: $(_DOC_POFILES)
923
978
$(_DOC_POFILES): $(_DOC_C_DOCS)
924
if ! test -d $(dir $@); then mkdir $(dir $@); fi
979
@if ! test -d $(dir $@); then \
980
echo "mkdir $(dir $@)"; \
983
@if test ! -f $@ -a -f $(srcdir)/$@; then \
984
echo "cp $(srcdir)/$@ $@"; \
985
cp "$(srcdir)/$@" "$@"; \
988
list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
989
if test -f $$doc; then \
990
docs="$$docs ../$$doc"; \
992
docs="$$docs ../$(srcdir)/$$doc"; \
925
995
if ! test -f $@; then \
996
echo "(cd $(dir $@) && \
997
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
998
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
926
999
(cd $(dir $@) && \
927
$(_xml2po) -e $(_DOC_C_DOCS_NOENT:%=../%) > $(notdir $@)); \
1000
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
1001
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
1003
echo "(cd $(dir $@) && \
1004
$(_xml2po) -e -u $(notdir $@) $$docs)"; \
929
1005
(cd $(dir $@) && \
930
$(_xml2po) -e -u $(basename $(notdir $@)) $(_DOC_C_DOCS_NOENT:%=../%)); \
1006
$(_xml2po) -e -u $(notdir $@) $$docs); \
933
1009
# FIXME: fix the dependancy
934
1010
# FIXME: hook xml2po up
935
1011
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
936
1012
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
1013
if ! test -d $(dir $@); then mkdir $(dir $@); fi
1014
case "$(srcdir)" in /*) sd="$(srcdir)";; *) sd="../$(srcdir)";; esac; \
1015
if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$$sd/"; fi; \
937
1016
(cd $(dir $@) && \
938
$(_xml2po) -p $(patsubst %/$(notdir $@),%,$@).po ../C/$(notdir $@) > $(notdir $@))
1018
"$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
1019
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
1020
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
1023
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
1024
$(_xml2po) -e -o $@ $^
940
1026
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
941
1027
xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".html" $(_db2html) $(patsubst %.html,%.xml,$@)
943
################################################################################
946
1030
$(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
947
1031
$(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
948
1032
$(_DOC_HTML_ALL) $(_DOC_POFILES)
950
.PHONY: clean-rngdoc clean-xsldoc clean-omf clean-dsk clean-lc
952
clean-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
953
clean-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
954
clean-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
955
clean-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
956
clean-lc: ; rm -f $(_DOC_LC_DOCS)
959
$(_clean_rngdoc) $(_clean_xsldoc) \
960
$(_clean_omf) $(_clean_dsk) \
963
$(_clean_rngdoc) $(_clean_xsldoc) \
964
$(_clean_omf) $(_clean_dsk) \
967
$(_clean_rngdoc) $(_clean_xsldoc) \
968
$(_clean_omf) $(_clean_dsk) \
971
$(_clean_rngdoc) $(_clean_xsldoc) \
972
$(_clean_omf) $(_clean_dsk) \
975
.PHONY: dist-doc dist-fig dist-omf dist-dsk
1034
.PHONY: clean-doc-rngdoc clean-doc-xsldoc clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
1036
clean-doc-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
1037
clean-doc-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
1038
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
1039
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
1041
rm -f $(_DOC_LC_DOCS)
1042
@list='$(_DOC_POFILES)'; for po in $$list; do \
1043
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
1044
echo "rm -f $$po"; \
1048
@for lc in C $(DOC_LINGUAS); do \
1049
if test -f "$$lc/.xml2po.mo"; then \
1050
echo "rm -f $$lc/.xml2po.mo"; \
1051
rm -f "$$lc/.xml2po.mo"; \
1055
@for lc in C $(DOC_LINGUAS); do \
1056
for dir in `find $$lc -depth -type d`; do \
1057
if ! test $$dir -ef $(srcdir)/$$dir; then \
1058
echo "rmdir $$dir"; \
1065
$(_clean_rngdoc) $(_clean_xsldoc) \
1066
$(_clean_omf) $(_clean_dsk) \
1067
$(_clean_lc) $(_clean_dir)
1069
$(_clean_rngdoc) $(_clean_xsldoc) \
1070
$(_clean_omf) $(_clean_dsk) \
1071
$(_clean_lc) $(_clean_dir)
1072
mostlyclean-local: \
1073
$(_clean_rngdoc) $(_clean_xsldoc) \
1074
$(_clean_omf) $(_clean_dsk) \
1075
$(_clean_lc) $(_clean_dir)
1076
maintainer-clean-local: \
1077
$(_clean_rngdoc) $(_clean_xsldoc) \
1078
$(_clean_omf) $(_clean_dsk) \
1079
$(_clean_lc) $(_clean_dir)
1081
.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
976
1082
doc-dist-hook: \
977
$(if $(DOC_MODULE),dist-doc) \
978
$(if $(DOC_FIGURES),dist-fig) \
979
$(if $(_DOC_OMF_IN),dist-omf) \
980
$(if $(_DOC_DSK_IN),dist-dsk)
1083
$(if $(DOC_MODULE),dist-doc-docs) \
1084
$(if $(_DOC_C_FIGURES),dist-doc-figs) \
1085
$(if $(_DOC_OMF_IN),dist-doc-omf)
1086
# $(if $(_DOC_DSK_IN),dist-doc-dsk)
982
dist-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
1088
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
983
1089
@for lc in C $(DOC_LINGUAS); do \
984
1090
echo " $(mkinstalldirs) $(distdir)/$$lc"; \
985
1091
$(mkinstalldirs) "$(distdir)/$$lc"; \
987
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES); do \
1093
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
1094
for doc in $$list; do \
988
1095
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
989
1096
echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
990
1097
$(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
993
dist-fig: $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)
994
@for lc in C $(DOC_LINGUAS); do \
995
echo " $(mkinstalldirs) $(distdir)/$$lc/figures"; \
996
$(mkinstalldirs) "$(distdir)/$$lc/figures"; \
998
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
1100
dist-doc-figs: $(_DOC_SRC_FIGURES)
1101
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
1102
for fig in $$list; do \
999
1103
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
1000
if test -f "$$dd$$fig"; then \
1104
if test -f "$$d$$fig"; then \
1105
figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
1106
if ! test -d "$(distdir)/$$figdir"; then \
1107
echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
1108
$(mkinstalldirs) "$(distdir)/$$figdir"; \
1001
1110
echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
1002
1111
$(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
1007
1116
@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
1008
1117
echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
1009
1118
$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
1012
1121
@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
1013
1122
echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
1014
1123
$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
1016
.PHONY: check-doc check-omf
1125
.PHONY: check-doc-docs check-doc-omf
1018
$(if $(DOC_MODULE),check-doc) \
1019
$(if $(_DOC_OMF_IN),check-omf)
1127
$(if $(DOC_MODULE),check-doc-docs) \
1128
$(if $(_DOC_OMF_IN),check-doc-omf)
1021
check-doc: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
1130
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
1022
1131
@for lc in C $(DOC_LINGUAS); do \
1023
if test -f "$$lc"; then d=; else d="$(srcdir)/"; fi; \
1024
echo " (cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml)"; \
1025
(cd $$d$$lc && xmllint --noout --xinclude --postvalid $(DOC_MODULE).xml); \
1132
if test -f "$$lc"; \
1137
xmlpath="$$lc:$(srcdir)/$$lc"; \
1139
echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
1140
xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
1028
check-omf: $(_DOC_OMF_ALL)
1029
@for omf in $(_DOC_OMF_ALL); do \
1143
check-doc-omf: $(_DOC_OMF_ALL)
1144
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1030
1145
echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
1031
1146
xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
1034
.PHONY: install-doc install-html install-fig install-omf install-dsk
1149
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
1035
1150
install-data-local: \
1036
$(if $(DOC_MODULE),install-doc) \
1037
$(if $(_DOC_HTML_ALL),install-html) \
1038
$(if $(DOC_FIGURES),install-fig) \
1039
$(if $(_DOC_OMF_IN),install-omf)
1040
# $(if $(_DOC_DSK_IN),install-dsk)
1151
$(if $(DOC_MODULE),install-doc-docs) \
1152
$(if $(_DOC_HTML_ALL),install-doc-html) \
1153
$(if $(_DOC_C_FIGURES),install-doc-figs) \
1154
$(if $(_DOC_OMF_IN),install-doc-omf)
1155
# $(if $(_DOC_DSK_IN),install-doc-dsk)
1043
1158
@for lc in C $(DOC_LINGUAS); do \
1044
1159
echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
1045
1160
$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
1047
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
1162
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
1048
1163
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
1049
1164
echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
1050
1165
$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
1054
@for lc in C $(DOC_LINGUAS); do \
1055
echo " $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
1056
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc/figures"; \
1058
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
1059
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
1060
if test -f "$$dd$$fig"; then \
1061
echo "$(INSTALL_DATA) $$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
1062
$(INSTALL_DATA) "$$d$$fig $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
1169
@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
1170
for lc in C $(DOC_LINGUAS); do \
1171
if test -f "$$lc/$$fig"; then \
1172
figfile="$$lc/$$fig"; \
1173
elif test -f "$(srcdir)/$$lc/$$fig"; then \
1174
figfile="$(srcdir)/$$lc/$$fig"; \
1175
elif test -f "C/$$fig"; then \
1176
figfile="C/$$fig"; \
1178
figfile="$(srcdir)/C/$$fig"; \
1180
figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
1181
figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
1182
if ! test -d "$$figdir"; then \
1183
echo "$(mkinstalldirs) $$figdir"; \
1184
$(mkinstalldirs) "$$figdir"; \
1186
figbase=`echo $$fig | sed -e 's/^.*\///'`; \
1187
echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
1188
$(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
1067
1193
echo install-html
1070
1196
$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
1071
@for omf in $(_DOC_OMF_ALL); do \
1197
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1072
1198
echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1073
1199
$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
1075
-scrollkeeper-update -p "$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"
1201
@if test "x$(_ENABLE_SK)" = "xtrue"; then \
1202
echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
1203
scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
1078
1207
echo install-dsk
1080
.PHONY: uninstall-doc uninstall-html uninstall-omf uninstall-dsk
1209
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
1081
1210
uninstall-local: \
1082
$(if $(DOC_MODULE),uninstall-doc) \
1083
$(if $(_DOC_HTML_ALL),uninstall-html) \
1084
$(if $(DOC_FIGURES),uninstall-fig) \
1085
$(if $(_DOC_OMF_IN),uninstall-omf)
1086
# $(if $(_DOC_DSK_IN),uninstall-dsk)
1211
$(if $(DOC_MODULE),uninstall-doc-docs) \
1212
$(if $(_DOC_HTML_ALL),uninstall-doc-html) \
1213
$(if $(DOC_FIGURES),uninstall-doc-figs) \
1214
$(if $(_DOC_OMF_IN),uninstall-doc-omf)
1215
# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
1089
@for doc in $(_DOC_C_DOCS) $(_DOC_LC_DOCS); do \
1218
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
1090
1219
echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
1091
1220
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
1095
@for fig in $(_DOC_C_FIGURES) $(_DOC_LC_FIGURES); do \
1224
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
1096
1225
echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
1097
1226
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
1101
@for omf in $(_DOC_OMF_ALL); do \
1102
echo " scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1103
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1230
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1231
if test "x$(_ENABLE_SK)" == "xtrue"; then \
1232
echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1233
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1104
1235
echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
1105
1236
rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \