comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Gprbuild - Setting the earliest version of MacOS X that an executable will run on.
Date: Mon, 27 Mar 2017 08:26:00 +0100
Date: 2017-03-27T08:26:00+01:00	[thread overview]
Message-ID: <ly60ivch9z.fsf@pushface.org> (raw)
In-Reply-To: 6f8cefdc-9f22-43ef-97fc-5835d9376bc1@googlegroups.com

ahlan.marriott@gmail.com writes:

> However I don't understand you proposed workaround to the linker.
> "-Wl,-macosx_version_min,'sw_vers -productVersion'"
> When I try this Gnat says
> -macosx_version_min value malformed: 'sw_vers -productVersion'

Those were *backticks*, and the workround would need to be applied on
the command line (since gprbuild can't execute arbitrary shell commands
internally).

If you say

   gprbuild -P foo -largs -Wl,-macosx_version_min,`sw_vers -productVersion`

under a Unix-type sh-like shell (e.g. bash), the shell will execute the
part in backticks and substitute the result (in this case, 10.12.3) in
the command line actually passed to gprbuild.

I suppose you could set up an environment variable

   export OS_VER=`sw_vers -productVersion`

and use 'case' magic inside your GPR.

      reply	other threads:[~2017-03-27  7:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26 15:10 Gprbuild - Setting the earliest version of MacOS X that an executable will run on ahlan.marriott
2017-03-26 18:01 ` Simon Wright
2017-03-26 21:03   ` Simon Wright
2017-03-27  6:58     ` ahlan.marriott
2017-03-27  7:26       ` Simon Wright [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox