# mkgra.sh,  6 Aug 03
#
# Top level coordinator to graph template building

source ../config.files

#GEN_DATA="1"

$MKGRA hashindent.g $C_CNT_FILE $H_CNT_FILE
$MKGRA incdefline.g $C_CNT_FILE $H_CNT_FILE

if [ $GEN_DATA == 1 ]; then
   gzcat $PP_DIR/*$C_DIRECT_SUFF | awk -f numincl.awk > $LOC_DIA_DIR/all.incl.cnt
   fi
$MKGRA numincl.g $LOC_DIA_DIR/all.incl.cnt
$MKGRA sameincl.g $LOC_DIA_DIR/all.incl.cnt

if [ $GEN_DATA == 1 ]; then
   gzcat $PP_DIR/*$C_BODY_SUFF | awk -f mdefparam.awk > $LOC_DIA_DIR/mdefparam
   gzcat $PP_DIR/*$H_BODY_SUFF | awk -f mdefparam.awk > $LOC_DIA_DIR/mdefparam.h
   fi
$MKGRA mdefparam.g $LOC_DIA_DIR/mdefparam $LOC_DIA_DIR/mdefparam.h

if [ $GEN_DATA == 1 ]; then
   gzcat $PP_DIR/*$C_DIRECT_SUFF | awk -f define.awk > $LOC_DIA_DIR/define_ids
   gzcat $PP_DIR/*$H_DIRECT_SUFF | awk -f define.awk > $LOC_DIA_DIR/define_ids.h
   fi
$MKGRA numdefine.g $LOC_DIA_DIR/define_ids $LOC_DIA_DIR/define_ids.h

if [ $GEN_DATA == 1 ]; then
   gzcat $PP_DIR/*$C_DIRECT_SUFF | awk -f ifnest.awk > $LOC_DIA_DIR/ifnest
   gzcat $PP_DIR/*$H_DIRECT_SUFF | awk -f ifnest.awk > $LOC_DIA_DIR/ifnest.h
   fi
$MKGRA ppifnest.g $LOC_DIA_DIR/ifnest $LOC_DIA_DIR/ifnest.h

