aboutsummaryrefslogtreecommitdiff
path: root/share/mk/doc.translate.mk
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>2017-10-12 14:38:11 +0000
committerWolfram Schneider <wosch@FreeBSD.org>2017-10-12 14:38:11 +0000
commit3573c48c463135271dd72200221a1efde47eb2f1 (patch)
treedc2c9973c78bc934a440736a3c14ce04755355ff /share/mk/doc.translate.mk
parenta6c77942cdf3d9a10e752cf2af038fd726a867c0 (diff)
downloaddoc-3573c48c463135271dd72200221a1efde47eb2f1.tar.gz
doc-3573c48c463135271dd72200221a1efde47eb2f1.zip
no fatal errors for english documents
refactor to use make syntax instead shell/test scripts PR: 222939
Notes
Notes: svn path=/head/; revision=51109
Diffstat (limited to 'share/mk/doc.translate.mk')
-rw-r--r--share/mk/doc.translate.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/share/mk/doc.translate.mk b/share/mk/doc.translate.mk
index 3ccf6cbe1e..c5e4a4a7e7 100644
--- a/share/mk/doc.translate.mk
+++ b/share/mk/doc.translate.mk
@@ -42,10 +42,9 @@ POSET_CMD= ${SED} -i '' -e '1s,^,\#${IDSTR1}${IDSTR2}\${.newline},' \
MASTER_SRCS!= ${MAKE} -C ${EN_DIR} -V SRCS
${DOC}.translate.xml:
- @if [ "${TRAN_DIR}" == "${EN_DIR}" ]; then \
- ${ECHO} "build PO file in a non-English dir" ; \
- exit 1 ; \
- fi
+.if ${TRAN_DIR} == ${EN_DIR}
+ @${ECHO} "build PO file in a non-English dir, ignored"
+.else
# some SRCS files might need to be generated, make sure they exist
@${MAKE} -C ${EN_DIR} ${MASTER_SRCS} > /dev/null
# normalize the English original into a single file
@@ -54,9 +53,16 @@ ${DOC}.translate.xml:
@${PO_XMLLINT} --nsclean ${.TARGET}.tmp > ${.TARGET}
@${RM} ${.TARGET}.tmp
@${MAKE} -C ${EN_DIR} clean > /dev/null
+.endif
+.if ${TRAN_DIR} == ${EN_DIR}
+po:
+.else
po: ${PO_LANG}.po
+.endif
+
.PHONY: po
+
${PO_LANG}.po: ${DOC}.translate.xml
@${ITSTOOL} -o ${PO_LANG}.po.tmp ${DOC}.translate.xml
@( if [ -f "${PO_LANG}.po" ]; then \