Date: Mon, 05 Mar 2001 09:08:52 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Nik Clayton <nik@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Wolfram Schneider <wosch@panke.de.freebsd.org> Subject: Re: cvs commit: www/en/docs Makefile Message-ID: <XFMail.010305090852.jhb@FreeBSD.org> In-Reply-To: <20010305093857.A2592@canyon.nothing-going-on.org>
index | next in thread | previous in thread | raw e-mail
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 <jhb@FreeBSD.org> -- 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010305090852.jhb>
