File: projects

package info (click to toggle)
libgnatcoll 1.6gpl2014-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 22,760 kB
  • ctags: 10,162
  • sloc: ada: 132,013; ansic: 94,291; python: 3,762; sh: 2,781; cpp: 1,394; makefile: 342; xml: 31; sql: 6
file content (32 lines) | stat: -rw-r--r-- 646 bytes parent folder | download
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
#!/bin/sh
set -C -e -f -u

cd "$ADTTMP"

# From docs/projects.rst.
# Checks that libgnatcoll-dev depends libgnatprj-dev.

E=exec
P=proj

cat > $E.adb <<EOF
with GNATCOLL.Projects; use GNATCOLL.Projects;
with GNATCOLL.VFS;      use GNATCOLL.VFS;
procedure $E is
   Tree  : Project_Tree;
   Files : File_Array_Access;
begin
   Tree.Load (GNATCOLL.VFS.Create ("$P.gpr"));
   Files := Tree.Root_Project.Source_Files;
   pragma Assert (Files'Length = 1 and then Files (1).Base_Name = "$E.adb");
   Tree.Unload;
end $E;
EOF
cat > $P.gpr <<EOF
with "gnatcoll.gpr";
project $P is
   for Main use ("$E.adb");
end $P;
EOF
gnatmake -P $P.gpr -q -gnata
./$E