[Scons-users] clarification on Depends()

Jason Kenny dragon512 at live.com
Tue Jun 5 00:05:27 EDT 2018


HI,

I just want to clarify behavior of Depends() in SCons.

I have a small sample:

Depends(["hello.c")],["fake.txt"])
Program("hello","hello.c")


If I run this sample "hello" will build. If I change fake.txt, nothing will rebuild.

I have a tree like this:

+-hello
  | +-hello.o
  | | +-hello.c
  | | +-fake.txt
  | | +-/usr/bin/gcc
  | +-/usr/bin/gcc

If I change the sample to this ( depends() is not hello.o vs hello.c)

Depends(["hello.c")],["fake.txt"])
Program("hello","hello.c")

Now when I change fake.txt hello.o will rebuild. The tree here looks like:

+-hello
  | +-hello.o
  | | +-hello.c
  | | +-fake.txt
  | | +-/usr/bin/gcc
  | +-/usr/bin/gcc

Is this right... I have to know the target of a builder to use? I cannot use the source of a builder?

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180605/2545cd0f/attachment.html>


More information about the Scons-users mailing list