diff options
author | Tom Payerle <payerle@umd.edu> | 2024-03-19 15:04:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 20:04:15 +0100 |
commit | f16e29559ee3095a95b5e64f0d973c2646ad6571 (patch) | |
tree | 8bc9afb8f45046bf77b2a50555c1e406d95d04d4 /var | |
parent | ea9640315707e5662e4f906da0a42deb68c01d32 (diff) | |
download | spack-f16e29559ee3095a95b5e64f0d973c2646ad6571.tar.gz spack-f16e29559ee3095a95b5e64f0d973c2646ad6571.tar.bz2 spack-f16e29559ee3095a95b5e64f0d973c2646ad6571.tar.xz spack-f16e29559ee3095a95b5e64f0d973c2646ad6571.zip |
n2p2: add --no-print-directory flag to calls to "make" (#43196)
This should fix issue #43192
Basically, had issue where a make variable was set to the output
of a shell function which included cd commands, and then the value
of that variable used as a makefile target.
The cd commands in the shell function caused assorted informational
messages (e.g. "Entering directory ...") which got included in the
return of the shell function, corrupting the value of the variable.
The presence of colons in the corrupted value caused make to issue
"multiple target" erros.
This fix adds --no-print-directory flags to the calls to the
make function in the package's build method, which resolves the
issue above.
It is admittedly a crude fix, and will remove *all* informational
messages re directory changes, thereby potentially making it more
difficult to diagnose/debug future issues building this package.
However, I do not see a way for to turn off these messages in a
more surgical manner.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/n2p2/package.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/n2p2/package.py b/var/spack/repos/builtin/packages/n2p2/package.py index 1c30e9841c..2a41a52c20 100644 --- a/var/spack/repos/builtin/packages/n2p2/package.py +++ b/var/spack/repos/builtin/packages/n2p2/package.py @@ -71,11 +71,13 @@ class N2p2(MakefilePackage): def build(self, spec, prefix): with working_dir("src"): - make() - make("lammps-nnp") - make("pynnp") + # Add --no-print-directory flag to avoid issues when variables set + # to value of shell function with cd cmd used as target (see #43192) + make("--no-print-directory") + make("--no-print-directory", "lammps-nnp") + make("--no-print-directory", "pynnp") if "+doc" in self.spec: - make("doc") + make("--no-print-directory", "doc") def install(self, spec, prefix): install_tree("bin", prefix.bin) |