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.
This commit is contained in:
parent
ea96403157
commit
f16e29559e
1 changed files with 6 additions and 4 deletions
|
@ -71,11 +71,13 @@ def edit(self, spec, prefix):
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue