comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <Bjorn@xn--rombobjrn-67a.se>
Subject: Re: Introducing Comfignat
Date: Mon, 12 Aug 2013 11:03:57 +0200
Date: 2013-08-12T11:03:57+02:00	[thread overview]
Message-ID: <1376298237.5037.16.camel@speedy.xn--rombobjrn-67a.se> (raw)
In-Reply-To: <20130810175217.04eb4dc639e40f35e96be212@iki.fi>

[-- Attachment #1: Type: text/plain, Size: 2683 bytes --]

Tero Koskinen wrote:
> On Wed, 07 Aug 2013 19:32:09 +0200
> Björn Persson <Bjorn@xn--rombobjrn-67a.se> wrote:
> 
> > Last Friday I published the first release of Comfignat. Comfignat is
> > common, convenient, command-line-controlled compile-time configuration
> > of software built with the GNAT tools on Unix-like operating systems.
> 
> I tried to apply comfignat for my Ahven project[1].

Thank you. This should make it easy to package Ahven in Fedora, and then
we can run the test suites of Anet, which is now packaged without the
tests, and Alog and the Trusted Key Manager, which I want to package.

> While it
> was mostly straightforward, I have some questions:
> 
> How do you control what goes to staging directory?
> 
> For me, only two source files (out of ~20 or so) goes there:
> % find gnat/stage -type f
> gnat/stage/usr/local/share/gpr/ahven.gpr
> gnat/stage/usr/local/include/ahven/ahven.ads
> gnat/stage/usr/local/include/ahven/ahven.adb
> gnat/stage/usr/local/lib/ahven/ahven.ali
> gnat/stage/usr/local/lib/libahven.so.24
> %

GPRbuild or Gnatmake copies the source files. It's supposed to be only
those files that are needed for compiling code that uses the library,
that is the specifications of the interface packages and those bodies
that contain generics or inlined subprograms. Your build project says
“for Library_Interface use ("Ahven");”, so the package Ahven is the only
interface package. It contains a generic procedure. Therefore ahven.ads
and ahven.adb are staged.

> Also, how do I get documentation (built by a separate Python tool)
> there (easily)?

Comfignat doesn't know about the Python tool so you'll need to write a
rule in your makefile to invoke it. To get the documentation staged you
should use the Make variables stage_mandir (for manpages), stage_infodir
(for the Info format) and stage_miscdocdir (for other documentation). 

Hopefully the tool allows you to specify an output directory, and then
you can tell it to write directly to "${stage_miscdocdir}/ahven" for
example.

In case the tool is hardcoded to write the files in the source tree,
your makefile will have to copy them to the appropriate directories. In
that case the tool also doesn't support out-of-tree builds, but will
write the files in the source tree even when a separate build directory
is used, so you'll be copying from srcdir. The commands might be:

  mkdir -p "${stage_miscdocdir}/ahven"
  cp -RPp ${srcdir}/some/where/* "${stage_miscdocdir}/ahven/"

A possible future extension to Comfignat might be additional makefile
modules for some popular documentation generators.

Björn Persson


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-08-12  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 17:32 Introducing Comfignat Björn Persson
2013-08-07 18:01 ` Simon Wright
2013-08-07 19:00   ` Björn Persson
2013-08-10 14:52 ` Tero Koskinen
2013-08-12  9:03   ` Björn Persson [this message]
2013-08-13 14:24     ` Tero Koskinen
2013-08-14 13:13       ` Crash problem with GNAT in Fedora 18 (was: Introducing Comfignat) Björn Persson
2013-08-20  5:10         ` Crash problem with GNAT in Fedora 18 Tero Koskinen
2013-08-20  7:26           ` Simon Wright
2013-08-24  8:34           ` Björn Persson
replies disabled

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