The csmake Command Manual Page

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
EXAMPLE: DEBIAN PACKAGE
SEE ALSO
AUTHOR

NAME

csmake - CScout make

SYNOPSIS

csmake [-T spy_directory] [-N rules_file] [make(1) options]

DESCRIPTION

csmake is a wrapper around make and typical C compilation commands. When invoked instead of make on a clean (unbuilt) system, it will build the system in the same way as make. As a side-effect it will monitor the invocations of cc(1), gcc(1), clang(1), ar(1), ld(1), and mv(1) commands and record their environment and arguments. With those data it will generate a CScout project specification that can be used to process the project that was compiled. The project specification is saved into a file named make.cs. Moreover, a separate CScout .cs file is generated for each executable in cscout_projects directory.

To allow csmake to be used as a drop in replacement in build sequences that execute multiple make commands, you can create a /tmp/csmake-spy, which will be used to create rules for the superset of all make-generated executables.

csmake options can be passed through CSMAKEFLAGS environment variable.

OPTIONS

-N rules_file

Run on an existing rules file.

-T spy_directory

Create a separate CScout .cs file for each real executable. Use spy_directory as spy directory, remember to clear it if you use it multiple times. Save the .cs files into cscout_projects in the current directory.

EXAMPLE

The following commands are often the only ones required to process a typical C project.

make clean
csmake
cscout make.cs

If you want to use csmake with another C compiler, prepend CC=compiler-name to the csmake invocation, as shown in the following example.

CC=x86_64-w64-gcc csmake

EXAMPLE: DEBIAN PACKAGE

The following commands can be used to run csmake for a Debian package using dpkg-buildpackage.

rm -rf tmp_dir && mkdir -p tmp_dir
CSMAKEFLAGS=’-T tmp_dir’ MAKE=/usr/local/bin/csmake dpkg-buildpackage -b

SEE ALSO

cscout(1)

AUTHOR

(C) Copyright 2006-2016 Diomidis Spinellis.