summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Becker <becker33@llnl.gov>2015-09-23 12:58:22 -0700
committerGregory Becker <becker33@llnl.gov>2015-11-10 15:40:00 -0800
commitf9c8c4d216f8e2357f1b81afc40665d0323a816e (patch)
tree6b83d24d7828c5d93bd90c8202f9f55856469093
parent4ed22ad932b440eb6088e31f9bc317aef56f83f1 (diff)
downloadspack-f9c8c4d216f8e2357f1b81afc40665d0323a816e.tar.gz
spack-f9c8c4d216f8e2357f1b81afc40665d0323a816e.tar.bz2
spack-f9c8c4d216f8e2357f1b81afc40665d0323a816e.tar.xz
spack-f9c8c4d216f8e2357f1b81afc40665d0323a816e.zip
partial commit to merge database
-rwxr-xr-xlib/spack/env/cc16
-rw-r--r--lib/spack/spack/build_environment.py2
-rw-r--r--lib/spack/spack/spec.py33
3 files changed, 42 insertions, 9 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index b39d91b5f0..0bb723c237 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -89,19 +89,23 @@ done
command=$(basename "$0")
case "$command" in
cc|gcc|c89|c99|clang|xlc)
- command="$SPACK_CC $SPACK_CFLAGS"
+ command="$SPACK_CC"
+# command="$SPACK_CC $SPACK_CFLAGS"
language="C"
;;
c++|CC|g++|clang++|xlC)
- command="$SPACK_CXX SPACK_CXXFLAGS"
+ command="$SPACK_CXX"
+# command="$SPACK_CXX SPACK_CXXFLAGS"
language="C++"
;;
f77|xlf)
- command="$SPACK_F77 $SPACK_FFLAGS"
+ command="$SPACK_F77"
+# command="$SPACK_F77 $SPACK_FFLAGS"
language="Fortran 77"
;;
fc|f90|f95|xlf90)
- command="$SPACK_FC $SPACK_FFLAGS"
+ command="$SPACK_FC"
+# command="$SPACK_FC $SPACK_FFLAGS"
language="Fortran 90"
;;
cpp)
@@ -109,7 +113,7 @@ case "$command" in
;;
ld)
mode=ld
- command+=" $LDFLAGS"
+ # command+=" $LDFLAGS"
;;
*)
die "Unkown compiler: $command"
@@ -119,7 +123,7 @@ esac
# Finish setting up the mode.
if [ -z "$mode" ]; then
mode=ccld
- command+=" $SPACK_LDFLAGS"
+# command+=" $SPACK_LDFLAGS"
for arg in "$@"; do
if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then
mode=vcheck
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index afd987c702..252846196a 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -108,7 +108,7 @@ def set_compiler_environment_variables(pkg):
os.environ['SPACK_CFLAGS'] = compiler.cflags
if compiler.cxxflags:
os.environ['SPACK_CXXFLAGS'] = compiler.cxxflags
- if compiler.cflags:
+ if compiler.fflags:
os.environ['SPACK_FFLAGS'] = compiler.fflags
if compiler.ldflags:
os.environ['SPACK_LDFLAGS'] = compiler.ldflags
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 7b79feb311..430cf9b66f 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1680,10 +1680,11 @@ class SpecParser(spack.parse.Parser):
elif self.accept(DEP):
if not specs:
- self.last_token_error("Dependency has no package")
+ specs.append(self.empty_spec())
self.expect(ID)
specs[-1]._add_dependency(self.spec())
-
+ for spec in specs:
+ print spec
else:
self.unexpected_token()
except spack.parse.ParseError, e:
@@ -1697,6 +1698,34 @@ class SpecParser(spack.parse.Parser):
return self.compiler()
+ def empty_spec(self):
+ """Create a Null spec from which dependency constraints can be hung"""
+ spec = Spec.__new__(Spec)
+ spec.name = "any-pkg-name"
+# spec.name = None
+ spec.versions = VersionList()
+ spec.variants = VariantMap(spec)
+ spec.architecture = None
+ spec.compiler = None
+ spec.dependents = DependencyMap()
+ spec.dependencies = DependencyMap()
+
+ #Should we be able to add cflags eventually?
+ while self.next:
+ if self.accept(ON):
+ spec._add_variant(self.variant(), True)
+
+ elif self.accept(OFF):
+ spec._add_variant(self.variant(), False)
+
+ elif self.accept(PCT):
+ spec._set_compiler(self.compiler())
+
+ else:
+ break
+
+ return spec
+
def spec(self):
"""Parse a spec out of the input. If a spec is supplied, then initialize
and return it instead of creating a new one."""