From owner-cvs-all Mon Mar 5 9: 9:17 2001 Delivered-To: cvs-all@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id 12BCF37B718; Mon, 5 Mar 2001 09:09:11 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@dhcp152.geekhouse.net [192.168.1.152]) by moby.geekhouse.net (8.11.0/8.9.3) with ESMTP id f25HA8188050; Mon, 5 Mar 2001 09:10:08 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010305093857.A2592@canyon.nothing-going-on.org> Date: Mon, 05 Mar 2001 09:08:52 -0800 (PST) From: John Baldwin To: Nik Clayton Subject: Re: cvs commit: www/en/docs Makefile Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Wolfram Schneider Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 05-Mar-01 Nik Clayton wrote: > 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 >> > >> > Modified files: >> > en/docs Makefile >> > Log: >> > unset(1) returns '1' if the variable doesn't exist, so use the '||' >> > operator rather than the '&&' operator. >> >> this is hard to read shell code: >> >> all install clean: >> (cd ../../../doc/en_US.ISO_8859-1 && unset DESTDIR || ${MAKE} >> FORMATS=ht >> ml-split DOCDIR=${DESTDIR}/data/docs ${.TARGET}) >> >> what does it mean? >> >> 1. unset the variable DESTDIR and execute the targets in the >> 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. Umm, but if the unset succeeds will it just not do the 'make' command? I think you want something more like this: (cd ../../../doc/en_US.ISO_8859-1 && \ (unset DESTDIR ; ${MAKE} ...)) ? -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message