Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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?=3D      doc
 WWW_PREFIX_NAME?=3D      www
=20
+.if defined(LANGCODE) && !empty(LANGCODE)
+.if !defined(WWW_LANGCODE) || empty(WWW_LANGCODE)
+WWW_LANGCODE=3D${LANGCODE}
+.endif
+.endif
+
+.if defined(WWW_LANGCODE) && !empty(WWW_LANGCODE)
+.if !defined(LANGCODE) || empty(LANGCODE)
+LANGCODE=3D${WWW_LANGCODE}
+.endif
+.endif
+
 .if !defined(LANGCODE) || empty(LANGCODE) || !defined(WWW_LANGCODE) || emp=
ty(WWW_LANGCODE)
 # Calculate LANGCODE.
 LANGCODE:=3D     ${.CURDIR}

Comments?

/s/Udo
--=20
Ich bin root, ich darf das.

--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iQCVAwUBP/DJr0Poh1XnT6hxAQGE1AQAoQyhPLJrsyXrC1JSDPoSP95EcREuqJvB
VVZiRsHxJRVzyT5EjPkdbtq3/eW2xEERstrdEbsJB2717U3Ti3/3EK9CJk8JiLRC
hWIkmQRhu50wwBBuRQI182CMi/LNQoebz+A0dbXjxT0EkIKi2ws5r0OF9/PZKDak
QbkONxBiRNY=
=WmhF
-----END PGP SIGNATURE-----

--jRHKVT23PllUwdXP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031230004119.GA19005>