From owner-freebsd-current@freebsd.org Sat Feb 10 00:00:04 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7602AF0D504 for ; Sat, 10 Feb 2018 00:00:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 222DA8017C; Sat, 10 Feb 2018 00:00:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id EE732B369; Sat, 10 Feb 2018 00:00:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C01F78E11; Sat, 10 Feb 2018 00:00:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id B1PE8RGGzS3n; Sat, 10 Feb 2018 00:00:00 +0000 (UTC) Subject: Re: Makefile and nested variables question DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com BCBA68E0C To: Johannes Lundberg , freebsd-current References: From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <02523ce9-4771-e63f-1c0e-735998bf1f67@FreeBSD.org> Date: Fri, 9 Feb 2018 15:59:50 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u7gU0EWK11oMDi0hOfUxRXlnax214FBqe" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2018 00:00:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --u7gU0EWK11oMDi0hOfUxRXlnax214FBqe Content-Type: multipart/mixed; boundary="yXZa17jINsNpo3iw2uTYFjBvRdHsXBvwe"; protected-headers="v1" From: Bryan Drewery To: Johannes Lundberg , freebsd-current Message-ID: <02523ce9-4771-e63f-1c0e-735998bf1f67@FreeBSD.org> Subject: Re: Makefile and nested variables question References: In-Reply-To: --yXZa17jINsNpo3iw2uTYFjBvRdHsXBvwe Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/9/2018 9:02 AM, Johannes Lundberg wrote: > Hi >=20 > Is there some way to use nested variables in the dependency line like s= o: >=20 > ${OBJS}: ${${.TARGET:S/$/_DEPS/}} >=20 > In my case I get nothing.. >=20 I think I need more details. That line won't work. ${.TARGET} is only defined *in a running target*, not while declaring dependencies. If these OBJS are C files then this syntax may be enough to only declare the dependencies when really needed. OBJS_DEPEND_GUESS.foo.o +=3D bar.h bar.c Rather than what I think you tried: foo.o_DEPS +=3D bar.h bar.c If you want them declared always (ignoring .depend files) then just: foo.o: bar.h bar.c --=20 Regards, Bryan Drewery --yXZa17jINsNpo3iw2uTYFjBvRdHsXBvwe-- --u7gU0EWK11oMDi0hOfUxRXlnax214FBqe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJafjX8AAoJEDXXcbtuRpfPgLMIAJSKSt3PLp7Bv8p+yLo7XqL3 VuvwBN6tsCk6srYbFXdsydXMRjOkjf71+GWjDU/T1OtYc0miFenudH6L+wYI7STB 6OccjbD4DrUWq+rfvid9//GNJK5EWw37phNqxPItMI9Ixo2adhRkOHy50vZxEVci YiMkrVnA8XJFLvM+zIJog1Gr7aIsajMdxyxRnTz9HXqBr18tPZBGWKDZklpjqjTG dqr2O6t9RMztL0Vgu3kTNNCJUqDlU2Zz+/wXsLADdNsJSeIvUirDQU8ceeJyvFQK Y9MKG2tQuwKZYttghQ9ljbTPrlWQZpZUxFbSlCKEFc5Riea7qdP/vn299TeccPg= =TNwa -----END PGP SIGNATURE----- --u7gU0EWK11oMDi0hOfUxRXlnax214FBqe--