doc.common.mk 1.3

Udo Erdelhoff ue at nathan.ruhr.de
Tue Dec 30 00:50:11 UTC 2003


Hi,
your changes to doc.common.mk break certian cases of out-of-tree
builds of the release notes.  The problem is quite simple, you set
LANGCODE to ${.CURDIR} if either LANGCODE or WWW_LANGCODE is not
defined.  If the current path does not contain "doc" or "www",
LANGCODE is set to ".", and this breaks all non-english versions.
In my opinion, you should only use your initialization if *both*
LANGCODE and WWW_LANGCODE are empty.  If only one of the two variables
is empty, you should initialize the other variable with this value.

In other words, something like:
diff -u -r1.3 doc.common.mk
--- doc.common.mk       26 Nov 2003 01:47:00 -0000      1.3
+++ doc.common.mk       30 Dec 2003 00:40:11 -0000
@@ -23,6 +23,18 @@
 DOC_PREFIX_NAME?=      doc
 WWW_PREFIX_NAME?=      www
 
+.if defined(LANGCODE) && !empty(LANGCODE)
+.if !defined(WWW_LANGCODE) || empty(WWW_LANGCODE)
+WWW_LANGCODE=${LANGCODE}
+.endif
+.endif
+
+.if defined(WWW_LANGCODE) && !empty(WWW_LANGCODE)
+.if !defined(LANGCODE) || empty(LANGCODE)
+LANGCODE=${WWW_LANGCODE}
+.endif
+.endif
+
 .if !defined(LANGCODE) || empty(LANGCODE) || !defined(WWW_LANGCODE) || empty(WWW_LANGCODE)
 # Calculate LANGCODE.
 LANGCODE:=     ${.CURDIR}

Comments?

/s/Udo
-- 
Ich bin root, ich darf das.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20031230/af47cae9/attachment.sig>


More information about the freebsd-doc mailing list