I have my wscript file as:-
def build(bld):
bld(
rule = 'cp ${SRC} ${TGT}',
source = 'a.txt',
target = 'b.txt',
)
By default, the output target is created inside the build directory build/b.txt
,
However, I want my target to be created inside the source directory where my current wscript file is.
One method I tried is :-
def build(bld):
bld(
rule = 'cp ${SRC} b.txt',
source = 'a.txt',
cwd = './',
)
This outputs b.txt
inside the source directory relative to the current wscript file however the problem I face is that I lose the automatic dependency calculation or rebuilding as I'm not providing the target.