On 08/30/05 14:53, Adil Rajput wrote:

For thoise questioning my sanity, I am about to teach an undergrad course in OS and would like to give my students assignments based on the code. Since it is an undergrad class, I want them to be able to do simple things without getting into make issues.

As others have said the OpenSolaris tree is designed to be easily built as a 
whole and building
sub-parts requires localised knowledge.  But there is one thing you can do which
will help many of these circumstances - provide a fully-built "parent" workspace
for the child workspaces to import headers and libraries from.

In the Teamware world code workspaces are arranged in a hierarchical 
parent-child
relationship.  OpenSolaris is not under TeamWare control (as Solaris ON 
consolidation is)
but you can still establish the parent relationship from the point of view of 
the
build process as below.

You have 4 environment variables that control where additional includes and 
libraries (-I and -L)
are sourced: ENVCPPFLAGS{1,2} and ENVLDLIBS{1,2}.  The *1 versions should be 
pointed to your
child workspace proto-root area, while the *2 versions can optionally be 
pointed at
another workspace proto root area (your code should be a close child of the 
other workspaces -
if you have edited 1001 include files in the child then sourcing from the 
parent is probably
not what you want; in the case of your undergrad class you should be ok).

By way of example, I have a workspace "/share/bld/nightly/system/onnv-sparc" 
parented off
of "/net/Tulasco.uk.Sun.com/export/gates/onnv-clone".  There is a Teamware 
parent-child
relationship there, but regardless of that (eg if they are OpenSolaris code 
drops)
my build setup script does the equivalent of the following:

#
# ROOT is proto area of the child workspace (eg undergrad students code area)
#
export PARENT="/net/Tulasco.uk.Sun.com/export/gates/onnv-clone"
export CHILD="/share/bld/nightly/system/onnv-sparc"
export ROOT="$CHILD/proto/root_sparc"

#
# Find headers and libraries in the child proto area (that have been
# installed there by install/install_h make targets)
#
export ENVCPPFLAGS1=-"I${ROOT}/usr/include"
export ENVLDLIBS1="-L${ROOT}/lib -L${ROOT}/usr/lib"

#
# Secondary locations for headers and libraries - select our parent workspace
# which has a fully-populated proto area (ie, is fully built)
#
export ENVCPPFLAGS2="-I${PARENT}/proto/root_sparc/usr/include"
export ENVLDLIBS2=-"L${PARENT}/proto/root_sparc/usr/ccs/lib 
-L${PARENT}/proto/root_sparc/usr/lib"

Hope that is clear and helps.

Cheers

Gavin
_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to