The Depends Method

On the other hand, sometimes a file depends on another file that has no SCons scanner will detect. For this situation, SCons allows you to specific explicitly that one file depends on another file, and must be rebuilt whenever that file changes. This is specified using the Depends method:

       env = Environment()
       hello = env.Program('hello.c')
       env.Depends(hello, 'other_file')
    

       % scons hello
       cc -c hello.c -o hello.o
       cc -o hello hello.o
       % scons hello
       scons: `hello' is up to date.
       % edit other_file
           [CHANGE THE CONTENTS OF other_file]
       % scons hello
       cc -c hello.c -o hello.o
       cc -o hello hello.o