comp.lang.ada
 help / color / mirror / Atom feed
* Two questions about gpr files
@ 2014-04-05  8:01 mockturtle
  2014-04-05 11:19 ` Simon Wright
  2014-04-08  8:07 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: mockturtle @ 2014-04-05  8:01 UTC (permalink / raw)


Dear all, 
in my spare time I am writing a program that I would like

  (a)  to run on different systems (e.g., Windows, Linux, ...) 
despite the fact that it needs to access to some system-specific 
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 *.gpr file the type of system and if a given project file is present.  For example, with something like

  case OS is
    when "Linux" =>
      OS_Dependent_Source_Dir := "src/linux";

    when "Windows" =>
      OS_Dependent_Source_Dir := "src/win";
  end case;

Well, you got the idea... (to be honest, I cannot imagine how to do a "conditional with" of gtkada.gpr with the current syntax).

I looked around the gprbuild documentation, but I was not able to find anything.  I know I could use external variables, such as reading environment variables or use the -X switch, but I would like a solution that works on any OS (OK, most of the commonly used OSes :-) and it requires no special intervention from the user that compiles the code.

Any ideas?

Thank you in advance for any help.

Riccardo




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-08  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-05  8:01 Two questions about gpr files mockturtle
2014-04-05 11:19 ` Simon Wright
2014-04-08  8:07 ` Stephen Leake
2014-04-08  9:38   ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox