A programmer developing new IPW software should use a separate development directory with a tree structure like IPW's directory. For example,
$HOME/.../ipw/ programmer's development directory | +- bin/ user commands | +- h/ C header files | +- lib/ libraries | +- man/ manual pages (troff versions) | +- sbin/ system commands | +- src/ source directory | +- tests/ tests | +- www/ Web documentation including manual pages
The name of the development directory does not need to be "ipw"
;
however, the names of its subdirectories must be those noted above.
The system command "mkipwdir"
facilitates the setup of this directory structure.
The include
files that are used in IPW Makefiles are designed
to perform compiling, linking, and installation relative to the directories
where the Makefiles reside. Therefore, when a programmer compiles an IPW
program whose source directory is located in the development directory (e.g.,
"$HOME/.../ipw/src/bin/cmd"
), the corresponding header
directory (e.g., "$HOME/.../ipw/h"
) is searched for header
files, and the corresponding library directory
(e.g., "$HOME/.../ipw/lib"
) is searched for additional IPW
libraries.
When the programmer installs a command, the executable file is placed
in the corresponding binary directory (e.g., "$HOME/.../ipw/bin"
).
Similarly, a library whose source directory resides in the development
directory is installed in the corresponding library directory
(e.g., "$HOME/.../ipw/lib"
).
The man pages for a command, library function, or header file located
in the development directory are installed in the corresponding manual
and Web directories (e.g., "$HOME/.../ipw/man"
for
troff versions, and "$HOME/.../ipw/www/
for
the HTML versions).
IPW's "local"
directory
Once development is complete, a new command or library is made available
to the local installation of IPW by copying the command's or library's
source directory into IPW's "local"
subdirectory. This
directory has a tree structure like that of the top-level IPW directory.
$IPW/ IPW directory | +- local/ local IPW commands and libraries | +- bin/ user commands | +- h/ C header files | +- lib/ libraries | +- man/ manual pages (troff versions) | +- sbin/ system commands | +- src/ source directory | +- tests/ tests | +- www/ Web documentation including manual pages
Because a programmer's development directory has the same tree structure as
IPW's local directory, the migration of source code from the former into
the latter is simple. The programmer need only copy a source
directory, and invoke the "make"
utility with the
"install"
target; no modifications to Makefiles or other
source files are required.