From owner-cvs-all Tue May 7 5: 6: 1 2002 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 6032A37B407; Tue, 7 May 2002 05:05:37 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g47C4P888446; Tue, 7 May 2002 15:04:25 +0300 (EEST) (envelope-from ru) Date: Tue, 7 May 2002 15:04:25 +0300 From: Ruslan Ermilov To: Warner Losh Cc: Bruce Evans , Dima Dorfman , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf kmod.mk Message-ID: <20020507120425.GH26127@sunbay.com> References: <20020503032719.G4775-100000@gamplex.bde.org> <200205022239.g42MdGr04255@harmony.village.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L+ofChggJdETEG3Y" Content-Disposition: inline In-Reply-To: <200205022239.g42MdGr04255@harmony.village.org> User-Agent: Mutt/1.3.27i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --L+ofChggJdETEG3Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 02, 2002 at 04:39:16PM -0600, Warner Losh wrote: > In message <20020503032719.G4775-100000@gamplex.bde.org> Bruce Evans writ= es: > : > > +.if !exists(/usr/sbin/kldxref) > : > > +NO_XREF=3Dyes > : > > +.endif > :=20 > : This is broken. kldxref might be in $PATH but not in /usr/sbin, or vice > : versa. >=20 > True. However, it breaks a case I don't care about. Until make gets > a exists_in_path(foo), this is a reasonable compromise. >=20 There is a better compromise, please see below. > : > > .if !defined(NO_XREF) > :=20 > : If a non-broken existence test ifdef exists, why not write it here dire= ctly. >=20 > I didn't want to remove NO_XREF, but rather just use it. >=20 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. >=20 > Yes. It even seems to work. :-) >=20 How about this? %%% Index: kmod.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =20 -.if !exists(/usr/sbin/kldxref) -NO_XREF=3Dyes -.endif - _ILINKS=3D@ machine =20 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 =20 %%% Cheers, --=20 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 --L+ofChggJdETEG3Y Content-Type: application/pgp-signature Content-Disposition: inline -----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----- --L+ofChggJdETEG3Y-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message