From 68c9592c28f33ea1ff1c9d687a67b0697858595d Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Thu, 12 Oct 2017 14:57:29 +0000 Subject: [PATCH] refactor to use make syntax instead shell/test scripts PR: 222939 --- share/mk/doc.translate.mk | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/share/mk/doc.translate.mk b/share/mk/doc.translate.mk index c5e4a4a7e7..da0bfec79b 100644 --- a/share/mk/doc.translate.mk +++ b/share/mk/doc.translate.mk @@ -65,17 +65,17 @@ po: ${PO_LANG}.po ${PO_LANG}.po: ${DOC}.translate.xml @${ITSTOOL} -o ${PO_LANG}.po.tmp ${DOC}.translate.xml - @( if [ -f "${PO_LANG}.po" ]; then \ - echo "${PO_LANG}.po exists, merging" ; \ - ${MSGMERGE} -o ${PO_LANG}.po.new ${PO_LANG}.po ${PO_LANG}.po.tmp ; \ - ${MSGATTRIB} --no-obsolete -o ${PO_LANG}.po.new ${PO_LANG}.po ; \ - ${MV} ${PO_LANG}.po.new ${PO_LANG}.po ; \ - ${RM} ${PO_LANG}.po.tmp ${DOC}.translate.xml ; \ - else \ - ${ECHO} "${PO_LANG}.po created, please check and correct the settings in the header" ; \ - ${MV} ${PO_LANG}.po.tmp ${PO_LANG}.po ; \ - ${POSET_CMD} ${.TARGET} ; \ - fi ) +.if exists(${PO_LANG}.po) + echo "${PO_LANG}.po exists, merging" + ${MSGMERGE} -o ${PO_LANG}.po.new ${PO_LANG}.po ${PO_LANG}.po.tmp + ${MSGATTRIB} --no-obsolete -o ${PO_LANG}.po.new ${PO_LANG}.po + ${MV} ${PO_LANG}.po.new ${PO_LANG}.po + ${RM} ${PO_LANG}.po.tmp ${DOC}.translate.xml +.else + ${ECHO} "${PO_LANG}.po created, please check and correct the settings in the header" + ${MV} ${PO_LANG}.po.tmp ${PO_LANG}.po + ${POSET_CMD} ${.TARGET} +.endif ${PO_LANG}.mo: ${PO_LANG}.po @${MSGFMT} -o ${.TARGET} ${.ALLSRC}