-
Notifications
You must be signed in to change notification settings - Fork 0
/
adalinker.in
76 lines (64 loc) · 1.75 KB
/
adalinker.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
##----------------------------------------------------------------------------
##
## Automated system of air traffic management and management
##
##----------------------------------------------------------------------------
##! <Copyright>
##! Copyright (C) 2005 ТехноСерв А/С
##!
##! <Unit> adalinker.in
##! <Purpose>
##! A script for running the Ada programming language editor from
##! the libtool package.
##!
##! <Effects>
##! <ImplementationNotes>
##! The initial version is based on a similar module from the
##! PolyORB package.
##!
##! <PortabilityIssues>
##! <AnticipatedChanges>
##----------------------------------------------------------------------------
## $Revision: 3422 $ $Author: godunko $
## $Date: 2006-09-16 13:59:18 +0400 (Сбт, 16 Сен 2006) $
##----------------------------------------------------------------------------
GNATMAKE="@GNATMAKE@"
abs_top_builddir="@abs_top_builddir@"
## Selecting a list of object files.
while [ $# -ne 0 ]; do
case "$1" in
*.o)
allobjs="${allobjs} ${1}"
shift
;;
-I*)
args="${args} ${1}"
SEARCHDIRS="${SEARCHDIRS} "`cd "${1#-I}" && pwd`
shift
;;
-largs)
break
;;
*)
args="${args} ${1}"
shift
;;
esac
done
## Deleting object files corresponding to Ada compilation units.
for file in ${allobjs}; do
incl=1
for dir in ${SEARCHDIRS}; do
if [ -f ${dir}/${file/%.o/.ads} ]; then
incl=0
break
fi
done
if [ ${incl} -ne 0 ]; then
objs="${objs} ${file}"
fi
done
## Call gnatmake to build the program.
echo $GNATMAKE -b -l ${args} -largs "$@" ${objs} -bargs -E
$GNATMAKE -b -l ${args} -largs "$@" ${objs} -bargs -E