Chapter 9
Development Tools
This chapter looks at some of the tools available for developing programs on Linux systems, some of which are also available for UNIX. In addition to the obvious necessities of compilers and debuggers, Linux provides a set of tools, each of which does a single job, and allows the developer to combine these tools in new and innovative ways. This is part of the UNIX philosophy Linux has inherited. Here, you look at a few of the more important tools and see some examples of their being used to solve problems. These tools include:
- The make command and makefiles
- Source code control using RCS and CVS
- Writing a manual page
- Distributing software using patch and tar
- Development environments
Problems of Multiple Source Files
When they’re writing small programs, many people simply rebuild their application after edits by recompiling all the files. However, with larger programs, some problems with this simple approach become apparent. The time for the edit-compile-test cycle will grow. Even the most patient programmer will want to avoid recompiling all the files when only one file has been changed.
A potentially much more difficult problem arises when multiple header files are created and included in different source files. Suppose you have header files a.h, b.h, and c.h, and C source files main.c, 2.c, and 3.c. (We hope that you choose better names than these for real projects!) You could have the following situation:
/* main.c */
#include "a.h"
...
/* 2.c ...