L31 Software Build Process
L31 Software Build Process
> Git, SVN, Github > Compiled objects. > The physical > Method of software
> Compilers.
> Where all the > Each developer machines on packaging, distribution,
> Documentation &
source is stored and has his/her own. which the and installation on client
unit test generators.
shared amongst compilation is machines.
developers. done.
Interpreted Languages
> Similar to compiled except that the source code is not compiled.
> The compilation tools here are used for transforming the source files into
packages that are used by the system.
Web Applications
> A combination of compiled, interpreted, and static files (data & configuration).
> Some are copied directly (HTML) others are compiled first (Java).
> Tricky part here is that the users browser is involved in some of the
interpretation (JavaScript).
Unit Testing
> Similar to what was just discussed except that the build systems produces
several unit test suites and runs them.
> Similarly for integration testing. The process of preparing code and setting up
the integration tests and test cases is done automatically.
Static Analysis
> Analyze source code to try to identify bugs, security holes, or other hard to
detect problems that are not caught by compilation alone.
> Some tools: Coverity Prevent, Klocwork Insight, Findbugs
> No object code produced, just a report from the tool of choice and the
source code.
Document Generation
○ Make
○ Apache Ant
○ SCons
○ CMake
○ Eclipse
Make
● Considered the first build tool.
● Most commonly used for C/C++
development.
● If you develop for legacy systems you will
most likely have to deal with Make.
● Not recommended for new projects.
Make (Cont'd)
● Created in 1977
● Uses the concept of a rule that defines all
the dependencies between files for
compilation purposes.
> myprog is a generated file that is created when running gcc compiler
and uses the input files prog.c and lib.c
> make is smart enough to look at file timestamps and re-compile only
when necessary.
> a programmer has to write this file by hand (know as makefile). In a
program with thousands of files and dependencies this can be a very
challenging and error prone task.
GNU Make
● Before GNU Make each OS had its own
version of Make. Each had slightly different
syntax. This made it obviously difficult for
developers.
● GNU Make supports many platforms and
therefore makes your life as a developer
slightly better. (Xcode)
GNU Make (Cont'd)
● GNU provides a language that can be
thought of as three separate languages:
● File dependencies - rule-based syntax for
specifying dependencies (similar to Make)
> Setting flags based on whether the developer wants to build for development or production.
SCons Pros
● Uses general purpose language - Python
is a syntactically simple language and easy
to learn for beginners.
● Simple build construction - not much
overhead results in quick build definition for
simple programs.
● Builder method portability - the methods
hide the compilation tools. Developer can
focus on writing the build instead of worrying
about which tools are installed.
SCons Pro
● 100% Python - everything is done in Python
so you don't have to switch languages if you
want to do a shell script.
● Focus on correctness - one of the main
goals of SCons is to be correct; e.g., use
md5 file checksums to see if file has
changed
● Active development - young tool but is
actively developed; bugs fixed quickly and
new features added on a regular basis.
SCons Pro
● Debugging - several debugging options that
allow you to more easily narrow down
problems in your build.
SCons Cons
● Slow - The focus on correctness makes the
build process slow. More of a problem when
doing incremental builds.
● Language Support - good for C/C++ but not
so much for Java or C#.
● Memory footprint - in certain circumstances
uses more memory than other build systems
such as Make.
● Evaluation:
Convenience Correctness Performance Scalability
> What you see is not what you get. Eclipse auto-
generates folders for the source and folders for
the builds.
> This is fine because developers don't care about
.class files. They care about the source and
execution. Eclipse takes care of the build.
Eclipse Files .project