3.6. Keyword Arguments

SCons also allows you to identify the output file and input source files using Python keyword arguments. The output file is known as the target, and the source file(s) are known (logically enough) as the source. The Python syntax for this is:

       src_files = Split('main.c file1.c file2.c')
       Program(target = 'program', source = src_files)

Because the keywords explicitly identify what each argument is, you can actually reverse the order if you prefer:

       src_files = Split('main.c file1.c file2.c')
       Program(source = src_files, target = 'program')

Whether or not you choose to use keyword arguments to identify the target and source files, and the order in which you specify them when using keywords, are purely personal choices; SCons functions the same regardless.