File: adacompiler.in

package info (click to toggle)
adasockets 1.8.4.7-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,712 kB
  • ctags: 70
  • sloc: sh: 8,546; ada: 1,586; makefile: 211; ansic: 120
file content (17 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (3)
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="@GNATMAKE@"

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