
#
# Testing environment variables and path variables
#

#
#  o 3 packages A, B, C
#  o Package C defines a macro M and some env. variables.
#  o Package C defines an env. var. T which contains references
#    to other macros or env. vars.
#

scroot=${CMTROOT}/demo/scenario2

CMTPATH=${scroot}

rm -Rf ${scroot}
mkdir -p ${scroot}
cmt create A v1 ${scroot}
cmt create B v1 ${scroot}
cmt create C v1 ${scroot}

cd ${scroot}/C/v1/cmt

echo 'package C                        '  > requirements
echo 'macro_append M "Z"               ' >> requirements
echo 'macro M "mmm" aaa "mam" bbb "mbm"' >> requirements
echo 'set   S "sss" aaa "sas" bbb "sbs"' >> requirements
echo 'set   T "${M}ttt${S}$(tag)" WIN32 "${M}ttt%%S%%$(tag)"' >> requirements

cd ${scroot}/B/v1/cmt

cd ${scroot}/A/v1/cmt

echo 'package A '                  > requirements
echo 'use B v1  '                 >> requirements
echo 'use C v1  '                 >> requirements

cmt show sets
cmt show sets -tag=aaa
cmt show set T

cd ${CMTROOT}/contrib
