svn commit: r41629 - projects/xml-tools/share/mk
Gabor Kovesdan
gabor at FreeBSD.org
Wed May 15 13:40:07 UTC 2013
Author: gabor
Date: Wed May 15 13:40:06 2013
New Revision: 41629
URL: http://svnweb.freebsd.org/changeset/doc/41629
Log:
- The old LANGCODE detection was bogus and did not work properly with
release notes. Use a different approach that works.
Modified:
projects/xml-tools/share/mk/doc.common.mk
Modified: projects/xml-tools/share/mk/doc.common.mk
==============================================================================
--- projects/xml-tools/share/mk/doc.common.mk Tue May 14 14:06:32 2013 (r41628)
+++ projects/xml-tools/share/mk/doc.common.mk Wed May 15 13:40:06 2013 (r41629)
@@ -20,20 +20,8 @@ DOC_PREFIX_NAME?= head
.endif
.if (!defined(LANGCODE) || empty(LANGCODE))
-# Calculate _LANGCODE.
-_LANGCODE:= ${.CURDIR}
-. for _ in 1 2 3 4 5 6 7 8 9 10
-. if !(${_LANGCODE:H:T} == ${DOC_PREFIX_NAME})
-_LANGCODE:= ${_LANGCODE:H}
-. endif
-. endfor
-_LANGCODE:= ${_LANGCODE:T}
-.else # (!defined(LANGCODE) || empty(LANGCODE))
-# when LANGCODE is defined, use the value.
-_LANGCODE?= ${LANGCODE}
-.endif # (!defined(LANGCODE) || empty(LANGCODE))
-
-LANGCODE?= ${_LANGCODE}
+LANGCODE!= echo ${.CURDIR} | grep -o '[a-z]*_[A-Z]*\.[-A-Za-z0-9]*' || true
+.endif
# normalize DOC_PREFIX
DOC_PREFIX!= ${REALPATH} ${DOC_PREFIX}
More information about the svn-doc-projects
mailing list