From f78699024c228386c76cd5b09e22cfcf08c013aa Mon Sep 17 00:00:00 2001 From: Warren Block Date: Tue, 13 Oct 2015 21:45:26 +0000 Subject: [PATCH] Remove a duplicated {PO_LANG}.mo from CLEANFILES. Modify the PO_SET script to add a #$FreeBSD$ line to new PO files. --- share/mk/doc.docbook.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk index f794e7a412..d49ea5b122 100644 --- a/share/mk/doc.docbook.mk +++ b/share/mk/doc.docbook.mk @@ -278,10 +278,11 @@ TRAN_DIR?= ${MASTERDOC:H} EN_DIR?= ${TRAN_DIR:S/${LANGCODE}/en_US.ISO8859-1/} PO_LANG?= ${LANGCODE:C/\..*$//} PO_CHARSET?= ${LANGCODE:tl:C/^.*\.//:S/^iso/iso-/:S/utf-8/UTF-8/} -CLEANFILES+= ${DOC}.translate.xml ${PO_LANG}.mo ${PO_LANG}.mo +CLEANFILES+= ${DOC}.translate.xml ${PO_LANG}.mo # fix settings in PO file -POSET_CMD= ${SED} -i '' -e 's,^\(\"Language-Team:.*\\n\"\),\1\${.newline}\"Language: ${PO_LANG}\\n\",' \ +POSET_CMD= ${SED} -i '' -e '1s,^,\#$$FreeBSD$$\${.newline},' \ + -e 's,^\(\"Language-Team:.*\\n\"\),\1\${.newline}\"Language: ${PO_LANG}\\n\",' \ -e 's,^\"Content-Type: text/plain; charset=.*\\n,\"Content-Type: text/plain; charset=${PO_CHARSET}\\n,' .if ${.TARGETS:Mpo} || ${.TARGETS:Mtran}