mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Bug 807492 Part X - Allow gyp mozmake generator to handle various BSD flavors r=ted
This commit is contained in:
parent
d3818c2ab0
commit
cf491e0f36
@ -6,6 +6,7 @@ import collections
|
||||
import gyp
|
||||
import gyp.common
|
||||
import sys
|
||||
import platform
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
@ -114,15 +115,25 @@ def ensure_directory_exists(path):
|
||||
|
||||
def GetFlavor(params):
|
||||
"""Returns |params.flavor| if it's set, the system's default flavor else."""
|
||||
system = platform.system().lower()
|
||||
flavors = {
|
||||
'win32': 'win',
|
||||
'darwin': 'mac',
|
||||
'sunos5': 'solaris',
|
||||
'freebsd7': 'freebsd',
|
||||
'freebsd8': 'freebsd',
|
||||
'microsoft': 'win',
|
||||
'windows' : 'win',
|
||||
'cygwin' : 'win',
|
||||
'darwin' : 'mac',
|
||||
'sunos' : 'solaris',
|
||||
'dragonfly': 'dragonfly',
|
||||
'freebsd' : 'freebsd',
|
||||
'netbsd' : 'netbsd',
|
||||
'openbsd' : 'openbsd',
|
||||
}
|
||||
flavor = flavors.get(sys.platform, 'linux')
|
||||
return params.get('flavor', flavor)
|
||||
|
||||
if 'flavor' in params:
|
||||
return params['flavor']
|
||||
if system in flavors:
|
||||
return flavors[system]
|
||||
|
||||
return 'linux'
|
||||
|
||||
|
||||
def CalculateVariables(default_variables, params):
|
||||
|
Loading…
x
Reference in New Issue
Block a user