Makefile question

Ryan Schmidt ryandesign at macports.org
Sun Dec 6 00:39:00 PST 2015


On Dec 5, 2015, at 8:59 AM, Mark Brethen wrote:

> On Dec 5, 2015, at 6:35 AM, Ryan Schmidt wrote:
>> 
>> Well the "very simplistic arch test" is of course wrong. "uname -m" tells you the arch of the kernel, which is not necessarily the arch of userland software. In any case, we don't want build systems deciding for themselves what arch(s) to user; they shall obey the arch(s) MacPorts tells them to use.
> 
> I see this quite often with multi-platform source. What should be done?

MacPorts sets the correct -arch flags during the configure phase in the CFLAGS, CXXFLAGS, LDFLAGS and other environment variables, which is suitable for autotools-based build systems and some others. For cmake, there's the cmake portgroup which sets things up correctly. For xcode, there's the xcode portgroup. For custom build systems, you have to figure out how to do it. The [get_canonical_archflags] procedure is available to help you.


>> Also, I assume "arch_osx" and "arch_legacy_osx" are filenames; I wonder what the difference in the contents of those files is.
>> 
> 
> Just one line:
> 
> --- arch_osx.ml	2015-08-09 09:37:56.000000000 -0500
> +++ arch_legacy_osx.ml	2015-08-09 09:37:56.000000000 -0500
> @@ -48,7 +48,7 @@
> 
> let create_process_env = Unix.create_process_env
> 
> -let biff_path_separator = "\\\\" (* backslash_to_slash hopefully sorts this out *)
> +let biff_path_separator = ":"
> 
> (* On OSX, TOB baldur.ini has:
>    [Alias]
> @@ -59,7 +59,6 @@
>    CD3:=:CD3:
>    CD4:=:CD4:
>  *)
> -
> let cd_regexp = Str.regexp "\\(CD[0-9]\\)"
> (* doesn't work:
>    let cd_regexp = Str.regexp "^[CH]D[0-9]+.*=\\([^\r\n]*\\)"  *)

The path separator was ":" on Mac OS 9 and earlier, so that's not applicable in MacPorts which only runs on OS X.



More information about the macports-dev mailing list