From: "Rego, P." <pvrego@gmail.com>
Subject: Re: Converting a simple makefile in a GPS project.
Date: Thu, 26 Apr 2012 21:07:09 -0700 (PDT)
Date: 2012-04-26T21:07:09-07:00 [thread overview]
Message-ID: <22488837.1024.1335499629707.JavaMail.geo-discussion-forums@yncd3> (raw)
In-Reply-To: <82ty09gw8s.fsf@stephe-leake.org>
> I'd have given up on gpr and kept the makefile, since it's simpler (and
> better documented); why are you bothering with the gpr file?
I did not find a way of using the makefiles properly in GPS without having to configure the Build>Settings>Targets Compile/Build options and without messing up my OS configurations on other GPS projects (with other cross-compilers, etc); but actually I did not look for it harder. Running the makefiles from command-line or emacs is no problem, but I like to code using GPS stuffs, so I found that .gpr configs are easier (however the documentation does not help so much).
> Here's what I use to run 'auto_text_io', which is similar. First,
> auto_text_io.xml, in <gnat>/share/gprconfig:
>
> <?xml version="1.0" ?>
> <!-- Run auto_text_io
>
> To tell gprbuild how to run auto_text_io:
>
> copy this file to <gnat>/share/gprconfig
>
> use gprbuild - -autoconf
>
> -->
> <gprconfig>
> <compiler_description>
> <name>Auto_Text_IO</name>
> <executable>auto_text_io</executable>
> <languages>Auto_Text_IO</languages>
> <version>
> <external>auto_text_io -?</external>
> <grep regexp="auto_text_io version .*"/>
> </version>
> <!-- target must match gprconfig target -->
> <target>
> <external>${PREFIX}gcc -dumpmachine</external>
> <grep regexp="[^\r\n]+"></grep>
> </target>
> </compiler_description>
>
> <configuration>
> <compilers>
> <compiler language="Auto_Text_IO"/>
> </compilers>
> <config>
> package Compiler is
> for Driver ("Auto_Text_IO") use "${PATH}auto_text_io";
> for Include_Path ("Auto_Text_IO") use "ADA_INCLUDE_PATH";
> for Required_Switches ("Auto_Text_IO") use ("-f");
> for Dependency_Switches ("Auto_Text_IO") use ("-M");
> end Compiler;
> package Naming is
> for Body_Suffix ("Auto_Text_IO") use ".ads";
> end Naming;
> for Inherit_Source_Path ("Auto_Text_IO") use ("Ada");
> for Object_Generated ("Auto_Text_IO") use "false";
> </config>
> </configuration>
> </gprconfig>
>
>
> Then a gpr file sal_text_io.gpr:
>
> project SAL_Text_IO is
> for Languages use ("Auto_Text_IO");
> for Source_Dirs use
> ("../Source_Common");
> for Object_Dir use "auto";
> for Source_Files use
> ("sal-gen_math-gen_den_hart.ads",
> "sal-gen_math-gen_dof_2.ads",
> "sal-gen_math-gen_dof_3.ads",
> "sal-gen_math-gen_dof_6.ads",
> "sal-gen_math-gen_manipulator.ads",
> "sal-gen_math-gen_polynomials.ads",
> "sal-gen_math-gen_scalar.ads",
> "sal-interfaces_more.ads",
> "sal-time_conversions.ads");
> end SAL_Text_IO;
>
> and a makefile rule to run it:
>
> text_io :
> gprbuild -p -k --autoconf=../auto/auto.cgpr --target=x86-windows -Psal_text_io.gpr
>
> Your application should be similar.
Thanks again. I will try it.
next prev parent reply other threads:[~2012-04-27 4:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 1:52 Converting a simple makefile in a GPS project Rego, P.
2012-04-18 12:45 ` Rolf
2012-04-21 19:56 ` Rego, P.
2012-04-18 12:49 ` Stephen Leake
2012-04-21 19:54 ` Rego, P.
2012-04-22 4:09 ` Configuring --RTS=? on GPS Rego, P.
2012-04-22 14:18 ` Converting a simple makefile in a GPS project Stephen Leake
2012-04-22 15:30 ` Simon Wright
2012-04-23 2:09 ` Rego, P.
2012-04-23 2:04 ` Rego, P.
2012-04-21 19:57 ` Rego, P.
2012-04-23 2:34 ` Rego, P.
2012-04-24 12:17 ` Stephen Leake
2012-04-27 4:07 ` Rego, P. [this message]
[not found] ` <30582310.1752.1335499373911.JavaMail.geo-discussion-forums@ynjj16>
2012-04-28 7:05 ` Stephen Leake
2012-04-30 2:41 ` Rego, P.
2012-04-30 2:43 ` Rego, P.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox