File: projects

package info (click to toggle)
libgnatcoll 24.1.20230921-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,660 kB
  • sloc: ada: 55,966; python: 1,296; ansic: 905; makefile: 236; sh: 149
file content (32 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (3)
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 "$AUTOPKGTEST_TMP"

# From docs/projects.rst.
# Checks that libgnatcoll-dev depends libgpr-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 -v $P.gpr -gnata
./$E