Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ import string
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++')

root_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib'))
build_dir = os.getcwd()
src_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(src_dir, 'tools', 'gyp', 'pylib'))
from gyp.common import GetFlavor

# imports in tools/configure.d
sys.path.insert(0, os.path.join(root_dir, 'tools', 'configure.d'))
sys.path.insert(0, os.path.join(src_dir, 'tools', 'configure.d'))
import nodedownload

# imports in tools/
sys.path.insert(0, os.path.join(root_dir, 'tools'))
sys.path.insert(0, os.path.join(src_dir, 'tools'))
import getmoduleversion

# parse our options
Expand Down Expand Up @@ -372,7 +373,7 @@ intl_optgroup.add_option('--download',
intl_optgroup.add_option('--download-path',
action='store',
dest='download_path',
default=os.path.join(root_dir, 'deps'),
default=os.path.join(build_dir, 'deps'),
help='Download directory [default: %default]')

parser.add_option_group(intl_optgroup)
Expand Down Expand Up @@ -942,7 +943,7 @@ def configure_openssl(o):
o['variables']['openssl_no_asm'] = 1 if options.openssl_no_asm else 0
if options.openssl_fips:
o['variables']['openssl_fips'] = options.openssl_fips
fips_dir = os.path.join(root_dir, 'deps', 'openssl', 'fips')
fips_dir = os.path.join(build_dir, 'deps', 'openssl', 'fips')
fips_ld = os.path.abspath(os.path.join(fips_dir, 'fipsld'))
o['make_fips_settings'] = [
['LINK', fips_ld + ' <(openssl_fips)/bin/fipsld'],
Expand Down Expand Up @@ -972,7 +973,7 @@ def configure_static(o):


def write(filename, data):
filename = os.path.join(root_dir, filename)
filename = os.path.join(build_dir, filename)
print('creating %s' % filename)
f = open(filename, 'w+')
f.write(data)
Expand Down Expand Up @@ -1094,7 +1095,7 @@ def configure_intl(o):
return

# this is just the 'deps' dir. Used for unpacking.
icu_parent_path = os.path.join(root_dir, 'deps')
icu_parent_path = os.path.join(build_dir, 'deps')

# The full path to the ICU source directory. Should not include './'.
icu_full_path = 'deps/icu'
Expand Down Expand Up @@ -1339,7 +1340,7 @@ config = '\n'.join(map('='.join, config.iteritems())) + '\n'
write('config.mk',
'# Do not edit. Generated by the configure script.\n' + config)

gyp_args = [sys.executable, 'tools/gyp_node.py', '--no-parallel']
gyp_args = [sys.executable, os.path.join(src_dir, 'tools/gyp_node.py'), '--no-parallel']

if options.use_xcode:
gyp_args += ['-f', 'xcode']
Expand Down