Date: Tue, 30 Dec 2003 01:41:19 +0100 From: Udo Erdelhoff <ue@nathan.ruhr.de> To: hrs@freebsd.org Cc: freebsd-doc@freebsd.org Subject: doc.common.mk 1.3 Message-ID: <20031230004119.GA19005@nathan.ruhr.de>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iQCVAwUBP/DJr0Poh1XnT6hxAQGE1AQAoQyhPLJrsyXrC1JSDPoSP95EcREuqJvB
VVZiRsHxJRVzyT5EjPkdbtq3/eW2xEERstrdEbsJB2717U3Ti3/3EK9CJk8JiLRC
hWIkmQRhu50wwBBuRQI182CMi/LNQoebz+A0dbXjxT0EkIKi2ws5r0OF9/PZKDak
QbkONxBiRNY=
=WmhF
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031230004119.GA19005>
