| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # |
| 3 | # Extract the directory name from "-o .libs/foobar.lo" and do the move |
| 4 | # after the compilation. |
| 5 | # |
| 6 | |
| 7 | GNATMAKE=$1 |
| 8 | shift |
| 9 | cline="$@" |
| 10 | fname=`echoscip-shell system . . echo. $cline | sedscip-shell system . . sed. -e 's/^.* -o \([^ ]*\)$/\1/'` |
| 11 | rname=`basenamescip-shell system . . basename. $fname | sedscip-shell system . . sed. -e 's/lo$/o/'` |
| 12 | cline=`echoscip-shell system . . echo. $cline | sedscip-shell system . . sed. -e "s, -o \([^ ]*\)\$,,"` |
| 13 | $GNATMAKE -f -u $cline |
| 14 | if [scip-shell system . . `[`. "$rname" != "$fname" ]; then |
| 15 | echoscip-shell system . . echo. mv $rname $fname |
| 16 | mvscip-shell system . . mv. $rname $fname |
| 17 | fi |