Tero Koskinen wrote: > On Wed, 07 Aug 2013 19:32:09 +0200 > Björn Persson 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