SConstruct
not recognizing that a piped action requires a certain executable to run
#4354
Unanswered
amine-aboufirass
asked this question in
Q&A
Replies: 1 comment
-
I see a couple problems here:
Here are my suggested changes: modify_app/SConscript.py env = Environment(tools=["mingw"])
modify_node = env.Program(target='#/modify', source="modify.cpp")
Return("modify_node") SConstruct.py import os
env = Environment()
env['MODIFY'] = SConscript(["modify_app/SConscript"])
env['ENV']['PATH'] += f"{os.pathsep}." # so Command can execute 'modify'
env.Command(
"file.out",
["$MODIFY", "file.in"],
action = [
Copy("tempfile", "${SOURCES[1]}"),
"${SOURCES[0]} tempfile appendtext",
Copy("$TARGET", "tempfile")
]
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a directory with the following contents:
Here are the contents of each file:
file.in
SConstruct.py
modify/modify.cpp
modify/SConscript.py
The idea here is to compile
modify.cpp
tomodify.exe
, copymodify.exe
to the root folder and then run it againstfile.in
to generate a new file. However when I runscons
theSConstruct
executes theCopy
command first, and then naturally runs into a problem becausemodify.cpp
has not been compiled yet:What am I doing wrong here and why doesn't SCons recognize that
Command
needsmodify.exe
to be able to run? ThanksBeta Was this translation helpful? Give feedback.
All reactions