The softwares of K2K (also SK) is managed with CVS & Imake.
  K2K CVS repository is 
  Lines to be added in your login shell for CVS: 
  (example for tcsh users on neutrino.kek.jp)
# for CVS
        setenv DISTTYPE  neutrino 
        setenv EDITOR '/usr/local/bin/mule -nw'
        alias rsh      '/usr/bin/rsh'
        alias k2krep 'setenv CVSROOT :ext:k2krep@neutrino.kek.jp:/home/k2krep/repository'
        alias skrep 'setenv CVSROOT :ext:skrep@neutrino.kek.jp:/home/skrep/repository'
        k2krep
        alias chkrep 'env | grep CVSROOT'
        setenv CVS_RSH /usr/bin/rsh
        setenv CVS_SERVER "env LOGNAME=$LOGNAME cvs"
You need to change CVSROOT environment depending on which software you need. As you see, due to the complicity, three aliases are prepared:(example for bash users) export EDITOR='/usr/bin/X11/emacs -nw' alias rsh='/usr/bin/rsh' alias k2krep='export CVSROOT=:ext:k2krep@neutrino.kek.jp:/home/k2krep/repository' alias skrep=export CVSROOT=:ext:skrep@neutrino.kek.jp:/home/skrep/repository' k2krep alias chkrep='echo CVSROOT is set to: $CVSROOT' export CVS_RSH=/usr/bin/rsh export CVS_SERVER="env LOGNAME=$LOGNAME cvs"
  Imake is utility to make 'Makefile'. You do not need botherfull
  setting of -L -l, -i, compiler options if you once setup your
  site specific definition. 
  At first you need to setup Imake on your machine. 
Please also see instruction of Imake given in here .> cd > mkdir lib > cd lib > skrep > cvs checkout config > cd config Example on CCPS/neutrino etc. > ln -s ./site_definitions/kek.def site.def > ./install.imake
  * You need to use gnu-make(gmake) as make.
 
  * How you create your site specific definitions: 
to copy from existing .defs with same machine-type may be best.
# to use /KEK/local/bin/as, instead of /bin/as set path=(/KEK/local/bin $path) # do not use perl in KEK/local/bin/perl (v.4) set path = (/KEK/local/perl/perl5/bin $path)
  Lines to be added in your login shell for Imake:
  (example for neutrino)
# CERN lib
        setenv CERN /cern 
        setenv CERN_LEVEL 97a
        setenv CERN_ROOT /cern/97a
        set path=(${CERN}/${CERN_LEVEL}/bin $path)
# for IMAKE
        setenv EXPERIMENT "/u/neutrino/k2k"
        setenv EXPERIMENT_LEVEL  pro
        setenv EXPERIMENT_ROOT ${EXPERIMENT}/${EXPERIMENT_LEVEL}
        setenv PACKAGE ${EXPERIMENT}
        setenv PACKAGE_LEVEL ${EXPERIMENT_LEVEL}  
        setenv PACKAGE_ROOT ${PACKAGE}/${PACKAGE_LEVEL}
        set path=($path ${EXPERIMENT}/bin ${EXPERIMENT_ROOT}/bin/`Machine`)
        source ${EXPERIMENT}/bin/imake.cshrc
        unsetenv PRIVATE_ROOT
   If you are just after installing Imake, you need:
 Necessary libraries for FGD analyses: 
   k2k/src (k2k specific programs) 
      /atmpd/chgen
      /skam /inc
            /src/zbs
                /iolib
                /rfa_dummy
--- chgen install ---
   skrep(, or chkrep)
   cd (go to home directory)
   mkdir atmpd
   cd atmpd
   cvs checkout chgen
   cd chgen 
   imake_boot ; make install.include ; make install
--- skam_inc install ---
   cd
   mkdir skam
   cd skam
   cvs checkout -r sk98b skam_inc
   mv skam_inc inc
   cd inc
   imake_boot ; make install.include
--- skam_src install ---
   cd ..
   mkdir src
   cd src
   cvs checkout -r sk98b zbs
   cd zbs
   imake_boot ; make install.include ; make install
   cd ..
   cvs checkout -r sk98b rfa_dummy
   cd rfa_dummy
   imake_boot ; make install.include ; make install
   cvs checkout -r sk98b iolib
   cd iolib
   imake_boot ; make install.include ; make install
   cd ..
For skam_src installation, 
should work. This install all libraries in skam_src.cvs checkout -r sk98b skam_src cd skam_src imake_boot ; make World
In root of experiment account,
cd mkdir pro k2krep cvs checkout -r K2K98a k2kinc cvs checkout -r K2K98a k2ksrc cvs checkout -r K2K98a k2kdb --- k2kinc install --- cd k2kinc imake_boot ; make install.include --- k2ksrc install --- cd ../k2ksrc imake_boot ; make World --- for fgscan (will be included in World, in k2k99a)--- cd fgscan imake_boot ; make install.include ; make install ; make fgscan --- for fgsim --- cd ../fgsim imake_boot ; make fgsim
For development of codes, users need to checkout a certain library 
into their private work space.
The developped libraries will be installed under 'PRIVATE_ROOT' directory.
For other libs, ones in experiment account will be linked.
Actually, the work will be like..(example for neutrino user) # for IMAKE setenv PRIVATE_ROOT "${home}" alias make 'make PRIVATE=y' # setenv EXPERIMENT "/u/neutrino/k2k" setenv EXPERIMENT_LEVEL pro setenv EXPERIMENT_ROOT ${EXPERIMENT}/${EXPERIMENT_LEVEL} setenv PACKAGE ${EXPERIMENT} setenv PACKAGE_LEVEL ${EXPERIMENT_LEVEL} setenv PACKAGE_ROOT ${PACKAGE}/${PACKAGE_LEVEL} source ${EXPERIMENT}/bin/imake.cshrc set path=($path ${EXPERIMENT}/bin \ ${EXPERIMENT_ROOT}/bin/`${EXPERIMENT}/bin/Machine`) #
cd mkdir work cd work cvs checkout mcsft cvs checkout fgsim cd mcsft (improve something...) imake_boot ; make clean ; make install.include ; make install cd ../fgsim imake_boot ; make fgsim (try to figure out the change is okay or not..)