#! /bin/csh -f
#
# run makefile to check need to run python generator "nbigen"
#  try to make sure a code developer environment exists...
#
   @ itest = 0

   if ( $?CODESYSDIR ) then
     @ itest++
   endif

   if ( $?DBGDIR ) then
     @ itest++
   endif

   if ( $?WORKSTATION_TYPE ) then
     if ( "$WORKSTATION_TYPE" == "LINUX" ) then
       if ( $?FORTRAN_VARIANT ) then
         @ itest++
       endif
     else 
       @ itest++
     endif
   endif

   if ( $itest == 3 ) then

     if ( ! -d $BUILD/marker/nubeam ) then
       echo "%nbigen_check: $BUILD/marker/nubeam directory not found"
       echo " (early exit) "
       exit 1
     endif

     make -f nbigen.make

   endif
