
@echo off

rem
rem Testing environment variables and path variables
rem

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

set scroot=%CMTROOT%\demo\scenario2

set CMTPATH=%scroot%

rmdir /Q /S %scroot%
mkdir %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
