diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-09-09 11:41:05 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-09-09 11:41:05 -0700 |
commit | 608898c15b9181a583d99d0da05f145997a98db0 (patch) | |
tree | 3e1c81a714a9d4f28725623e52b09a50dd5a3985 | |
parent | fb383a0ad08470d2a50923c7f3baa3a59a530026 (diff) | |
download | node-new-608898c15b9181a583d99d0da05f145997a98db0.tar.gz |
configure: add a "--dest-os" option to force a gyp "flavor"
This makes cross-compiling easier. i.e. from my mac:
./configure --dest-cpu=arm --dest-os=linux
-rwxr-xr-x | configure | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -159,6 +159,12 @@ parser.add_option("--dest-cpu", dest="dest_cpu", help="CPU architecture to build for. Valid values are: arm, ia32, x64") +parser.add_option("--dest-os", + action="store", + dest="dest_os", + help="Operating system to build for. Valid values are: " + "win, mac, solaris, freebsd, linux") + parser.add_option("--no-ifaddrs", action="store_true", dest="no_ifaddrs", @@ -465,6 +471,8 @@ write('config.mk', "# Do not edit. Generated by the configure script.\n" + if os.name == 'nt': gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010'] +elif options.dest_os: + gyp_args = ['-f', 'make-' + options.dest_os] else: gyp_args = ['-f', 'make'] |