File: adacompiler

package info (click to toggle)
adasockets 1.14-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 744 kB
  • sloc: ada: 1,743; ansic: 352; perl: 238; makefile: 233; sh: 162; lisp: 73
file content (17 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh
#
# Extract the directory name from "-o .libs/foobar.lo" and do the move
# after the compilation.
#

GNATMAKE=$1
shift
cline="$@"
fname=`echo $cline | sed -e 's/^.* -o \([^ ]*\)$/\1/'`
rname=`basename $fname | sed -e 's/lo$/o/'`
cline=`echo $cline | sed -e "s, -o \([^ ]*\)\$,,"`
$GNATMAKE -f -u $cline
if [ "$rname" != "$fname" ]; then
  echo mv $rname $fname
  mv $rname $fname
fi