Clone in a terminal:
#! /usr/bin/env python

"""
ctx.add_manual_dependency

change the file 'testfile' and see how it affects the rebuild of 'somecopy'
"""

def configure(ctx):
	pass

def build(ctx):
	ctx(rule='cp ${SRC} ${TGT}', source='wscript', target='somecopy')
	ctx.add_manual_dependency(ctx.path.find_node('wscript'), ctx.path.find_node('testfile'))

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112