On Mon, Dec 19, 2022 at 1:54 PM Alejandro Colomar
<alx.manpa...@gmail.com> wrote:
> That would render the $(includedir) variable unusable for use within the
> Makefile (for example, within targets that install the header files).

We can introduce another variable, e.g. myincludedir and initialize it
with the expanded value of includedir and use myincludedir within the
makefile.

includedir:=$${prefix}/include
$(eval myincludedir:=$(includedir))
myconfig.pc:; @echo 'includedir=$(includedir)' >> myconfig.pc


regards, Dmitry

Reply via email to