HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 50 (of 101)
Chapter 11 Software Development
October 29, 2013
-> obj_b.o -> mydefs.h
-> obj_b.c
myprog is the main target. It must be built (linked) from the objects obj_a.o and obj_b.o. The
objects themselves are targets too, they must be built (compiled) from source and header files. A
simple makefile to handle these dependencies could look like this:
myprog: obj_a.o obj_b.o
cc -o myprog obj_a.o obj_b.o
obj_a.o: mydefs.h obj_a.c
cc -c obj_a.c
obj_b.o: mydefs.h obj_b.c
cc -c obj_b.c
make(1) belongs to the unix core commands.
Versioning Tools
When developing software it is important to keep track of changes made to sources over time,
and to avoid conflicts if more than one person makes changes to the same source file. This is
what versioning tools are for.
There are many different tools of this type available. The following table lists only a few:
SCCS
Source Code Control System
RCS
Revision Control System
CVS
Concurrent Version System
SCCS and RCS are part of HP-UX runtime, There also is an RCS from Gnu. This Gnu-based
RCS version, as well as CVS, are available on the HP-UX Archiving and porting center [10].
However, the Gnu-based RCS and CVS tools are not supported by the Response Center.
The basic principle of these tools is to provide source code in a repository. Each developer can
check out files he wants to edit. That means he gets a local copy. When he has made changes to a
file he wants to provide to the team he can check this file in again. The versioning tool will check
then if someone else has made changes to this file too and request both to solve possible
conflicts.