First, I've got SConstruct file like this:
Object('a.s')
Program('mya','a.o')
I run scons, it generates 'mya'. OK. Then I change my SConstruct to be:
Object('a.s',CCFLAGS='-DHello')
Program('mya','a.o')
Run scons again. Nothing is done:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
This is quite weird to me. When I used make or msbuild systems, whenever there's argumenet change in project configuration file, there'll be a rebuild. This is a default rule.
But seems scons's rule is different, is this by design? Only when source file change will trigger rebuild? If this is the design, I think there's a flaw that when compilation/linker option changes, target file should be different and thus, should trigger rebuild, right?
Is my understanding incorrect, or there's some special points in scons that I still need to know about? Thanks a lot.