summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2013-02-21 19:27:27 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2013-02-21 19:27:27 -0800
commitbd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1 (patch)
tree126f0686a1f772d1f72ac3404392f8d1037112a3
parentb39165b999b8e90754e07601526d472fc7c74e61 (diff)
downloadspack-bd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1.tar.gz
spack-bd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1.tar.bz2
spack-bd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1.tar.xz
spack-bd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1.zip
Minor changes; loosened up parallel build for dwarf.
-rwxr-xr-xbin/spack2
-rw-r--r--lib/spack/spack/Package.py3
-rw-r--r--lib/spack/spack/globals.py3
-rw-r--r--lib/spack/spack/packages/libdwarf.py8
-rw-r--r--lib/spack/spack/tty.py4
-rw-r--r--lib/spack/spack/utils.py2
6 files changed, 11 insertions, 11 deletions
diff --git a/bin/spack b/bin/spack
index 53b4cf3dac..03cc802b8c 100755
--- a/bin/spack
+++ b/bin/spack
@@ -21,6 +21,7 @@ parser = argparse.ArgumentParser(
description='Spack: the Supercomputing PACKage Manager.')
parser.add_argument('-V', '--version', action='version', version="%s" % spack.spack_version)
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose')
+parser.add_argument('-d', '--debug', action='store_true', dest='debug')
# each command module implements a parser() function, to which we pass its
# subparser for setup.
@@ -35,6 +36,7 @@ args = parser.parse_args()
# Set up environment based on args.
spack.verbose = args.verbose
+spack.debug = args.debug
# Try to load the particular command asked for and run it
command = spack.cmd.get_command(args.command)
diff --git a/lib/spack/spack/Package.py b/lib/spack/spack/Package.py
index 3ebf8cff4d..e5b2d00943 100644
--- a/lib/spack/spack/Package.py
+++ b/lib/spack/spack/Package.py
@@ -68,7 +68,8 @@ class MakeExecutable(Executable):
disable_parallel = env_flag(SPACK_NO_PARALLEL_MAKE)
if parallel and not disable_parallel:
- args += ("-j%d" % multiprocessing.cpu_count(),)
+ jobs = "-j%d" % multiprocessing.cpu_count()
+ args = (jobs,) + args
super(MakeExecutable, self).__call__(*args, **kwargs)
diff --git a/lib/spack/spack/globals.py b/lib/spack/spack/globals.py
index 2182c56413..d7321417b2 100644
--- a/lib/spack/spack/globals.py
+++ b/lib/spack/spack/globals.py
@@ -33,9 +33,6 @@ editor = Executable(os.environ.get("EDITOR", ""))
# Curl tool for fetching files.
curl = which("curl", required=True)
-verbose = False
-debug = False
-
# Whether to build in tmp space or directly in the stage_path.
# If this is true, then spack will make stage directories in
# a tmp filesystem, and it will symlink them into stage_path.
diff --git a/lib/spack/spack/packages/libdwarf.py b/lib/spack/spack/packages/libdwarf.py
index 3b1cdc5891..070fc8360f 100644
--- a/lib/spack/spack/packages/libdwarf.py
+++ b/lib/spack/spack/packages/libdwarf.py
@@ -9,9 +9,6 @@ class Libdwarf(Package):
url = "http://reality.sgiweb.org/davea/libdwarf-20130207.tar.gz"
md5 = "64b42692e947d5180e162e46c689dfbf"
- # There's some kind of race in the makefile
- parallel = False
-
depends_on("libelf")
def clean(self):
@@ -38,7 +35,10 @@ class Libdwarf(Package):
with working_dir('dwarfdump2'):
configure("--prefix=%s" % prefix)
- make()
+
+ # This makefile has strings of copy commands that
+ # cause a race in parallel
+ make(parallel=False)
install('dwarfdump', bin)
install('dwarfdump.conf', lib)
diff --git a/lib/spack/spack/tty.py b/lib/spack/spack/tty.py
index 915fde35d6..dc31c5456c 100644
--- a/lib/spack/spack/tty.py
+++ b/lib/spack/spack/tty.py
@@ -37,8 +37,8 @@ def info(msg, *args, **kwargs):
print "{}==>{} {}".format(color, reset, str(msg))
for arg in args: print indent + str(arg)
-def verbose(*args):
- if spack.verbose: msg(*args, color=green)
+def verbose(msg, *args):
+ if spack.verbose: info(msg, *args, color=green)
def debug(*args):
if spack.debug: msg(*args, color=red)
diff --git a/lib/spack/spack/utils.py b/lib/spack/spack/utils.py
index 442a68f1fa..0128d283cf 100644
--- a/lib/spack/spack/utils.py
+++ b/lib/spack/spack/utils.py
@@ -132,7 +132,7 @@ class Executable(object):
"Quotes aren't needed because spack doesn't use a shell. Consider removing them")
cmd = self.exe + list(args)
- tty.verbose(cmd)
+ tty.verbose(" ".join(cmd))
if return_output:
return subprocess.check_output(cmd)