Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174418712
D16726.id47417.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D16726.id47417.diff
View Options
Index: head/share/mk/doc.translate.mk
===================================================================
--- head/share/mk/doc.translate.mk
+++ head/share/mk/doc.translate.mk
@@ -42,9 +42,6 @@
MASTER_SRCS!= ${MAKE} -C ${EN_DIR} -V SRCS
${DOC}.translate.xml:
-.if ${TRAN_DIR} == ${EN_DIR}
- @${ECHO} "Please build PO file only in a non-English directory, 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
@@ -52,32 +49,34 @@
# remove redundant namespace attributes
@${PO_XMLLINT} --nsclean ${.TARGET}.tmp > ${.TARGET}
@${RM} ${.TARGET}.tmp
- @${MAKE} -C ${EN_DIR} clean > /dev/null
-.endif
.if ${TRAN_DIR} == ${EN_DIR}
-po:
+PO_FILE=${PO_LANG}.pot
.else
-po: ${PO_LANG}.po
+PO_FILE=${PO_LANG}.po
.endif
+po: ${PO_FILE}
.PHONY: po
-${PO_LANG}.po: ${DOC}.translate.xml
- @${ITSTOOL} -o ${PO_LANG}.po.tmp ${DOC}.translate.xml
-.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.tmp ${PO_LANG}.po.new
- @${RM} ${PO_LANG}.po.new
- @${MV} ${PO_LANG}.po.tmp ${PO_LANG}.po
+${PO_FILE}: ${DOC}.translate.xml
+ @${ITSTOOL} -o ${PO_FILE}.tmp ${DOC}.translate.xml
+.if exists(${PO_FILE})
+ @${ECHO} "${PO_FILE} exists, merging"
+ @${MSGMERGE} -o ${PO_FILE}.new ${PO_FILE} ${PO_FILE}.tmp
+ @${MSGATTRIB} --no-obsolete -o ${PO_FILE}.tmp ${PO_FILE}.new
+ @${RM} ${PO_FILE}.new
+ @${MV} ${PO_FILE}.tmp ${PO_FILE}
.else
- @${ECHO} "${PO_LANG}.po created, please check and correct the settings in the header"
- @${MV} ${PO_LANG}.po.tmp ${PO_LANG}.po
+ @${ECHO} "${PO_FILE} created, please check and correct the settings in the header"
+ # Just to wrap long message lines
+ @${MSGATTRIB} -o ${PO_FILE} ${PO_FILE}.tmp
+ @${RM} ${PO_FILE}.tmp
@${POSET_CMD} ${.TARGET}
.endif
+ @${MAKE} -C ${EN_DIR} clean > /dev/null
-${PO_LANG}.mo: ${PO_LANG}.po
+${PO_LANG}.mo: ${PO_FILE}
@${MSGFMT} -o ${.TARGET} ${.ALLSRC}
tran ${DOC}.xml: ${DOC}.translate.xml ${PO_LANG}.mo
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 1:33 AM (5 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40166747
Default Alt Text
D16726.id47417.diff (2 KB)
Attached To
Mode
D16726: share/mk/doc.translate.mk: Improve `make po`
Attached
Detach File
Event Timeline
Log In to Comment