From 473721979d7b872e1d8885508b9299723c70398e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 16 Nov 2010 03:19:01 +0000 Subject: [PATCH] Print warning when using platform_none.cc --- wscript | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/wscript b/wscript index 0f67133283..6c1917db2c 100644 --- a/wscript +++ b/wscript @@ -353,6 +353,14 @@ def configure(conf): # platform conf.env.append_value('CPPFLAGS', '-DPLATFORM="' + conf.env['DEST_OS'] + '"') + platform_file = "src/platform_%s.cc" % conf.env['DEST_OS'] + if os.path.exists(join(cwd, platform_file)): + Options.options.platform_file = True + conf.env["PLATFORM_FILE"] = platform_file + else: + Options.options.platform_file = False + conf.env["PLATFORM_FILE"] = "src/platform_none.cc" + if conf.env['USE_PROFILING'] == True: conf.env.append_value('CPPFLAGS', '-pg') conf.env.append_value('LINKFLAGS', '-pg') @@ -563,16 +571,10 @@ def build(bld): src/node_timer.cc src/node_script.cc """ + node.source += bld.env["PLATFORM_FILE"] if not product_type_is_lib: node.source = 'src/node_main.cc '+node.source - platform_file = "src/platform_%s.cc" % bld.env['DEST_OS'] - if os.path.exists(join(cwd, platform_file)): - node.source += platform_file - else: - node.source += "src/platform_none.cc " - - if bld.env["USE_OPENSSL"]: node.source += " src/node_crypto.cc " node.includes = """ @@ -660,6 +662,10 @@ def shutdown(): if not Options.options.use_openssl: print "WARNING WARNING WARNING" print "OpenSSL not found. Will compile Node without crypto support!" + + if not Options.options.platform_file: + print "WARNING: Platform not fully supported. Using src/platform_none.cc" + elif not Options.commands['clean']: if os.path.exists('build/default/node') and not os.path.exists('node'): os.symlink('build/default/node', 'node')