genpath(1) UNIX Programmer's Manual genpath(1)
NAME
genpath - expands a flag specified by a relative directory
to look in all backing trees
SYNOPSIS
genpath [-sb sandbox-name] [-sb_rc rc-file] [-rc rc-file]
[-usage] [-v] flags_to_be_expanded
FLAGS
-sb sandbox-name
The sandbox name. The default value of this flag is
the value of $SANDBOX or the default sandbox name
listed in your $HOME/.sandboxrc file.
-rc rc-file
Provides the path and name of an alternative .sandboxrc
file to use instead of the default ${HOME}/.sandboxrc.
-sb_rc rc-file
Provides the path and name of an alternative rc file to
use instead of the default sandbox/rc_files/local.
-usage
Print the usage line.
-v Provides additional debugging information.
DESCRIPTION
genpath searches through the local file in your sandbox
rc_files directory for backing trees for your sandbox. Each
flags_to_be_expanded that is specified with a relative path
is expanded to a list of flags for the obj tree and src tree
of the sandbox and of each backing tree. Each
flags_to_be_expanded that does not contain a relative path
or is not of the form -Cpath (where C is any character and
path is a relative path) is passed through unchanged. In
the beta version of genpath, only the flags -I and -L are
recognized. genpath functions commutatively, therefore:
`genpath -Ifoo -Ibar`
is equivelent to
`genpath -Ifoo` `genpath -Ibar`
EXAMPLES
Here is the simple use of genpath in a sandbox, /foo, backed
by a backing tree, /back:
cd /foo/src/usr
genpath -I. -Iinc
Printed 1/23/91 5/20/90 1
genpath(1) UNIX Programmer's Manual genpath(1)
This returns the value:
-I. -I/foo/src/usr -I/back/obj/pmax/usr -I/back/src/usr -Iinc \
-I/foo/src/usr/inc -I/back/obj/pmax/usr/inc -I/back/src/usr/inc
When genpath is run in a Makefile, it will be executing from
the obj directory that corresponds to the source directory
of the Makefile that it is called in. If the obj directory
is different from the source directory then it may be neces-
sary to cd to the obj directory before executing a genpath
command that is cut and pasted from make output. This is an
example of how to run the genpath command shown in a
Makefile which uses different source and object directories:
(cd ../../../obj/pmax/usr/bin; genpath -I. -Ilocal_includes)
FILES
$HOME/.sandboxrc
is used to obtain the path of the sandbox.
sandbox/rc_files/local
are looked in for references to the backing trees.
PLANNED ENHANCEMENTS
If no flags_to_be_expanded are specified, then genpath
should print a list of the source tree roots (pseudo-roots)
for all of the trees that the sandbox is backed by. genpath
should allow the user to specify an environment variable
that describes these psuedo-roots so that it does not need
to read the rc files to determine their location.
genpath will function properly with all flags, not just -I
and -L.
Printed 1/23/91 5/20/90 2