From owner-cvs-all Mon Mar 5 1:52:31 2001 Delivered-To: cvs-all@freebsd.org Received: from nothing-going-on.demon.co.uk (unknown [194.128.198.234]) by hub.freebsd.org (Postfix) with ESMTP id 236B237B71A; Mon, 5 Mar 2001 01:52:14 -0800 (PST) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.1/8.11.1) id f259cvX02644; Mon, 5 Mar 2001 09:38:58 GMT (envelope-from nik) Date: Mon, 5 Mar 2001 09:38:57 +0000 From: Nik Clayton To: Wolfram Schneider Cc: Nik Clayton , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: www/en/docs Makefile Message-ID: <20010305093857.A2592@canyon.nothing-going-on.org> References: <200102241804.f1OI4Ap34648@freefall.freebsd.org> <20010304223255.A1254@paula.panke.de.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010304223255.A1254@paula.panke.de.freebsd.org>; from wosch@panke.de.freebsd.org on Sun, Mar 04, 2001 at 10:32:55PM +0100 Organization: FreeBSD Project Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 04, 2001 at 10:32:55PM +0100, Wolfram Schneider wrote: > On 2001-02-24 10:04:10 -0800, Nik Clayton wrote: > > nik 2001/02/24 10:04:10 PST > >=20 > > Modified files: > > en/docs Makefile=20 > > Log: > > unset(1) returns '1' if the variable doesn't exist, so use the '||' > > operator rather than the '&&' operator. >=20 > this is hard to read shell code: >=20 > all install clean: > (cd ../../../doc/en_US.ISO_8859-1 && unset DESTDIR || ${MAKE} FOR= MATS=3Dht > ml-split DOCDIR=3D${DESTDIR}/data/docs ${.TARGET}) >=20 > what does it mean? > > 1. unset the variable DESTDIR and execute the targets in the=20 > directory ../../../doc/en_US.ISO_8859-1 Correct. Both the web build and the doc build honour the DESTDIR variable, with DESTDIR taking precedence over DOCDIR. So if you had DESTDIR set in the environment to something like /usr/local/www/data/, that's where the docs would get installed. The "unset" builtin returns a non-zero exit value if the variable doesn't exist in the environment. This halted the build (and is the reason why my first commit to this broke the build -- I tested it with DESTDIR on the command line, which worked, rather than in the environment, which failed). Hence the '||' connector, rather than the '&&' connector which I originally used. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjqjXrAACgkQk6gHZCw343XkggCfZm4lJ+Du06TGq4EWfwUofmZ8 VEQAnRwFjolbdtM8WbPfype3CL20McX5 =WChk -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message