File: projects

package info (click to toggle)
libgnatcoll 1.7gpl2015-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,280 kB
  • ctags: 1,124
  • sloc: ada: 134,072; python: 4,017; cpp: 1,397; ansic: 1,234; makefile: 368; sh: 152; xml: 31; sql: 6
file content (32 lines) | stat: -rw-r--r-- 640 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
gprbuild $P.gpr -gnata
./$E