Date: Tue, 7 May 2002 15:04:25 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Warner Losh <imp@harmony.village.org> Cc: Bruce Evans <bde@zeta.org.au>, Dima Dorfman <dima@trit.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf kmod.mk Message-ID: <20020507120425.GH26127@sunbay.com> In-Reply-To: <200205022239.g42MdGr04255@harmony.village.org> References: <20020503032719.G4775-100000@gamplex.bde.org> <200205022239.g42MdGr04255@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Thu, May 02, 2002 at 04:39:16PM -0600, Warner Losh wrote:
> In message <20020503032719.G4775-100000@gamplex.bde.org> Bruce Evans writes:
> : > > +.if !exists(/usr/sbin/kldxref)
> : > > +NO_XREF=yes
> : > > +.endif
> :
> : This is broken. kldxref might be in $PATH but not in /usr/sbin, or vice
> : versa.
>
> True. However, it breaks a case I don't care about. Until make gets
> a exists_in_path(foo), this is a reasonable compromise.
>
There is a better compromise, please see below.
> : > > .if !defined(NO_XREF)
> :
> : If a non-broken existence test ifdef exists, why not write it here directly.
>
> I didn't want to remove NO_XREF, but rather just use it.
>
What Bruce meant is why didn't put the existence test directly inside the
".if !defined(NO_XREF)" block?
> : I agree. Ignoring errors in Makefiles is a bug.
>
> Yes. It even seems to work. :-)
>
How about this?
%%%
Index: kmod.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.123
diff -u -r1.123 kmod.mk
--- kmod.mk 1 May 2002 19:24:26 -0000 1.123
+++ kmod.mk 7 May 2002 12:03:19 -0000
@@ -170,10 +170,6 @@
.endif
.endif
-.if !exists(/usr/sbin/kldxref)
-NO_XREF=yes
-.endif
-
_ILINKS=@ machine
all: objwarn ${PROG}
@@ -260,7 +256,9 @@
done; true
.endif
.if !defined(NO_XREF)
- -kldxref ${DESTDIR}${KMODDIR}
+ @if type kldxref >/dev/null 2>&1; then \
+ kldxref ${DESTDIR}${KMODDIR}; \
+ fi
.endif
.endif
%%%
Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE818LJUkv4P6juNwoRAqTxAJ92g8/aci2t6wNWzGO73eHSJs/vDQCgghCJ
dWPRUSZhNJVXj5mq2b+Wqjg=
=CDcY
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020507120425.GH26127>
