#!/bin/csh -f
# Runs GDMO compiler without Attribute Compiler 
# to produce C++ source for OSIMIS.

if (!($?OSIMISETCPATH)) then
    echo Set environment variable OSIMISETCPATH before use
    exit 1
endif

# Set the values of GDMODIR as required
setenv GDMODIR $OSIMISETCPATH/gdmodir
set gdmo=gdmo

if (-e $OSIMISETCPATH/../bin/gdmo) then
    set gdmo=$OSIMISETCPATH/../bin/gdmo
endif

if ($#argv == 2) then
     $gdmo $1 -s $2
     exit 0
endif

if ($#argv == 1) then
    $gdmo $1 
    exit 0
endif

echo Usage: run-gdmo \<GDMOFile\> \<Syntax database name\>
exit 1
