4
echo "Usage: gate project-file"
8
echo Generating Ada files...
11
file=`cd $dir; pwd`/`basename $1`
12
info=`gate-in.exe -p -s -x $file`
15
if [ $stat != 0 ]; then
16
if [ $stat = 2 ]; then
20
echo "Couldn't parse $file Exiting."
26
if [ "$1" = "<no_name>" ]; then
32
if [ "$2" = "<no_name>" ]; then
34
psrcdir="the current directory"
41
# Copy any pixmap files from pixdir to srcdir
45
if [ "$pixdir" != "<no_name>" -a -d $dir/$pixdir ]; then
46
cp $dir/$pixdir/*xpm $dir/$srcdir > /dev/null 2>&1
53
echo "Couldn't change to $dir/$srcdir, aborting."
58
mkdir -p $gt > /dev/null 2>&1
63
gate-in.exe $file > $tmp/gate.ada
66
echo "Couldn't generate Ada code. Exiting."
71
if gnatchop gate.ada > /dev/null 2>&1; then
74
echo "Warning: gnatchop returned non zero status."
81
if [ "@MERGE_AVAIL@" = "True" ]; then
83
echo "Merge of some changes failed. It usually means that some modified code
84
is obsolete in the current project file.
85
Conflicts have been kept in the following files to help merging manually:
90
@MERGE@ $j $gt/$j $tmp/$j 2>/dev/null
97
echo "$j" >> $gt/conflicts.txt
101
echo "The following files have been created/updated in $psrcdir:"
107
if [ $conflicts = 1 ]; then
108
cat $gt/conflicts.txt | gdialog error justify_left
115
/bin/rm -f $gt/gate.difs
118
@DIFF@ $gt/$j $j >> $gt/gate.difs 2>/dev/null
122
/bin/rm -f *.rej *.orig
124
if cat $gt/gate.difs | @PATCH@ > $gt/patch.out 2>&1; then
125
echo "The following files have been created/updated in $psrcdir:"
133
echo "The following files have been updated in $psrcdir:"
139
cat << EOF | gdialog error justify_left
140
Merge of some changes failed. It usually means that some modified code
141
is obsolete in the current project file.
142
.rej files have been generated to help merging manually if needed.
149
/bin/mv -f $tmp/* $gt/