Subject: testing for USE_DESTDIR in a Makefile
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.jul.sieben@kh-22.de>
List: tech-pkg
Date: 07/01/2007 18:51:51
Hi,
as far as I can see in bsd.prefs.mk, there are two official values for
USE_DESTDIR: "yes" and "full". USE_DESTDIR being unset or having any other
value means the facility is switched off.
I just had a case where I needed to test whether USE_DESTDIR is
(partially) on or off, so I would rather use
.if defined(USE_DESTDIR) && (!empty(USE_DESTDIR:M[Nn][Oo])
instead of
.if defined(USE_DESTDIR) && (!empty(USE_DESTDIR:M[Yy][Ee][Ss]) || !empty(USE_DESTDIR:M[Ff][Uu][Ll][Ll]))
Could "no" be added to the official values so I can rely on it?
ciao
Klaus