make/common/shared/Compiler-msvc.gmk

changeset 114
1c130e7b7a2e
parent 57
9c0cc0d0eca2
child 150
ee2d8f1bef5b
     1.1 --- a/make/common/shared/Compiler-msvc.gmk	Tue Sep 01 23:44:41 2009 +0100
     1.2 +++ b/make/common/shared/Compiler-msvc.gmk	Wed Sep 02 09:20:17 2009 -0700
     1.3 @@ -48,11 +48,17 @@
     1.4    NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
     1.5  
     1.6    # Compiler version and type (Always get word after "Version")
     1.7 -  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
     1.8 -  
     1.9 +  ifndef CC_VER
    1.10 +    CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
    1.11 +    export CC_VER
    1.12 +  endif
    1.13 +
    1.14    # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
    1.15    ifeq ($(ARCH_DATA_MODEL), 32)
    1.16 -    LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
    1.17 +    ifndef LINK_VER
    1.18 +      LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
    1.19 +      export LINK_VER
    1.20 +    endif
    1.21      CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
    1.22      ifeq ($(CC_MAJORVER), 13)
    1.23        # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
    1.24 @@ -93,7 +99,10 @@
    1.25      endif
    1.26    else
    1.27      # else ARCH_DATA_MODEL is 64
    1.28 -    LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
    1.29 +    ifndef LINK_VER
    1.30 +      LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
    1.31 +      export LINK_VER
    1.32 +    endif
    1.33      CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
    1.34      CC_MINORVER :=$(call MinorVersion,$(CC_VER))
    1.35      CC_MICROVER :=$(call MicroVersion,$(CC_VER))

mercurial