[MacPorts] #36303: llvm-3.1 compilation hangs on sw_vers -> hack found

MacPorts noreply at macports.org
Mon Sep 24 08:48:31 PDT 2012


#36303: llvm-3.1 compilation hangs on sw_vers -> hack found
------------------------+------------------------
  Reporter:  bobo@…     |      Owner:  jeremyhu@…
      Type:  defect     |     Status:  closed
  Priority:  Low        |  Milestone:
 Component:  ports      |    Version:  2.1.2
Resolution:  duplicate  |   Keywords:
      Port:  llvm-3.1   |
------------------------+------------------------

Comment (by gnwiii@…):

 The line you give won't work unless you escape the space after echo or
 apply some quotes, so it is possible the sw_vers command is OK.

 I copied the text from {{{llvm-3.n.src/Makefile.rules}}} into a trivial
 Makfile:

 {{{
   DARWIN_VERSION := `sw_vers -productVersion`
   # Strip a number like 10.4.7 to 10.4
   DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E
 's/(10.[0-9]).*/\1/')
   # Get "4" out of 10.4 for later pieces in the makefile.
   DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E
 's/10.([0-9]).*/\1/')

   all:
          echo $(DARWIN_VERSION) and $(DARWIN_MAJVERS)

 }}}

 On Snow Leopard (/usr/bin/make is GNU make 3.81) I get:

 {{{
 $ /usr/bin/make
 10.6 and 6
 SHELL=/bin/sh  /usr/bin/make
 10.6 and 6
 }}}

 Does Mountain Lion use a different make program?   Does /bin/sh work in a
 terminal?   Do other simple {{{$(shell xxx)}}} examples
 work in Makefiles?

-- 
Ticket URL: <https://trac.macports.org/ticket/36303#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list