Search code examples
configfilenamesscons

What's all the valid file name for scons?


I tried SConstruct, Sconstruct, sconstruct, all seems to be OK.

My question: 1. Is it case insensitive that all 'sconstruct' files? I think linux system file name is case sensitive, is it by python that scons is case insensitive regarding with file names?

  1. If there's 'sconstruct' file, scons prints:

    $ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets.

Why it says "Reading SConscript file", not saying "Reading SConstruct file"?

I guess it's in old versions of scons, make file names are "SConscript", right? But I tried to rename "SConstruct" to "SConscript", then it prints out:

$ scons

scons: *** No SConstruct file found.

This is so weird to me, what is a "SConscript" concept?


Solution

  • To answer your question about the file name casing of SConstruct see the man page: http://scons.org/doc/production/HTML/scons-man.html

    By default, scons searches for a file named SConstruct, Sconstruct, or sconstruct (in that order) in the current directory and reads its configuration from the first file found. An alternate file name may be specified via the -f option.

    For a better understanding of SCons.. reading the users guide is also recommended. In the case of your question about what is SConscript?

    http://scons.org/doc/production/HTML/scons-user/ch14.html

    14.1. SConscript Files

    As we've already seen, the build script at the top of the tree is called SConstruct. The top-level SConstruct file can use the SConscript function to include other subsidiary scripts in the build. These subsidiary scripts can, in turn, use the SConscript function to include still other scripts in the build. By convention, these subsidiary scripts are usually named SConscript. For example, a top-level SConstruct file might arrange for four subsidiary scripts to be included in the build as follows: