Re: PG_CFLAGS rpath Passthrough Issue - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: PG_CFLAGS rpath Passthrough Issue
Date
Msg-id 202503151158.wmhl2cxl77gn@alvherre.pgsql
Whole thread Raw
In response to Re: PG_CFLAGS rpath Passthrough Issue  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: PG_CFLAGS rpath Passthrough Issue
List pgsql-hackers
On 2025-Mar-14, David E. Wheeler wrote:

> But, just. WAT. 30 years in this business and shell string escaping
> continues to elude me. I tried lots of different combinations of
> escaping, but this weird double-$ never occurred to me.

It's make.  From its info manual:

 6.1 Basics of Variable References

   To substitute a variable’s value, write a dollar sign followed by the name
   of the variable in parentheses or braces: either ‘$(foo)’ or ‘${foo}’ is a
   valid reference to the variable foo. This special significance of
   ‘$’ is why you must write ‘$$’ to have the effect of a single dollar sign in
   a file name or recipe.

I'm surprised that you don't need \$\$ though.  I wonder if
  make CFLAGS='-Wl,-rpath,$$ORIGIN'
isn't enough actually?

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Learn about compilers. Then everything looks like either a compiler or
a database, and now you have two problems but one of them is fun."
            https://twitter.com/thingskatedid/status/1456027786158776329



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Proposal: Adding compression of temporary files
Next
From: Christoph Berg
Date:
Subject: Re: Available disk space per tablespace