How to fix SCons error: Do not know how to make File target `clean'

Problem:

You are trying to clean your SCons build using

clean.sh
scons clean

but you see the following error message:

error.txt
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Do not know how to make File target `clean' (/home/user/myproject/clean).  Stop.
scons: building terminated because of errors.

Solution

When using SCons, the correct command to clean is

clean.sh
scons --clean

 


Check out similar posts by category: Build Systems, SCons