I have made a SCons builder that takes a Makefile file as a source and calls it to generate “things”.
(Mainly it is a Makefile written by other libraries, so I don’t have to choice to replace it with SCons).
So far, it works well but now I’d like to make the scons -c work as well.
My MakefileCallBuilder only has a dummy target as its target so scons -c won’t really clean anything.
Is there a way of telling SCons that I want make clean or make distclean to be called upon cleaning ?
I have been pulling my hair out because of this exact problem. I finally created a solution that is kind of crude, but works. Here is the part of the SConstruct file which does cleaning:
Basically, since Scons does not offer any way to call
make clean, I get it done via Python’s subprocess.call().