To build a specified component of a makefile, you can use a target definition
on the command line. To build just the program, you use make with the
skel target, like this:
Click here to view code image
matthew@seymour:~$ sudo make skel
If you make any changes to any element of a target object, such as a source
code file, make rebuilds the target automatically. This feature is part of the
convenience of using make to manage a development project. To build and
install a program in one step, you can specify the target of install like
this:
Click here to view code image
matthew@seymour:~$ sudo make install
Larger software projects might have a number of traditional targets in the
makefile, such as the following:
test—To run specific tests on the final software
man—To process an include or a troff document with the man macros
clean—To delete any remaining object files
archive—To clean up, archive, and compress the entire source code
tree
bugreport—To automatically collect and then mail a copy of the build
or error logs
Large applications can require hundreds of source code files. Compiling and
linking these applications can be a complex and error-prone task. The make
utility helps you organize the process of building the executable form of a
complex application from many source files.
Using the autoconf Utility to Configure Code
The make command is only one of several programming automation utilities
included with Ubuntu. There are others, such as pmake (which causes a
parallel make); imake (which is a dependency-driven makefile generator that
is used for building X11 clients); automake; and one of the newer tools,
autoconf, which builds shell scripts that can be used to configure program
source code packages.
Building many software packages for Linux that are distributed in source