svn commit: r51109 - in head/share: . mk

Wolfram Schneider wosch at FreeBSD.org
Thu Oct 12 14:38:13 UTC 2017


Author: wosch
Date: Thu Oct 12 14:38:11 2017
New Revision: 51109
URL: https://svnweb.freebsd.org/changeset/doc/51109

Log:
  no fatal errors for english documents
  
  refactor to use make syntax instead shell/test scripts
  
  PR: 222939

Modified:
  head/share/Makefile
  head/share/mk/doc.translate.mk

Modified: head/share/Makefile
==============================================================================
--- head/share/Makefile	Thu Oct 12 14:14:41 2017	(r51108)
+++ head/share/Makefile	Thu Oct 12 14:38:11 2017	(r51109)
@@ -2,4 +2,6 @@
 
 SUBDIR+=	pgpkeys
 
+po:
+
 .include <bsd.subdir.mk>

Modified: head/share/mk/doc.translate.mk
==============================================================================
--- head/share/mk/doc.translate.mk	Thu Oct 12 14:14:41 2017	(r51108)
+++ head/share/mk/doc.translate.mk	Thu Oct 12 14:38:11 2017	(r51109)
@@ -42,10 +42,9 @@ POSET_CMD=	${SED} -i '' -e '1s,^,\#${IDSTR1}${IDSTR2}\
 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 \


More information about the svn-doc-all mailing list