From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.109.200 with SMTP id hu8mr2147303obb.20.1396684911119; Sat, 05 Apr 2014 01:01:51 -0700 (PDT) X-Received: by 10.182.191.98 with SMTP id gx2mr6537obc.22.1396684911021; Sat, 05 Apr 2014 01:01:51 -0700 (PDT) Path: border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin2!goblin.stu.neva.ru!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.85.213.215.MISMATCH!l13no3154629iga.0!news-out.google.com!gi6ni200igc.0!nntp.google.com!l13no3154625iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 5 Apr 2014 01:01:50 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.37.247.31; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 93.37.247.31 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Two questions about gpr files From: mockturtle Injection-Date: Sat, 05 Apr 2014 08:01:51 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:185550 Date: 2014-04-05T01:01:50-07:00 List-Id: Dear all,=20 in my spare time I am writing a program that I would like (a) to run on different systems (e.g., Windows, Linux, ...)=20 despite the fact that it needs to access to some system-specific=20 features that are outside the scope of the standard. (b) to use a GTK-based interface, but falling down to a text-based one (e.g., ncurses) if GTK is not available at compilation time I could solve those two problems if it was possible to find within the *.gp= r file the type of system and if a given project file is present. For exam= ple, with something like case OS is when "Linux" =3D> OS_Dependent_Source_Dir :=3D "src/linux"; when "Windows" =3D> OS_Dependent_Source_Dir :=3D "src/win"; end case; Well, you got the idea... (to be honest, I cannot imagine how to do a "cond= itional with" of gtkada.gpr with the current syntax). I looked around the gprbuild documentation, but I was not able to find anyt= hing. I know I could use external variables, such as reading environment v= ariables or use the -X switch, but I would like a solution that works on an= y OS (OK, most of the commonly used OSes :-) and it requires no special int= ervention from the user that compiles the code. Any ideas? Thank you in advance for any help. Riccardo