So I have scons working with an alternate build location (build/
for my output files, src/
for my input files) and it works great. Except for one thing.
I'm using an IDE (TI Code Composer 4) to debug my program. I point the IDE at the output executable to run it, and what it uses for the source files for debugging is the build/
directory. I don't really care, except when I go to edit the file in the IDE, for example main.cpp
, the file is really build/main.cpp
which gets clobbered as soon as I run scons again. I have to remember to edit src/main.cpp
instead. I am aware of this issue and yet I make the same mistake often.
Is there a way to have scons make the source files it copies into the build path read-only? (I'd ask how to get TI CCS4 to use the right source files when it is debugging an executable, but I doubt I'd get any answers.)