Scons User Manual

Source: Internet
Author: User

It was translated to chapter 17, and the result was accidentally lost due to power failure. Lessons! Come back.

========================================================== ============================================

Title: scons User Guide 2.0.0
Author: Steven knight

Directory:
Preface:
1. scons Criterion
2. Integrity considerations in this document
3. Thank you
4. Contact Information

Chapter 1: Create and install scons
1.1 install Python
1.2 install scons from the pre-compiled package
1.2.1 install scons on Red Hat (Other rpm-based) Linux systems
1.2.3 install scons On Debian Linux
1.2.4 install scons on Windows
1.3 build and install scons on any system
1.3.1 build scons with multiple versions installed at the same time
1.3.2 install scons on other systems
1.3.2 build and install scons without administrator permissions

Chapter 2: simple construction
2.1 (C/C ++)ProgramQuick Building
2.2 build the target file
2.3 fast Java program construction
2.4 clean up the system
2.5 sconstruct File
2.5.1 The sconstruct file is a Python script
2.5.2 unordered execution of scons Functions

Chapter 3: simple and quick System Construction
3.1 specify the target name
3.2 compile multiple source files
3.3 create a file list with glob
3.4 specify a single file and file list
3.5 make the file list easier to understand
3.6 keyword Parameters
3.7 compile multiple programs
3.8 share source files among multiple programs

Chapter 4: Build and link library files
4.1 create and link library files
4.1.1 build a library file from the target file or source file
4.1.2 explicitly construct the static library file: staticlibrary Builder
4.1.3 build a dynamic library file: sharelibrary Builder
4.2 link library files
4.3 find the library file: $ libpath variable Chapter 5: Node object:
5.1 build Method for returning the target node list
5.2 explicitly create file and directory nodes
5.3 print the node file name
5.4 use the node file name as a string
5.5 getbuildpaht: Get the path from node or string

Chapter 6: dependency
6.1 decider function: determines when the input file is changed
6.1.1 use MD5 Signature to determine whether the file has changed
6.1.2 use the timestamp to determine whether the file has changed
6.1.3 use MD5 Signature and timestamp to determine whether the file has changed
6.1.4 custom decider Function
6.1.5 mixed multiple methods to determine whether the file is changed
6.2 whether the obsolete function decision file is changed
6.2.1 sourcesignatures Function
6.2.2 targetsignatures Function
6.3 implicit dependency: $ cpppath Structure Variable
6.4 cache implicit dependency:
6.4.1 -- implicit-deps-changd Option
6.4.2 -- implicit-deps-unchanged Option
6.5 explicit dependency: depens Function
6.6 obtain the dependency from an external file: parsedepends Function
6.7 ignore dependency: Ignore Function
6.8 sequential dependency: requires Function
6.9 alwaysbuild Function

Chapter 7: Environment Variables
7.1 use external environment variables
7.2 create environment variables
7.2.1 create a structure variable: Environment Function
7.2.1 get environment variables from construction environment
7.2.3 extend environment variables from construction environment: SUBST Method
7.2.4 Handling Value extension Problems
7.2.5 control the default construction environment: defualtenvironment Function
7.2.6 multiple construction environment
7.2.7 copy construction environment: Clone Method
7.2.8 replace value: replace Method
7.2.9 set the default value: setdfault Method
7.2.10 append environment variable: appen Method
7.2.11 append a unique environment variable: appendunique Method
7.2.12 start position of append to environment variable: prepend Method
7.2.13 append a unique environment variable to the starting position: prependunique Method
7.3 control the execution environment of Issued commands
7.3.1 inherit path from external environment
7.3.2 add path in the execution environment

Chapter 8: automatically add command line options to Structure Variables
8.1 merge options to the environment variable: mergeflags Function
8.2 extract compilation parameters to the environment variable: parseflags Function
8.3 find the installation Library Information: parseconfig Function

Chapter 9: control compilation and Output
9.1 compilation help: Help function
9.2 control scons printing and compiling command: ¥ * comstar
9.3 provide the compilation process output: Progress Function
9.4 print the detailed compilation status: getbuildfailures Function

Chapter 10: control compilation from the command line
10.1 command line option
10.1.1 you do not need to specify the command line option every time: sconsflags environment variable
10.1.2 get the value set by the command line: getopton function
10.1.3 set the command line option: setoption function
10.1.4 get or set the command line option string
10.1.5 add custom command line options: addoption function
10.2 command line variable = value compile variable
10.2.1 control command line compile variable
10.2.2 compile variable that provides Command Line Help
10.2.3 from read the compilation variable in the file
10.2.4 pre-defined compilation Variable Function
10.2.5 add multiple command line compilation variables at a time
10.2.6 process unknown command line compilation variables: unknownvariables function
10.3 command line target
10.3.1 obtain command line target: Command) line_targets variable
10.3.2 control default target: default function
10.3.3 gets the compilation target list, no matter what the original target is: build_targets

Chapter 2: Install the file from other directories: install builder
11.1 Install multiple files in a directory
11.2 install a file with different file names
11.3 Install multiple files with different file names

Chapter 2: platform-independent file system operations
12.1 copy a file or directory: Copy proxy
12.2 delete a file or directory: Delete
12.3 move or rename a file or directory: Move
12.4 Update file modification time: Touch
12.5 create a directory: mkdir
12.6 change file or directory permissions: chmod
12.7 execute the command immediately: Execute

Chapter 1: Remove a target
13.1 prevent the target from being removed during compilation:
13.2 prevent the target from being removed during cleaning: noclean Function
13.3 remove additional files from the system: clean function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.