From: Ryan Dahl Date: Fri, 14 May 2010 23:30:41 +0000 (-0700) Subject: Remove some unused cruft from wscript X-Git-Tag: v0.1.96~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b7bda8f46db36f951e644377fd4c20c461a52ca;p=platform%2Fupstream%2Fnodejs.git Remove some unused cruft from wscript --- diff --git a/wscript b/wscript index e8bb79e..ba35aee 100644 --- a/wscript +++ b/wscript @@ -39,72 +39,6 @@ def set_options(opt): , dest='system' ) -def mkdir_p(dir): - if not os.path.exists (dir): - os.makedirs (dir) - -# Copied from Python 2.6 because 2.4.4 at least is broken by not using -# mkdirs -# http://mail.python.org/pipermail/python-bugs-list/2005-January/027118.html -def copytree(src, dst, symlinks=False, ignore=None): - names = os.listdir(src) - if ignore is not None: - ignored_names = ignore(src, names) - else: - ignored_names = set() - - os.makedirs(dst) - errors = [] - for name in names: - if name in ignored_names: - continue - srcname = join(src, name) - dstname = join(dst, name) - try: - if symlinks and os.path.islink(srcname): - linkto = os.readlink(srcname) - os.symlink(linkto, dstname) - elif os.path.isdir(srcname): - copytree(srcname, dstname, symlinks, ignore) - else: - shutil.copy2(srcname, dstname) - # XXX What about devices, sockets etc.? - except (IOError, os.error), why: - errors.append((srcname, dstname, str(why))) - # catch the Error from the recursive copytree so that we can - # continue with other files - except Error, err: - errors.extend(err.args[0]) - try: - shutil.copystat(src, dst) - except OSError, why: - if WindowsError is not None and isinstance(why, WindowsError): - # Copying file access times may fail on Windows - pass - else: - errors.extend((src, dst, str(why))) - if errors: - raise Error, errors - -def conf_subproject (conf, subdir, command=None): - print("---- %s ----" % subdir) - src = join(conf.srcdir, subdir) - if not os.path.exists (src): conf.fatal("no such subproject " + subdir) - - default_tgt = join(conf.blddir, "default", subdir) - - if not os.path.exists(default_tgt): - copytree(src, default_tgt, True) - - if command: - if os.system("cd \"%s\" && %s" % (default_tgt, command)) != 0: - conf.fatal("Configuring %s failed." % (subdir)) - - debug_tgt = join(conf.blddir, "debug", subdir) - - if not os.path.exists(debug_tgt): - copytree(default_tgt, debug_tgt, True) - def configure(conf): conf.check_tool('compiler_cxx') if not conf.env.CXX: conf.fatal('c++ compiler not found')