Date: Fri, 9 Feb 2018 15:59:50 -0800 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Johannes Lundberg <johalun0@gmail.com>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: Makefile and nested variables question Message-ID: <02523ce9-4771-e63f-1c0e-735998bf1f67@FreeBSD.org> In-Reply-To: <CAECmPwv2%2BacPz=KdWgPHEC-kSF4GNN62O3ZEXhXYKT0BjCVXXw@mail.gmail.com> References: <CAECmPwv2%2BacPz=KdWgPHEC-kSF4GNN62O3ZEXhXYKT0BjCVXXw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--u7gU0EWK11oMDi0hOfUxRXlnax214FBqe
Content-Type: multipart/mixed; boundary="yXZa17jINsNpo3iw2uTYFjBvRdHsXBvwe";
protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Johannes Lundberg <johalun0@gmail.com>,
freebsd-current <freebsd-current@freebsd.org>
Message-ID: <02523ce9-4771-e63f-1c0e-735998bf1f67@FreeBSD.org>
Subject: Re: Makefile and nested variables question
References: <CAECmPwv2+acPz=KdWgPHEC-kSF4GNN62O3ZEXhXYKT0BjCVXXw@mail.gmail.com>
In-Reply-To: <CAECmPwv2+acPz=KdWgPHEC-kSF4GNN62O3ZEXhXYKT0BjCVXXw@mail.gmail.com>
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?02523ce9-4771-e63f-1c0e-735998bf1f67>
